From 86f5c28f7c6784eb6a4b0a67a4e44b5114734687 Mon Sep 17 00:00:00 2001 From: pythcoiner Date: Tue, 14 Jul 2026 23:50:57 -0400 Subject: [PATCH] bip-138 treat content type 0x00 as the end of content items --- bip-0138.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bip-0138.md b/bip-0138.md index 8d5e36ba..199e3e58 100644 --- a/bip-0138.md +++ b/bip-0138.md @@ -322,7 +322,7 @@ remaining bytes are `PADDING`. A `PAYLOAD` MUST contain at least one item (see | Value | Definition | |:-------|:---------------------------------------| -| 0x00 | Reserved | +| 0x00 | End of content items; padding follows | | 0x01 | BIP Number (big-endian uint16) | | 0x02 | Vendor-Specific Opaque Tag | @@ -333,7 +333,8 @@ For all `TYPE` values except `0x01`, `LENGTH` MUST be present. `DATA`: variable-length field whose encoding depends on `TYPE`. For `TYPE` values defined above: -- 0x00: parsers MUST reject the payload. +- 0x00: parsers MUST stop reading content items and treat the remaining bytes as + padding. - 0x01: `LENGTH` MUST be omitted and `DATA` is a 2-byte big-endian unsigned integer representing the BIP number that defines it. - 0x02: `DATA` MUST be `LENGTH` bytes of opaque, vendor-specific data.