Layr-Labs / hello-world-avs

Hello World AVS
MIT License
58 stars 53 forks source link

The Rust operator does not work #24

Closed wawrzek closed 3 months ago

wawrzek commented 3 months ago

When I try to follow the rust steps, there is the error when starting the rust operator. The node steps are fine.

 > ~/Ethereum/EigenLayer/hello-world-avs > master > make start-rust-operator
cargo run --bin start_operator
warning: missing documentation for the crate
 --> operator/rust/crates/operator/src/lib.rs:3:1
  |
3 | / /// Create createNewTask at regular intervals with random task names
4 | | pub mod spam_tasks;
5 | | /// Register Operator and monitor for NewTaskCreated event
6 | | pub mod start_operator;
7 | | /// test utils
8 | | pub mod test_utils;
  | |___________________^
  |
  = note: requested on the command line with `-W missing-docs`

warning: `hello-world-avs-operator` (lib) generated 1 warning
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.51s
     Running `target/debug/start_operator`
Operator registered on EL successfully
initialize new ecdsa
Failed to register operator: server returned an error response: error code 3: execution reverted: AVSDirectory.registerOperatorToAVS: operator not registered to EigenLayer yet

Location:
    operator/rust/crates/operator/src/start_operator.rs:233:15
damienen commented 3 months ago

I solved (workaround) this by waiting for a few seconds after the EL registration transaction. Basically added a sleep for 15 seconds command

supernovahs commented 3 months ago

Sorry for this , looks like one of the recent push did it . Looking into it. You can checkout to PR 15 meanwhile , it works

supernovahs commented 3 months ago

@NimaVaziri

Gajesh2007 commented 3 months ago

patched https://github.com/Layr-Labs/hello-world-avs/commit/c49ece411b7f3c2ad45b0c2fe4d0710041e0d8cb