-
Notifications
You must be signed in to change notification settings - Fork 197
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
Vote txs per block are less than 1 vote per validator #1851
Comments
When testing this out in practice, it seems that the vote can be sent to the leader at a 3 slot offset or more.
In the presence of forks, the reset bank could be on a completely different fork than the vote bank, causing even poorer inclusion. |
Ran a small patch to log which slot's leader we would send a vote tx to against mainnet (non voting validator), we see a larger range of the desync between the slot selected through the
Note that there is a larger amount of variability for the earlier leader slots, and it seems like the reset bank converges during the final leader slot.
This means that of the ~55k slots voted on, 49% of them were sent to a leader which ensured that the vote could not land in the next slot without the assistance of forwarding or gossip. This could just mean that replay is not able to keep up half of the time. Will follow up with more replay metrics. |
Hi @AshwinSekar. Is there any plan to backfill vote txs after we failover to the heaviest fork? I understand that would increase vote inclussion as well, even though I'm not sure if that would help for the consensus. Thanks! |
It doesn't increase vote inclusion in this context, as you can't retroactively add votes to blocks that have already been produced. |
#2607 and #2605 are present in v2.0.7 which has 63% adoption on testnet in epoch 683. Here's a comparison with some prior epochs 671 & 672 (2.0.4).
We have a huge increase in votes (and latency 1 votes specifically) for the 4th leader slot. I believe this can be attributed to #2607 sending to poh_slot + 1 🎉 . |
CC @ilya-bobyr - You may find this interesting given your investigation into leader targeting |
Let's assume an ideal state with 0 network delays, forking, or skipped slots.
This seems overly pessimistic. Seems like it could be even better if we also included slot offset of 0:
The only net differences is that we'll try to include votes for:
This is a slight increase from 5 vote txs to 6 vote txs sent across the network for every 4 blocks. |
Problem
Given a cluster of fully performant validators, we would expect there to be 1 vote per validator in each block. This is not what we observe in practice. There is also a reduction of votes from epochs prior to 578 and current epochs. Similarly, there is a large discrepancy in landed vote transactions for each leader slot.
Analysis
A sample of 10k slots from epochs 577 and 628 show that there are less vote txs per block:
Interestingly, we see in 628 there are more vote transactions landing in the first leader slot, while there are less for the second and third leader slot. There is a sharp decline in the 4th leader slot that is consistent for both 577 and 628
Breaking this down by latency, we see that there are less latency 1 votes (votes for the immediately previous slot) in general. The 4th leader slot has very few latency 1 votes in comparison:
One possible explanation for the 4th leader slot having so few latency 1 votes could be the vote tpu sending logic, which selects the leader at a 2 slot offset in order to forward to:
agave/sdk/program/src/clock.rs
Line 141 in 5263c9d
This implies that a vote for the 3rd leader slot can only land in the 4th leader slot through gossip.
Another explanation for overall poor tx inclusion is related to forks. If the next leader chooses to build off a different parent, votes for the previous leaders slots will fail the slot hashes check. As we've modified banking stage to only hold the latest vote per validator, even if there was a previous vote for a parent that has not been included in this fork, it has no chance to land. Also since we only send vote tx to the tpu of the slot + 2 leader, these votes can only land through gossip for the next leader that decides to build off of the main fork.
We can see this in action here, as slots 271409560 - 63 was a minor fork, meaning any votes for 58-59 could have only landed through gossip on 64.
Solutions
Another possibility is that replay is not keeping up and vote transactions are not being sent in time for inclusion. I will follow up with some more individual vote timing metrics.
The text was updated successfully, but these errors were encountered: