op-replica
op-replica copied to clipboard
Unexpected number of transactions, cannot recover OVM Context, could not detect network
Trying to set up an OE-replica node using a local geth docker container. Cloned op-replica repo, modified .env, replica.yml and replica-shared.yml but not sure everything is set up correctly. Added l1geth as a service into the op-replica docker compose file.
Right now I'm getting the following errors in my l2geth-replica logs:
l2geth-replica_1 | INFO [02-07|21:54:16.330] Connected to upstream service
data-transport-layer_1 | {"level":30,"time":1644270856334,"method":"GET","url":"/eth/syncing?backend=l2","elapsed":4,"msg":"Served HTTP Request"}
l2geth-replica_1 | INFO [02-07|21:54:16.335] Found latest index index=0
l2geth-replica_1 | INFO [02-07|21:54:16.335] Block not found, resetting index new=<nil> old=0
l2geth-replica_1 | ERROR[02-07|21:54:16.335] Unexpected number of transactions in block count=0
l2geth-replica_1 | panic: Cannot recover OVM Context
and these in the replica-healthcheck logs
replica-healthcheck_1 | Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.4.4)
replica-healthcheck_1 | at Logger.makeError (/opt/optimism/node_modules/@ethersproject/logger/lib/index.js:187:21)
replica-healthcheck_1 | at Logger.throwError (/opt/optimism/node_modules/@ethersproject/logger/lib/index.js:196:20)
replica-healthcheck_1 | at StaticJsonRpcProvider.<anonymous> (/opt/optimism/node_modules/ethers/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:491:54)
replica-healthcheck_1 | at step (/opt/optimism/node_modules/ethers/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
replica-healthcheck_1 | at Object.throw (/opt/optimism/node_modules/ethers/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
replica-healthcheck_1 | at rejected (/opt/optimism/node_modules/ethers/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)
replica-healthcheck_1 | at processTicksAndRejections (node:internal/process/task_queues:96:5) {
replica-healthcheck_1 | reason: 'could not detect network',
replica-healthcheck_1 | code: 'NETWORK_ERROR',
replica-healthcheck_1 | event: 'noNetwork'
replica-healthcheck_1 | }
I'm using GETH_INIT_SCRIPT=l2geth-replica-start.sh
in my .env
If I use GETH_INIT_SCRIPT=check-for-chaindata-berlin.sh
I get
l2geth-replica_1 | /scripts/check-for-chaindata-berlin.sh: line 20: L2GETH_GENESIS_HASH: parameter not set
l2geth-replica_1 | /geth/geth/chaindata missing, running init
node_optimism_l2geth-replica_1 exited with code 2
Here are my set up files env.env.txt replica-shared.yml.txt replica,yml.txt
And here is the full logs all_logs.txt
any ideas what the issue might be?
In the second case (GETH_INIT_SCRIPT=check-for-chaindata-berlin.sh
), it looks like you're using a Kovan script, but your configuration is set to mainnet and you haven't the L2GETH_GENESIS_HASH
set (it doesn't seem to be necessary for mainnet configs).
Just a thought though, I'm really not an expert in this stuff.
Hi,
I updated the repo to contain a default env for kovan and a separate one for mainnet. These defaults specify the correct GETH_INIT_SCRIPT
and shared envs required for each network.
Specifically from the output provided, it looks like l2geth was not properly initialized.
[34;1ml2geth-replica_1 |[0m INFO [02-07|21:53:49.716] Initialised chain configuration config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 7280000 Petersburg: 7280000 Istanbul: 9069000, Muir Glacier: 9200000, Engine: ethash}"