Relax witness size checking #103

Open
roylee17 wants to merge 2 commits from relax-witness-size-checking into master

2 commits

Author SHA1 Message Date
Elle Mouton
c96645c3a8 wire: increase max witness items per input 2023-05-01 15:03:14 -07:00
Olaoluwa Osuntokun
df89776a17 wire: remove erroneous witness size check in wire parsing
In this commit, we fix a bug that would cause nodes to be unable to
parse a given block from the wire. The block would be properly accepted
if fed in via other mechanisms.

The issue here is that the old checks for the maximum witness size,
circa segwit v0 where placed in the wire package _as well_ as the tx
engine. This check should only be in the engine, since it's properly
gated by other related scrip validation flags.

The fix itself is simple: limit witnesses only based on the maximum
block size in bytes, or ~4MB.
2023-05-01 15:01:37 -07:00