Skip to content

Conversation

@JuArce
Copy link
Collaborator

@JuArce JuArce commented May 13, 2025

Update eigenlayer contracts for devnet

Description

This PR introduces the following changes

  • Update eigenlayer contracts to v1.4.2
  • Eigenlayer contracts are added as submodule, but eigenlayer-middleware keeps using previous version of contracts due to breaking changes and compatibility issues
  • Update foundry version to 1.1.0-stable
  • Added a new target to deploy all contract make anvil_deploy_all_contracts
  • Bump EigenSDK to v0.2.0-beta.1 for Devnet
  • Update DEVNET addresses in the Aligned SDK
  • Enable optimizer in contracts/foundry.toml
  • Migrate operator registration for Devnet
  • Update Docs
  • Update CI

Closes #1894

How to Test

Update Foundry

  1. Update foundry to v1.1.0
foundryup -i v1.1.0
  1. Check foundry version
cast --version
  1. Foundry version must be:
cast Version: 1.1.0-v1.1.0

Update eigenlayer-cli

  1. Update eigenlayer cli to correct version
make install_eigenlayer_cli_devnet
  1. Check CLI version
eigenlayer --version
  1. CLI version must be:
eigenlayer version 0.13.0

Test Aggregation Layer

  1. Run anvil
make anvil_start
  1. Run batcher
make batcher_start_local
  1. Run aggregator
make aggregator_start ENVIRONMENT=devnet
  1. Register and start operator
make operator_full_registration CONFIG_FILE=config-files/config-operator-1.yaml ENVIRONMENT=devnet
make operator_start CONFIG_FILE=config-files/config-operator-1.yaml ENVIRONMENT=devnet
  1. Send proofs
make batcher_send_risc0_burst
make batcher_send_sp1_burst

Do not stop anvil, so you can test the aggregation mode with the proofs already sent

Test Aggregation Mode

  1. Run aggregation mode for SP1 in dev mode
make start_proof_aggregator_dev AGGREGATOR=sp1
  1. Run aggregation mode for Risc0 in dev mode
make start_proof_aggregator_dev AGGREGATOR=risc0
  1. Run aggregation mode for SP1 with proving (it will take some time to finish)
make start_proof_aggregator AGGREGATOR=sp1

Type of change

Please delete options that are not relevant.

  • New feature
  • Bug fix
  • Refactor

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change batcher/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

JuArce added 3 commits May 13, 2025 11:51
fix: update SDK
fix: mint mock tokens and deposit into strategy
fix: whitelist weth strategy in devnet
chore: update sdk
@JuArce JuArce self-assigned this May 13, 2025
@github-actions
Copy link

github-actions bot commented May 13, 2025

Changes to gas cost

