-
Notifications
You must be signed in to change notification settings - Fork 147
feat(l1): docker compose parallel snapsync run in loop #5695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
51f9b68
run parallel snapsync using docker-compose
rodrigo-o 883701f
Try to run the 3 networks in parallel
rodrigo-o 737a868
update the monitor while syncing also
rodrigo-o 2d64e7c
Some changes related to timing
rodrigo-o 7040831
renamed lighthouse to consensus
rodrigo-o 2dff5be
simplify docker monitor and add a check for how much blocks do we pro…
rodrigo-o a9ef138
add more time to docker monitor
rodrigo-o 62f8ae9
check containers already running to avoid false failure messages
rodrigo-o c8b5d5d
test reruns
rodrigo-o 5ef8997
reduce block execution time check and add rerun
rodrigo-o df2e7c9
Add loop task to the makefile
rodrigo-o d978f22
Merge branch 'main' into parallel-snapsync-test
rodrigo-o fdc8a10
Merge branch 'main' into parallel-snapsync-test
rodrigo-o 45fbd26
improved history logging and separated runs
rodrigo-o cccda90
renamed docker compose file and make targets
rodrigo-o 67d6bcb
Merge branch 'main' into parallel-snapsync-test
rodrigo-o a6dbdad
make service configurable
rodrigo-o 821216e
simplify network and port management
rodrigo-o 556facf
fix the naming in the service derive
rodrigo-o e6bcd38
ensure cleanup is done for all networks
rodrigo-o 9e93631
enhance slack notification
rodrigo-o 379f44c
enhance logging and slack notification summary
rodrigo-o 804819a
Merge branch 'main' into parallel-snapsync-test
rodrigo-o 57c1b58
added logs path to the notification
rodrigo-o b967a77
Merge branch 'main' into parallel-snapsync-test
rodrigo-o e2da46f
Merge branch 'main' into parallel-snapsync-test
rodrigo-o 82c84bc
Merge branch 'main' into parallel-snapsync-test
rodrigo-o 185526c
Added docuemntation to the tooling/sync README
rodrigo-o 5210d1f
fix some issues regarding getattr, formatting and unnecesary and miss…
rodrigo-o 9501604
Fix a Makefile complex command and added comments in the compose
rodrigo-o 48fd423
Added exception comment and fixed sys.exit
rodrigo-o File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,225 @@ | ||
| # Multi-network parallel snapsync | ||
| # Usage: | ||
| # docker compose -f docker-compose.multisync.yaml up -d | ||
| # docker compose -f docker-compose.multisync.yaml logs -f | ||
| # docker compose -f docker-compose.multisync.yaml down -v | ||
| # | ||
| # Each network runs in isolation with its own volumes. | ||
| # Host ports are mapped for external RPC access: | ||
| # hoodi: localhost:8545 | ||
| # sepolia: localhost:8546 | ||
| # mainnet: localhost:8547 | ||
rodrigo-o marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| x-ethrex-common: ðrex-common | ||
| image: "ghcr.io/lambdaclass/ethrex:main" | ||
| pull_policy: always | ||
| ulimits: | ||
| nofile: 1000000 | ||
| restart: unless-stopped | ||
|
|
||
| x-consensus-common: &consensus-common | ||
| image: sigp/lighthouse:v8.0.1 | ||
| restart: unless-stopped | ||
|
|
||
| services: | ||
| # ============================================================================= | ||
| # HOODI | ||
| # ============================================================================= | ||
| setup-jwt-hoodi: | ||
| image: alpine | ||
| volumes: | ||
| - secrets-hoodi:/secrets | ||
| command: sh -c 'apk add openssl && openssl rand -hex 32 | tr -d "\n" | tee /secrets/jwt.hex' | ||
|
|
||
| consensus-hoodi: | ||
| <<: *consensus-common | ||
| container_name: consensus-hoodi | ||
| volumes: | ||
| - secrets-hoodi:/secrets | ||
| - consensus-hoodi:/root/.lighthouse | ||
| command: > | ||
| lighthouse bn | ||
| --network hoodi | ||
| --http --http-address 0.0.0.0 | ||
| --execution-endpoint http://ethrex-hoodi:8551 | ||
| --execution-jwt /secrets/jwt.hex | ||
| --checkpoint-sync-url https://hoodi-checkpoint-sync.stakely.io/ | ||
| --checkpoint-sync-url-timeout 600 | ||
| --purge-db | ||
| depends_on: | ||
| setup-jwt-hoodi: | ||
| condition: service_completed_successfully | ||
|
|
||
| ethrex-hoodi: | ||
| <<: *ethrex-common | ||
| container_name: ethrex-hoodi | ||
| ports: | ||
| - "8545:8545" # RPC | ||
| volumes: | ||
| - secrets-hoodi:/secrets | ||
| - ethrex-hoodi:/data | ||
| command: > | ||
| --http.addr 0.0.0.0 | ||
| --network hoodi | ||
| --authrpc.addr 0.0.0.0 | ||
| --authrpc.jwtsecret /secrets/jwt.hex | ||
| --syncmode snap | ||
| --datadir /data | ||
| depends_on: | ||
| setup-jwt-hoodi: | ||
| condition: service_completed_successfully | ||
|
|
||
| # ============================================================================= | ||
| # SEPOLIA | ||
| # ============================================================================= | ||
| setup-jwt-sepolia: | ||
| image: alpine | ||
| volumes: | ||
| - secrets-sepolia:/secrets | ||
| command: sh -c 'apk add openssl && openssl rand -hex 32 | tr -d "\n" | tee /secrets/jwt.hex' | ||
|
|
||
| consensus-sepolia: | ||
| <<: *consensus-common | ||
| container_name: consensus-sepolia | ||
| volumes: | ||
| - secrets-sepolia:/secrets | ||
| - consensus-sepolia:/root/.lighthouse | ||
| command: > | ||
| lighthouse bn | ||
| --network sepolia | ||
| --http --http-address 0.0.0.0 | ||
| --execution-endpoint http://ethrex-sepolia:8551 | ||
| --execution-jwt /secrets/jwt.hex | ||
| --checkpoint-sync-url https://checkpoint-sync.sepolia.ethpandaops.io | ||
| --checkpoint-sync-url-timeout 600 | ||
| --purge-db | ||
| depends_on: | ||
| setup-jwt-sepolia: | ||
| condition: service_completed_successfully | ||
|
|
||
| ethrex-sepolia: | ||
| <<: *ethrex-common | ||
| container_name: ethrex-sepolia | ||
| ports: | ||
| - "8546:8545" # RPC on different host port | ||
| volumes: | ||
| - secrets-sepolia:/secrets | ||
| - ethrex-sepolia:/data | ||
| command: > | ||
| --http.addr 0.0.0.0 | ||
| --network sepolia | ||
| --authrpc.addr 0.0.0.0 | ||
| --authrpc.jwtsecret /secrets/jwt.hex | ||
| --syncmode snap | ||
| --datadir /data | ||
| depends_on: | ||
| setup-jwt-sepolia: | ||
| condition: service_completed_successfully | ||
|
|
||
| # ============================================================================= | ||
| # MAINNET | ||
| # ============================================================================= | ||
| setup-jwt-mainnet: | ||
| image: alpine | ||
| volumes: | ||
| - secrets-mainnet:/secrets | ||
| command: sh -c 'apk add openssl && openssl rand -hex 32 | tr -d "\n" | tee /secrets/jwt.hex' | ||
|
|
||
| consensus-mainnet: | ||
| <<: *consensus-common | ||
| container_name: consensus-mainnet | ||
| volumes: | ||
| - secrets-mainnet:/secrets | ||
| - consensus-mainnet:/root/.lighthouse | ||
| command: > | ||
| lighthouse bn | ||
| --network mainnet | ||
| --http --http-address 0.0.0.0 | ||
| --execution-endpoint http://ethrex-mainnet:8551 | ||
| --execution-jwt /secrets/jwt.hex | ||
| --checkpoint-sync-url https://mainnet-checkpoint-sync.attestant.io | ||
| --checkpoint-sync-url-timeout 600 | ||
| --purge-db | ||
| depends_on: | ||
| setup-jwt-mainnet: | ||
| condition: service_completed_successfully | ||
|
|
||
| ethrex-mainnet: | ||
| <<: *ethrex-common | ||
| container_name: ethrex-mainnet | ||
| ports: | ||
| - "8547:8545" # RPC on different host port | ||
| volumes: | ||
| - secrets-mainnet:/secrets | ||
| - ethrex-mainnet:/data | ||
| command: > | ||
| --http.addr 0.0.0.0 | ||
| --network mainnet | ||
| --authrpc.addr 0.0.0.0 | ||
| --authrpc.jwtsecret /secrets/jwt.hex | ||
| --syncmode snap | ||
| --datadir /data | ||
| depends_on: | ||
| setup-jwt-mainnet: | ||
| condition: service_completed_successfully | ||
|
|
||
| # ============================================================================= | ||
| # HOODI-2 | ||
| # ============================================================================= | ||
| setup-jwt-hoodi-2: | ||
| image: alpine | ||
| volumes: | ||
| - secrets-hoodi-2:/secrets | ||
| command: sh -c 'apk add openssl && openssl rand -hex 32 | tr -d "\n" | tee /secrets/jwt.hex' | ||
|
|
||
| consensus-hoodi-2: | ||
| <<: *consensus-common | ||
| container_name: consensus-hoodi-2 | ||
| volumes: | ||
| - secrets-hoodi-2:/secrets | ||
| - consensus-hoodi-2:/root/.lighthouse | ||
| command: > | ||
| lighthouse bn | ||
| --network hoodi | ||
| --http --http-address 0.0.0.0 | ||
| --execution-endpoint http://ethrex-hoodi-2:8551 | ||
| --execution-jwt /secrets/jwt.hex | ||
| --checkpoint-sync-url https://hoodi-checkpoint-sync.stakely.io/ | ||
| --checkpoint-sync-url-timeout 600 | ||
| --purge-db | ||
| depends_on: | ||
| setup-jwt-hoodi-2: | ||
| condition: service_completed_successfully | ||
|
|
||
| ethrex-hoodi-2: | ||
| <<: *ethrex-common | ||
| container_name: ethrex-hoodi-2 | ||
| ports: | ||
| - "8548:8545" # RPC on different host port | ||
| volumes: | ||
| - secrets-hoodi-2:/secrets | ||
| - ethrex-hoodi-2:/data | ||
| command: > | ||
| --http.addr 0.0.0.0 | ||
| --network hoodi | ||
| --authrpc.addr 0.0.0.0 | ||
| --authrpc.jwtsecret /secrets/jwt.hex | ||
| --syncmode snap | ||
| --datadir /data | ||
| depends_on: | ||
| setup-jwt-hoodi-2: | ||
| condition: service_completed_successfully | ||
|
|
||
| volumes: | ||
| secrets-hoodi: | ||
| secrets-sepolia: | ||
| secrets-mainnet: | ||
| consensus-hoodi: | ||
| consensus-sepolia: | ||
| consensus-mainnet: | ||
| ethrex-hoodi: | ||
| ethrex-sepolia: | ||
| ethrex-mainnet: | ||
| secrets-hoodi-2: | ||
| consensus-hoodi-2: | ||
| ethrex-hoodi-2: | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.