Re: [bitcoin-dev] Script Abuse Potential?

2017-01-05 Thread Jeremy via bitcoin-dev
@Russell: Appreciate the historical note, but as that op code was simultaneously disabled in that patch I don't think we can look back to how it was non-functionally changed (that number means nothing... maybe Satoshi was trying it out with 520 bytes but then just decided to all-out disable it and

Re: [bitcoin-dev] Script Abuse Potential?

2017-01-04 Thread Jorge Timón via bitcoin-dev
I would assume that the controversial part of op_cat comes from the fact that it enables covenants. Are there more concerns than that? On 4 Jan 2017 04:14, "Russell O'Connor via bitcoin-dev" < bitcoin-dev@lists.linuxfoundation.org> wrote: > For the record, the OP_CAT limit of 520 bytes was added

Re: [bitcoin-dev] Script Abuse Potential?

2017-01-03 Thread Russell O'Connor via bitcoin-dev
For the record, the OP_CAT limit of 520 bytes was added by Satoshi on the famous August 15, 2010 "misc" commit, at the same time that OP_CAT was disabled. The previous limi

Re: [bitcoin-dev] Script Abuse Potential?

2017-01-03 Thread Jeremy via bitcoin-dev
Sure, was just upper bounding it anyways. Even less of a problem! RE: OP_CAT, not as OP_CAT was specified, which is why it was disabled. As far as I know, the elements alpha proposal to reenable a limited op_cat to 520 bytes is somewhat controversial... -- @JeremyRubin

Re: [bitcoin-dev] Script Abuse Potential?

2017-01-02 Thread Russell O'Connor via bitcoin-dev
OP_2DUP? Why not OP_3DUP? On Mon, Jan 2, 2017 at 10:39 PM, Johnson Lau via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > No, there could only have not more than 201 opcodes in a script. So you > may have 198 OP_2DUP at most, i.e. 198 * 520 * 2 = 206kB > > For OP_CAT, just check i

Re: [bitcoin-dev] Script Abuse Potential?

2017-01-02 Thread Johnson Lau via bitcoin-dev
No, there could only have not more than 201 opcodes in a script. So you may have 198 OP_2DUP at most, i.e. 198 * 520 * 2 = 206kB For OP_CAT, just check if the returned item is within the 520 bytes limit. > On 3 Jan 2017, at 11:27, Jeremy via bitcoin-dev > wrote: > > It is an unfortunate scrip

Re: [bitcoin-dev] Script Abuse Potential?

2017-01-02 Thread Jeremy via bitcoin-dev
It is an unfortunate script, but can't actually ​do that much ​ it seems​ . The MAX_SCRIPT_ELEMENT_SIZE = 520 Bytes. ​ Thus, it would seem the worst you could do with this would be to (1-520*2)*520*2 bytes ~=~ 10 MB. ​Much more concerning would be the op_dup/op_cat style bug, which under a s

[bitcoin-dev] Script Abuse Potential?

2017-01-02 Thread Steve Davis via bitcoin-dev
Hi all, Suppose someone were to use the following pk_script: [op_2dup, op_2dup, op_2dup, op_2dup, op_2dup, ...(to limit)..., op_2dup, op_hash160, , op_equalverify, op_checksig] This still seems to be valid AFAICS, and may be a potential attack vector? Thanks. _