You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SENDCMPCT announce field is not validated against BIP152 (MUST be 0 or 1) #35542
When processing a sendcmpct message, the first field (the high-bandwidth announce boolean) is not validated to be 0 or 1. Any non-zero byte is silently accepted and treated as true, which deviates from what the BIP152 says: "The first integer SHALL be interpreted as a boolean (and MUST have a value of either 1 or 0)".
if (msg_type == NetMsgType::SENDCMPCT) {
bool sendcmpct_hb{false};
uint64_t sendcmpct_version{0};
vRecv >> sendcmpct_hb >> sendcmpct_version;
// Only support compact block relay with witnessesif (sendcmpct_version != CMPCTBLOCKS_VERSION) return;
Not super relevant in practice, but just a divergence with the BIP that we noticed while reviewing another impl of compact blocks (cc @MPins).
Activity
yancyribbens commentedon Jun 16, 2026
This is I believe the same change I applied in rust-bitcoin rust-bitcoin/rust-bitcoin#6317