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

Js/refac surge multiprover #6

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
97 changes: 69 additions & 28 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,48 +1,89 @@
############################### 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
# `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=
# 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.
Expand All @@ -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
Expand All @@ -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=

Expand All @@ -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.
Expand Down
78 changes: 78 additions & 0 deletions docker-compose-protocol.yml
Original file line number Diff line number Diff line change
@@ -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
116 changes: 0 additions & 116 deletions docker-compose-prover.yml

This file was deleted.

Loading
Loading