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

feat: Update view-genesis command to view genesis in store #11809

Merged
merged 12 commits into from
Jul 18, 2024

Conversation

tayfunelmas
Copy link
Contributor

@tayfunelmas tayfunelmas commented Jul 18, 2024

We previously added the neard view-state view-genesis command to display the genesis block generated from code using the genesis json file. We used this command to debug the reason for the blockhash-mismatches between the genesis in the store/DB and the genesis computed from the config files using code.

We extend the command to also display the genesis block stored in the DB.

Example usage to see the genesis in config and store and compare their hashes:

./target/debug/neard --home ~/.near/localnet/node4 view-state view-genesis --config --store --compare

Also shorten the flag names to remove view- prefix since it is already as part of main command and sub command.

@tayfunelmas tayfunelmas requested a review from a team as a code owner July 18, 2024 11:27
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.

Project coverage is 71.75%. Comparing base (0557fa4) to head (a2686da).
Report is 2 commits behind head on master.

Files Patch % Lines
tools/state-viewer/src/commands.rs 0.00% 34 Missing ⚠️
tools/state-viewer/src/cli.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11809      +/-   ##
==========================================
+ Coverage   71.72%   71.75%   +0.03%     
==========================================
  Files         796      796              
  Lines      162984   163196     +212     
  Branches   162984   163196     +212     
==========================================
+ Hits       116897   117100     +203     
- Misses      41037    41043       +6     
- Partials     5050     5053       +3     
Flag Coverage Δ
backward-compatibility 0.23% <0.00%> (-0.01%) ⬇️
db-migration 0.23% <0.00%> (-0.01%) ⬇️
genesis-check 1.35% <0.00%> (-0.01%) ⬇️
integration-tests 37.81% <0.00%> (+<0.01%) ⬆️
linux 71.36% <0.00%> (+0.01%) ⬆️
linux-nightly 71.33% <0.00%> (+<0.01%) ⬆️
macos 54.59% <0.00%> (+1.63%) ⬆️
pytests 1.62% <0.00%> (+0.03%) ⬆️
sanity-checks 1.42% <0.00%> (+0.03%) ⬆️
unittests 66.21% <0.00%> (+0.05%) ⬆️
upgradability 0.28% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@tayfunelmas tayfunelmas added this pull request to the merge queue Jul 18, 2024
Merged via the queue into near:master with commit 2d19c2a Jul 18, 2024
30 checks passed
@tayfunelmas tayfunelmas deleted the genesis-debug branch July 18, 2024 14:51
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