Skip to content

Reject a compact block with sizes that are not storable. - #1293

Merged
evoskuil merged 1 commit into
libbitcoin:masterfrom
echennells:fix/txs-size
Nov 27, 2026
Merged

evoskuil merged 1 commit into
libbitcoin:masterfrom
echennells:fix/txs-size

Conversation

@echennells

Copy link
Copy Markdown
Contributor

do_submit_compact treats any failure to associate as a fault. With txs_size from database, a compact block of 2^23 bytes or more is instead marked unconfirmable (it is above the block weight limit) and its channel is stopped, as for a block with an invalid tx. The block is already identified (merkle root, malleation and witness commitment), so marking the header is safe.

Regtest on the November 25 masters, a compact block with valid proof of work over txs already pooled (plus its coinbase):

  • 8,888,747 bytes, 9 pooled txs: confirmed.
  • 17,277,341 bytes, 18 pooled txs: confirmed.
  • 8,888,740 bytes, 9 pooled txs and one prefilled tx above 1,000,000 bytes, which is not pooled: validate2 fault, network suspended.

With both changes each is rejected, with no fault, and a valid compact block is confirmed.

Depends on libbitcoin/libbitcoin-database#1110.

@echennells
echennells requested a review from evoskuil November 26, 2026 15:57
@evoskuil
evoskuil merged commit 5fcf3b7 into libbitcoin:master Nov 27, 2026
2 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants