Skip to content

Conversation

@RaveenaBhasin
Copy link

Motivation
Trie validation errors currently only report the count mismatch without contextual information about where in the trie structure the issue occurred. This makes debugging sync failures difficult, as there is relevant starting point to investigate the inconsistency (ref: issue #5745, PR #5713 comment).

Description
Improved the NodeCountMismatch error with diagnostic context including

  • Path to the last successfully validated node
  • Node type (Branch/Extension/Leaf)
  • Node hash for db cross-referencing
  • Total nodes traversed before failure

Closes #5745

@RaveenaBhasin RaveenaBhasin requested a review from a team as a code owner January 6, 2026 18:53
@RaveenaBhasin RaveenaBhasin changed the title fix: add context to trie validation count mismatch error fix(l1): add context to trie validation count mismatch error Jan 6, 2026
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.

Add more context to count mismatch in trie validation function

2 participants