Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flat storage] adding debug tool for flat storage #8531

Merged
merged 12 commits into from
Feb 22, 2023

Conversation

mm-near
Copy link
Contributor

@mm-near mm-near commented Feb 8, 2023

Couple basic debug commands for flat storage:

  • viewing current state
  • removing flat storage
  • creating flat storage
  • verification (comparing with trie)

Example usage (verify shard 0):

target/debug/neard flat-storage verify 0

Currently it looks only on the main column (it doesn't display any information about the deltas)

@mm-near mm-near changed the title [DRAFT] flat storage tool - cleaning up [Flat storage] adding debug tool for flat storage Feb 8, 2023
@mm-near mm-near marked this pull request as ready for review February 8, 2023 13:02
@mm-near mm-near requested a review from a team as a code owner February 8, 2023 13:02
Copy link
Member

@Longarithm Longarithm left a comment

Choose a reason for hiding this comment

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

LGTM, leaving some readability suggestions:

Comment on lines 25 to 27
protocol_feature_flat_state = ["nearcore/protocol_feature_flat_state",
"near-chain/protocol_feature_flat_state",
"near-store/protocol_feature_flat_state",]
Copy link
Member

Choose a reason for hiding this comment

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

cargo fmt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

tools/flat-storage/src/flat.rs Outdated Show resolved Hide resolved
tools/flat-storage/src/flat.rs Outdated Show resolved Hide resolved
@@ -0,0 +1,2 @@
#[cfg(feature = "protocol_feature_flat_state")]
pub mod flat;
Copy link
Member

Choose a reason for hiding this comment

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

Name of module is a bit confusing, maybe commands.rs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

tools/flat-storage/src/flat.rs Outdated Show resolved Hide resolved
tools/flat-storage/src/flat.rs Outdated Show resolved Hide resolved
tools/flat-storage/src/flat.rs Outdated Show resolved Hide resolved
tools/flat-storage/src/flat.rs Outdated Show resolved Hide resolved
@near-bulldozer near-bulldozer bot merged commit bf3aab2 into master Feb 22, 2023
@near-bulldozer near-bulldozer bot deleted the 0207_flat_storage_tool branch February 22, 2023 12:51
@pugachAG pugachAG mentioned this pull request Feb 22, 2023
26 tasks
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.

2 participants