Posted by Tobin Harding
Sep 2, 2024/23:18 UTC
The ReadCompactSize function, as defined in serialize.h, includes an optional range_check parameter that is set to true by default. This setting ensures that the value read by the function does not exceed 0x02000000, effectively enforcing a limit that keeps the compact size value within the bounds of a 32-bit unsigned integer. An examination of the codebase reveals that there are no instances where ReadCompactSize is invoked with the range_check parameter set to false. This information raises a pertinent inquiry regarding the necessity of adhering to the constraints of a 32-bit integer for values encoded using CompactSize, and questions the utility of the 0xFF or 9-byte encoding scheme for compact sizes, suggesting a potential reevaluation of whether this approach remains necessary.
Thread Summary (0 replies)
Sep 2 - Sep 2, 2024
1 messages
TLDR
We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project.
Give Feedback