uses enum for shred type (backport #21333)#22147
Conversation
|
why do we need this in 1.8? |
|
automerge label removed due to a CI failure |
|
None of those changes sound like they should be in 1.8 either? Why wouldn’t we test on 1.9 and then wait for mainnet to be on that version? |
Carl wanted the #22141 and #22139 backports so that backport of #20873 would be easier. Those changes are from back in August. The other backports are related to shreds/erasure-coding/blockstore, which are working towards implementing: which will then generate more coding shreds than data shreds. Because there are more coding shreds than data shreds, the indices of coding shreds no longer align with data shreds and we need for example #21600 to track position of coding shreds explicitly and #21623 to track first coding index. It will cause backward incompatibility issue if a node running master or v1.9 becomes the leader and generates more coding shreds than the data shreds, whereas the cluster does not yet have above patches to be able to digest these shreds. So we need these backports to v1.8 so that master/v1.9 is backward compatible with mainnet. |
|
automerge label removed due to a CI failure |
97a809d to
eafe111
Compare
|
😱 New commits were pushed while the automerge label was present. |
|
automerge label removed due to a CI failure |
|
automerge label removed due to a CI failure |
|
@Mergifyio rebase |
Current code is using u8 which does not have any type-safety and can contain invalid values: https://github.com/solana-labs/solana/blob/66fa062f1/ledger/src/shred.rs#L167 Checks for invalid shred-types are scattered through the code: https://github.com/solana-labs/solana/blob/66fa062f1/ledger/src/blockstore.rs#L849-L851 https://github.com/solana-labs/solana/blob/66fa062f1/ledger/src/shred.rs#L346-L348 The commit uses enum for shred type with #[repr(u8)]. Backward compatibility is maintained by implementing Serialize and Deserialize compatible with u8, and adding a test to assert that. (cherry picked from commit 57057f8) # Conflicts: # core/src/retransmit_stage.rs # gossip/src/cluster_info.rs # ledger/Cargo.toml # ledger/src/blockstore.rs # ledger/src/shred.rs
(cherry picked from commit 48dfdfb) # Conflicts: # ledger/src/blockstore.rs
✅ Branch has been successfully rebased |
eafe111 to
c3b4b11
Compare
|
automerge label removed due to a CI failure |
Codecov Report
@@ Coverage Diff @@
## v1.8 #22147 +/- ##
=========================================
- Coverage 81.5% 81.5% -0.1%
=========================================
Files 459 459
Lines 130934 130957 +23
=========================================
+ Hits 106835 106843 +8
- Misses 24099 24114 +15 |
|
This PR has been automatically locked since there has not been any activity in past 14 days after it was merged. |
This is an automatic backport of pull request #21333 done by Mergify.
Cherry-pick of 57057f8 has failed:
Cherry-pick of 48dfdfb has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refreshwill re-evaluate the rules@Mergifyio rebasewill rebase this PR on its base branch@Mergifyio updatewill merge the base branch into this PR@Mergifyio backport <destination>will backport this PR on<destination>branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com