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

Error when running l2-rollup in app op-batcher #13808

Open
neodiz opened this issue Jan 16, 2025 · 7 comments
Open

Error when running l2-rollup in app op-batcher #13808

neodiz opened this issue Jan 16, 2025 · 7 comments

Comments

@neodiz
Copy link

neodiz commented Jan 16, 2025

Bug Description
When starting the network, op-batcher constantly shows an error in the logs

Steps to Reproduce
I used the tutorial at https://docs.optimism.io/builders/chain-operators/tutorials/create-l2-rollup

Environment Information:

  • Operating System: Ubuntu 20.04
  • git 2 2.34.1
  • go 1.21 1.22.9
  • node 20 22.11.0
  • pnpm 8 9.14.2
  • foundry 0.2.0 0.2.0
  • make 3 4.3
  • jq 1.6 1.6
  • direnv 2 2.25.2

Configurations:
Use branch tutorials/chain
env from file .envrc
L1_RPC_KIND=debug_geth
config network use by default. Only change l2ChainID

{
  "l1StartingBlockTag": "",
  "l1ChainID": 11155111,
  "l2ChainID": 42090,
  "l2BlockTime": 2,
  "l1BlockTime": 12,
  "maxSequencerDrift": 600,
  "sequencerWindowSize": 3600,
  "channelTimeout": 300,

  "p2pSequencerAddress": "",
  "batchInboxAddress": "",
  "batchSenderAddress": "",

  "l2OutputOracleSubmissionInterval": 120,
  "l2OutputOracleStartingBlockNumber": 0,
  "l2OutputOracleStartingTimestamp": 1736488032,

  "l2OutputOracleProposer": "",
  "l2OutputOracleChallenger": "",

  "finalizationPeriodSeconds": 12,

  "proxyAdminOwner": "",
  "baseFeeVaultRecipient": "",
  "l1FeeVaultRecipient": "",
  "sequencerFeeVaultRecipient": "",
  "finalSystemOwner": "",
  "superchainConfigGuardian": "",

  "baseFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
  "l1FeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
  "sequencerFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
  "baseFeeVaultWithdrawalNetwork": 0,
  "l1FeeVaultWithdrawalNetwork": 0,
  "sequencerFeeVaultWithdrawalNetwork": 0,

  "gasPriceOracleOverhead": 2100,
  "gasPriceOracleScalar": 1000000,

  "enableGovernance": true,
  "governanceTokenSymbol": "OP",
  "governanceTokenName": "Optimism",
  "governanceTokenOwner": "",

  "l2GenesisBlockGasLimit": "0x1c9c380",
  "l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
  "l2GenesisRegolithTimeOffset": "0x0",

  "eip1559Denominator": 50,
  "eip1559DenominatorCanyon": 250,
  "eip1559Elasticity": 6,

  "l2GenesisRegolithTimeOffset": "0x0",
  "l2GenesisDeltaTimeOffset": null,
  "l2GenesisCanyonTimeOffset": "0x0",

  "systemConfigStartBlock": 0,

  "requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "recommendedProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",

  "faultGameAbsolutePrestate": "",
  "faultGameMaxDepth": 44,
  "faultGameMaxDuration": 1200,
  "faultGameGenesisBlock": 0,
  "faultGameGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "faultGameSplitDepth": 14
}

Logs:
lvl=eror msg="unable to get tx data" err="adding block[0] to channel builder: converting block to batch: first transaction in block is not a deposit tx"

Additional context
The problem occurs immediately after starting the network


@neodiz
Copy link
Author

neodiz commented Jan 16, 2025

log then op-batcher start

