Skip to content
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

Refactored simple surge stack and added monitoring for nethermind EL #7

Merged
merged 29 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e891433
feat: add multiprover configs
nmjustinchan Nov 28, 2024
747742c
feat: update taiko client image
nmjustinchan Nov 29, 2024
054e248
debug: update taiko client image without taikoToken
nmjustinchan Nov 29, 2024
0e2821f
feat: add l2 protocol deployment to docker compose and update env vars
nmjustinchan Dec 6, 2024
8e24e02
fix: update domain for set address services
nmjustinchan Dec 12, 2024
bce3d52
debug: update l1.proverPrivKey
nmjustinchan Dec 12, 2024
24be3d9
fix: update images
nmjustinchan Dec 12, 2024
5e5cfa4
debug: update set signal service
nmjustinchan Dec 18, 2024
466bae5
Revert "debug: update set signal service"
nmjustinchan Dec 18, 2024
12b0571
debug: update taiko geth docker compose for testing
nmjustinchan Dec 19, 2024
90d8e86
feat: update proposer annd prover flags and nethermind EL image
nmjustinchan Dec 20, 2024
a7ef011
debug: update taiko client and protocol images
nmjustinchan Dec 23, 2024
56cfeff
refac: update docker compose and env sample
nmjustinchan Dec 25, 2024
810e70a
debug: test refactored docker compose and env file
nmjustinchan Dec 25, 2024
706fcd3
fix: update metrics port naming and network
nmjustinchan Dec 26, 2024
e1c2b47
fix: update scripts TX_RECEIPT_QUERY_INTERVAL and volumes for prover …
nmjustinchan Dec 26, 2024
2442a21
fix: update surge specific env vars to avoid clash
nmjustinchan Dec 26, 2024
25e5a7b
fix: remove prover from proposer profile
nmjustinchan Dec 26, 2024
6e7c572
fix: update TX_NOT_IN_MEMPOOL_TIMEOUT for prover script
nmjustinchan Dec 26, 2024
b554660
fix: update prometheus target
nmjustinchan Dec 26, 2024
e6b318c
feat: add monitoring for nm EL
nmjustinchan Dec 26, 2024
7189dd0
fix: update monitoring services indentation
nmjustinchan Dec 26, 2024
bfc88fd
fix: update grafana port, update deprecated storage.tsdb.retention an…
nmjustinchan Dec 26, 2024
1fcd600
debug: add nethermind EL as a new prometheus job
nmjustinchan Dec 29, 2024
935b7dc
feat: add additional raiko configs and remove devnet machine details
nmjustinchan Dec 30, 2024
3310326
feat: enable metrics and add job for taiko client
nmjustinchan Dec 30, 2024
98de90f
refac: fix boolean value flags and update prover flags
nmjustinchan Jan 2, 2025
11aa2e2
refac: fix boolean value flags and update protocol url
nmjustinchan Jan 2, 2025
e633975
refac: remove pushgateway and add taiko client metrics env var
nmjustinchan Jan 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 79 additions & 30 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,48 +1,97 @@
############################### DEFAULT #####################################
# Chain ID
CHAIN_ID=763374
ENABLE_TAIKO_CLIENT_METRICS=true

# Exposed ports
PORT_PROMETHEUS=9091
PORT_GRAFANA=3001
BRIDGE_32_BYTES=0x6272696467650000000000000000000000000000000000000000000000000000
SIGNAL_SERVICE_32_BYTES=0x7369676e616c5f73657276696365000000000000000000000000000000000000

# Comma separated L2 execution engine bootnode URLs for P2P discovery bootstrap
BOOT_NODES=
RISC0_VERIFIER=0xCd9f348aeBF4649BFF58654da5C7A008b9008e7d
SP1_VERIFIER=0xD7d1678E63Ec1d3609F404659Ff6C4d6C590825b
SGX_VERIFIER=0x86A0679C7987B5BA9600affA994B78D0660088ff

# Taiko protocol contract addresses
# L1
L1_CHAIN_ID=3151908

L1_BRIDGE_ADDRESS=0x72bCbB3f339aF622c28a26488Eed9097a2977404
L1_SIGNAL_SERVICE_ADDRESS=0x00c042C4D5D913277CE16611a2ce6e9003554aD5
L1_SHARED_ADDRESS_MANAGER=0x7633740000000000000000000000000000000006
TAIKO_L1_ADDRESS=0xaE37C7A711bcab9B0f8655a97B738d6ccaB6560B

L1_ENDPOINT_HTTP=http://host.docker.internal:32002
L1_ENDPOINT_WS=ws://host.docker.internal:32003
L1_BEACON_HTTP=http://host.docker.internal:33001

# L2
L2_CHAIN_ID=763374
L2_GENESIS_HASH=0xbeced3738f1246571cccabc82a1e6cbd9ed9d5f7ed2b6c7ded28f9722317bd9e

L2_BRIDGE_ADDRESS=0x72bCbB3f339aF622c28a26488Eed9097a2977404
L2_SIGNAL_SERVICE_ADDRESS=0x00c042C4D5D913277CE16611a2ce6e9003554aD5
L2_SHARED_ADDRESS_MANAGER=0x7633740000000000000000000000000000000006
TAIKO_L2_ADDRESS=0x7633740000000000000000000000000000010001

# P2P
DISABLE_P2P_SYNC=false
P2P_SYNC_URL=https://rpc.hekla.taiko.xyz
L2_ENDPOINT_HTTP=http://host.docker.internal:8547
L2_ENDPOINT_WS=ws://host.docker.internal:8548
L2_AUTH_HTTP=http://host.docker.internal:8552

# Nethermind log level
NETHERMIND_OP_LOG_LEVEL=debug
NETHERMIND_LOG_LEVEL=debug

# Surge
SURGE_PROPOSING_BLOCK_GAS=
SURGE_PROVING_BLOCK_GAS=
SURGE_OFF_CHAIN_COSTS=
SURGE_PRICE_FLUCTUATION_MODIFIER=

# Exposed ports
L2_METRICS_PORT=8018
L2_HTTP_PORT=8547
L2_WS_PORT=8548
L2_ENGINE_API_PORT=8552
L2_NETWORK_DISCOVERY_PORT=30313
POSTGRES_PORT=5432
VERIFIER_PORT=8050
BLOCKSCOUT_PORT=4000
PROMETHEUS_PORT=9091
GRAFANA_PORT=3001

# Comma separated L2 execution engine bootnode URLs for P2P discovery bootstrap
BOOT_NODES=

# P2P
DISABLE_P2P_SYNC=true
P2P_SYNC_URL=

############################### REQUIRED #####################################
# L1 Holesky RPC endpoints (you will need an RPC provider such as BlockPi, or run a full Holesky node yourself).
# If you are using a local Holesky L1 node, you can refer to it as "http://host.docker.internal:8545" and "ws://host.docker.internal:8546", which refer to the default ports in the .env for an eth-docker L1 node.
# However, you may need to add this host to docker-compose.yml. If that does not work, you can try the private local ip address (e.g. http://192.168.1.15:8545). You can find that with `ip addr show` or a similar command.
# In addition, you can use your public ip address followed by the specific ports for http and ws (e.g. http://82.168.1.15:8545). You can find that with `hostname -I | awk '{print $1}'`.
L1_ENDPOINT_WS=
# HTTP RPC endpoint of a L1 beacon node. Everything behind the top-level domain is ignored. Make sure you don't need to work with subdirectories. The path will always be /eth/v1...
# If you are using a local Holesky L1 node, you can refer to it as "http://host.docker.internal:5052", which refer to the default REST port in the .env for an eth-docker L1 node.
# Or follow the recommendations for http RPC endoint using the default REST port "5052", (e.g. http://82.168.1.15:5052).
L1_BEACON_HTTP=
# Owner private key for contract deployments
OWNER_PRIVATE_KEY=0xbcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31

# Profitability check
CHECK_PROFITABILITY=false

# Allow empty blocks
ALLOW_EMPTY_BLOCKS=false

############################### OPTIONAL #####################################
# If you want to be a prover who generates and submits zero knowledge proofs of proposed L2 blocks, you need to change
# `ENABLE_PROVER` to true and set `L1_PROVER_PRIVATE_KEY`.
ENABLE_PROVER=true
# SGX Raiko service endpoint, required if not running a guardian prover.
SGX_RAIKO_HOST=
RAIKO_HOST_ZKVM=
SGX_RAIKO_HOST=http://74.235.18.170:8080
# ZKVM Raiko service endpoint.
RAIKO_HOST_ZKVM=http://62.169.158.226:8080
# ZKVM Raiko service configs
RAIKO_REQUEST_TIMEOUT=60s
RAIKO_SP1_RECURSION="plonk"
RAIKO_SP1_PROVER="local"
RAIKO_RISC0_BONSAI=false
RAIKO_RISC0_SNARK=true
RAIKO_RISC0_PROFILE=false
RAIKO_RISC0_EXECUTION_PO2=20
# How many provers you want to run concurrently.
PROVER_CAPACITY=1
# A L1 account private key (with a balance of TTKOh deposited on TaikoL1) which will be used to sign the bond for proving the block.
# WARNING: only use a test account, pasting your private key in plain text here is not secure.
L1_PROVER_PRIVATE_KEY=ab63b23eb7941c1251757e24b3d2350d2bc05c3c388d06f8fe6feafefb1e8c70
L1_PROVER_PRIVATE_KEY=0x53321db7c1e331d93a11a41d16f004d7ff63972ec8ec7c25db329728ceeb1710
# Amount to approve TaikoL1 contracts for TaikoToken usage. i.e 250 TTKOh = 250
TOKEN_ALLOWANCE=
# Minimum ETH balance (in ETH) a prover wants to keep.
Expand All @@ -53,13 +102,11 @@ MIN_TAIKO_BALANCE=
# without the original prover submitting a proof.).
PROVE_UNASSIGNED_BLOCKS=false

RAIKO_REQUEST_TIMEOUT=60s

# If you want to be a proposer who proposes L2 execution engine's transactions in mempool to Taiko L1 protocol
# contract (be a "mining L2 node"), you need to change `ENABLE_PROPOSER` to true, then fill `L1_PROPOSER_PRIVATE_KEY`.
ENABLE_PROPOSER=true
# A L1 account (with balance) private key who will send TaikoL1.proposeBlock transactions.
L1_PROPOSER_PRIVATE_KEY=53321db7c1e331d93a11a41d16f004d7ff63972ec8ec7c25db329728ceeb1710
L1_PROPOSER_PRIVATE_KEY=0x53321db7c1e331d93a11a41d16f004d7ff63972ec8ec7c25db329728ceeb1710
# Address of the proposed block's suggested L2 fee recipient.
L2_SUGGESTED_FEE_RECIPIENT=0xD51a7E12997f6f1D04AcCC2b4053307a62b373cb
# Comma-delineated list (no spaces) of prover endpoints proposer should query when attempting to propose a block
Expand All @@ -68,6 +115,8 @@ L2_SUGGESTED_FEE_RECIPIENT=0xD51a7E12997f6f1D04AcCC2b4053307a62b373cb
BLOB_ALLOWED=true
# Minimum tip (in GWei) for a transaction to propose.
EPOCH_MIN_TIP=
# Time interval to propose L2 pending transactions
EPOCH_INTERVAL=5s
# ProverSet Address: We highly recommend you consult the deploy a proverset guide and use separate EOAs for prover and proposer to prevent nonce issues.
PROVER_SET=