Generated at commit: 1e31ccb4ed7eb411d9213764792d41919c0630b1, compared to commit: 837b4fbe4715d1b848b001bf77ce517608ae7d02

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
RegistryCoordinatorHarness blsApkRegistry
stakeRegistry
+354 ❌
+354 ❌
+57.47%
+51.91%
StakeRegistryHarness delegation +146 ❌ +22.19%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Slasher 728,578 (-870,247) initialize 366 (-556) -60.30% 366 (-556) -60.30% 366 (-556) -60.30% 366 (-556) -60.30% 6 (0)
RegistryCoordinatorHarness 5,528,683 (-4,601,377) blsApkRegistry
initialize
stakeRegistry
970 (+354)
55,078,420 (-1,203,055)
1,036 (+354)
+57.47%
-2.14%
+51.91%
970 (+354)
55,078,420 (-1,203,055)
1,036 (+354)
+57.47%
-2.14%
+51.91%
970 (+354)
55,078,420 (-1,203,055)
1,036 (+354)
+57.47%
-2.14%
+51.91%
970 (+354)
55,078,420 (-1,203,055)
1,036 (+354)
+57.47%
-2.14%
+51.91%
6 (0)
6 (0)
6 (0)
StakeRegistryHarness 2,590,172 (-2,549,338) delegation
initializeQuorum
804 (+146)
144,420 (-1,780)
+22.19%
-1.22%
804 (+146)
164,216 (-1,780)
+22.19%
-1.07%
804 (+146)
164,320 (-1,780)
+22.19%
-1.07%
804 (+146)
164,320 (-1,780)
+22.19%
-1.07%
6 (0)
1,152 (0)
AlignedLayerServiceManager 4,398,072 (-3,921,136) batchesState
createNewTask
disableVerifier
disabledVerifiers
enableVerifier
isVerifierDisabled
receive
setDisabledVerifiers
5,132 (-278)
56,898 (-944)
24,602 (+303)
3,030 (+516)
23,748 (-443)
2,406 (-450)
23,301 (-195)
24,243 (-7)
-5.14%
-1.63%
+1.25%
+20.53%
-1.83%
-15.76%
-0.83%
-0.03%
5,132 (-278)
76,859 (-938)
36,191 (+375)
3,030 (+516)
24,388 (-372)
2,406 (-450)
46,835 (-356)
35,262 (+86)
-5.14%
-1.21%
+1.05%
+20.53%
-1.50%
-15.76%
-0.75%
+0.24%
5,132 (-278)
77,002 (-920)
36,191 (+375)
3,030 (+516)
24,388 (-372)
2,406 (-450)
47,115 (-357)
35,262 (+86)
-5.14%
-1.18%
+1.05%
+20.53%
-1.50%
-15.76%
-0.75%
+0.24%
5,132 (-278)
77,836 (-956)
47,780 (+446)
3,030 (+516)
25,029 (-300)
2,406 (-450)
47,115 (-357)
46,282 (+179)
-5.14%
-1.21%
+0.94%
+20.53%
-1.18%
-15.76%
-0.75%
+0.39%
256 (0)
256 (0)
2 (0)
1 (0)
2 (0)
3 (0)
256 (0)
2 (0)
AVSDirectory 1,485,692 (-1,689,090) initialize 97,570 (-3,067) -3.05% 97,570 (-3,067) -3.05% 97,570 (-3,067) -3.05% 97,570 (-3,067) -3.05% 6 (0)
ServiceManagerMock 1,340,500 (-1,292,283) initialize 71,296 (-2,066) -2.82% 71,296 (-2,066) -2.82% 71,296 (-2,066) -2.82% 71,296 (-2,066) -2.82% 6 (0)
ProxyAdmin 412,495 (-345,151) upgrade
upgradeAndCall
38,758 (-883)
55,403,611 (-1,228,407)
-2.23%
-2.17%
38,767 (-883)
55,403,611 (-1,228,407)
-2.23%
-2.17%
38,770 (-883)
55,403,611 (-1,228,407)
-2.23%
-2.17%
38,770 (-883)
55,403,611 (-1,228,407)
-2.23%
-2.17%
24 (0)
6 (0)
BLSApkRegistryHarness 1,676,697 (-1,447,540) initializeQuorum
setBLSPublicKey
45,382 (-596)
89,551 (-556)
-1.30%
-0.62%
45,382 (-596)
89,551 (-556)
-1.30%
-0.62%
45,382 (-596)
89,551 (-556)
-1.30%
-0.62%
45,382 (-596)
89,551 (-556)
-1.30%
-0.62%
1,152 (0)
6 (0)
TransparentUpgradeableProxy 521,513 (-376,486) fallback 1,634 (+90) +5.83% 47,449 (-617) -1.28% 8,200 (+90) +1.11% 119,180 (-820) -0.68% 30 (0)
StrategyManagerMock 1,146,058 (-1,255,314) setAddresses 88,974 (-768) -0.86% 88,974 (-768) -0.86% 88,974 (-768) -0.86% 88,974 (-768) -0.86% 6 (0)
IndexRegistry 917,389 (-790,168) initializeQuorum 45,244 (-348) -0.76% 45,244 (-348) -0.76% 45,244 (-348) -0.76% 45,244 (-348) -0.76% 1,152 (0)

Copy link
Contributor

@MauroToscano MauroToscano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the anvil deploy target for eigen contracts is no longer valid, maybe we should remove it

@JuArce
Copy link
Collaborator Author

JuArce commented May 14, 2025

I think the anvil deploy target for eigen contracts is no longer valid, maybe we should remove it

The target make anvil_deploy_eigen_contracts is still valid. Basically, it uses the solidity script available at contracts/eigenlayer_contracts/eigenlayer-contracts/script/deploy/local/deploy_from_scratch.slashing.s.sol

@MauroToscano MauroToscano added this pull request to the merge queue May 14, 2025
Merged via the queue into staging with commit 57d3209 May 14, 2025
7 checks passed
@MauroToscano MauroToscano deleted the 1894-fix-update-eigenlayer-contracts-for-devnet branch May 14, 2025 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: update EigenLayer contracts compatible with EigenSDK v0.2.0 for Devnet

4 participants