-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9903 +/- ##
========================================
- Coverage 80.4% 80.4% -0.1%
========================================
Files 287 289 +2
Lines 66539 67016 +477
========================================
+ Hits 53555 53922 +367
- Misses 12984 13094 +110 |
Darn, all those nice links you setup in the description don't work @carllin :( |
I've been wanting a way to determine Solana version from gossip actually, now that everybody is locking down RPC. Stealing bits from the It would be amazing if |
Ah shucks, updated all of them, hopefully they work now? |
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.
This is looking really good overall. I think you should hack this PR to little bits though, so we can incrementally roll this out to the clusters.
For example we know we'll need that shred nonce, so we can carve that bit out ASAP and get mainnet-beta/testnet using it. That looks like the stickiest part of enabling a rolling update.
@@ -0,0 +1,271 @@ | |||
use crate::request_response::RequestResponse; |
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.
nit: outstanding_requests
feels too generic to me in core: outstanding_repair_requests
. If we had that repair
crate then calling this module outstanding_requests
would be fine 😵
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.
@mvines, so the way it's currently set up, outstanding_requests::OutstandingRequests<T, S>
is designed to be more general than just repair, it can track any request type T
that implements T: RequestResponse<Response = S>
.
For instance gossip could potentially initialize an OutstandingRequests<T, S>
for gossip requests/responses as well.
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.
Is that a thing we need though? Building generic interfaces in the hopes that somebody in the future will use them when there's only a single consumer today usually doesn't end too well.
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.
@mvines yeah I would agree in mosts cases, but there was a lot of talk of a similar solution to solve the gossip replay issue here: #9491.
It was a also a nice way to logically bundle the verification of responses into the actual request object like this: https://github.com/solana-labs/solana/pull/9903/files#diff-dc108ad584300fa57f99d1675ccff3b9R66, so that they fit together rather than in disparate functions.
This feels like it's own PR too. |
6977ef6
to
9eb8c57
Compare
56f7e3f
to
86cd4c5
Compare
Removed that change as it didn't yield the expected perf benefits |
slots_iter = slots.into_iter(); | ||
slots_iter_ref = &mut slots_iter; | ||
} | ||
for (batch, slots) in batches.iter().zip(slots_iter_ref) { |
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.
Is it easier to just read the slot out of the shred data here?
@carllin - thanks for landing the v1.1 version of shred nonce. Rolling out the v1.0 version and master quickly would be very nice too. We're coming up on branch day for v1.2 (next Tuesday!) |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Problem
People could send arbitrary shreds for ingestion via the repair port
Summary of Changes
definition: https://github.com/solana-labs/solana/pull/9903/files#diff-7062b585d412f82cf93eb8c6255d60ecR99-R102
Because we still have to support old shred size as well, changes like: https://github.com/solana-labs/solana/pull/9903/files#diff-dc91d3a3b6051569c3c1d9979c3e4df1R896 are necessary.
Backwards Compatibility:
(Painful, but good exercise in what we want to do for any future changes to shreds :P)
packet.data
.https://github.com/solana-labs/solana/pull/9903/files#diff-65dbf75f4753cd8c1a130e96e72cd1b4R242-R246
Due to new shred size, changes like https://github.com/solana-labs/solana/pull/9903/files#diff-dc91d3a3b6051569c3c1d9979c3e4df1R750 and https://github.com/solana-labs/solana/pull/9903/files#diff-dc91d3a3b6051569c3c1d9979c3e4df1R843 are needed to guarantee erasure and de-shredding still work with old shred sizes.
Repair request structure has changed to include nonce: https://github.com/solana-labs/solana/pull/9903/files#diff-dc108ad584300fa57f99d1675ccff3b9R93-R95. TODO: support old version as well
Proposed Upgrade Path:
Land
Backwards Compatibility
1) and 2) above without changing the shred size so that everyone has the code to parse/perform erasure/deshred on smaller shreds. This way when we upgrade, people will understand turbine shreds regardless of whether they have upgraded.This step is dependent on knowing what version people in gossip are on, @mvines is there a way to do that? If not I was thinking maybe we could set the
storage_addr
in ContactInfo as a flag.Perform upgrade and modify repair such that:
Fixes #