|
| 1 | +--- |
| 2 | +simd: '0313' |
| 3 | +title: Drop unchained merkle shreds |
| 4 | +authors: |
| 5 | + - Ashwin Sekar |
| 6 | +category: Standard |
| 7 | +type: Core |
| 8 | +status: Review |
| 9 | +created: 2025-06-30 |
| 10 | +feature: |
| 11 | + - 5KLGJSASDVxKPjLCDWNtnABLpZjsQSrYZ8HKwcEdAMC8 |
| 12 | + - https://github.com/anza-xyz/feature-gate-tracker/issues/80 |
| 13 | +--- |
| 14 | + |
| 15 | +## Summary |
| 16 | + |
| 17 | +As the new shred format is being sent by all clients, this feature deprecates |
| 18 | +the old shred format. |
| 19 | + |
| 20 | +## Motivation |
| 21 | + |
| 22 | +It is inconvinient to support both formats, and upcoming consensus changes (alpenglow) |
| 23 | +expect all shreds to be of the chained variety. |
| 24 | + |
| 25 | +## New Terminology |
| 26 | + |
| 27 | +N/A |
| 28 | + |
| 29 | +## Detailed Design |
| 30 | + |
| 31 | +The chained merkle shred variant, adds an additional field to Data and Coding shreds. |
| 32 | +It adds the Merkle root of the previous erasure batch after the data buffer or |
| 33 | +erasure coded shard respectively, before the merkle proof: |
| 34 | + |
| 35 | +``` |
| 36 | +// Layout: {common, data} headers | data buffer |
| 37 | +// | [Merkle root of the previous erasure batch if chained] |
| 38 | +// | Merkle proof |
| 39 | +// | [Retransmitter's signature if resigned] |
| 40 | +// The slice past signature till the end of the data buffer is erasure coded. |
| 41 | +// The slice past signature and before the merkle proof is hashed to generate |
| 42 | +// the Merkle tree. The root of the Merkle tree is signed. |
| 43 | +
|
| 44 | +// Layout: {common, data} headers | data buffer |
| 45 | +// | [Merkle root of the previous erasure batch if chained] |
| 46 | +// | Merkle proof |
| 47 | +// | [Retransmitter's signature if resigned] |
| 48 | +// The slice past signature till the end of the data buffer is erasure coded. |
| 49 | +// The slice past signature and before the merkle proof is hashed to generate |
| 50 | +// the Merkle tree. The root of the Merkle tree is signed. |
| 51 | +``` |
| 52 | + |
| 53 | +Additionally in the common shred header, the first 4 bits of the shred variant |
| 54 | +field are reserved to specify the shred variant. The second bit indicates if this |
| 55 | +shred is of the chained merkle shred variant. |
| 56 | + |
| 57 | +If `drop_unchained_merkle_shreds: 5KLGJSASDVxKPjLCDWNtnABLpZjsQSrYZ8HKwcEdAMC8` |
| 58 | +is active, then any shred with the second bit of the shred variant as zero will |
| 59 | +be dropped on ingest. |
| 60 | + |
| 61 | +## Alternatives Considered |
| 62 | + |
| 63 | +None |
| 64 | + |
| 65 | +## Impact |
| 66 | + |
| 67 | +Any clients still producing blocks using the old shred format will have their |
| 68 | +shreds ignored on ingest. |
| 69 | + |
| 70 | +## Security Considerations |
| 71 | + |
| 72 | +None |
| 73 | + |
| 74 | +## Backwards Compatibility |
| 75 | + |
| 76 | +This feature is not backwards compatible. |
0 commit comments