status-im / nimbus-eth2

Nim implementation of the Ethereum Beacon Chain
https://nimbus.guide
Other
523 stars 227 forks source link

Fix blob syncing for Electra #6438

Closed etan-status closed 2 months ago

etan-status commented 2 months ago

BlobSidecar requests on libp2p have a context prefix based on:

The <context-bytes> field is calculated as context = compute_fork_digest(fork_version, genesis_validators_root)

We currently only process blobs if that indicates Deneb, meaning that on Electra we incorrectly report InvalidContextBytes and refuse to process the blob response data.

Fix this, and also ensure that the code no longer needs maintenance with every fork unrelated to blobs.

etan-status commented 2 months ago

Spec is a bit vague about the fork digest to use, btw.

When producing response, we use peer.network.forkDigestAtEpoch(blockRef.slot.epoch).data.

It doesn't hurt to just accept either deneb/electra fork digests when reading.

etan-status commented 2 months ago