AVS Logic Implementation

Every AVS must implement both execution and validation logic.

We recommend to use the AVS Samples repository as a boilerplate for your AVS. It provides an example implementation that helps clarify how the network functions and allows you to get up and running.

Structure


The AVS logic implementation consists of two main components:

Each component runs as a separate service: Execution_Service handles execution, while Validation_Service is responsible for validation.

Task Execution

The Task Performer must create a proofOfTask, which can be validated by Attester Nodes. This proof could be the result of a calculation, a ZK proof, the CID of a JSON on IPFS, etc. Task Validation implementation should be able to use this proof to attest to the task properly.

In order to publish the task, the Task Performer must send a JSON-RPC request to an arbitrary node on the network, which propagates to its peers. See the sendTask function in the Task_Performer module to learn how to send such requests.

Task Validation

Attester nodes are responsible for running the Validation Service, which contains the task validation logic. This is similar to how the Consensus Client communicates with the Execution Client in Ethereum.

The Validation Service must implement the /task/validate endpoint.

When an Attester receives a proof of task from the Performer, it uses the Validation Service API endpoint to verify the task.

Last updated