optimism icon indicating copy to clipboard operation
optimism copied to clipboard

Deploying a contract with an initcode that is too large should not succeed.

Open zmovane opened this issue 3 months ago • 2 comments

Bug Description The OP-Batcher service is encountering an "INVALID: initcode too large" error and the error keeps occurring.

How to handle the "INVALID: initcode too large" error that keeps occurring with the OP-Batcher service? Is there a way to skip failed transactions?

Steps to Reproduce Deploying a contract with a large initcode

Expected behavior Deploying a contract with an initcode that is too large should not succeed.

Environment Information:

  • Operating System: AWS Linux 2023
  • Package Version (or commit hash): op-batcher a06cae81ed60c85d1566f48f45d9f9c0e48cc47c

Configurations:

./bin/op-batcher \
  --l2-eth-rpc=http://localhost:8545 \
  --rollup-rpc=http://localhost:8547 \
  --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=1 \
  --l1-eth-rpc=$L1_RPC_URL \
  --private-key=$GS_BATCHER_PRIVATE_KEY

Logs:

t=2024-03-19T11:02:02+0000 lvl=info msg="bumping gas price for transaction" service=batcher tx=0x5b63c6cfa0877b792b17b423278ea3b5437e93efc11870a9fbb73ee4ffc07771 nonce=192 gasTipCap=1,100,000,000 gasFeeCap=1,693,997,600 gasLimit=1,613,804
t=2024-03-19T11:02:04+0000 lvl=eror msg="unable to publish transaction"     service=batcher tx=0x15255d6d044586f3e925561213c15bf61e003f7d62bfcb8d76db4c23dded3bf7 nonce=192 gasTipCap=1,210,000,000 gasFeeCap=1,863,397,360 gasLimit=1,613,804 err="INVALID: initcode too large"
t=2024-03-19T11:02:32+0000 lvl=info msg="Publishing transaction"            service=batcher tx=0x15255d6d044586f3e925561213c15bf61e003f7d62bfcb8d76db4c23dded3bf7 nonce=192 gasTipCap=1,210,000,000 gasFeeCap=1,863,397,360 gasLimit=1,613,804
t=2024-03-19T11:02:32+0000 lvl=info msg="bumping gas price for transaction" service=batcher tx=0x15255d6d044586f3e925561213c15bf61e003f7d62bfcb8d76db4c23dded3bf7 nonce=192 gasTipCap=1,210,000,000 gasFeeCap=1,863,397,360 gasLimit=1,613,804
t=2024-03-19T11:02:34+0000 lvl=eror msg="unable to publish transaction"     service=batcher tx=0xb5d6c0d1c76ea346a2ce2ad49c4cc7e014e6f40b230b6d8b8b4f31550cc0f6ae nonce=192 gasTipCap=1,331,000,000 gasFeeCap=2,049,737,096 gasLimit=1,613,804 err="INVALID: initcode too large"
t=2024-03-19T11:03:02+0000 lvl=warn msg="Aborting transaction submission"   service=batcher tx=0xb5d6c0d1c76ea346a2ce2ad49c4cc7e014e6f40b230b6d8b8b4f31550cc0f6ae nonce=192
t=2024-03-19T11:03:02+0000 lvl=warn msg="Transaction failed to send"        frame_id=7d3dd7be862c895a2a144f74450f7f75:0 data_len=99686 err="aborted transaction sending"
t=2024-03-19T11:03:02+0000 lvl=warn msg="Transaction failed to send"        frame_id=9ff9c030c90fb49cb1dc02f38f6e1611:0 data_len=99690 err="failed to create the tx: context canceled"
t=2024-03-19T11:03:02+0000 lvl=info msg="Publishing transaction"            service=batcher tx=0x3963e270edd1fa2c0c3eda0cc19ba4919e18decfc452ecc75ec92e38f3fd9e11 nonce=192 gasTipCap=1,000,000,000 gasFeeCap=1,361,744,808 gasLimit=1,613,804
t=2024-03-19T11:03:04+0000 lvl=eror msg="unable to publish transaction"     service=batcher tx=0x3963e270edd1fa2c0c3eda0cc19ba4919e18decfc452ecc75ec92e38f3fd9e11 nonce=192 gasTipCap=1,000,000,000 gasFeeCap=1,361,744,808 gasLimit=1,613,804 err="INVALID: initcode too large"

Additional context Add any other context about the problem here.


⚠️ Notice: Issues that do not include the following sections will be subject to closure:

  • Bug Description
  • Steps to Reproduce
  • Environment Information

Please ensure all required sections are filled out accurately to expedite the debugging process and improve issue resolution efficiency.

zmovane avatar Mar 19 '24 11:03 zmovane

Looks like the batch inbox isn't configured which is leaving tx.to unset which is resulting in deployment txs

tynes avatar Mar 19 '24 16:03 tynes

{
  "genesis": {
    "l1": {
      "hash": "0x6363a6f10143a8354c22be0e5782bc648a6fcfab3802dc2ee3230881228bf358",
      "number": 5495359
    },
    "l2": {
      "hash": "0x9b2a860ad408fc483c1caa5d3617dec6ccdc37d6ca465a6978b20294086bebe0",
      "number": 0
    },
    "l2_time": 1710562272,
    "system_config": {
      "batcherAddr": "0xb773ad428540d19fb6f4cddd131e780b87838ad1",
      "overhead": "0x0000000000000000000000000000000000000000000000000000000000000834",
      "scalar": "0x00000000000000000000000000000000000000000000000000000000000f4240",
      "gasLimit": 30000000,
      "baseFeeScalar": 0,
      "blobBaseFeeScalar": 0
    }
  },
  "block_time": 2,
  "max_sequencer_drift": 600,
  "seq_window_size": 3600,
  "channel_timeout": 300,
  "l1_chain_id": 11155111,
  "l2_chain_id": 42069,
  "regolith_time": 0,
  "canyon_time": 0,
  "batch_inbox_address": "0xff00000000000000000000000000000000042069",
  "deposit_contract_address": "0x579973566dc062223746c0d283473f75cf8d9b9e",
  "l1_system_config_address": "0x446be58aef502fff94f77a0adf3852b2e1fbdcbe",
  "protocol_versions_address": "0x0000000000000000000000000000000000000000"
}

This is my rollup configuration, batch_inbox_address is set. @tynes

Looks like the batch inbox isn't configured which is leaving tx.to unset which is resulting in deployment txs

zmovane avatar Mar 20 '24 03:03 zmovane