Skip to content

feat(cmd): DB verification with cmd tool#3335

Draft
MaksymMalicki wants to merge 15 commits intomainfrom
maksym/doctor-cmd
Draft

feat(cmd): DB verification with cmd tool#3335
MaksymMalicki wants to merge 15 commits intomainfrom
maksym/doctor-cmd

Conversation

@MaksymMalicki
Copy link
Copy Markdown
Contributor

@MaksymMalicki MaksymMalicki commented Dec 18, 2025

This PR introduces a new cmd tool, which can be used for the DB corruption verification on the Merkle Trie side. For now its just an empty command. To use the tool, hit:
juno verify --db-path <path>

@MaksymMalicki MaksymMalicki marked this pull request as draft December 18, 2025 16:39
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 71.79487% with 99 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.01%. Comparing base (b48ef4b) to head (b9cdb91).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
verify/trie/trie_verifier.go 80.86% 23 Missing and 8 partials ⚠️
verify/trie/trie_core.go 60.65% 17 Missing and 7 partials ⚠️
verify/trie/traversal.go 22.22% 19 Missing and 2 partials ⚠️
cmd/juno/verify/trie.go 75.00% 15 Missing and 3 partials ⚠️
cmd/juno/verify/verify.go 76.19% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3335      +/-   ##
==========================================
- Coverage   74.02%   74.01%   -0.01%     
==========================================
  Files         381      386       +5     
  Lines       40673    40974     +301     
==========================================
+ Hits        30108    30328     +220     
- Misses       8780     8841      +61     
- Partials     1785     1805      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rodrodros
Copy link
Copy Markdown
Contributor

I don't know if the PR plans to go live like this, but I strongly suggest it gets divided in two:

  • Adding the new cmd overall command
  • Adding the trie verification

@MaksymMalicki MaksymMalicki marked this pull request as ready for review December 22, 2025 15:11
@MaksymMalicki MaksymMalicki changed the title feat(cmd): DB verification with cmd tool + trie roots verification feat(cmd): DB verification with cmd tool Dec 23, 2025
@thiagodeev thiagodeev self-requested a review February 5, 2026 15:54
Copy link
Copy Markdown
Contributor

@thiagodeev thiagodeev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey. Nice work!

I've made a few comments. Some of them are just nitpicks and can be easily ignored, but I believe the rest are relevant.
Unfortunately, due to my lack of knowledge of the state and DB, I couldn't help very much with the verification logic, only with general logic things.

Comment thread cmd/juno/verify/trie.go Outdated
Comment thread verify/trie/types.go Outdated
Comment thread cmd/juno/verify/verify.go Outdated
Comment thread verify/trie/trie_verifier.go Outdated
Comment thread verify/trie/trie_verifier.go Outdated
Comment thread cmd/juno/verify/trie.go
Comment thread verify/trie/trie_verifier.go Outdated
Comment thread verify/trie/trie_verifier.go Outdated
Comment thread cmd/juno/verify/trie.go Outdated
Comment thread verify/trie/trie_verifier_test.go
@github-actions
Copy link
Copy Markdown
Contributor

This pull request is stale because it has been open 35 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@MaksymMalicki MaksymMalicki marked this pull request as draft April 23, 2026 09:50
@MaksymMalicki MaksymMalicki marked this pull request as draft April 23, 2026 09:50
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