Skip to content

Conversation

@JuArce
Copy link
Collaborator

@JuArce JuArce commented May 14, 2025

Update contracts to new eigenlayer version

Description

This PR updates the deployed contracts in ethreum package.

  • Update prefunded accounts
  • Update preloaded contracts
  • Update make targets
  • Update config files
  • Add targets for proof aggregator
  • Set consensus client port

Note: Anvil and Ethereum Package have the same contracts addresses, so the SDK is fully compatible with both using Network::devnet

Closes #1936

How to Test

Update Kurtosis

  1. You need to have the latest version of Kurtosis
brew install kurtosis-tech/tap/kurtosis-cli
  1. Check Kurtosis version
kurtosis version
  1. Output must be:
CLI Version:   1.8.0

Test Aggregation Layer

  1. Run Ethereum Package
make ethereum_package_start
  1. It should show logs like this:
INFO[2025-05-15T10:43:01-03:00] ================================================
INFO[2025-05-15T10:43:01-03:00] ||          Created enclave: aligned          ||
INFO[2025-05-15T10:43:01-03:00] ================================================
Name:            aligned
UUID:            617a7b9f8976
Status:          RUNNING
Creation Time:   Thu, 15 May 2025 10:42:24 -03
Flags:

========================================= Files Artifacts =========================================
UUID           Name
c87e11745f47   1-lighthouse-reth-0-31
daebbe91ff03   2-lighthouse-reth-32-63
df35f117ebf7   assertoor-config
833b631349f0   assertoor-tests
85f178b08863   dora-config
4f1f61948bea   el_cl_genesis_data
3e885760cd5c   final-genesis-timestamp
353255b26e31   genesis-el-cl-env-file
740482804ff4   genesis_validators_root
029b6b374da1   grafana-config
66c2f3bdadce   grafana-dashboards
75ab00ca3df1   jwt_file
2b06c1ae194b   keymanager_file
71c21cf350c9   prometheus-config
f4af2c1d85d7   prysm-password
895b12cb384e   validator-ranges

========================================== User Services ==========================================
UUID           Name                                             Ports                                         Status
80be2bb093cf   assertoor                                        http: 8080/tcp -> http://127.0.0.1:58822      RUNNING
8c9b6599112a   cl-1-lighthouse-reth                             http: 4000/tcp -> http://127.0.0.1:58810      RUNNING
                                                                metrics: 5054/tcp -> http://127.0.0.1:58808
                                                                quic-discovery: 9001/udp -> 127.0.0.1:56294
                                                                tcp-discovery: 9000/tcp -> 127.0.0.1:58809
                                                                udp-discovery: 9000/udp -> 127.0.0.1:53091
5d6c85c430b5   cl-2-lighthouse-reth                             http: 4000/tcp -> http://127.0.0.1:58811      RUNNING
                                                                metrics: 5054/tcp -> http://127.0.0.1:58812
                                                                quic-discovery: 9001/udp -> 127.0.0.1:55543
                                                                tcp-discovery: 9000/tcp -> 127.0.0.1:58813
                                                                udp-discovery: 9000/udp -> 127.0.0.1:52095
cabb39ce9e7a   dora                                             http: 8080/tcp -> http://127.0.0.1:58818      RUNNING
d72bc4a846a1   el-1-reth-lighthouse                             engine-rpc: 8551/tcp -> 127.0.0.1:8543        RUNNING
                                                                metrics: 9001/tcp -> http://127.0.0.1:8544
                                                                rpc: 8545/tcp -> 127.0.0.1:8545
                                                                tcp-discovery: 8542/tcp -> 127.0.0.1:8542
                                                                udp-discovery: 8542/udp -> 127.0.0.1:8542
                                                                ws: 8546/tcp -> 127.0.0.1:8546
1f1b27da08ea   el-2-reth-lighthouse                             engine-rpc: 8551/tcp -> 127.0.0.1:8549        RUNNING
                                                                metrics: 9001/tcp -> http://127.0.0.1:8550
                                                                rpc: 8545/tcp -> 127.0.0.1:8551
                                                                tcp-discovery: 8548/tcp -> 127.0.0.1:8548
                                                                udp-discovery: 8548/udp -> 127.0.0.1:8548
                                                                ws: 8546/tcp -> 127.0.0.1:8552
6c4e13761f24   ethereum-metrics-exporter-1-lighthouse-reth      http: 9090/tcp -> http://127.0.0.1:58814      RUNNING
5bbd8770ab92   ethereum-metrics-exporter-2-lighthouse-reth      http: 9090/tcp -> http://127.0.0.1:58816      RUNNING
18092b75c0b4   grafana                                          http: 3000/tcp -> http://127.0.0.1:58836      RUNNING
4f22999150df   prometheus                                       http: 9090/tcp -> http://127.0.0.1:58825      RUNNING
2b73994fde96   validator-key-generation-cl-validator-keystore   <none>                                        RUNNING
1e0a51548142   vc-1-reth-lighthouse                             metrics: 8080/tcp -> http://127.0.0.1:58815   RUNNING
962aeb769261   vc-2-reth-lighthouse                             metrics: 8080/tcp -> http://127.0.0.1:58817   RUNNING

  1. Run batcher
make batcher_start_ethereum_package
  1. Run explorer

Set the following values in explorer/.env

# Network
RPC_URL=http://localhost:8545
ENVIRONMENT=devnet

# Elixir
PHX_HOST=localhost
ELIXIR_HOSTNAME=MAC

# Database
DB_NAME=explorer_db
DB_USER=explorer_user
DB_PASS=explorer_pass
DB_HOST=localhost

