Skip to content

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

Open
zhangchiqing wants to merge 2 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 2 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: 8d961b68-acb9-4341-b8c2-9d6a6dd7cd51

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-list-tries branch from 3b2789a to 1ecb010 Compare July 2, 2026 19:13
@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-list-tries branch from 1ecb010 to 4892b86 Compare July 13, 2026 17:27
@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-list-tries branch from 4892b86 to 203015a Compare July 14, 2026 20:01
@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-list-tries branch from 203015a to 1f9b6bb Compare July 31, 2026 04:35
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-checkpoint-verify-hash branch from ce67ef0 to f4625b1 Compare July 31, 2026 04:36
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