optimism: op-replica-data-transport-layer-1:TypeError: Cannot read properties of null
Describe the bug #op-replica-data-transport-layer-1 error logs:
op-replica-data-transport-layer-1 | {“level”:50,“time”:1668411148974,“extra”:{“message”:“TypeError: Cannot read properties of null (reading ‘from’)”,“stack”:“TypeError: Cannot read properties of null (reading ‘from’)\n at Object.getExtraData (/opt/optimism/packages/data-transport-layer/dist/src/services/l1-ingestion/handlers/sequencer-batch-appended.js:27:38)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async L1IngestionService._syncEvents (/opt/optimism/packages/data-transport-layer/dist/src/services/l1-ingestion/service.js:230:39)\n at async L1IngestionService._start (/opt/optimism/packages/data-transport-layer/dist/src/services/l1-ingestion/service.js:140:17)\n at async L1IngestionService.start (/opt/optimism/packages/common-ts/dist/base-service/base-service.js:33:9)\n at async Promise.all (index 1)\n at async L1DataTransportService._start (/opt/optimism/packages/data-transport-layer/dist/src/services/main/service.js:69:13)\n at async L1DataTransportService.start (/opt/optimism/packages/common-ts/dist/base-service/base-service.js:33:9)\n at async /opt/optimism/packages/data-transport-layer/dist/src/services/run.js:77:9”},“msg”:“Caught an unhandled error”}
.env config file: ` COMPOSE_PROJECT_NAME=op-replica COMPOSE_FILE=replica.yml:replica-shared.yml:replica-toml.yml ETH_NETWORK=mainnet DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT=http://192.1.1.17:8545 DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT=https://mainnet.optimism.io SEQUENCER_CLIENT_HTTP=https://mainnet.optimism.io SHARED_ENV_PATH=…/envs/mainnet GCMODE=archive L2GETH_IMAGE_TAG=0.5.29 DTL_IMAGE_TAG=0.5.48 HC_IMAGE_TAG=1.1.12 L2GETH_HTTP_PORT=9991 L2GETH_WS_PORT=9992 DTL_PORT=7878 GETH_INIT_SCRIPT=check-for-chaindata-berlin.sh HEALTHCHECK__REFERENCE_RPC_PROVIDER=https://mainnet.optimism.io HEALTHCHECK__TARGET_RPC_PROVIDER=http://l2geth-replica:8545
RESTART=unless-stopped
# Sync source ROLLUP_BACKEND=l2 DATA_TRANSPORT_LAYER__DEFAULT_BACKEND=l2 DATA_TRANSPORT_LAYER__L1_GAS_PRICE_BACKEND=l2 DATA_TRANSPORT_LAYER__SYNC_FROM_L1=true DATA_TRANSPORT_LAYER__SYNC_FROM_L2=true ` then: docker-compose up -d && docker-compose logs -f found this issuse at this time
How can I solve this problem ????
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 43 (3 by maintainers)
@sanbotto @zhy827827 I think I figured the issue. Back in Feb 2021 Geth started unindexing txs by hash after 1 year. So you are no longer able to look up transactions by their hashes. I did some looking at how Optimism is finding transactions and it is trying to look up transactions by hash.
The way to fix this should be to set
--txlookuplimit=0
and the Geth node should start reindexing again. After I set this and restarted Geth I am seeing:You can check to see if this is your issue by running the command below:
Seems to be working now, after letting the Indexing run I am now getting the following:
No. I thought the missing
--http.api
and--ws.api
flags were the issue but I’m now using--http.api "eth,txpool,debug,web3,net"
and--ws.api "eth,txpool,debug,web3,net"
and nothing has changed on the Optimism side, I’m still getting theCannot read properties of null
error. Maybe I’m missing a particular API that I don’t know about, but that geth node works fine with absolutely everything else…I haven’t had issues with Infura or Alchemy. I’m using both on different nodes.
if i use l1 to data sync,then ethereumoptimism/data-transport-layer:latest have error:
{“level”:50,“time”:1670926343808,“extra”:{“message”:“TypeError: Cannot read properties of null (reading ‘from’)”,“stack”:“TypeError: Cannot read properties of null (reading ‘from’)\n at Object.getExtraData (/opt/optimism/packages/data-transport-layer/dist/src/services/l1-ingestion/handlers/sequencer-batch-appended.js:27:38)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async L1IngestionService._syncEvents (/opt/optimism/packages/data-transport-layer/dist/src/services/l1-ingestion/service.js:277:39)\n at async L1IngestionService._start (/opt/optimism/packages/data-transport-layer/dist/src/services/l1-ingestion/service.js:156:17)\n at async L1IngestionService.start (/opt/optimism/packages/common-ts/dist/base-service/base-service.js:33:9)\n at async Promise.all (index 1)\n at async L1DataTransportService._start (/opt/optimism/packages/data-transport-layer/dist/src/services/main/service.js:69:13)\n at async L1DataTransportService.start (/opt/optimism/packages/common-ts/dist/base-service/base-service.js:33:9)\n at async /opt/optimism/packages/data-transport-layer/dist/src/services/run.js:78:9”},“msg”:“Caught an unhandled error”} {“level”:30,“time”:1670926344318,“highestSyncedL1Block”:13596466,“targetL1Block”:13598466,“msg”:“Synchronizing events from Layer 1 (Ethereum)”}
and ethereumoptimism/data-transport-layer:latest not sync block. I really don’t know how to solve the problem of optimism。 @smartcontracts Take a moment,thank you~~~