-
Notifications
You must be signed in to change notification settings - Fork 318
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
turbine: Adjust reference tick calculation #4644
Conversation
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.
Comment here to remember why we put the hack in would be nice. Other than that, LGTM
Can we remove the https://github.com/anza-xyz/agave/blob/f5d6ebcfb/turbine/src/broadcast_stage/standard_broadcast_run.rs#L276
and this line:
|
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.
LGTM assuming my understanding is correct
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.
lgtm
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.
LGTM
The current reference tick calculation results in the reference tick being recorded as 0 when a Bank has reached max tick_height. The reference tick is used to determine if/when shreds should be repaired, so adjust the calculation to saturate at bank.ticks_per_slot() - 1 instead.
1d61261
to
624ad06
Compare
No need to apply the mask in turbine code as the underlying code will do it for us
624ad06
to
55ed445
Compare
I know you both gave me ship-its, but I decided to push the cleanup into a separate PR (#4653) for the sake of keeping the diff in this PR as small as possible. I also force pushed to cleanup commit history + rebase to tip of master. |
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.
LGTM
Problem
The current reference tick calculation results in the reference tick being recorded as 0 when a Bank has reached max tick height
Summary of Changes
Adjust the calculation to saturate at
bank.ticks_per_slot() - 1
, which coincides with the max value of 63 that fit in the 6 bits allocated forreference_tick
in the shred header.I sampled a random block (
313491481
) from MNB and plotted reference tick vs. shred index to show the issue: