Commit 970f421e authored by Maurelian's avatar Maurelian Committed by Kelvin Fichter

feat(batch-submitter): Ensure empty batches are not submitted

parent 5e97fd5d
---
'@eth-optimism/batch-submitter': patch
---
Ensure empty batches are not submitted
...@@ -3,7 +3,7 @@ ADDRESS_MANAGER_ADDRESS= ...@@ -3,7 +3,7 @@ ADDRESS_MANAGER_ADDRESS=
DEBUG=info*,error*,warn*,debug* DEBUG=info*,error*,warn*,debug*
MAX_L1_TX_SIZE=90000 MAX_L1_TX_SIZE=90000
MIN_L1_TX_SIZE=0 MIN_L1_TX_SIZE=32
MAX_TX_BATCH_COUNT=50 MAX_TX_BATCH_COUNT=50
MAX_STATE_BATCH_COUNT=50 MAX_STATE_BATCH_COUNT=50
......
...@@ -16,7 +16,7 @@ L1_NODE_WEB3_URL=http://localhost:9545 ...@@ -16,7 +16,7 @@ L1_NODE_WEB3_URL=http://localhost:9545
L2_NODE_WEB3_URL=http://localhost:8545 L2_NODE_WEB3_URL=http://localhost:8545
MAX_L1_TX_SIZE=90000 MAX_L1_TX_SIZE=90000
MIN_L1_TX_SIZE=0 MIN_L1_TX_SIZE=32
MAX_TX_BATCH_SIZE=50 MAX_TX_BATCH_SIZE=50
MAX_STATE_BATCH_COUNT=2000 MAX_STATE_BATCH_COUNT=2000
MAX_TX_BATCH_COUNT=250 MAX_TX_BATCH_COUNT=250
......
...@@ -334,6 +334,11 @@ export const run = async () => { ...@@ -334,6 +334,11 @@ export const run = async () => {
} }
} }
if (requiredEnvVars.MIN_L1_TX_SIZE === 0) {
logger.error('Must configure a MIN_L1_TX_SIZE greater than 0')
process.exit(1)
}
const clearPendingTxs = requiredEnvVars.CLEAR_PENDING_TXS const clearPendingTxs = requiredEnvVars.CLEAR_PENDING_TXS
const l2Provider = injectL2Context( const l2Provider = injectL2Context(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment