Age | Commit message (Collapse) | Author |
|
|
|
Now that signing is deterministic, we can require exact correspondence between the
automatically generated tests and the ones read from JSON. Do this, and update
the tests to those deterministic versions. Note that some flag changes weren't
correctly applied before.
|
|
Possible with STRICTENC
|
|
This turns STRICTENC turn into a softforking-safe change (even though it
is not intended as a consensus rule), and as a result guarantee that using
it for mempool validation only results in consensus-valid transactions in
the mempool.
|
|
NOP1 to NOP10 are reserved for future soft-fork upgrades. In the event
of an upgrade such NOPs have *VERIFY behavior, meaning that if their
arguments are not correct the script fails. Discouraging these NOPs by
rejecting transactions containing them from the mempool ensures that
we'll never accept transactions, nor mine blocks, with scripts that are
now invalid according to the majority of hashing power even if we're not
yet upgraded. Previously this wasn't an issue as the IsStandard() rules
didn't allow upgradable NOPs anyway, but 7f3b4e95 relaxed the
IsStandard() rules for P2SH redemptions allowing any redeemScript to be
spent.
We *do* allow upgradable NOPs in scripts so long as they are not
executed. This is harmless as there is no opportunity for the script to
be invalid post-upgrade.
|
|
|
|
minimal encoding rule
|
|
Removes the need for the 'negated' versions of the tests, and ensures
other failures don't mask what we're trying to test.
|
|
Also use the new flag as a standard rule, and replace the IsCanonicalPush
standardness check with it (as it is more complete).
|
|
|
|
* Delete canonical_tests.cpp, and move the tests to script_tests.cpp.
* Split off SCRIPT_VERIFY_DERSIG from SCRIPT_VERIFY_STRICTENC (the BIP62 part of it).
* Change signature STRICTENC/DERSIG semantics to fail the script entirely rather than the CHECKSIG result (softfork safety, and BIP62 requirement).
* Add many autogenerated tests for several odd cases.
* Mention specific BIP62 rules in the script verification flags.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unlike other boolean checks, arguments >5 bytes invalidate the script
|
|
b1fdd54 script: Add test for CScriptNum (Cory Fields)
90320d6 script: add additional script tests (Cory Fields)
05e3ecf script: remove bignum dependency (Cory Fields)
4f497cd script: switch outside users to CScriptNum (Cory Fields)
27bff74 script: switch to CScriptNum usage for scripts (Cory Fields)
48d8eb1 script: add CScriptNum class (Cory Fields)
|
|
|
|
|
|
Previously an empty script would evaluate to OP_0
|
|
than [0].
|
|
Seems it was forgotten about when IsPushOnly() and the unittests were
written. A particular oddity is that OP_RESERVED doesn't count towards
the >201 opcode limit unlike every other named opcode.
|
|
IF ELSE ELSE ENDIF is a valid construct; execution or non-execution
inverts on each ELSE encountered.
|
|
|
|
0xba thru 0xff
|
|
|
|
Newlines in JSON strings are against the JSON spec,
so remove them from the script*.json unit tests to
make python's jsonrpc happy (json::spirit didn't care).
|
|
|
|
|
|
|
|
|