Skip to content

Commit

Permalink
fix(devnet): batcher uses its address to submit transactions (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
welkin22 authored Jun 20, 2024
1 parent 92cada6 commit 40cf16b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
15 changes: 13 additions & 2 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ def deployL1ContractsForDeploy(paths):
l1_init_holder = l1env['INIT_HOLDER']
l1_init_holder_prv = l1env['INIT_HOLDER_PRV']
proposer_address = l1env['PROPOSER_ADDRESS']
batcher_address = l1env['BATCHER_ADDRESS']
account = l1_init_holder
log.info(f'Deploying with {account}')

Expand All @@ -231,6 +232,13 @@ def deployL1ContractsForDeploy(paths):
'--value', '10000ether', proposer_address
], env={}, cwd=paths.contracts_bedrock_dir)

# send some ether to batcher address
run_command([
'cast', 'send', '--private-key', l1_init_holder_prv,
'--rpc-url', 'http://127.0.0.1:8545', '--gas-price', '10000000000', '--legacy',
'--value', '10000ether', batcher_address
], env={}, cwd=paths.contracts_bedrock_dir)

# deploy the create2 deployer
run_command([
'cast', 'publish', '--rpc-url', 'http://127.0.0.1:8545',
Expand Down Expand Up @@ -263,6 +271,8 @@ def devnet_deploy(paths):
l1_init_holder_prv = l1env['INIT_HOLDER_PRV']
proposer_address = l1env['PROPOSER_ADDRESS']
proposer_address_prv = l1env['PROPOSER_ADDRESS_PRV']
batcher_address = l1env['BATCHER_ADDRESS']
batcher_address_prv = l1env['BATCHER_ADDRESS_PRV']
log.info('Generating network config.')
devnet_cfg_orig = pjoin(paths.contracts_bedrock_dir, 'deploy-config', 'devnetL1.json')
devnet_cfg_backup = pjoin(paths.devnet_dir, 'devnetL1.json.bak')
Expand All @@ -279,8 +289,8 @@ def devnet_deploy(paths):
deploy_config['eip1559Denominator'] = 8
deploy_config['eip1559DenominatorCanyon'] = 8
deploy_config['eip1559Elasticity'] = 2
deploy_config['batchSenderAddress'] = l1_init_holder
deploy_config['l2OutputOracleProposer'] = proposer_address
deploy_config['batchSenderAddress'] = batcher_address
deploy_config['baseFeeVaultRecipient'] = l1_init_holder
deploy_config['l1FeeVaultRecipient'] = l1_init_holder
deploy_config['sequencerFeeVaultRecipient'] = l1_init_holder
Expand Down Expand Up @@ -347,7 +357,8 @@ def devnet_deploy(paths):
'SEQUENCER_BATCH_INBOX_ADDRESS': rollup_config['batch_inbox_address'],
'OP_BATCHER_SEQUENCER_BATCH_INBOX_ADDRESS': rollup_config['batch_inbox_address'],
'INIT_HOLDER_PRV': l1_init_holder_prv,
'PROPOSER_ADDRESS_PRV': proposer_address_prv
'PROPOSER_ADDRESS_PRV': proposer_address_prv,
'BATCHER_ADDRESS_PRV': batcher_address_prv
})

log.info('Devnet ready.')
Expand Down
2 changes: 1 addition & 1 deletion ops-bedrock/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ services:
OP_BATCHER_TXMGR_RECEIPT_QUERY_INTERVAL: 1s
OP_BATCHER_RESUBMISSION_TIMEOUT: "30s"
OP_BATCHER_LOG_LEVEL: "debug"
OP_BATCHER_PRIVATE_KEY: ${INIT_HOLDER_PRV}
OP_BATCHER_PRIVATE_KEY: ${BATCHER_ADDRESS_PRV}
OP_BATCHER_PPROF_ENABLED: "true"
OP_BATCHER_METRICS_ENABLED: "true"
OP_BATCHER_RPC_ENABLE_ADMIN: "true"
Expand Down
2 changes: 2 additions & 0 deletions ops-bedrock/l1.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ INIT_HOLDER="0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
INIT_HOLDER_PRV="ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
PROPOSER_ADDRESS="0x04d63aBCd2b9b1baa327f2Dda0f873F197ccd186"
PROPOSER_ADDRESS_PRV="59ba8068eb256d520179e903f43dacf6d8d57d72bd306e1bd603fdb8c8da10e8"
BATCHER_ADDRESS="0x64682F353D27a746685902a3274aBDDfaD903e72"
BATCHER_ADDRESS_PRV="5e272ec7037b061078bf86ae2ed24df4808a483ba746f59dd8e91230919b9463"
BSC_CHAIN_ID=714

0 comments on commit 40cf16b

Please sign in to comment.