diff --git a/.env.sample b/.env.sample index 79811ae..a5caf3f 100644 --- a/.env.sample +++ b/.env.sample @@ -1,35 +1,74 @@ ############################### DEFAULT ##################################### -# Chain ID -CHAIN_ID=763374 -# 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=0xA2C4Ef228de6BA701660e75Cb06f1c9b29E53069 +SP1_VERIFIER=0x9c63682FC2d397Aa47471c046cE57b095d7195D7 +SGX_VERIFIER=0xdFb2fAc1519eDA2b3ee1Edf578ee0509DC8633f7 -# 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 +PROPOSING_BLOCK_GAS=165000 +PROVING_BLOCK_GAS=100000 +OFF_CHAIN_COSTS=50000000000000 +PRICE_FLUCTUATION_MODIFIER=15 + +# 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=false +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 @@ -37,12 +76,14 @@ L1_BEACON_HTTP= ENABLE_PROVER=true # SGX Raiko service endpoint, required if not running a guardian prover. SGX_RAIKO_HOST= +# ZKVM Raiko service endpoint. RAIKO_HOST_ZKVM= +RAIKO_REQUEST_TIMEOUT=60s # 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=0xab63b23eb7941c1251757e24b3d2350d2bc05c3c388d06f8fe6feafefb1e8c70 # 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. @@ -53,13 +94,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 @@ -68,6 +107,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= @@ -81,19 +122,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. diff --git a/docker-compose-protocol.yml b/docker-compose-protocol.yml new file mode 100644 index 0000000..1c6d0e1 --- /dev/null +++ b/docker-compose-protocol.yml @@ -0,0 +1,78 @@ +services: + set-bridge-address-l1: + image: nethsurge/protocol:composite-proof-debug + 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 "${FORK_URL}" --broadcast -vvv' + set-signal-service-address-l1: + image: nethsurge/protocol:composite-proof-debug + 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 "${FORK_URL}" --broadcast -vvv' + networks: + - surge + profiles: + - set-signal-service + + set-bridge-address-l2: + image: nethsurge/protocol:composite-proof-debug + environment: + FOUNDRY_PROFILE: layer1 + DOMAIN: ${L1_CHAIN_ID} + ADDRESS: ${L1_BRIDGE_ADDRESS} + NAME: ${BRIDGE_32_BYTES} + PROXY_ADDRESS: ${L2_SHARED_ADDRESS_MANAGER} + FORK_URL: ${L2_ENDPOINT_HTTP} + PRIVATE_KEY: ${OWNER_PRIVATE_KEY} + entrypoint: + - sh + - -c + command: > + 'forge script ./script/shared/SetAddress.s.sol --fork-url "${FORK_URL}" --broadcast -vvv' + networks: + - surge + profiles: + - set-bridge + + set-signal-service-address-l2: + image: nethsurge/protocol:composite-proof-debug + 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: ${L2_ENDPOINT_HTTP} + PRIVATE_KEY: ${OWNER_PRIVATE_KEY} + entrypoint: + - sh + - -c + command: > + 'forge script ./script/shared/SetAddress.s.sol --fork-url "${FORK_URL}" --broadcast -vvv' + networks: + - surge + profiles: + - set-signal-service +networks: + surge: + name: surge-network \ No newline at end of file diff --git a/docker-compose-prover.yml b/docker-compose-prover.yml deleted file mode 100644 index 5209187..0000000 --- a/docker-compose-prover.yml +++ /dev/null @@ -1,116 +0,0 @@ -services: - l2_execution_engine: - image: nethswitchboard/taiko-geth:surge - restart: unless-stopped - pull_policy: always - env_file: - - .env - stop_grace_period: 3m - volumes: - - l2_execution_engine_data:/data/taiko-geth - ports: - - "6061:6060" - - "8549:8545" - - "8550:8546" - - "30307:30306" - - "30307:30306/udp" - command: | - --taiko - --networkid 763374 - --gcmode archive - --datadir /data/taiko-geth - --metrics - --metrics.addr "0.0.0.0" - --authrpc.addr "0.0.0.0" - --authrpc.vhosts "*" - --http - --http.api debug,eth,net,web3,txpool,taiko - --http.addr "0.0.0.0" - --http.vhosts "*" - --ws - --ws.api debug,eth,net,web3,txpool,taiko - --ws.addr "0.0.0.0" - --ws.origins "*" - --gpo.defaultprice "10000000" - --port 30306 - --discovery.port 30306 - ${GETH_ADDITIONAL_ARGS:-} - profiles: - - l2_execution_engine - - prover - - proposer - - taiko_client_driver: - image: nethsurge/taiko-client:f042ca8 - restart: unless-stopped - pull_policy: always - depends_on: - - l2_execution_engine - env_file: - - .env - volumes: - - l2_execution_engine_data:/data/taiko-geth - entrypoint: - - taiko-client - command: - - driver - - --l1.ws=${L1_ENDPOINT_WS} - - --l2.ws=ws://l2_execution_engine:8546 - - --l1.beacon=${L1_BEACON_HTTP} - - --l2.auth=http://l2_execution_engine:8551 - - --taikoL1=${TAIKO_L1_ADDRESS} - - --taikoL2=${TAIKO_L2_ADDRESS} - - --jwtSecret=/data/taiko-geth/geth/jwtsecret - profiles: - - l2_execution_engine - - prover - - proposer - - taiko_client_prover_relayer: - image: nethsurge/taiko-client:f042ca8 - restart: unless-stopped - pull_policy: always - depends_on: - - l2_execution_engine - - taiko_client_driver - ports: - - "9877:9876" - env_file: - - .env - entrypoint: - - taiko-client - command: - - prover - - --l1.ws=${L1_ENDPOINT_WS} - - --l2.ws=ws://l2_execution_engine:8546 - - --l2.http=http://l2_execution_engine:8545 - - --taikoL1=${TAIKO_L1_ADDRESS} - - --taikoL2=${TAIKO_L2_ADDRESS} - - --l1.proverPrivKey=${L1_PROPOSER_PRIVATE_KEY} - - --prover.capacity=${PROVER_CAPACITY} - - --raiko.host=${SGX_RAIKO_HOST} - - --tx.notInMempoolTimeout=30s - - --tx.resubmissionTimeout=10s - # - --raiko.requestTimeout=${RAIKO_REQUEST_TIMEOUT} - # conditioned - # - --proverSet ${PROVER_SET} - # - --prover.allowance ${TOKEN_ALLOWANCE} - # - --prover.minEthBalance ${MIN_ETH_BALANCE} - # - --prover.minTaikoTokenBalance ${MIN_TAIKO_BALANCE} - # - --prover.proveUnassignedBlocks - # - --tx.feeLimitMultiplier ${TX_FEE_LIMIT_MULTIPLIER} - # - --tx.feeLimitThreshold ${TX_FEE_LIMIT_THRESHOLD} - # - --tx.gasLimit ${TX_GAS_LIMIT} - # - --tx.minBaseFee ${TX_MIN_BASEFEE} - # - --tx.minTipCap ${TX_MIN_TIP_CAP} - # - --tx.notInMempoolTimeout ${TX_NOT_IN_MEMPOOL} - # - --tx.numConfirmations ${TX_NUM_CONFIRMATIONS} - # - --tx.receiptQueryInterval ${TX_RECEIPT_QUERY} - # - --tx.resubmissionTimeout ${TX_RESUBMISSION} - # - --tx.safeAbortNonceTooLowCount ${TX_SAFE_ABORT_NONCE_TOO_LOW} - # - --tx.sendTimeout ${TX_SEND_TIMEOUT} - profiles: - - prover - -volumes: - l2_execution_engine_data: diff --git a/docker-compose.yml b/docker-compose.yml index 9e0cf5d..1349bab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,45 +1,45 @@ services: nethermind_execution_l2: - image: nethermindeth/nethermind:surge-2b6ed5201 + image: nethermindeth/nethermind:surge-19b6c6906 + container_name: l2-nethermind-execution-client restart: unless-stopped pull_policy: always stop_grace_period: 3m tty: true - container_name: execution-taiko-l2-client volumes: - - ./jwtsecret:/tmp/jwt/jwtsecret - - ./chainspec.json:/chainspec.json + - ./static/jwtsecret:/tmp/jwt/jwtsecret + - ./static/chainspec.json:/chainspec.json networks: - surge ports: - - 30313:30313/tcp - - 30313:30313/udp - - 8018:8018 - - 8547:8547 - - 8548:8548 - - 8552:8552 + - ${L2_NETWORK_DISCOVERY_PORT}:${L2_NETWORK_DISCOVERY_PORT}/tcp + - ${L2_NETWORK_DISCOVERY_PORT}:${L2_NETWORK_DISCOVERY_PORT}/udp + - ${L2_METRICS_PORT}:${L2_METRICS_PORT} + - ${L2_HTTP_PORT}:${L2_HTTP_PORT} + - ${L2_WS_PORT}:${L2_WS_PORT} + - ${L2_ENGINE_API_PORT}:${L2_ENGINE_API_PORT} command: - --config=none - --datadir=/data/taiko-geth - --Init.ChainSpecPath=/chainspec.json - - --Init.GenesisHash=0xbeced3738f1246571cccabc82a1e6cbd9ed9d5f7ed2b6c7ded28f9722317bd9e + - --Init.GenesisHash=${L2_GENESIS_HASH} - --Init.DiscoveryEnabled=false - --Metrics.Enabled=true - - --Metrics.ExposePort=8018 + - --Metrics.ExposePort=${L2_METRICS_PORT} - --JsonRpc.Enabled=true - --JsonRpc.EnabledModules=[debug,eth,net,web3,txpool,rpc,subscribe,trace,personal,proof,parity,health] - --JsonRpc.Host=0.0.0.0 - - --JsonRpc.Port=8547 - - --JsonRpc.WebSocketsPort=8548 + - --JsonRpc.Port=${L2_HTTP_PORT} + - --JsonRpc.WebSocketsPort=${L2_WS_PORT} - --JsonRpc.JwtSecretFile=/tmp/jwt/jwtsecret - --JsonRpc.EngineHost=0.0.0.0 - - --JsonRpc.EnginePort=8552 - - --Network.DiscoveryPort=30313 - - --Network.P2PPort=30313 + - --JsonRpc.EnginePort=${L2_ENGINE_API_PORT} + - --Network.DiscoveryPort=${L2_NETWORK_DISCOVERY_PORT} + - --Network.P2PPort=${L2_NETWORK_DISCOVERY_PORT} - --Sync.FastSync=false - --Sync.SnapSync=false - --HealthChecks.Enabled=true - - --log=${NETHERMIND_OP_LOG_LEVEL} + - --log=${NETHERMIND_LOG_LEVEL} - --JsonRpc.MaxBatchResponseBodySize=335544320 - --JsonRpc.MaxBatchSize=102400 healthcheck: @@ -51,37 +51,55 @@ services: profiles: - nethermind_execution_l2 - proposer + - prover - blockscout taiko_client_driver: - image: nethsurge/taiko-client:f042ca8 + image: nethsurge/taiko-client:composite-proof + container_name: l2-taiko-consensus-client restart: unless-stopped pull_policy: always depends_on: - nethermind_execution_l2 volumes: - ./execution-data-taiko:/data/taiko-geth - - ./jwtsecret:/tmp/jwt/jwtsecret + - ./static/jwtsecret:/tmp/jwt/jwtsecret + - ./script:/script + entrypoint: + - /bin/sh + - -c + - "/script/start-driver.sh" networks: - surge - entrypoint: - - taiko-client - command: - - driver - - --l1.ws=${L1_ENDPOINT_WS} - - --l2.ws=ws://execution-taiko-l2-client:8548 - - --l1.beacon=${L1_BEACON_HTTP} - - --l2.auth=http://execution-taiko-l2-client:8552 - - --taikoL1=${TAIKO_L1_ADDRESS} - - --taikoL2=${TAIKO_L2_ADDRESS} - - --jwtSecret=/tmp/jwt/jwtsecret profiles: - nethermind_execution_l2 - proposer + - prover + - blockscout + + taiko_client_prover_relayer: + image: nethsurge/taiko-client:composite-proof + container_name: l2-taiko-prover-relayer-client + restart: unless-stopped + pull_policy: always + depends_on: + - nethermind_execution_l2 + - taiko_client_driver + volumes: + - ./script:/script + entrypoint: + - /bin/sh + - -c + - "/script/start-prover-relayer.sh" + networks: + - surge + profiles: + - prover - blockscout taiko_client_proposer: - image: nethsurge/taiko-client:f042ca8 + image: nethsurge/taiko-client:composite-proof + container_name: l2-taiko-proposer-client restart: unless-stopped pull_policy: always depends_on: @@ -89,48 +107,16 @@ services: - taiko_client_driver volumes: - ./execution-data-taiko:/data/taiko-geth - - ./jwtsecret:/tmp/jwt/jwtsecret + - ./script:/script + entrypoint: + - /bin/sh + - -c + - "/script/start-proposer.sh" networks: - surge - entrypoint: - - taiko-client - command: - - proposer - - --l1.ws=${L1_ENDPOINT_WS} - - --l2.http=http://execution-taiko-l2-client:8547 - - --l2.auth=http://execution-taiko-l2-client:8552 - - --taikoL1=${TAIKO_L1_ADDRESS} - - --taikoL2=${TAIKO_L2_ADDRESS} - - --jwtSecret=/tmp/jwt/jwtsecret - - --l1.proposerPrivKey=${L1_PROPOSER_PRIVATE_KEY} - - --l2.suggestedFeeRecipient=${L2_SUGGESTED_FEE_RECIPIENT} - - --tx.notInMempoolTimeout=30s - - --tx.resubmissionTimeout=10s - - --epoch.interval=5s - # - --surge.gasNeededForProposingBlock=165000 - # - --surge.gasNeededForProvingBlock=100000 - # - --surge.offChainCosts=50000000000000 - # - --surge.priceFluctuationModifier=15 - # - --verbosity=4 - # conditioned - # - --epoch.minTip ${EPOCH_MIN_TIP} - # - --proverSet ${PROVER_SET} - # - --txPool.localsOnly - # - --txPool.locals ${TXPOOL_LOCALS} - # - --l1.blobAllowed - # - --tx.feeLimitMultiplier ${TX_FEE_LIMIT_MULTIPLIER} - # - --tx.feeLimitThreshold ${TX_FEE_LIMIT_THRESHOLD} - # - --tx.gasLimit ${TX_GAS_LIMIT} - # - --tx.minBaseFee ${TX_MIN_BASEFEE} - # - --tx.minTipCap ${TX_MIN_TIP_CAP} - # - --tx.notInMempoolTimeout ${TX_NOT_IN_MEMPOOL} - # - --tx.numConfirmations ${TX_NUM_CONFIRMATIONS} - # - --tx.receiptQueryInterval ${TX_RECEIPT_QUERY} - # - --tx.resubmissionTimeout ${TX_RESUBMISSION} - # - --tx.safeAbortNonceTooLowCount ${TX_SAFE_ABORT_NONCE_TOO_LOW} - # - --tx.sendTimeout ${TX_SEND_TIMEOUT} profiles: - proposer + - prover - blockscout taiko-blockscout-postgres: @@ -144,7 +130,7 @@ services: volumes: - ./blockscout-postgres-data:/var/lib/postgresql/data ports: - - 5432:5432 + - ${POSTGRES_PORT}:${POSTGRES_PORT} environment: POSTGRES_DB: blockscout POSTGRES_USER: postgres @@ -173,9 +159,9 @@ services: - nethermind_execution_l2 - taiko_client_driver ports: - - 8050:8050 + - ${VERIFIER_PORT}:${VERIFIER_PORT} environment: - SMART_CONTRACT_VERIFIER__SERVER__HTTP__ADDR: 0.0.0.0:8050 + SMART_CONTRACT_VERIFIER__SERVER__HTTP__ADDR: 0.0.0.0:${VERIFIER_PORT} PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin APP_USER: app SMART_CONTRACT_VERIFIER__SOLIDITY__ENABLED: true @@ -196,24 +182,24 @@ services: - nethermind_execution_l2 - taiko_client_driver ports: - - 4000:4000 + - ${BLOCKSCOUT_PORT}:${BLOCKSCOUT_PORT} environment: DATABASE_URL: postgresql://postgres:MyPassword1!@taiko-blockscout-postgres:5432/blockscout API_V2_ENABLED: true ETHEREUM_JSONRPC_VARIANT: nethermind - MICROSERVICE_SC_VERIFIER_URL: http://taiko-blockscout-verif:8050/api - ETHEREUM_JSONRPC_HTTP_URL: http://execution-taiko-l2-client:8547/ + MICROSERVICE_SC_VERIFIER_URL: http://taiko-blockscout-verif:${VERIFIER_PORT}/api + ETHEREUM_JSONRPC_HTTP_URL: http://l2-nethermind-execution-client:${L2_HTTP_PORT}/ INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: true - SUBNETWORK: Kurtosis - ETHEREUM_JSONRPC_TRACE_URL: http://execution-taiko-l2-client:8547/ + SUBNETWORK: Surge + ETHEREUM_JSONRPC_TRACE_URL: http://l2-nethermind-execution-client:${L2_HTTP_PORT}/ COIN: ETH MICROSERVICE_SC_VERIFIER_TYPE: sc_verifier - PORT: 4000 + PORT: ${BLOCKSCOUT_PORT} MICROSERVICE_SC_VERIFIER_ENABLED: true ECTO_USE_SSL: false SECRET_KEY_BASE: 56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN - CHAIN_ID: 763374 - SHOW_TESTNET_LABEL: true + CHAIN_ID: ${L2_CHAIN_ID} + SHOW_TESTNET_LABEL: false DISABLE_EXCHANGE_RATES: true DISABLE_KNOWN_TOKENS: true INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE: 10000 @@ -234,50 +220,50 @@ services: profiles: - blockscout - # prometheus: - # image: prom/prometheus:latest - # restart: unless-stopped - # ports: - # - ${PORT_PROMETHEUS}:9090 - # depends_on: - # - nethermind_execution_l2 - # - taiko_client_driver - # volumes: - # - ./docker/prometheus/l2:/etc/prometheus - # - prometheus_data:/prometheus - # command: - # - --log.level=debug - # - --config.file=/etc/prometheus/prometheus.yml - # profiles: - # - nethermind_execution_l2 - # - prover - # - proposer + prometheus: + image: prom/prometheus:latest + restart: unless-stopped + ports: + - ${PORT_PROMETHEUS}:${PORT_PROMETHEUS} + depends_on: + - nethermind_execution_l2 + - taiko_client_driver + volumes: + - ./docker/prometheus/l2:/etc/prometheus + - prometheus_data:/prometheus + command: + - --log.level=debug + - --config.file=/etc/prometheus/prometheus.yml + profiles: + - nethermind_execution_l2 + - prover + - proposer - # grafana: - # image: grafana/grafana:latest - # restart: unless-stopped - # ports: - # - ${PORT_GRAFANA}:3000 - # depends_on: - # - nethermind_execution_l2 - # - taiko_client_driver - # - prometheus - # environment: - # - GF_PATHS_CONFIG=/etc/grafana/custom/settings.ini - # - GF_PATHS_PROVISIONING=/etc/grafana/custom/provisioning - # - GF_LOG_LEVEL=WARN - # volumes: - # - ./docker/grafana/custom/settings.ini:/etc/grafana/custom/settings.ini - # - ./docker/grafana/custom/l2/provisioning/:/etc/grafana/custom/provisioning/ - # - grafana_data:/var/lib/grafana - # profiles: - # - nethermind_execution_l2 - # - prover - # - proposer + grafana: + image: grafana/grafana:latest + restart: unless-stopped + ports: + - ${PORT_GRAFANA}:${PORT_GRAFANA} + depends_on: + - nethermind_execution_l2 + - taiko_client_driver + - prometheus + environment: + - GF_PATHS_CONFIG=/etc/grafana/custom/settings.ini + - GF_PATHS_PROVISIONING=/etc/grafana/custom/provisioning + - GF_LOG_LEVEL=WARN + volumes: + - ./docker/grafana/custom/settings.ini:/etc/grafana/custom/settings.ini + - ./docker/grafana/custom/l2/provisioning/:/etc/grafana/custom/provisioning/ + - grafana_data:/var/lib/grafana + profiles: + - nethermind_execution_l2 + - prover + - proposer -# volumes: -# prometheus_data: -# grafana_data: +volumes: + prometheus_data: + grafana_data: networks: surge: diff --git a/script/start-driver.sh b/script/start-driver.sh index 8ac2492..17ff6eb 100755 --- a/script/start-driver.sh +++ b/script/start-driver.sh @@ -5,21 +5,21 @@ set -eou pipefail if [ "$DISABLE_P2P_SYNC" = "false" ]; then exec taiko-client driver \ --l1.ws "${L1_ENDPOINT_WS}" \ - --l2.ws ws://l2_execution_engine:8546 \ + --l2.ws ws://l2-nethermind-execution-client:"${L2_WS_PORT}" \ --l1.beacon "${L1_BEACON_HTTP}" \ - --l2.auth http://l2_execution_engine:8551 \ + --l2.auth http://l2-nethermind-execution-client:"${L2_ENGINE_API_PORT}" \ --taikoL1 "${TAIKO_L1_ADDRESS}" \ --taikoL2 "${TAIKO_L2_ADDRESS}" \ - --jwtSecret /data/taiko-geth/geth/jwtsecret \ + --jwtSecret /tmp/jwt/jwtsecret \ --p2p.sync \ --p2p.checkPointSyncUrl "${P2P_SYNC_URL}" else exec taiko-client driver \ --l1.ws "${L1_ENDPOINT_WS}" \ - --l2.ws ws://l2_execution_engine:8546 \ + --l2.ws ws://l2-nethermind-execution-client:"${L2_WS_PORT}" \ --l1.beacon "${L1_BEACON_HTTP}" \ - --l2.auth http://l2_execution_engine:8551 \ + --l2.auth http://l2-nethermind-execution-client:"${L2_ENGINE_API_PORT}" \ --taikoL1 "${TAIKO_L1_ADDRESS}" \ --taikoL2 "${TAIKO_L2_ADDRESS}" \ - --jwtSecret /data/taiko-geth/geth/jwtsecret + --jwtSecret /tmp/jwt/jwtsecret fi diff --git a/script/start-proposer.sh b/script/start-proposer.sh index fc5f1fd..a0fa4f2 100755 --- a/script/start-proposer.sh +++ b/script/start-proposer.sh @@ -4,14 +4,19 @@ set -eou pipefail if [ "$ENABLE_PROPOSER" = "true" ]; then ARGS="--l1.ws ${L1_ENDPOINT_WS} - --l2.http http://l2_execution_engine:8545 - --l2.auth http://l2_execution_engine:8551 + --l2.http http://l2-nethermind-execution-client:${L2_HTTP_PORT} + --l2.auth http://l2-nethermind-execution-client:${L2_ENGINE_API_PORT} --taikoL1 ${TAIKO_L1_ADDRESS} --taikoL2 ${TAIKO_L2_ADDRESS} - --taikoToken ${TAIKO_TOKEN_L1_ADDRESS} - --jwtSecret /data/taiko-geth/geth/jwtsecret + --jwtSecret /tmp/jwt/jwtsecret --l1.proposerPrivKey ${L1_PROPOSER_PRIVATE_KEY} - --l2.suggestedFeeRecipient ${L2_SUGGESTED_FEE_RECIPIENT}" + --l2.suggestedFeeRecipient ${L2_SUGGESTED_FEE_RECIPIENT} + --checkProfitability ${CHECK_PROFITABILITY} + --allowEmptyBlocks ${ALLOW_EMPTY_BLOCKS} + --surge.gasNeededForProposingBlock ${PROPOSING_BLOCK_GAS} + --surge.gasNeededForProvingBlock ${PROVING_BLOCK_GAS} + --surge.offChainCosts ${OFF_CHAIN_COSTS} + --surge.priceFluctuationModifier ${PRICE_FLUCTUATION_MODIFIER}" if [ -z "$L1_ENDPOINT_WS" ]; then echo "Error: L1_ENDPOINT_WS must be non-empty" @@ -23,6 +28,10 @@ if [ "$ENABLE_PROPOSER" = "true" ]; then exit 1 fi + if [ -n "$EPOCH_INTERVAL" ]; then + ARGS="${ARGS} --epoch.interval ${EPOCH_INTERVAL}" + fi + if [ -n "$EPOCH_MIN_TIP" ]; then ARGS="${ARGS} --epoch.minTip ${EPOCH_MIN_TIP}" fi @@ -61,8 +70,8 @@ if [ "$ENABLE_PROPOSER" = "true" ]; then ARGS="${ARGS} --tx.minTipCap ${TX_MIN_TIP_CAP}" fi - if [ -n "$TX_NOT_IN_MEMPOOL" ]; then - ARGS="${ARGS} --tx.notInMempoolTimeout ${TX_NOT_IN_MEMPOOL}" + if [ -n "$TX_NOT_IN_MEMPOOL_TIMEOUT" ]; then + ARGS="${ARGS} --tx.notInMempoolTimeout ${TX_NOT_IN_MEMPOOL_TIMEOUT}" fi if [ -n "$TX_NUM_CONFIRMATIONS" ]; then diff --git a/script/start-prover-relayer.sh b/script/start-prover-relayer.sh index 5aea315..912f183 100755 --- a/script/start-prover-relayer.sh +++ b/script/start-prover-relayer.sh @@ -4,19 +4,15 @@ set -eou pipefail if [ "$ENABLE_PROVER" = "true" ]; then ARGS="--l1.ws ${L1_ENDPOINT_WS} - --l2.ws ws://l2_execution_engine:8546 - --l2.http http://l2_execution_engine:8545 + --l2.ws ws://l2-nethermind-execution-client:${L2_WS_PORT} + --l2.http http://l2-nethermind-execution-client:${L2_HTTP_PORT} --taikoL1 ${TAIKO_L1_ADDRESS} --taikoL2 ${TAIKO_L2_ADDRESS} - --taikoToken ${TAIKO_TOKEN_L1_ADDRESS} --l1.proverPrivKey ${L1_PROVER_PRIVATE_KEY} --prover.capacity ${PROVER_CAPACITY} - --raiko.host ${SGX_RAIKO_HOST}" - - if [ -z "$SGX_RAIKO_HOST" ]; then - echo "Error: SGX_RAIKO_HOST must be non-empty" - exit 1 - fi + --sgxVerifier ${SGX_VERIFIER} + --sp1Verifier ${SP1_VERIFIER} + --risc0Verifier ${RISC0_VERIFIER}" if [ -z "$L1_ENDPOINT_WS" ]; then echo "Error: L1_ENDPOINT_WS must be non-empty" @@ -33,6 +29,18 @@ if [ "$ENABLE_PROVER" = "true" ]; then exit 1 fi + if [ -n "$SGX_RAIKO_HOST" ]; then + ARGS="${ARGS} --raiko.host ${SGX_RAIKO_HOST}" + fi + + if [ -n "$RAIKO_HOST_ZKVM" ]; then + ARGS="${ARGS} --raiko.host.zkvm ${RAIKO_HOST_ZKVM}" + fi + + if [ -n "$RAIKO_REQUEST_TIMEOUT" ]; then + ARGS="${ARGS} --raiko.requestTimeout ${RAIKO_REQUEST_TIMEOUT}" + fi + if [ -n "$PROVER_SET" ]; then ARGS="${ARGS} --proverSet ${PROVER_SET}" fi diff --git a/chainspec.json b/static/chainspec.json similarity index 100% rename from chainspec.json rename to static/chainspec.json diff --git a/jwtsecret b/static/jwtsecret similarity index 100% rename from jwtsecret rename to static/jwtsecret