Skip to content

Comments

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

Open
MaksymMalicki wants to merge 14 commits intomainfrom
maksym/doctor-cmd
Open

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

Conversation

@MaksymMalicki
Copy link
Contributor

@MaksymMalicki MaksymMalicki commented Dec 18, 2025

This PR introduces a new cmd tool, which can be used for the DB corruption verification. For now its just an empty command. The new commands will be added in the followup PRs. 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

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 71.08434% with 96 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.80%. Comparing base (27e3453) to head (1bb79e5).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
verify/trie/trie_verifier.go 80.27% 19 Missing and 10 partials ⚠️
cmd/juno/verify/verify.go 36.11% 21 Missing and 2 partials ⚠️
verify/trie/traversal.go 26.08% 15 Missing and 2 partials ⚠️
verify/trie/trie_core.go 70.17% 10 Missing and 7 partials ⚠️
cmd/juno/verify/trie.go 83.87% 5 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3335      +/-   ##
==========================================
- Coverage   75.98%   75.80%   -0.18%     
==========================================
  Files         377      384       +7     
  Lines       34614    35126     +512     
==========================================
+ Hits        26301    26627     +326     
- Misses       6466     6623     +157     
- Partials     1847     1876      +29     

☔ 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
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
Copy link
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.

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