ChainSafe / ChainSafe/lodestar

Improve block signature verification

Open
#6,613 3 comments 0 reactions 0 assignees View on GitHub
meta-feature-request prio-medium scope-logging scope-ux
Dominant language
TypeScript
Stars
1.4k
Forks
483
Avg merge
1d 16h
Merged PRs (30d)
150

Description

### Problem description

When we receive an invalid signature block, we log something like:
```
1431597:Mar-28 17:05:14.470[network] warn: Error receiving block slot=8735124, peer=16Uiu2HAmQMr7RYZPDb56G7LzuRPMaf7upo2r6keaYDsBQAEqhFA7, code=BLOCK_ERROR_INVALID_SIGNATURE, slot=8735123
```

while Prysm logs more specific error:
```
Mar 28 10:05:13 t beacon-chain[1075038]: time="2024-03-28 10:05:13" level=error msg="Could not handle p2p pubsub" error="failed to validate consensus state transition function: could not execute state transition: could not process block: process_sync_aggregate failed: could not verify sync committee signature: invalid sync committee signature" prefix=sync topic="/eth2/6a95a1a9/beacon_block/ssz_snappy
```

### Solution description

we should be able to log which specific signatures of block are invalid. When a gossip block already fails signature verification, we should do a retry to know which signatures are invalid since timing is not important anymore

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

The issue does not name implementation files, tests, or entry points. Start by tracing where invalid gossip block signatures produce BLOCK_ERROR_INVALID_SIGNATURE, then inspect the existing block signature verification path; done means retrying failed gossip blocks and logging which specific signatures are invalid, with tests covering the diagnostic output.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, networking, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.