BIP141: Add 520 bytes witness stack limit#303
Conversation
|
??? Why a limit? |
|
Why a limit? Because DoS potential. I don't like things that allow
arbitrary size data in consensus code.
Script already can't deal with stack items larger than 73 bytes anyway, and
I don't think we should support more, but with 520 bytes we're certain that
it doesn't remove any former functionality.
|
|
The script itself should be longer than 520 bytes or we get the P2SH regression again... |
|
The restriction does not apply to the script itself, only to the input
stack fed to it.
|
|
@sipa This is unclear, as the witnessScript is popped off the witness stack... |
There was a problem hiding this comment.
@luke-jr re: witnessScript size and witness stack size
There was a problem hiding this comment.
I would say "witness redeem" instead of witnessScript.
WitnessScript are the pushes for a particular input.
|
Testing with witnessScript of 10000 and 10001 bytes: |
|
@jl2012 From left to right top to bottom coordinates of meaning.. is the first link to 10000 and the 10001 to 2nd link ? |
|
@andre-amorim yes, you can find it by clicking the links |
|
Thanks @jl2012 it's 212k on my lp0, yep I printed it out. |
BIP141: Add 520 bytes witness stack limit
@sipa