From e8c1f9a836865336149839b31e4f4529d13290c9 Mon Sep 17 00:00:00 2001 From: Roger <50648015+RogerLamTd@users.noreply.github.com> Date: Tue, 16 Jul 2024 00:34:31 -0700 Subject: [PATCH] feat(proposer): support epoch.minTip (#316) * support epoch.minTip * use prover-set in prover --- .env.sample | 4 ++-- .env.sample.hekla | 2 ++ script/start-proposer-hekla.sh | 4 ++++ script/start-proposer.sh | 4 ++++ script/start-prover-relayer-hekla.sh | 4 ++++ script/start-prover-relayer.sh | 4 ++++ 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.env.sample b/.env.sample index b2a0e0b..2785b8e 100644 --- a/.env.sample +++ b/.env.sample @@ -71,8 +71,8 @@ L2_SUGGESTED_FEE_RECIPIENT= BLOB_ALLOWED=true # 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= -# Minimum Gas Tip for a transaction to accept for mempool (in wei). -TAIKO_MIN_TIP= +# Minimum tip (in GWei) for a transaction to propose. +EPOCH_MIN_TIP= # 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= diff --git a/.env.sample.hekla b/.env.sample.hekla index c21ba9f..de9f002 100644 --- a/.env.sample.hekla +++ b/.env.sample.hekla @@ -69,6 +69,8 @@ L2_SUGGESTED_FEE_RECIPIENT= # If you keep this default value you must also enable a prover by setting ENABLE_PROVER=true. # Whether to send EIP-4844 blob transactions when proposing blocks. BLOB_ALLOWED=true +# Minimum tip (in GWei) for a transaction to propose. +EPOCH_MIN_TIP= # 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= diff --git a/script/start-proposer-hekla.sh b/script/start-proposer-hekla.sh index f0566c4..c2aed55 100755 --- a/script/start-proposer-hekla.sh +++ b/script/start-proposer-hekla.sh @@ -22,6 +22,10 @@ if [ "$ENABLE_PROPOSER" = "true" ]; then echo "Error: L1_PROPOSER_PRIVATE_KEY must be non-empty" exit 1 fi + + if [ -n "$EPOCH_MIN_TIP" ]; then + ARGS="${ARGS} --epoch.minTip ${EPOCH_MIN_TIP}" + fi if [ -n "$PROVER_SET" ]; then ARGS="${ARGS} --proverSet ${PROVER_SET}" diff --git a/script/start-proposer.sh b/script/start-proposer.sh index 6971604..fc5f1fd 100755 --- a/script/start-proposer.sh +++ b/script/start-proposer.sh @@ -23,6 +23,10 @@ if [ "$ENABLE_PROPOSER" = "true" ]; then exit 1 fi + if [ -n "$EPOCH_MIN_TIP" ]; then + ARGS="${ARGS} --epoch.minTip ${EPOCH_MIN_TIP}" + fi + if [ -n "$PROVER_SET" ]; then ARGS="${ARGS} --proverSet ${PROVER_SET}" fi diff --git a/script/start-prover-relayer-hekla.sh b/script/start-prover-relayer-hekla.sh index 95e98bc..a569d30 100755 --- a/script/start-prover-relayer-hekla.sh +++ b/script/start-prover-relayer-hekla.sh @@ -34,6 +34,10 @@ if [ "$ENABLE_PROVER" = "true" ]; then exit 1 fi + if [ -n "$PROVER_SET" ]; then + ARGS="${ARGS} --proverSet ${PROVER_SET}" + fi + if [ -n "$TOKEN_ALLOWANCE" ]; then ARGS="${ARGS} --prover.allowance ${TOKEN_ALLOWANCE}" fi diff --git a/script/start-prover-relayer.sh b/script/start-prover-relayer.sh index 95e98bc..a569d30 100755 --- a/script/start-prover-relayer.sh +++ b/script/start-prover-relayer.sh @@ -34,6 +34,10 @@ if [ "$ENABLE_PROVER" = "true" ]; then exit 1 fi + if [ -n "$PROVER_SET" ]; then + ARGS="${ARGS} --proverSet ${PROVER_SET}" + fi + if [ -n "$TOKEN_ALLOWANCE" ]; then ARGS="${ARGS} --prover.allowance ${TOKEN_ALLOWANCE}" fi