Add block signatures in beacon header RPC endpoints #2997
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #2992
Context
Block signatures were missing from the beacon header RPC endpoints (
/eth/v1/beacon/headersand/eth/v1/beacon/headers/{block_id}), returning empty strings instead of the actual BLS signatures. This was because the block store only persisted block metadata (roots, timestamps) but not signatures.This PR extends the in-memory block store to also cache block signatures during finalization, and updates the header handler to retrieve and include them in API responses.
Signatures are available for blocks within the availability window. For genesis or blocks outside this window, an empty string is returned (like its currenltly).
Test plan
On a restart, querying the slot 4 again results in a null signature (since this PR uses in-memory store)