Expand All @@ -81,19 +130,19 @@ TX_FEE_LIMIT_MULTIPLIER=
# The minimum threshold (in GWei) at which fee bumping starts to be capped. Allows arbitrary fee bumps below this threshold.
TX_FEE_LIMIT_THRESHOLD=
# Gas limit will be used for transactions (0 means using gas estimation)
TX_GAS_LIMIT=
TX_GAS_LIMIT=1000000
# Enforces a minimum base fee (in GWei) to assume when determining tx fees. 1 GWei by default
TX_MIN_BASEFEE=
# Enforces a minimum tip cap (in GWei) to use when determining tx fees. 1 GWei by default.
TX_MIN_TIP_CAP=
# Timeout for aborting a tx send if the tx does not make it to the mempool.
TX_NOT_IN_MEMPOOL_TIMEOUT=
TX_NOT_IN_MEMPOOL_TIMEOUT=30s
# Number of confirmations which we will wait after sending a transaction
TX_NUM_CONFIRMATIONS=
# Frequency to poll for receipts
TX_RECEIPT_QUERY_INTERVAL=
# Duration we will wait before resubmitting a transaction to L1
TX_RESUBMISSION=
TX_RESUBMISSION=10s
# Number of ErrNonceTooLow observations required to give up on a tx at a particular nonce without receiving confirmation
TX_SAFE_ABORT_NONCE_TOO_LOW=
# Timeout for sending transactions. If 0 it is disabled.
Expand Down
80 changes: 80 additions & 0 deletions docker-compose-protocol.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
services:
set-bridge-address-l1:
image: nethsurge/protocol:surge-docs
environment:
FOUNDRY_PROFILE: layer1
DOMAIN: ${L2_CHAIN_ID}
ADDRESS: ${L2_BRIDGE_ADDRESS}
NAME: ${BRIDGE_32_BYTES}
PROXY_ADDRESS: ${L1_SHARED_ADDRESS_MANAGER}
FORK_URL: ${L1_ENDPOINT_HTTP}
PRIVATE_KEY: ${OWNER_PRIVATE_KEY}
entrypoint:
- sh
- -c
command: >
'forge script ./script/shared/SetAddress.s.sol --fork-url "${L1_ENDPOINT_HTTP}" --broadcast -vvv'
set-signal-service-address-l1:
image: nethsurge/protocol:surge-docs
environment:
FOUNDRY_PROFILE: layer1
DOMAIN: ${L2_CHAIN_ID}
ADDRESS: ${L2_SIGNAL_SERVICE_ADDRESS}
NAME: ${SIGNAL_SERVICE_32_BYTES}
PROXY_ADDRESS: ${L1_SHARED_ADDRESS_MANAGER}
FORK_URL: ${L1_ENDPOINT_HTTP}
PRIVATE_KEY: ${OWNER_PRIVATE_KEY}
entrypoint:
- sh
- -c
command: >
'forge script ./script/shared/SetAddress.s.sol --fork-url "${L1_ENDPOINT_HTTP}" --broadcast -vvv'
networks:
- surge
profiles:
- set-signal-service

set-bridge-address-l2:
image: nethsurge/protocol:surge-docs
environment:
FOUNDRY_PROFILE: layer1
DOMAIN: ${L1_CHAIN_ID}
ADDRESS: ${L1_BRIDGE_ADDRESS}
NAME: ${BRIDGE_32_BYTES}
PROXY_ADDRESS: ${L2_SHARED_ADDRESS_MANAGER}
FORK_URL: http://l2-nethermind-execution-client:${L2_HTTP_PORT}
PRIVATE_KEY: ${OWNER_PRIVATE_KEY}
entrypoint:
- sh
- -c
command: >
'forge script ./script/shared/SetAddress.s.sol --fork-url http://l2-nethermind-execution-client:${L2_HTTP_PORT} --broadcast -vvv'
networks:
- surge
profiles:
- set-bridge

set-signal-service-address-l2:
image: nethsurge/protocol:surge-docs
environment:
FOUNDRY_PROFILE: layer1
DOMAIN: ${L1_CHAIN_ID}
ADDRESS: ${L2_SIGNAL_SERVICE_ADDRESS}
NAME: ${SIGNAL_SERVICE_32_BYTES}
PROXY_ADDRESS: ${L2_SHARED_ADDRESS_MANAGER}
FORK_URL: http://l2-nethermind-execution-client:${L2_HTTP_PORT}
PRIVATE_KEY: ${OWNER_PRIVATE_KEY}
entrypoint:
- sh
- -c
command: >
'forge script ./script/shared/SetAddress.s.sol --fork-url http://l2-nethermind-execution-client:${L2_HTTP_PORT} --broadcast -vvv'
networks:
- surge
profiles:
- set-signal-service

networks:
surge:
name: surge-network
external: true
116 changes: 0 additions & 116 deletions docker-compose-prover.yml

This file was deleted.

Loading
Loading