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

[Storehouse] Fix dynamic bootstrapping for storehouse #5165

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

zhangchiqing
Copy link
Member

@zhangchiqing zhangchiqing commented Dec 19, 2023

Close #5183

This PR fixes loading blocks on startup for storehouse when the node is dynamic bootstrapped

@@ -801,12 +801,12 @@ func (exeNode *ExecutionNode) LoadRegisterStore(

if !bootstrapped {
checkpointFile := path.Join(exeNode.exeConf.triedir, modelbootstrap.FilenameWALRootCheckpoint)
root, err := exeNode.builder.RootSnapshot.Head()
sealedRoot, err := node.State.Params().SealedRoot()
Copy link
Member Author

@zhangchiqing zhangchiqing Dec 19, 2023

Choose a reason for hiding this comment

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

In dynamic bootstrapping, the sealed root is lower than finalized root (RootSnapshot.Head returns finalized root), EN needs to load [sealedRoot + 1, finalizedRoot] block range on startup.

It is now consistent with how the existing block loader works

Note, block below finalizedRoot can still be retrieved by height.

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (db9383c) 56.49% compared to head (11e9567) 56.49%.

Files Patch % Lines
cmd/execution_builder.go 0.00% 12 Missing ⚠️
engine/execution/state/bootstrap/bootstrap.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5165   +/-   ##
=======================================
  Coverage   56.49%   56.49%           
=======================================
  Files         979      979           
  Lines       93159    93175   +16     
=======================================
+ Hits        52628    52640   +12     
- Misses      36626    36634    +8     
+ Partials     3905     3901    -4     
Flag Coverage Δ
unittests 56.49% <40.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.

@zhangchiqing zhangchiqing force-pushed the leo/dynamic-bootstrapping-for-storehouse branch 2 times, most recently from ee17ecf to 2c55334 Compare December 22, 2023 04:32
@zhangchiqing zhangchiqing marked this pull request as ready for review December 22, 2023 04:35
@zhangchiqing zhangchiqing force-pushed the leo/dynamic-bootstrapping-for-storehouse branch from 2c55334 to 4c6e1f1 Compare December 22, 2023 04:35
@zhangchiqing zhangchiqing force-pushed the leo/dynamic-bootstrapping-for-storehouse branch 2 times, most recently from 7f9872a to 1db40c6 Compare December 22, 2023 19:11
@zhangchiqing zhangchiqing force-pushed the leo/dynamic-bootstrapping-for-storehouse branch from 1db40c6 to 11e9567 Compare December 22, 2023 20:09
@zhangchiqing zhangchiqing added this pull request to the merge queue Dec 22, 2023
Merged via the queue into master with commit b812534 Dec 22, 2023
51 checks passed
@zhangchiqing zhangchiqing deleted the leo/dynamic-bootstrapping-for-storehouse branch December 22, 2023 20: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.

[Storehouse] Validate the bootstrap data
4 participants