t=2025-01-13T07:29:04+0000 lvl=info msg="Initializing Batch Submitter"
t=2025-01-13T07:29:05+0000 lvl=info msg="metrics disabled"
t=2025-01-13T07:29:05+0000 lvl=info msg="Admin RPC enabled"
t=2025-01-13T07:29:05+0000 lvl=info msg="Starting JSON-RPC server"
t=2025-01-13T07:29:05+0000 lvl=info msg="Starting batcher"             notSubmittingOnStart=false
t=2025-01-13T07:29:05+0000 lvl=info msg="Starting Batch Submitter"
t=2025-01-13T07:29:05+0000 lvl=info msg="Batch Submitter started"
t=2025-01-13T07:29:06+0000 lvl=info msg="Starting batch-submitter work at safe-head" safe=0xb3b1d98d30ae3b2cc3ded539866221dba859d25aba225191d6895392abb66ae3:0
t=2025-01-13T07:29:06+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:06+0000 lvl=dbug msg="Requested tx data"                l1Head=0x8ce7babeed05a25c0a8642d73f45b25ce19a9c8e30d9c6818fea33b01ecbc691:7481003 data_pending=false blocks_pending=0
t=2025-01-13T07:29:07+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:07+0000 lvl=dbug msg="Requested tx data"                l1Head=0x8ce7babeed05a25c0a8642d73f45b25ce19a9c8e30d9c6818fea33b01ecbc691:7481003 data_pending=false blocks_pending=0
t=2025-01-13T07:29:08+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:08+0000 lvl=dbug msg="Requested tx data"                l1Head=0x8ce7babeed05a25c0a8642d73f45b25ce19a9c8e30d9c6818fea33b01ecbc691:7481003 data_pending=false blocks_pending=0
t=2025-01-13T07:29:09+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:09+0000 lvl=dbug msg="Requested tx data"                l1Head=0x8ce7babeed05a25c0a8642d73f45b25ce19a9c8e30d9c6818fea33b01ecbc691:7481003 data_pending=false blocks_pending=0
t=2025-01-13T07:29:10+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:10+0000 lvl=dbug msg="Requested tx data"                l1Head=0x8ce7babeed05a25c0a8642d73f45b25ce19a9c8e30d9c6818fea33b01ecbc691:7481003 data_pending=false blocks_pending=0
t=2025-01-13T07:29:11+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:11+0000 lvl=dbug msg="Requested tx data"                l1Head=0x8ce7babeed05a25c0a8642d73f45b25ce19a9c8e30d9c6818fea33b01ecbc691:7481003 data_pending=false blocks_pending=0
t=2025-01-13T07:29:12+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:12+0000 lvl=dbug msg="Requested tx data"                l1Head=0x8ce7babeed05a25c0a8642d73f45b25ce19a9c8e30d9c6818fea33b01ecbc691:7481003 data_pending=false blocks_pending=0
t=2025-01-13T07:29:13+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:13+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:14+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:14+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:15+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:15+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:16+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:16+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:17+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:17+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:18+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:18+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:19+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:19+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:20+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:20+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:21+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:21+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:22+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:22+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:23+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:23+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:24+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:24+0000 lvl=dbug msg="Requested tx data"                l1Head=0xe9e50b2aec76e02223c9ea25810f5ce60b1533533e5c57640f99417b2a944245:7481004 data_pending=false blocks_pending=0
t=2025-01-13T07:29:25+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:25+0000 lvl=dbug msg="Requested tx data"                l1Head=0xfd638040bcef679c443d37e044e695c80a394e79fcdf569f20323ce1b14e818c:7481005 data_pending=false blocks_pending=0
t=2025-01-13T07:29:26+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:26+0000 lvl=dbug msg="Requested tx data"                l1Head=0xfd638040bcef679c443d37e044e695c80a394e79fcdf569f20323ce1b14e818c:7481005 data_pending=false blocks_pending=0
t=2025-01-13T07:29:27+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:27+0000 lvl=dbug msg="Requested tx data"                l1Head=0xfd638040bcef679c443d37e044e695c80a394e79fcdf569f20323ce1b14e818c:7481005 data_pending=false blocks_pending=0
t=2025-01-13T07:29:28+0000 lvl=warn msg="Error calculating L2 block range" err="L2 safe head ahead of L2 unsafe head"
t=2025-01-13T07:29:28+0000 lvl=dbug msg="Requested tx data"                l1Head=0xfd638040bcef679c443d37e044e695c80a394e79fcdf569f20323ce1b14e818c:7481005 data_pending=false blocks_pending=0
t=2025-01-13T07:29:29+0000 lvl=info msg="added L2 block to local state"    block=0x973463007c9639104c23192c42d5d33b5b981b04d427053255c6fc860e0342d3:1 tx_count=0 time=1,733,905,085
t=2025-01-13T07:29:29+0000 lvl=warn msg="Invalid L2 block loaded into state" err="l2 block is missing L1 info deposit tx, block hash: 0x973463007c9639104c23192c42d5d33b5b981b04d427053255c6fc860e0342d3"

@protolambda
Copy link
Contributor

t=2025-01-13T07:29:29+0000 lvl=warn msg="Invalid L2 block loaded into state" err="l2 block is missing L1 info deposit tx, block hash: 0x973463007c9639104c23192c42d5d33b5b981b04d427053255c6fc860e0342d3"

Is the op-batcher connected to the L1 RPC instead of L2 RPC? The L2 blocks should always contain a special system deposit.
This chain is misconfigured.

@neodiz
Copy link
Author

neodiz commented Jan 20, 2025

