AVS Task Management
Zellular providing a cost-efficient and high-throughput task manager for EigenLayer AVS
Last updated
Zellular providing a cost-efficient and high-throughput task manager for EigenLayer AVS
Last updated
Typically, AVS developers use blockchain smart contracts to manage their tasks. However, relying on the blockchain can be expensive and slow.
Zellular, a lightweight consensus-as-a-service AVS, serves as an excellent alternative to blockchain smart contracts for AVS task management. It operates more simply, efficiently, and cost-effectively, boasting a much higher throughput. Any AVS can use Zellular as a decentralized messaging queue to share events among their nodes.
Let’s explore how to update the Incredible Squaring AVS to use Zellular instead of a blockchain for task management.
First, an object needs to be built to connect to Zellular as the task manager. To do that, replace the following code block that connects to the task manager smart contract:
with the following code block that connects to Zellular as the task manager:
The next step is for the task generator to post tasks to Zellular instead of a blockchain. To do so, replace the code block for posting to the blockchain:
with the following code block for posting to Zellular:
The last step is to update the squaring operators to listen for NewTaskCreated events on Zellular instead of a blockchain. For that, replace the code block for listening to events emitted by the task manager contract:
with the code block that listens to Zellular for getting events:
Note that what we reviewed above, about using Zellular as the task manager of incredible squaring, is not a complete working solution, but a mere example to demonstrate how an AVS integration with Zellular works out.
The most significant problem with using a blockchain for AVS task management is its high costs. The costs are not limited to posting transactions for emitting events. Reading events from the blockchain through third-party RPC or subgraph service providers incurs higher costs compared to sending the transactions that emit the events. This is especially true since each AVS node must pay these costs separately; having tens of nodes results in the expenses multiplying tens of times!
Costs are not the only problem with using blockchains. AVS services often need high throughput rates that are simply not possible on blockchains. Using Zellular provides far higher throughput while curbing the costs exponentially. But that’s not all!
All nodes in an AVS typically use an RPC or subgraph service run by a third-party provider to access the blockchain. They do not run a blockchain node themselves, which introduces the risk of a single point of failure and reduces the AVS’s security.
In contrast, when events are read from Zellular instead of a blockchain, there is no need to rely on third-party providers. Events can be directly read from Zellular AVS nodes. Additionally, even though events can be received from any random Zellular node, there is always an aggregated signature on all responses, proving that the majority of Zellular nodes have verified the data’s validity. Unlike using blockchain, Zellular removes the need for trust in any individual node to read the events.
When building a decentralised service as an EigenLayer AVS, the first step is to define the tasks that validators will perform. For example, in the popular sample, nodes are responsible for calculating the square of a number provided by a task generator through a .