josepchetrit12 / hello-world-avs

Hello World AVS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hello World AVS

Welcome to the Hello World AVS.

This project shows you the simplest functionality you can expect from an AVS.

It will give you a concrete understanding of the basic components.

hello-world-png

There are 5 steps to this AVS:

  • AVS consumer requests a "Hello World" message to be generated and signed
  • AVS takes on the request by emitting an event for operators to pick up the request
  • any operator who is staked to serve this AVS takes this request, generates this message and signs it
  • the operator submits this message with their signature back to the AVS
  • if the operator is in fact registered to the AVS and has the minimum needed stake, the submission is accepted

That's it. This simple flow highlights some of the core mechanics of how AVSs work.

Where additional sophistication with AVSs come into the picture:

  • the nature of the request is more sophisicated than generating a constant string
  • the operators might need to coordinate with each other
  • the type of signature is different based on the constraints of the service
  • the type and amount of security used to secure the AVS
  • and so on...

Quick Start

Dependencies

  1. npm
  2. Foundry
  3. Docker

Steps

  1. Make sure Docker is running

  2. Run make start-chain-with-contracts-deployed

    2.1 This will build the contracts, start an Anvil chain, deploy the contracts to it, and leaves the chain running in the current terminal

  3. Open new terminal tab and run make start-operator

    3.1 This will compile the AVS software and start monitering new tasks

  4. Open new terminal tab and run make spam-tasks (Optional)

    4.1 This will spam the AVS with random names every 15 seconds

Extensions

  • Operator needs a minimum stake amount to make submissions
  • Add another strategy to the AVS
  • Operator must respond within a certain number of blocks

About

Hello World AVS

License:MIT License


Languages

Language:TypeScript 52.7%Language:Solidity 35.8%Language:Shell 8.4%Language:Makefile 2.9%Language:Dockerfile 0.1%