-
Notifications
You must be signed in to change notification settings - Fork 73
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
[3.2 -> 4.0] SHiP flush logs on write #934
Conversation
… or crash leaves valid ship logs.
[3.2] SHiP flush logs on write
fork_db.reset( *head ); | ||
return; | ||
if (!blog_head) | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.2
leap/libraries/chain/controller.cpp
Line 480 in 4359bc0
if( !blog.head() && !fork_db.root() ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is likely a good change for 3.2 as well, but I hit the problem in 4.0 because 4.0 in on_accepted_block
calls chain.last_irreversible_block_id()
. 3.2 does not call that method and didn't hit this issue.
Happy, to pull this in via a separate PR if desired, but it has to go in otherwise ship aborts when loading from a snapshot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the PR title is [3.2 -> 4.0], it might be better to only contain 3.2 changes. A separate PR is an extra work. Either way is fine with me.
Replaced by #935 without the forkdb root change. |
Flush the
state_history_plugin
logs to disk at the end of each write to make it more likely that akill -9
or crash leaves valid logs.Merges #928 into
release/4.0
.Includes a fix for replay where
forkdb.root()
is null during the write in SHiP foron_accepted_block
. 4.0 SHiP callschain.last_irreversible_block_id()
inon_accepted_block
which expectsforkdb.root()
to be valid.Resolves #596