Description
This is more a question for design clarification
Describe the bug
Running tests of the Demo (Incredible Squaring AVS) with a POS DevNet I hit the invalid reference block error (more in Layr-Labs/incredible-squaring-avs#61).
It is trigger because the check enforce that a block has to be from the past. In the real Ethereum network, a block is a unit of time of around 12 seconds. If I understand correctly, every AVS can fail in the same way as the Demo in my tests, if conformation of the task comes in period shorted than a block.
That might not be a bug, but rather a feature/design choice (e.g. because in real life/production, a task won't have time to be deal in less than 12 seconds).
To Reproduce
- Deploy iv1 (or other pos-devnet with right version of the EigenLayer contracts) - https://github.com/ivy-net/iv1
- Deploy Demo AVS: in the https://github.com/Layr-Labs/incredible-squaring-avs run following commands
(cd contracts ; forge script script/IncredibleSquaringDeployer.s.sol --rpc-url http://localhost:8545 --broadcast --unlocked --sender 0x123463a4b065722e99115d6c222f267d9cabb524 )
- TopUp operator:
make DEPLOYER_PRIVATE_KEY=0x2e0834786285daccd064ca17f1654f67b4aef298acbb82cef9ec422fb4975622 CHAINID=32382 send-fund
- start aggregator
make CHAINID=32382 start-aggregator
- start operator
make CHAINID=32382 start-operator
Expected behavior
Tasks should be validated in the same block
Environment
https://github.com/ivy-net/iv1
Potential solutions
- make clear in https://github.com/Layr-Labs/eigenlayer-contracts/blob/b087c530e002861818f0eb052eaa315b64cbf506/docs/experimental/AVS-Guide.md?plain=1#L102 what does 'briefly' mean, and ideally adjust the Demo AVS to work not only in ANVIL/POW networks, by ensuring that tasks
- revert back the change enforcing the block to be in the past
- Low priority and not a lot of work