Skip to content

ReceiptList68 and eth/68 receipt codec

Source (upstream pre-purge) Current
File eth/protocols/eth/receipt.go receipt_pow.go
Symbol ReceiptList68 ReceiptList68
Ref 723aae2b4~1 etc/v1.17.4-full-node

Byte-for-byte revival of the whole eth/68 half of upstream's receipt.go as it stood right before #33511 deleted it: maxReceiptSize, Receipt.decode68 / decodeDatabase / decodeInnerList / encodeForStorage / encodeForNetwork68, the receiptListBuffers scratch struct with initBuffers and its encodeForStorage, ReceiptList68 with NewReceiptList68 / setBuffers / EncodeForStorage / Derivable / DecodeRLP / EncodeRLP, and blockReceiptsToNetwork68. The eth/69 halves (decode69, encodeForNetwork69, ReceiptList69) are NOT revived — v1.17.4 carries their successors in receipt.go. Shared helpers are reused from that file rather than duplicated: newReceipt, Receipt.bloom, Receipt.encodeForHash, newDerivableRawList and txTypesInBody. Exactly two deviations from the source, both forced by later upstream refactors: (1) Derivable calls encodeForHash(&rl.buf.bloom, outbuf) because #33153 (eth/70) changed that method's parameter from receiptListBuffers to [6]byte; (2) the setBuffers doc comment no longer says "implements ReceiptsList", since that type constraint was removed along with the generic packet. Note this leaves Receipt.decodeInnerList (revived, flag driven) alongside the current Receipt.decode in receipt.go (upstream, eth/69-only, inlined by #33153) — near-duplicate parsers, accepted so that no upstream file is touched. Covered by TestReceiptList68 in receipt_pow_test.go, itself a byte-for-byte revival sharing the receiptsTests fixture still present in the upstream receipt_test.go.

3-way merge — purge → getc ← upstream

pre-purge
// ReceiptList68 is a block receipt list as downloaded by eth/68.
// This also implements types.DerivableList for validation purposes.
type ReceiptList68 struct {
buf *receiptListBuffers
items rlp.RawList[Receipt]
}

← eth Protocol