-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix occasional terminate_at_block failures #61
Conversation
I don't think this is correct. The expectation is to stop a node at a given block. Not around a given block. There is clearly a bug in the code which can be confirmed by looking at the logs. The node stopped after the requested block. |
Thanks. I looked at the logs before this and did not see anything wrong. Am trying to reproduce it locally with more logs. Any reason why the implementation is |
My guess it is just extra paranoid, in case it was missed elsewhere. |
I missed in the log that between two received blocks from peers, a vote message comes in and advances LIB over the target terminate-at block 75. Should we keep the implementation as is and update the test, or check
|
Vote messages do not advance LIB. LIB advances as QCs received in block headers are received. The key thing is we want to avoid applying a block past |
… block logs; move terminate-at-block for irreversible mode to apply_block
Note:start |
shutdown(); | ||
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.
indentation.
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.
Thanks.
https://github.com/AntelopeIO/spring/actions/runs/8707646627/job/23883711651#step:4:729 reports a failure of nodeos_read_terminate_at_block_test. It was triggered by
spring/tests/nodeos_read_terminate_at_block_test.py
Line 114 in 053b53b
with
AssertionError: head 76 termAtBlock 75
. This indicates nodoes did not stop at the specified terminate-at block, but a block after it.The PR fixes the problem by
log_irreversible
checking each block which is to become LIB and make sure it not pass the terminate-at block.Resolved #38