# Config file
ALIGNED_CONFIG_FILE="../contracts/script/output/devnet/alignedlayer_deployment_output.json"
ALIGNED_PROOF_AGG_CONFIG_FILE="../contracts/script/output/devnet/proof_aggregation_service_deployment_output.json"
BEACON_CLIENT="http://127.0.0.1:58801"

# Debug
DEBUG_ERRORS=true

# Operator version tracker API
TRACKER_API_URL=http://localhost:3030

MAX_BATCH_SIZE=268435456 # 256 MiB

BATCH_TTL_MINUTES=5
SCHEDULED_BATCH_INTERVAL_MINUTES=10
make run_explorer

Note: If you see errors with docker container, run make explorer_build_db

  1. Run aggregator
make aggregator_start_ethereum_package ENVIRONMENT=devnet
  1. Register and start operator
make operator_register_start_ethereum_package
  1. Send proofs
make batcher_send_risc0_burst
make batcher_send_sp1_burst
  1. Check the explorer to see the latest batches http://localhost:4000/batches
image

Do not stop Ethereum Package so you can test the aggregation mode with the proofs already sent

Test Aggregation Mode

Note: aggregated proofs in dev won't be displayed in the explorer

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

Note: This step takes several minutes

  1. Run aggregation mode for SP1 with proving using GPU
make start_proof_aggregator_gpu_ethereum_package AGGREGATOR=sp1
  1. Check the explorer to see the latest aggregated proofs http://localhost:4000/aggregated_proofs
image
  1. Use the SDK to check if your proof was verified by the aggregation mode
cd batcher/aligned/ && \
	cargo run verify-agg-proof \
		--network devnet \
		--from-block 0 \
		--proving_system SP1 \
		--public_input ../../scripts/test_files/sp1/sp1_fibonacci_4_1_3.pub \
		--program-id-file ../../scripts/test_files/sp1/sp1_fibonacci_4_1_3.vk \
		--beacon_url http://localhost:58801\
		--rpc_url http://localhost:8545

The output must be:

[2025-05-15T14:53:41Z INFO  aligned] Your proof has been verified in the aggregated proof with merkle root 0x8e7539080525ff2483d7f2a6ee126ea167e2a283ab8ee7dbaeddb4488c026841

Type of change

  • Feature
  • Bug fix

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 JuArce self-assigned this May 14, 2025
@JuArce JuArce marked this pull request as draft May 14, 2025 16:57
Base automatically changed from 1894-fix-update-eigenlayer-contracts-for-devnet to staging May 14, 2025 19:16
@JuArce JuArce marked this pull request as ready for review May 15, 2025 14:45
@MauroToscano MauroToscano changed the title fix(ethereum_package): update contracts to new eigenlayer version fix(ethereum_package): run localnet/devnet on Ethereum package May 15, 2025
@MauroToscano MauroToscano changed the title fix(ethereum_package): run localnet/devnet on Ethereum package fix(ethereum_package): fix localnet/devnet on Ethereum package May 15, 2025
Copy link
Member

@MarcosNicolau MarcosNicolau left a comment

Choose a reason for hiding this comment

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

Worked for me. I had to change the ports in the ethereum-packageconfigs for the fallback nodes, maybe there is a way to make them deterministic.

@JuArce
Copy link
Collaborator Author

JuArce commented May 15, 2025

Worked for me. I had to change the ports in the ethereum-packageconfigs for the fallback nodes, maybe there is a way to make them deterministic.

I updated the config files. Ports are deterministic

@JuArce JuArce requested a review from Copilot May 15, 2025 16:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes issues with the Ethereum package by updating deployed contracts to the new eigenlayer version and ensuring configuration consistency for localnet/devnet deployments. Key changes include:

  • Adding default RPC_URL handling in multiple shell scripts.
  • Updating configuration files with new service addresses and fallback endpoints.
  • Introducing new Makefile targets to support Ethereum package proof aggregation and operator management.

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/user_fund_payment_service_devnet.sh Added default RPC_URL check and replaced hardcoded RPC URL in cast commands.
scripts/mint_mock_token.sh Added default RPC_URL check and updated cast call with RPC_URL flag.
scripts/fund_operator_devnet.sh Added default RPC_URL check and replaced hardcoded RPC URL in operator fund commands.
explorer/.env.dev Replaced placeholder BEACON_CLIENT with an explicit localhost URL.
config-files/config-proof-aggregator-mock.yaml Updated configuration with aligned and proof aggregation service addresses.
config-files/config-proof-aggregator-mock-ethereum-package.yaml Added new configuration file for mock aggregator in Ethereum package.
config-files/config-proof-aggregator-ethereum-package.yaml Added new configuration file for production proof aggregator in Ethereum package.
config-files/config-operator-1-ethereum-package.yaml Updated RPC and WS fallback endpoints to match the new network configuration.
config-files/config-batcher-ethereum-package.yaml Updated fallback endpoints to reflect newly assigned ports.
config-files/config-aggregator-ethereum-package.yaml Revised fallback endpoints and adjusted garbage collector settings.
Makefile Added new targets for starting proof aggregators and updated operator start commands.
Comments suppressed due to low confidence (1)

Makefile:1339

  • [nitpick] Ensure that setting ENVIRONMENT=devnet for the operator start target is intentional and consistent with your deployment requirements.
$(MAKE) operator_start ENVIRONMENT=devnet OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 CONFIG_FILE=config-files/config-operator-1-ethereum-package.yaml

@MauroToscano MauroToscano enabled auto-merge May 15, 2025 19:13
@MauroToscano MauroToscano added this pull request to the merge queue May 15, 2025
Merged via the queue into staging with commit a90fd3a May 15, 2025
1 check passed
@MauroToscano MauroToscano deleted the 1936-fixethereum_package-update-contracts-to-new-eigenlayer-version branch May 15, 2025 19:28
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(ethereum_package): update contracts to new eigenlayer version

4 participants