File tree Expand file tree Collapse file tree
yarn-project/stdlib/src/p2p Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,8 +268,8 @@ export class BlockProposal extends Gossipable implements Signable {
268268 } else {
269269 buffer . push ( 0 ) ; // hasSignedTxs = false
270270 }
271- // Optional bucket-reference tail (AZIP-22 Fast Inbox). Appended only when set, so pre-flip proposals serialize
272- // byte-identically to the legacy format and mixed-version peers keep decoding them .
271+ // Optional bucket-reference tail (AZIP-22 Fast Inbox). Appended only when set, so a proposal without a reference
272+ // serializes without the tail and a decoder that reaches EOF reads it as unset .
273273 if ( this . bucketRef ) {
274274 buffer . push ( 1 ) ; // hasBucketRef = true
275275 buffer . push ( this . bucketRef . toBuffer ( ) ) ;
@@ -299,8 +299,8 @@ export class BlockProposal extends Gossipable implements Signable {
299299 }
300300 }
301301
302- // Optional bucket-reference tail (AZIP-22 Fast Inbox). Legacy buffers end after the signedTxs flag, so EOF here
303- // decodes as "no reference" — this is the cross-version tolerance that keeps mixed-version gossip working .
302+ // Optional bucket-reference tail (AZIP-22 Fast Inbox). A buffer that ends after the signedTxs flag decodes as
303+ // "no reference", so proposals written without the tail round-trip cleanly .
304304 let bucketRef : InboxBucketRef | undefined ;
305305 if ( ! reader . isEmpty ( ) ) {
306306 const hasBucketRef = reader . readNumber ( ) ;
Original file line number Diff line number Diff line change @@ -294,8 +294,8 @@ export class CheckpointProposal extends Gossipable implements Signable {
294294 } else {
295295 buffer . push ( 0 ) ; // hasSignedTxs = false
296296 }
297- // Optional bucket-reference tail (AZIP-22 Fast Inbox). Appended only when set, so pre-flip proposals serialize
298- // byte-identically to the legacy format and mixed-version peers keep decoding them .
297+ // Optional bucket-reference tail (AZIP-22 Fast Inbox). Appended only when set, so a proposal without a reference
298+ // serializes without the tail and a decoder that reaches EOF reads it as unset .
299299 if ( this . lastBlock . bucketRef ) {
300300 buffer . push ( 1 ) ; // hasBucketRef = true
301301 buffer . push ( this . lastBlock . bucketRef . toBuffer ( ) ) ;
@@ -336,8 +336,8 @@ export class CheckpointProposal extends Gossipable implements Signable {
336336 }
337337 }
338338
339- // Optional bucket-reference tail (AZIP-22 Fast Inbox). Legacy buffers end after the signedTxs flag, so EOF here
340- // decodes as "no reference" — the cross-version tolerance that keeps mixed-version gossip working .
339+ // Optional bucket-reference tail (AZIP-22 Fast Inbox). A buffer that ends after the signedTxs flag decodes as
340+ // "no reference", so proposals written without the tail round-trip cleanly .
341341 let bucketRef : InboxBucketRef | undefined ;
342342 if ( ! reader . isEmpty ( ) ) {
343343 const hasBucketRef = reader . readNumber ( ) ;
You can’t perform that action at this time.
0 commit comments