I start

  ./bin/op-batcher \
  --l2-eth-rpc=http://localhost:8545 \
  --rollup-rpc=http://localhost:9545 \
  --poll-interval=1s \
  --sub-safety-margin=6 \
  --num-confirmations=1 \
  --safe-abort-nonce-too-low-count=3 \
  --resubmission-timeout=30s \
  --rpc.addr=0.0.0.0 \
  --rpc.port=8548 \
  --rpc.enable-admin \
  --max-channel-duration=25 \
  --l1-eth-rpc=$L1_RPC_URL \
  --private-key=$GS_BATCHER_PRIVATE_KEY --log.level=debug > /mnt/op-batcher.log 2>&1

Sure. op-batcher have current connection to L1 network.

@hamidmuslih
Copy link

hamidmuslih commented Jan 20, 2025

i had similar issue, add --l1.rpckind=any --l1.trustrpc flags in op-node and restart, also make sure L1 is synced

@neodiz
Copy link
Author

neodiz commented Jan 21, 2025

Changed env L1_RPC_KIND to any
Start node using param.

  --l2=http://localhost:8551 \
  --l2.jwt-secret=./jwt.txt \
  --sequencer.enabled \
  --sequencer.l1-confs=5 \
  --verifier.l1-confs=4 \
  --rollup.config=./rollup.json \
  --rpc.addr=0.0.0.0 \
  --p2p.disable \
  --rpc.enable-admin \
  --p2p.sequencer.key=$GS_SEQUENCER_PRIVATE_KEY \
  --l1=$L1_RPC_URL \
  --l1.rpckind=$L1_RPC_KIND --l1.trustrpc --log.level=debug > /mnt/op-node.log 2>&1 

and from logs see save error

t=2025-01-21T12:59:51+0000 lvl=warn msg="Invalid L2 block loaded into state" err="l2 block is missing L1 info deposit tx, block hash: 0x08b0407e64c43f293230a5b13cdb9b31ebcc7b475f36069e8708fb17d0048871"
t=2025-01-21T12:59:51+0000 lvl=dbug msg="Requested tx data"                  l1Head=0x3badf9061c1d2dd005e6e7658c6e3b75d90de2beedea227971d6b57aa0d4ba27:7540004 data_pending=false blocks_pending=210
t=2025-01-21T12:59:51+0000 lvl=eror msg="unable to get tx data"              err="adding block[0] to channel builder: converting block to batch: block 0x6f724ca7c10b00ad565fc1dcceb26bc4cb2d3900d291b01245b9924491dc53be has no transactions"

@hamidmuslih
Copy link

hmm i have run with success with the below commands.

Init the geth
build/bin/geth init --datadir=datadir --state.scheme hash genesis.json
 
Run geth
./build/bin/geth  --datadir ./datadir --http --http.corsdomain="*" --http.vhosts="*" --http.addr=0.0.0.0 --http.api=web3,debug,eth,txpool,net,engine --ws --ws.addr=0.0.0.0  --ws.port=8546  --ws.origins="*"  --ws.api=debug,eth,txpool,net,engine  --syncmode=full --gcmode=archive --nodiscover --maxpeers=0 --networkid=42069 --authrpc.vhosts="*" --authrpc.addr=0.0.0.0  --authrpc.port=8551 --authrpc.jwtsecret=./jwt.txt --rollup.disabletxpoolgossip=true
 
Op-node
./bin/op-node --l2=http://localhost:8551 --l2.jwt-secret=./jwt.txt --sequencer.enabled --sequencer.l1-confs=5 --verifier.l1-confs=4 --rollup.config=./rollup.json --rpc.addr=0.0.0.0 --p2p.disable --rpc.enable-admin --p2p.sequencer.key=$GS_SEQUENCER_PRIVATE_KEY --l1=$L1_RPC_URL --l1.rpckind=$L1_RPC_KIND --l1.trustrpc
 
Op-batcher
./bin/op-batcher --l2-eth-rpc=http://localhost:8545 --rollup-rpc=http://localhost:9545 --poll-interval=1s --sub-safety-margin=6 --num-confirmations=1 --safe-abort-nonce-too-low-count=3 --resubmission-timeout=30s --rpc.addr=0.0.0.0 --rpc.port=8548 --rpc.enable-admin --max-channel-duration=25 --l1-eth-rpc=$L1_RPC_URL --private-key=$GS_BATCHER_PRIVATE_KEY
 
Op-proposer
./bin/op-proposer --poll-interval=12s --rpc.port=8560 --rollup-rpc=http://localhost:9545 --l2oo-address=$(cat ../packages/contracts-bedrock/deployments/getting-started/.deploy | jq -r .L2OutputOracleProxy) --private-key=$GS_PROPOSER_PRIVATE_KEY --l1-eth-rpc=$L1_RPC_URL

@neodiz
Copy link
Author

neodiz commented Jan 22, 2025

Repo optimism i use branch tutorials/chain (from documentation)
Repo op-geth i use optimism.
Maybe that's the problem. I try deploy smart from branch v1.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants