-
Notifications
You must be signed in to change notification settings - Fork 615
feat: making testnet script write a docker compose file #10333
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 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
51e394a
feat: making testnet script write a docker compose file
signorecello f9c07f0
feat: making testnet script write a docker compose file
signorecello f8539d2
feat: going the extra mile with a cli tool
signorecello f0c809c
feat: going the extra mile with a cli tool
signorecello 0ba6b43
feat: adding release-please
signorecello f604ae6
feat: adding tests to CI, fingers crossed
signorecello 415e6b9
feat: adding tests to CI, fingers crossed
signorecello 6908029
feat: adding tests to CI, fingers crossed
signorecello 239bdf5
feat: adding tests to CI, fingers crossed
signorecello 0a70a2b
feat: removing the whole .env file
signorecello 23e6e47
feat: nit
signorecello 05e9bc8
feat: making the CI deploy to NPM
signorecello 8c45b2f
feat: making the CI deploy to NPM
signorecello b4dd3dc
feat: making the CI deploy to NPM
signorecello f02740d
feat: Cursor rewrote it all in shell, AI will take our jobs
signorecello 47a3b5d
feat: made a downloader for reusability
signorecello 43d8d01
feat: made a downloader for reusability
signorecello 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,59 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -eu | ||
|
|
||
| # get host arch | ||
| : "${P2P_PORT:?P2P_PORT is not set}" | ||
| : "${NODE_PORT:?NODE_PORT is not set}" | ||
| : "${VALIDATOR_PKEY:?VALIDATOR_PKEY is not set}" | ||
|
|
||
| PUBLIC_IP=$(curl -s https://ipinfo.io/ip) | ||
|
|
||
| ARCH=$(uname -m) | ||
| IMAGE="aztecprotocol/aztec:698cd3d62680629a3f1bfc0f82604534cedbccf3-${ARCH}" | ||
| IMAGE=${IMAGE:-"aztecprotocol/aztec:698cd3d62680629a3f1bfc0f82604534cedbccf3-${ARCH}"} | ||
|
|
||
| cat > docker-compose.yml <<EOF | ||
|
|
||
| name: aztec-$P2P_PORT | ||
| services: | ||
| validator: | ||
| network_mode: host | ||
| restart: unless-stopped | ||
| env_file: | ||
| - .env | ||
| environment: | ||
| - P2P_UDP_ANNOUNCE_ADDR=$PUBLIC_IP:$P2P_PORT | ||
| - P2P_TCP_ANNOUNCE_ADDR=$PUBLIC_IP:$P2P_PORT | ||
| - COINBASE=0xbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
| - VALIDATOR_DISABLED=false | ||
| - VALIDATOR_PRIVATE_KEY=$VALIDATOR_PKEY | ||
| - SEQ_PUBLISHER_PRIVATE_KEY=$VALIDATOR_PKEY | ||
| - L1_PRIVATE_KEY=$VALIDATOR_PKEY | ||
| - DEBUG=aztec:*,-aztec:avm_simulator*,-aztec:circuits:artifact_hash,-aztec:libp2p_service,-json-rpc*,-aztec:world-state:database,-aztec:l2_block_stream* | ||
| - LOG_LEVEL=debug | ||
| - AZTEC_PORT=$NODE_PORT | ||
| - P2P_ENABLED=true | ||
| - L1_CHAIN_ID=1337 | ||
| - PROVER_REAL_PROOFS=true | ||
| - PXE_PROVER_ENABLED=true | ||
| - ETHEREUM_SLOT_DURATION=12sec | ||
| - AZTEC_SLOT_DURATION=36 | ||
| - AZTEC_EPOCH_DURATION=32 | ||
| - AZTEC_EPOCH_PROOF_CLAIM_WINDOW_IN_L2_SLOTS=13 | ||
| - ETHEREUM_HOST=http://35.221.3.35:8545 | ||
| - BOOTSTRAP_NODES=enr:-Jq4QKIJisajcICBVMoMwFtbmPgmHt3KoonypbBIQCAMNjhMc6DKW0J4vJzDpGPFUX7T2fzyyjezHgKKzeZY_DbRz_kGjWF6dGVjX25ldHdvcmsBgmlkgnY0gmlwhCPdAyOJc2VjcDI1NmsxoQK92C7GObzDvCt9uwzW0lhKJKGCvOWkmAZjd2E2w-svuoN0Y3CCndCDdWRwgp3Q | ||
| - REGISTRY_CONTRACT_ADDRESS=0x5fbdb2315678afecb367f032d93f642f64180aa3 | ||
| - GOVERNANCE_PROPOSER_CONTRACT_ADDRESS=0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0 | ||
| - FEE_JUICE_CONTRACT_ADDRESS=0xe7f1725e7734ce288f8367e1bb143e90bb3f0512 | ||
| - ROLLUP_CONTRACT_ADDRESS=0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6 | ||
| - REWARD_DISTRIBUTOR_CONTRACT_ADDRESS=0x5fc8d32690cc91d4c39d9d3abcbd16989f875707 | ||
| - GOVERNANCE_CONTRACT_ADDRESS=0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9 | ||
| - COIN_ISSUER_CONTRACT_ADDRESS=0xdc64a140aa3e981100a9beca4e685f962f0cf6c9 | ||
| - FEE_JUICE_PORTAL_CONTRACT_ADDRESS=0x0165878a594ca255338adfa4d48449f69242eb8f | ||
| - INBOX_CONTRACT_ADDRESS=0xed179b78d5781f93eb169730d8ad1be7313123f4 | ||
| - OUTBOX_CONTRACT_ADDRESS=0x1016b5aaa3270a65c315c664ecb238b6db270b64 | ||
| - P2P_UDP_LISTEN_ADDR=0.0.0.0:$P2P_PORT | ||
| - P2P_TCP_LISTEN_ADDR=0.0.0.0:$P2P_PORT | ||
| image: $IMAGE | ||
| command: start --node --archiver --sequencer | ||
| EOF | ||
|
|
||
| docker run --rm --network=host \ | ||
| -e P2P_UDP_ANNOUNCE_ADDR=$PUBLIC_IP:$P2P_PORT \ | ||
| -e P2P_TCP_ANNOUNCE_ADDR=$PUBLIC_IP:$P2P_PORT \ | ||
| -e COINBASE=0xbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ | ||
| -e VALIDATOR_DISABLED=false \ | ||
| -e VALIDATOR_PRIVATE_KEY=$VALIDATOR_PKEY \ | ||
| -e SEQ_PUBLISHER_PRIVATE_KEY=$VALIDATOR_PKEY \ | ||
| -e L1_PRIVATE_KEY=$VALIDATOR_PKEY \ | ||
| -e DEBUG="aztec:*,-aztec:avm_simulator*,-aztec:circuits:artifact_hash,-aztec:libp2p_service,-json-rpc*,-aztec:world-state:database,-aztec:l2_block_stream*" \ | ||
| -e LOG_LEVEL=debug \ | ||
| -e AZTEC_PORT=$NODE_PORT \ | ||
| -e P2P_ENABLED=true \ | ||
| -e L1_CHAIN_ID=1337 \ | ||
| -e PROVER_REAL_PROOFS=true \ | ||
| -e PXE_PROVER_ENABLED=true \ | ||
| -e ETHEREUM_SLOT_DURATION=12sec \ | ||
| -e AZTEC_SLOT_DURATION=36 \ | ||
| -e AZTEC_EPOCH_DURATION=32 \ | ||
| -e AZTEC_EPOCH_PROOF_CLAIM_WINDOW_IN_L2_SLOTS=13 \ | ||
| -e ETHEREUM_HOST=http://35.221.3.35:8545 \ | ||
| -e BOOTSTRAP_NODES=enr:-Jq4QKIJisajcICBVMoMwFtbmPgmHt3KoonypbBIQCAMNjhMc6DKW0J4vJzDpGPFUX7T2fzyyjezHgKKzeZY_DbRz_kGjWF6dGVjX25ldHdvcmsBgmlkgnY0gmlwhCPdAyOJc2VjcDI1NmsxoQK92C7GObzDvCt9uwzW0lhKJKGCvOWkmAZjd2E2w-svuoN0Y3CCndCDdWRwgp3Q \ | ||
| -e REGISTRY_CONTRACT_ADDRESS=0x5fbdb2315678afecb367f032d93f642f64180aa3 \ | ||
| -e GOVERNANCE_PROPOSER_CONTRACT_ADDRESS=0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0 \ | ||
| -e FEE_JUICE_CONTRACT_ADDRESS=0xe7f1725e7734ce288f8367e1bb143e90bb3f0512 \ | ||
| -e ROLLUP_CONTRACT_ADDRESS=0x2279b7a0a67db372996a5fab50d91eaa73d2ebe6 \ | ||
| -e REWARD_DISTRIBUTOR_CONTRACT_ADDRESS=0x5fc8d32690cc91d4c39d9d3abcbd16989f875707 \ | ||
| -e GOVERNANCE_CONTRACT_ADDRESS=0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9 \ | ||
| -e COIN_ISSUER_CONTRACT_ADDRESS=0xdc64a140aa3e981100a9beca4e685f962f0cf6c9 \ | ||
| -e FEE_JUICE_PORTAL_CONTRACT_ADDRESS=0x0165878a594ca255338adfa4d48449f69242eb8f \ | ||
| -e INBOX_CONTRACT_ADDRESS=0xed179b78d5781f93eb169730d8ad1be7313123f4 \ | ||
| -e OUTBOX_CONTRACT_ADDRESS=0x1016b5aaa3270a65c315c664ecb238b6db270b64 \ | ||
| -e P2P_UDP_LISTEN_ADDR=0.0.0.0:$P2P_PORT \ | ||
| -e P2P_TCP_LISTEN_ADDR=0.0.0.0:$P2P_PORT \ | ||
| $IMAGE start --node --archiver --sequencer | ||
| echo "docker compose file generated successfully!" | ||
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.