ChainSafe / ChainSafe/lodestar

Error fetching UnavailableBlockInput: Cannot read properties of undefined (reading 'data')

Open
#6,931 0 comments 0 reactions 0 assignees View on GitHub
meta-bug
Dominant language
TypeScript
Stars
1.4k
Forks
483
Avg merge
1d 18h
Merged PRs (30d)
156

Description

Found these in the logs
```
Jul-01 22:47:14.204[sync] debug: Error fetching UnavailableBlockInput attempt=0, blockRootHex=0xa716fedba9299af0f187feaeda3a999814fd1779785729385c3a8742845c6061, peer=16Uiu2HAm8NTb22bnv52PUrZ9dEzsEste2gsEdpCkiiFqaLpaLCqc - Cannot read properties of undefined (reading 'data')
TypeError: Cannot read properties of undefined (reading 'data')
at unavailableBeaconBlobsByRoot (file:///usr/app/packages/beacon-node/src/network/reqresp/beaconBlocksMaybeBlobsByRoot.ts:69:26)
at UnknownBlockSync.fetchUnavailableBlockInput (file:///usr/app/packages/beacon-node/src/sync/unknownBlock.ts:539:28)
at wrapError (file:///usr/app/packages/beacon-node/src/util/wrapError.ts:18:32)
at UnknownBlockSync.downloadBlock (file:///usr/app/packages/beacon-node/src/sync/unknownBlock.ts:295:13)
Jul-01 22:47:14.266[sync] debug: Error fetching UnavailableBlockInput attempt=1, blockRootHex=0xa716fedba9299af0f187feaeda3a999814fd1779785729385c3a8742845c6061, peer=16Uiu2HAm2YyKS58f5m4ZVqJswdwqoM8TodrfMynXjd7bzELSrgMm - Cannot read properties of undefined (reading 'data')
TypeError: Cannot read properties of undefined (reading 'data')
at unavailableBeaconBlobsByRoot (file:///usr/app/packages/beacon-node/src/network/reqresp/beaconBlocksMaybeBlobsByRoot.ts:69:26)
at UnknownBlockSync.fetchUnavailableBlockInput (file:///usr/app/packages/beacon-node/src/sync/unknownBlock.ts:539:28)
at wrapError (file:///usr/app/packages/beacon-node/src/util/wrapError.ts:18:32)
at UnknownBlockSync.downloadBlock (file:///usr/app/packages/beacon-node/src/sync/unknownBlock.ts:295:13)
```

Not sure if this is an actual issue but needs to be looked into.

cc @g11tech

Contributor guide

Open the contributing guide

Research direction

Start in packages/beacon-node/src/network/reqresp/beaconBlocksMaybeBlobsByRoot.ts at unavailableBeaconBlobsByRoot, then follow its call from packages/beacon-node/src/sync/unknownBlock.ts:539 and the downloadBlock path at line 295. Determine why the response is undefined when fetching UnavailableBlockInput and establish the expected behavior for that case. Done means the fetch no longer produces this TypeError and the behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.