Skip to content

Canonical fix tests, mimicing check_canonical.py#36

Open
svlachakis wants to merge 1 commit intomainfrom
canonical-fix-tests
Open

Canonical fix tests, mimicing check_canonical.py#36
svlachakis wants to merge 1 commit intomainfrom
canonical-fix-tests

Conversation

@svlachakis
Copy link
Copy Markdown

@svlachakis svlachakis commented Mar 27, 2026

Regression Test for PR NethermindEth/nethermind#10876

  1. Call eth_getBlockByNumber("finalized") to get a trusted anchor, since finalized blocks cannot be reorged.
  2. Walk backward 1000 blocks via parentHash using eth_getBlockByHash to build a ground-truth chain of (blockNumber, blockHash).
  3. Batch-fetch those block numbers using eth_getBlockByNumber to get the node’s canonical view.
  4. If eth_getBlockByNumber(N).hash differs from the ground-truth hash at N, the node has a stale canonical marker (bug #10876).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant