-
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
[1.0] Pause production when max-reversible-blocks reached #652
[1.0] Pause production when max-reversible-blocks reached #652
Conversation
…, max-reversible-blocks does nothing.
…fects block production now.
@@ -1976,6 +1982,11 @@ producer_plugin_impl::start_block_result producer_plugin_impl::start_block() { | |||
("ov", _last_other_vote_received.load(std::memory_order_relaxed))("bt", _accepted_block_time)); | |||
_pending_block_mode = pending_block_mode::speculating; | |||
not_producing_when_time = true; | |||
} else if (head_block_num - head.irreversible_blocknum() >= _max_reversible_blocks) { |
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.
Should >=
be >
as the option description says beyond?
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.
Need to check _max_reversible_blocks
not 0. Otherwise always pause.
@@ -1976,6 +1982,11 @@ producer_plugin_impl::start_block_result producer_plugin_impl::start_block() { | |||
("ov", _last_other_vote_received.load(std::memory_order_relaxed))("bt", _accepted_block_time)); | |||
_pending_block_mode = pending_block_mode::speculating; | |||
not_producing_when_time = true; | |||
} else if (head_block_num - head.irreversible_blocknum() >= _max_reversible_blocks) { |
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.
Need to check _max_reversible_blocks
not 0. Otherwise always pause.
Note:start |
Change the behavior of
max-reversible-blocks
. Instead of shutting down a node whenmax-reversible-blocks
is reached; pause production.max-reversible-blocks
.max-reversible-blocks
is reached.A block production node will report an
error
:Not producing block because max-reversible-blocks ${m} reached, head ${h}, lib ${l}.
and will instead speculatively execute transactions until LIB advances. Note LIB can advance by finalizers being restored and other block producers producing blocks. Once the number of reversible blocks is reduced on the network, the block producer will un-pause and start producing blocks again.If all block producers have the same default value for
max-reversible-blocks
(3600) then after approximately 30 minutes of LIB not advancing, all block producers will pause production. Manual restart of at least one block producer will be required at that point, after finality issues have been resolved, with a highermax-reversible-blocks
. Once a block producer with network finalizers are able to advance finality the number of reversible blocks should be reduced back down to ~2 and all other block producers will automatically un-pause and begin producing again.Resolves #641
Resolves #634