Skip to content

[Storehouse] 013 - Add util to verify checkpoint file - #8592

Open
zhangchiqing wants to merge 3 commits into
leo/payloadless-util-checkpoint-list-triesfrom
leo/payloadless-util-checkpoint-verify-hash
Open

[Storehouse] 013 - Add util to verify checkpoint file#8592
zhangchiqing wants to merge 3 commits into
leo/payloadless-util-checkpoint-list-triesfrom
leo/payloadless-util-checkpoint-verify-hash

Conversation

@zhangchiqing

Copy link
Copy Markdown
Member
  • Add a util checkpoint-verify-hash to verify the hash value of each node in the checkpoint file.
  • Compare to the previous implementation MTrie.AValidTrie() which also verify the hash value of each node, this util had the following advantages:
  1. Much less memory usage. The previous implementation has to load the entire checkpoint into memory before starting verification work. But this util doesn't load the checkpoint, instead, it iterates over each node in DFS manner, since the checkpoint file is saved in DFS manner, it guarantees the iteration callback can be called with the node and their children. The memory usage is O(n), n as the max depth of the trie.
  2. Concurrency. The previous implementation is single threaded. This util has --n-worker to process verify n subtrie concurrently.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 36f8713c-591f-457d-ba25-4d0398877aa1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch leo/payloadless-util-checkpoint-verify-hash

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zhangchiqing
zhangchiqing marked this pull request as ready for review July 1, 2026 04:23
@zhangchiqing
zhangchiqing requested a review from a team as a code owner July 1, 2026 04:23
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from 2e0691e to 5b65af3 Compare July 2, 2026 19:13
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from 5b65af3 to 66ed053 Compare July 13, 2026 17:27
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from 66ed053 to ce67ef0 Compare July 14, 2026 20:01
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from ce67ef0 to f4625b1 Compare July 31, 2026 04:36
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from f4625b1 to f9486aa Compare August 18, 2026 01:55
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov-commenter

codecov-commenter commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.18815% with 120 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ledger/complete/wal/checkpoint_verifier.go 62.54% 57 Missing and 43 partials ⚠️
cmd/util/cmd/checkpoint-verify-hash/cmd.go 0.00% 19 Missing ⚠️
cmd/util/cmd/root.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from f9486aa to cd1b805 Compare August 18, 2026 15:43
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from cd1b805 to 5965a57 Compare August 18, 2026 17:25
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from 5965a57 to 38284ae Compare August 18, 2026 18:18
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from 38284ae to d1ee592 Compare August 18, 2026 20:29
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from d1ee592 to e7d4977 Compare August 19, 2026 19:09
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from e7d4977 to 4bd9bb5 Compare August 20, 2026 00:16
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from dbf8111 to 8ff13ba Compare August 24, 2026 14:01
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from 8ff13ba to 707e192 Compare August 25, 2026 02:47
@blacksmith-sh

This comment has been minimized.

zhangchiqing and others added 3 commits August 25, 2026 16:00
Co-authored-by: zhangchiqing <811374+zhangchiqing@users.noreply.github.com>
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from 707e192 to 9c855a3 Compare August 25, 2026 23:00
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