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

feat(proposer): wait receipt timeout flags + refactor prover scripts #104

Merged
merged 3 commits into from
Aug 2, 2023
Merged
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
2 changes: 2 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ PROPOSE_BLOCK_TX_GAS_LIMIT=800000
# Comma-delimited local tx pool addresses you want to prioritize, useful to set your proposer to only propose blocks with your prover's transactions
TXPOOL_LOCALS=

# Timeout when waiting for a propose or prove block transaction receipt to be seen, in seconds
WAIT_RECEIPT_TIMEOUT=360
2 changes: 2 additions & 0 deletions .env.sample.l3
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ PROPOSE_BLOCK_TX_GAS_LIMIT=800000
# Comma-delimited local tx pool addresses you want to prioritize, useful to set your proposer to only propose blocks with your prover's transactions
TXPOOL_LOCALS=

# Timeout when waiting for a propose or prove block transaction receipt to be seen, in seconds
WAIT_RECEIPT_TIMEOUT=360
23 changes: 12 additions & 11 deletions script/l2/start-prover-relayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ if [ "$ENABLE_PROVER" == "true" ]; then

WAIT_HOSTS=zkevm_chain_prover_rpcd:9000 WAIT_TIMEOUT=360 ./wait

taiko-client prover \
--l1.ws ${L1_ENDPOINT_WS} \
--l2.ws ws://l2_execution_engine:8546 \
--l1.http ${L1_ENDPOINT_HTTP} \
--l2.http http://l2_execution_engine:8545 \
--taikoL1 ${TAIKO_L1_ADDRESS} \
--taikoL2 ${TAIKO_L2_ADDRESS} \
--zkevmRpcdEndpoint http://zkevm_chain_prover_rpcd:9000 \
--zkevmRpcdParamsPath /data \
--l1.proverPrivKey ${L1_PROVER_PRIVATE_KEY} \
--maxConcurrentProvingJobs ${ZKEVM_CHAIN_INSTANCES_NUM}
ARGS="--l1.ws ${L1_ENDPOINT_WS}
--l2.ws ws://l2_execution_engine:8546
--l1.http ${L1_ENDPOINT_HTTP}
--l2.http http://l2_execution_engine:8545
--taikoL1 ${TAIKO_L1_ADDRESS}
--taikoL2 ${TAIKO_L2_ADDRESS}
--zkevmRpcdEndpoint http://zkevm_chain_prover_rpcd:9000
--zkevmRpcdParamsPath /data
--l1.proverPrivKey ${L1_PROVER_PRIVATE_KEY}
--maxConcurrentProvingJobs ${ZKEVM_CHAIN_INSTANCES_NUM}"

taiko-client prover {$ARGS}
else
sleep infinity
fi
5 changes: 5 additions & 0 deletions script/l3/start-proposer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ fi
if [[ ! -z "$PROPOSE_BLOCK_TX_GAS_LIMIT" ]]; then
ARGS="${ARGS} --proposeBlockTxGasLimit ${PROPOSE_BLOCK_TX_GAS_LIMIT}"
fi

if [[ ! -z "$WAIT_RECEIPT_TIMEOUT" ]]; then
ARGS="${ARGS} --rpc.waitReceiptTimeout ${WAIT_RECEIPT_TIMEOUT}"
fi

if [ "$ENABLE_PROPOSER" == "true" ]; then
taiko-client proposer ${ARGS}
else
Expand Down
48 changes: 22 additions & 26 deletions script/l3/start-prover-relayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,31 @@ if [ "$ENABLE_PROVER" == "true" ]; then

WAIT_HOSTS=l3_zkevm_chain_prover_rpcd:9000 WAIT_TIMEOUT=3600 ./wait

if [ "$PROVE_UNASSIGNED_BLOCKS" == "true" ]; then
taiko-client prover \
--l1.ws ${L2_ENDPOINT_WS} \
--l2.ws ws://l3_execution_engine:8546 \
--l1.http ${L2_ENDPOINT_HTTP} \
--l2.http http://l3_execution_engine:8545 \
--taikoL1 ${TAIKO_L1_ADDRESS} \
--taikoL2 ${TAIKO_L2_ADDRESS} \
--taikoProverPoolL1 ${PROVER_POOL_ADDRESS} \
--zkevmRpcdEndpoint http://l3_zkevm_chain_prover_rpcd:9000 \

ARGS="--l1.ws ${L2_ENDPOINT_WS}
--l2.ws ws://l3_execution_engine:8546
--l1.http ${L2_ENDPOINT_HTTP}
--l2.http http://l3_execution_engine:8545
--taikoL1 ${TAIKO_L1_ADDRESS}
--taikoL2 ${TAIKO_L2_ADDRESS}
--taikoProverPoolL1 ${PROVER_POOL_ADDRESS}
--zkevmRpcdEndpoint http://l3_zkevm_chain_prover_rpcd:9000
--zkevmRpcdParamsPath /data \
--l1.proverPrivKey ${L2_PROVER_PRIVATE_KEY} \
--maxConcurrentProvingJobs ${ZKEVM_CHAIN_INSTANCES_NUM} \
--prover.proveUnassignedBlocks
--l1.proverPrivKey ${L2_PROVER_PRIVATE_KEY}
--maxConcurrentProvingJobs ${ZKEVM_CHAIN_INSTANCES_NUM}"

if [[ ! -z "$WAIT_RECEIPT_TIMEOUT" ]]; then
ARGS="${ARGS} --rpc.waitReceiptTimeout ${WAIT_RECEIPT_TIMEOUT}"
fi

if [[ ! -z "$PROVE_UNASSIGNED_BLOCKS" ]]; then
ARGS="${ARGS} --prover.proveUnassignedBlocks"
else
taiko-client prover \
--l1.ws ${L2_ENDPOINT_WS} \
--l2.ws ws://l3_execution_engine:8546 \
--l1.http ${L2_ENDPOINT_HTTP} \
--l2.http http://l3_execution_engine:8545 \
--taikoL1 ${TAIKO_L1_ADDRESS} \
--taikoL2 ${TAIKO_L2_ADDRESS} \
--taikoProverPoolL1 ${PROVER_POOL_ADDRESS} \
--zkevmRpcdEndpoint http://l3_zkevm_chain_prover_rpcd:9000 \
--zkevmRpcdParamsPath /data \
--l1.proverPrivKey ${L2_PROVER_PRIVATE_KEY} \
--maxConcurrentProvingJobs ${ZKEVM_CHAIN_INSTANCES_NUM} \
--prover.proveUnassignedBlocks=false
ARGS="${ARGS} --prover.proveUnassignedBlocks false"
fi


taiko-client prover ${ARGS}
else
sleep infinity
fi