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

[store] Remove genesis_height param from ChainStore::new() #12831

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

shreyan-gupta
Copy link
Contributor

Part 2 of removing dependency of ChainStoreAdapter from genesis_height

Follow up of PR #12828

We can cleanup the interface of ChainStoreAdapter and we no longer need genesis_height and save_trie_changes as initialization params.

@shreyan-gupta shreyan-gupta requested a review from a team as a code owner January 29, 2025 12:44
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 5 lines in your changes missing coverage. Please review.

Project coverage is 70.37%. Comparing base (ee6571f) to head (d16f89f).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
nearcore/src/migrations.rs 0.00% 2 Missing ⚠️
tools/state-viewer/src/commands.rs 0.00% 2 Missing ⚠️
tools/flat-storage/src/commands.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12831   +/-   ##
=======================================
  Coverage   70.37%   70.37%           
=======================================
  Files         848      848           
  Lines      174960   174870   -90     
  Branches   174960   174870   -90     
=======================================
- Hits       123129   123072   -57     
+ Misses      46575    46544   -31     
+ Partials     5256     5254    -2     
Flag Coverage Δ
backward-compatibility 0.16% <0.00%> (+<0.01%) ⬆️
db-migration 0.16% <0.00%> (+<0.01%) ⬆️
genesis-check 1.41% <0.00%> (+<0.01%) ⬆️
linux 69.99% <83.33%> (+0.01%) ⬆️
linux-nightly 70.02% <83.33%> (-0.01%) ⬇️
pytests 1.71% <0.00%> (+<0.01%) ⬆️
sanity-checks 1.52% <0.00%> (+<0.01%) ⬆️
unittests 70.21% <83.33%> (+<0.01%) ⬆️
upgradability 0.20% <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.

Copy link
Contributor

@wacban wacban left a comment

Choose a reason for hiding this comment

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

LGTM

genesis.transaction_validity_period,
),
}
Self { chain_store: ChainStore::new(store, false, genesis.transaction_validity_period) }
Copy link
Contributor

Choose a reason for hiding this comment

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

If you can get rid of the transaction_validity_period we could remove genesis all together from here. Just saying ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll try...

Base automatically changed from shreyan/store/genesis_height to master January 29, 2025 17:33
@shreyan-gupta shreyan-gupta added this pull request to the merge queue Jan 29, 2025
Merged via the queue into master with commit 94abfca Jan 29, 2025
28 of 29 checks passed
@shreyan-gupta shreyan-gupta deleted the shreyan/store/init_chain_store branch January 29, 2025 18:11
shreyan-gupta added a commit to shreyan-gupta/nearcore that referenced this pull request Mar 28, 2025
Part 2 of removing dependency of ChainStoreAdapter from genesis_height

Follow up of PR near#12828

We can cleanup the interface of ChainStoreAdapter and we no longer need
`genesis_height` and `save_trie_changes` as initialization params.
shreyan-gupta added a commit to shreyan-gupta/nearcore that referenced this pull request Mar 28, 2025
Part 2 of removing dependency of ChainStoreAdapter from genesis_height

Follow up of PR near#12828

We can cleanup the interface of ChainStoreAdapter and we no longer need
`genesis_height` and `save_trie_changes` as initialization params.
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