aboutsummaryrefslogtreecommitdiff
path: root/src/test/data
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5470Wladimir J. van der Laan2014-12-191-1/+1
|\ | | | | | | 78253fc Remove references to X11 licence (Michael Ford)
| * Remove references to X11 licenceMichael Ford2014-12-161-1/+1
| |
* | Merge pull request #5421Wladimir J. van der Laan2014-12-192-0/+21
|\ \ | |/ |/| | | cac15be Test unexecuted OP_CODESEPARATOR (Peter Todd)
| * Test unexecuted OP_CODESEPARATORPeter Todd2014-12-042-0/+21
| | | | | | | | | | | | | | | | OP_CODESEPARATOR is an actual executed instruction, not a declarative thing, so if it's wrapped in an OP_IF it can be turned off. Using this to implement Rivest's Paywords is left as an exercise for the reader.
* | minor fix on script test data docsManuel Araoz2014-12-162-2/+2
| |
* | newlines in strings are invalid JSONRyan X. Charles2014-12-022-31/+23
| | | | | | | | | | | | | | | | | | | | Although script_valid.json and script_invalid.json are loaded correctly by the JSON interpreter used by bitcoin core, these same files are often used by other libraries and do not necessarily load correctly due to the fact that newlines contained inside strings are not valid and must instead use the escape character \n. The files tx_valid.json and tx_invalid.json handle this correctly, so I've changed the formatting in script_valid.json and script_invalid.json to mirror those files.
* | Move CHECKMULTISIG order tests out of automatically generated blockPieter Wuille2014-12-012-43/+42
| |
* | Use deterministically generated script testsPieter Wuille2014-12-012-54/+53
|/ | | | | | | 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.
* Test the exact order of CHECKMULTISIG sig/pubkey evaluationPeter Todd2014-11-202-0/+44
| | | | Possible with STRICTENC
* Make STRICTENC invalid pubkeys fail the script rather than the opcode.Pieter Wuille2014-11-202-9/+27
| | | | | | | 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.
* Discourage NOPs reserved for soft-fork upgradesPeter Todd2014-11-172-0/+22
| | | | | | | | | | | | | | | | | 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.
* Add valid invert of invalid every numeric opcode testsPeter Todd2014-10-251-0/+49
|
* Clearly separate PUSHDATA and numeric argument MINIMALDATA testsPeter Todd2014-10-252-30/+114
|
* Test every numeric-accepting opcode for correct handling of the numeric ↵Peter Todd2014-10-251-0/+50
| | | | minimal encoding rule
* Ensure MINIMALDATA invalid tests can only fail one wayPeter Todd2014-10-251-0/+12
| | | | | Removes the need for the 'negated' versions of the tests, and ensures other failures don't mask what we're trying to test.
* Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4)Pieter Wuille2014-10-252-2/+33
| | | | | Also use the new flag as a standard rule, and replace the IsCanonicalPush standardness check with it (as it is more complete).
* Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2)Pieter Wuille2014-10-252-0/+30
|
* Make SCRIPT_VERIFY_STRICTENC compatible with BIP62Pieter Wuille2014-10-082-10/+100
| | | | | | | | * 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.
* Prettify JSON tests and minimize diffsPieter Wuille2014-10-072-26/+150
|
* Merge pull request #5014Wladimir J. van der Laan2014-10-011-10/+19
|\ | | | | | | 41d67c7 tests: fix python test-runner for windows (Cory Fields)
| * tests: fix python test-runner for windowsCory Fields2014-09-301-10/+19
| | | | | | | | | | | | | | | | | | Windows needed a few fixups to get the tests running: 1. bitcoin-tx needs a file extension in Windows. Take this opportunity to add an env file, which pulls variables out of our build config. This can be extended as needed, for now it's very simple. 2. After #1, split the args out of the exec key in the test data. 3. Correct the line-endings from windows stdout
* | Add automatic script test generation, and actual checksig testsPieter Wuille2014-09-262-24/+25
|/
* Add actual signature testsPieter Wuille2014-09-222-2/+33
|
* Use actually valid transactions for script testsPieter Wuille2014-09-222-0/+18
|
* bitcoin-util-test: Test bitcoin-tx with null scriptPubKeyLuke Dashjr2014-09-142-0/+4
|
* Make script_{valid,invalid}.json validation flags configurablePieter Wuille2014-09-082-787/+810
|
* Add bitcoin-tx testsJeff Garzik2014-08-196-0/+34
| | | | | Testing: delin, delout, locktime, and basic createrawtransaction-like functionality.
* bitcoin-tx: Accept input via stdin. Add input handling to tests.Jeff Garzik2014-08-191-0/+4
|
* Add "it works" test for bitcoin-txJeff Garzik2014-08-192-0/+6
|
* script tests: add tests for CHECKMULTISIG limitsOtto Allmendinger2014-07-181-0/+3
|
* script test: test case for 5-byte boolsOtto Allmendinger2014-07-181-0/+1
|
* script tests: value with trailing 0x00 is trueOtto Allmendinger2014-07-181-0/+1
|
* script tests: values that overflow to 0 are trueOtto Allmendinger2014-07-181-0/+1
|
* script tests: BOOLAND, BOOLOR decode to integerOtto Allmendinger2014-07-181-0/+3
| | | | unlike other boolean checks, arguments >5 bytes invalidate the script
* additional test for OP_SIZE in script_valid.jsonOtto Allmendinger2014-07-181-0/+1
|
* Merge pull request #4268Wladimir J. van der Laan2014-06-021-1/+1
|\ | | | | | | 223a6f7 Fix stray uppercase A in tx_valid.json. (Andreas Schildbach)
| * Fix stray uppercase A in tx_valid.json.Andreas Schildbach2014-06-011-1/+1
| |
* | Add CODESEPARATOR/FindAndDelete() testsPeter Todd2014-05-121-0/+46
|/
* Merge pull request #3843Wladimir J. van der Laan2014-05-092-45/+86
|\ | | | | | | | | | | | | | | | | 787ee0c Check redeemScript size does not exceed 520 byte limit (Peter Todd) 4d79098 Increase IsStandard() scriptSig length (Peter Todd) f80cffa Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails (Peter Todd) 6380180 Add rejection of non-null CHECKMULTISIG dummy values (Peter Todd) 29c1749 Let tx (in)valid tests use any SCRIPT_VERIFY flag (Peter Todd) 68f7d1d Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants (Peter Todd)
| * Add rejection of non-null CHECKMULTISIG dummy valuesPeter Todd2014-05-082-3/+44
| | | | | | | | | | | | This is a source of transaction mutability as the dummy value was previously not checked and could be modified to something other than the usual OP_0 value.
| * Let tx (in)valid tests use any SCRIPT_VERIFY flagPeter Todd2014-05-052-43/+43
| | | | | | | | Previously only P2SH could be set.
* | Merge pull request #3965Wladimir J. van der Laan2014-05-092-0/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | script: add additional script testsCory Fields2014-04-222-0/+16
| |/
* | Merge pull request #3860 from petertodd/test-checkmulti-n-m-zeroGavin Andresen2014-05-092-0/+102
|\ \ | |/ |/| Test CHECKMULTISIG with m == 0 and/or n == 0
| * Test CHECKMULTISIG with m == 0 and n == 0Peter Todd2014-03-122-0/+80
| |
| * Fix script test handling of empty scriptsPeter Todd2014-03-122-0/+22
| | | | | | | | Previously an empty script would evaluate to OP_0
* | Add sighash tests from data fileManuel Araoz2014-03-311-0/+503
| |
* | Add licenses for tests and test dataWladimir J. van der Laan2014-03-181-0/+14
|/ | | | | | | | - Add license headers to source files (years based on commit dates) in `src/test` as well as `qa` - Add `README.md` to `src/test/data` specifying MIT license Fixes #3848
* Add script test to prove that OP_0 evaluates as the empty vector, rather ↵Andreas Schildbach2014-03-112-2/+6
| | | | than [0].
* Add more data-driven tests.Matt Corallo2014-01-302-2/+34
|