v1.18: fix: ensure vote packets can be retried (backport of #2605)#2611
v1.18: fix: ensure vote packets can be retried (backport of #2605)#2611mergify[bot] wants to merge 2 commits intov1.18from
Conversation
(cherry picked from commit ecb44d7) # Conflicts: # core/src/banking_stage/latest_unprocessed_votes.rs
|
Cherry-pick of ecb44d7 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
b91584e to
3a725db
Compare
|
to what extent does this improve confirmation times? the changes seem non-trivial. we should at the very least let them bake on 2.0/testnet for a week or so |
It's very difficult to know the impact on confirmation times. At the end of any of a leader's slots, any remaining buffered votes effectively get dropped for processing and forwarding and we don't have metrics for that. From my own speculation I think the impact of this bug is not super big because note that if the next vote from a validator is delivered during the next slot it would be eligible for processing and we wouldn't care that the earlier vote was dropped. But I suspect that sometimes a few consecutive votes from validators are all received towards the end of a leader's slot and all get dropped leading to slower confirmation times and increased vote latency for an individual validator.
I'm cool with that. The 2.0 backport is subject to approval here: #2612 |
|
yeah no need to bp since mainnet will be on v2.0 soon |
Problem
Retryable vote packets are not retried so any votes received at the end of a block won't ever get processed by the current leader leading to higher voting latency
This is because when we try to reinsert retryable vote tx packets, the reinserted vote tx's will have timestamps equal to but not greater than the latest stored vote tx's timestamp. So the "taken" vote packet never gets replenished.
Summary of Changes
Allow replacing existing latest votes when the latest vote is "taken" and the slot and timestamps are equivalent to the replaced vote.
Fixes #
This is an automatic backport of pull request #2605 done by [Mergify](https://mergify.com).