-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
gossip: notify state machine of duplicate proofs #32963
gossip: notify state machine of duplicate proofs #32963
Conversation
2331e41
to
d147176
Compare
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
this looks like the commit which will allow Scenario 3, i'll wait to merge this until we have a fix. |
gossip/src/duplicate_shred.rs
Outdated
@@ -84,6 +84,8 @@ pub enum Error { | |||
TryFromIntError(#[from] TryFromIntError), | |||
#[error("unknown slot leader: {0}")] | |||
UnknownSlotLeader(Slot), | |||
#[error("unable to send duplicate slot to state machine")] | |||
DuplicateSlotSenderFailure, |
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.
please keep the enum sorted
@@ -25,6 +26,7 @@ const MAX_NUM_ENTRIES_PER_PUBKEY: usize = 128; | |||
const BUFFER_CAPACITY: usize = 512 * MAX_NUM_ENTRIES_PER_PUBKEY; | |||
|
|||
type BufferEntry = [Option<DuplicateShred>; MAX_NUM_CHUNKS]; | |||
type DuplicateSlotSender = Sender<Slot>; |
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.
please remove this typedef.
For someone reading the code, Sender<Slot>
is more explicit what actual type we are working with, and does not need to jump elsewhere to find the definition.
d147176
to
b63c9d7
Compare
b63c9d7
to
bd931bf
Compare
reopening this now that Scenario 3 has been merged #34186 |
bd931bf
to
3a0ba29
Compare
3a0ba29
to
048e1a0
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #32963 +/- ##
=========================================
- Coverage 81.6% 81.6% -0.1%
=========================================
Files 828 830 +2
Lines 224339 224743 +404
=========================================
+ Hits 183274 183569 +295
- Misses 41065 41174 +109 |
bd3ccc4
to
e3dcff6
Compare
34dc33b
to
61ce88a
Compare
bfa18af
to
850dc1e
Compare
850dc1e
to
87bf3e5
Compare
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
* gossip: notify state machine of duplicate proofs * Add feature flag for ingesting duplicate proofs from Gossip. * Use the Epoch the shred is in instead of the root bank epoch. * Fix unittest by activating the feature. * Add a test for feature disabled case. * EpochSchedule is now not copyable, clone it explicitly. * pr feedback: read epoch schedule on startup, add guard for ff recache * pr feedback: bank_forks lock, -cached_slots_in_epoch, init ff * pr feedback: bank.forks_try_read() -> read() * pr feedback: fix local-cluster setup * local-cluster: do not expose gossip internals, use retry mechanism instead * local-cluster: split out case 4b into separate test and ignore * pr feedback: avoid taking lock if ff is already found * pr feedback: do not cache ff epoch * pr feedback: bank_forks lock, revert to cached_slots_in_epoch * pr feedback: move local variable into helper function * pr feedback: use let else, remove epoch 0 hack --------- Co-authored-by: Wen <crocoxu@gmail.com> (cherry picked from commit 93271d9)
…32963) (#35006) gossip: notify state machine of duplicate proofs (#32963) * gossip: notify state machine of duplicate proofs * Add feature flag for ingesting duplicate proofs from Gossip. * Use the Epoch the shred is in instead of the root bank epoch. * Fix unittest by activating the feature. * Add a test for feature disabled case. * EpochSchedule is now not copyable, clone it explicitly. * pr feedback: read epoch schedule on startup, add guard for ff recache * pr feedback: bank_forks lock, -cached_slots_in_epoch, init ff * pr feedback: bank.forks_try_read() -> read() * pr feedback: fix local-cluster setup * local-cluster: do not expose gossip internals, use retry mechanism instead * local-cluster: split out case 4b into separate test and ignore * pr feedback: avoid taking lock if ff is already found * pr feedback: do not cache ff epoch * pr feedback: bank_forks lock, revert to cached_slots_in_epoch * pr feedback: move local variable into helper function * pr feedback: use let else, remove epoch 0 hack --------- Co-authored-by: Wen <crocoxu@gmail.com> (cherry picked from commit 93271d9) Co-authored-by: Ashwin Sekar <ashwin@solana.com>
Problem
We consume duplicate shred proofs from gossip, however we don't let fork choice know.
Summary of Changes
Notify the consensus state machine which will in turn update fork choice.
Split from #32862
Fixes #16508