Skip to content

Ledger rep weights consistency checks#4914

Merged
pwojcikdev merged 4 commits intonanocurrency:developfrom
pwojcikdev:rep-weights-verify-consistency
Jun 22, 2025
Merged

Ledger rep weights consistency checks#4914
pwojcikdev merged 4 commits intonanocurrency:developfrom
pwojcikdev:rep-weights-verify-consistency

Conversation

@pwojcikdev
Copy link
Copy Markdown
Contributor

This adds a fail-fast consistency check for the representative-weight map, one of the node’s most critical components. Any divergence triggers an assert that aborts the process immediately and dumps information to the log.

This is the first part of an effort to protect against silent ledger-database corruption.

Why it matters
Silent corruption can lead to incorrect quorum decisions. A stale or incorrect rep-weight map undermines consensus.
Detecting discrepancies the moment they appear keeps the blast radius small.
We have historically observed database corruption on nodes running on the RocksDB backend. It is important to remember that RocksDB is still considered experimental, so no production services should rely on it.

@pwojcikdev pwojcikdev force-pushed the rep-weights-verify-consistency branch from 4718c1d to b9a252b Compare June 4, 2025 14:41
@pwojcikdev pwojcikdev force-pushed the rep-weights-verify-consistency branch from b9a252b to 7be2c95 Compare June 4, 2025 14:49
@gr0vity-dev-bot
Copy link
Copy Markdown

Test Results for Commit 7be2c95

Pull Request 4914: Results
Overall Status:

Test Case Results

  • 5n4pr_conf_10k_bintree: PASS (Duration: 120s)
  • 5n4pr_conf_10k_change: PASS (Duration: 135s)
  • 5n4pr_conf_change_dependant: PASS (Duration: 156s)
  • 5n4pr_conf_change_independant: FAIL (Duration: 1596s)
  • Log
  • 5n4pr_conf_send_dependant: PASS (Duration: 114s)
  • 5n4pr_conf_send_independant: PASS (Duration: 143s)
  • 5n4pr_rocks_10k_bintree: PASS (Duration: 107s)
  • 5n4pr_rocks_10k_change: PASS (Duration: 150s)

Last updated: 2025-06-06 08:49:43 UTC

@pwojcikdev pwojcikdev merged commit 1c5e8cc into nanocurrency:develop Jun 22, 2025
25 of 26 checks passed
pwojcikdev added a commit that referenced this pull request Jun 23, 2025
@qwahzi qwahzi added this to the V29 milestone Jun 25, 2025
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.

3 participants