aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2015-01-08tests: run sanity checks in tests tooCory Fields
If these are going to fail in bitcoind, they should fail in the tests as well. Github-Pull: #5604 Rebased-From: d58c5d6f21fd2421bc8cbb224849e8c38b617775
2015-01-06bitcoin-tx: Fix JSON validation of prevtxsEric R. Schulz
Github-Pull: #5528 Rebased-From: 2a3d988b802dcea4453241e37168d8511078940a a089c50981e822014ffc18e8a37b3518feb52206 2c14d1532fe66a243cdbfb7de48b298213305765
2015-01-02Remove redundant copyright notices from README filesWladimir J. van der Laan
The normative place for these for the entire project is COPYING, and the main README already has a MIT license section. Rebased-From: e6df2bb48f4bff7a2dec4aa226102b0cf2cd828b
2014-12-09Merge pull request #5409Wladimir J. van der Laan
65b0328 newlines in strings are invalid JSON (Ryan X. Charles)
2014-12-06Add a new test for FormatParagraph (string longer than the default width).Pavel Janík
2014-12-05Move CMerkleBlock and CPartialMerkleTree to their own fileMatt Corallo
2014-12-03MOVEONLY: core/ -> primitives/Luke Dashjr
2014-12-02newlines in strings are invalid JSONRyan X. Charles
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.
2014-12-01Move CHECKMULTISIG order tests out of automatically generated blockPieter Wuille
2014-12-01Use deterministically generated script testsPieter Wuille
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.
2014-12-01Merge pull request #5227Wladimir J. van der Laan
4cdaa95 Resize after succesful result (Pieter Wuille) 9d8604f Header define style cleanups (Pieter Wuille) a53fd41 Deterministic signing (Pieter Wuille) 3060e36 Add the RFC6979 PRNG (Pieter Wuille) a8f5087 Add HMAC-SHA256 (Pieter Wuille) 36fa4a7 Split up crypto/sha2 (Pieter Wuille)
2014-11-24Merge pull request #1816Wladimir J. van der Laan
b867e40 CreateNewBlock: Stick height in coinbase so we pass template sanity check (Luke Dashjr) 60755db submitblock: Check for duplicate submissions explicitly (Luke Dashjr) bc6cb41 QA RPC tests: Add tests block block proposals (Luke Dashjr) 9765a50 Implement BIP 23 Block Proposal (Luke Dashjr) 3dcbb9b Abstract DecodeHexBlk and BIP22ValidationResult functions out of submitblock (Luke Dashjr) 132ea9b miner_tests: Disable checkpoints so they don't fail the subsidy-change test (Luke Dashjr) df08a62 TestBlockValidity function for CBlock proposals (used by CreateNewBlock) (Luke Dashjr) 4ea1be7 CreateNewBlock and miner_tests: Also check generated template is valid by CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock (Luke Dashjr) a48f2d6 Abstract context-dependent block checking from acceptance (Luke Dashjr)
2014-11-23Add sanity check after key generationPieter Wuille
Add a sanity check to prevent cosmic rays from flipping a bit in the generated public key, or bugs in the elliptic curve code. This is simply done by signing a (randomized) message, and verifying the result.
2014-11-20Deterministic signingPieter Wuille
2014-11-20Add the RFC6979 PRNGPieter Wuille
2014-11-20Add HMAC-SHA256Pieter Wuille
2014-11-20Split up crypto/sha2Pieter Wuille
2014-11-20Test the exact order of CHECKMULTISIG sig/pubkey evaluationPeter Todd
Possible with STRICTENC
2014-11-20Make STRICTENC invalid pubkeys fail the script rather than the opcode.Pieter Wuille
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.
2014-11-20Merge pull request #5000Pieter Wuille
0391423 Discourage NOPs reserved for soft-fork upgrades (Peter Todd)
2014-11-19build: add quick consensus lib testsCory Fields
They should be hooked up in other places as well, but this is a start.
2014-11-18miner_tests: Disable checkpoints so they don't fail the subsidy-change testLuke Dashjr
2014-11-18Do not use EC code in global constructorsPieter Wuille
2014-11-17Discourage NOPs reserved for soft-fork upgradesPeter Todd
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.
2014-11-14script: check ScriptError values in script testsCory Fields
2014-11-10Do signature-s negation inside the testsPieter Wuille
To avoid the need for libsecp256k1 to expose such functionality.
2014-11-04Merge pull request #5196Wladimir J. van der Laan
8473862 Fix all header defines (Pavel Janík)
2014-11-04Merge pull request #5162Wladimir J. van der Laan
d2e74c5 boost: moveonly: split CPubKey and friends to new files (Cory Fields) 78c228c boost: moveonly: move BIP32Hash to hash.h (Cory Fields) 900078a boost: moveonly: create eccryptoverify.h|cpp and move helper functions there (Cory Fields)
2014-11-03Fix all header definesPavel Janík
2014-11-03Merge pull request #5106Wladimir J. van der Laan
1bea2bb Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and document it (Luke Dashjr) d29a291 Rename RPC_TRANSACTION_* errors to RPC_VERIFY_* and use RPC_VERIFY_ERROR for submitblock (Luke Dashjr) f877aaa Bugfix: submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock, now that it no longer does the full block validity check (Luke Dashjr) 24e8896 Add CValidationInterface::BlockChecked notification (Luke Dashjr)
2014-10-31boost: moveonly: split CPubKey and friends to new filesCory Fields
2014-10-31tests: enable alertnotify test for WindowsCory Fields
The semantics of "echo" are different there and they change the resulting text, but they're still correct and predictable.
2014-10-29Separate protocol versioning from clientversionCory Fields
2014-10-28Merge pull request #5100Pieter Wuille
99f41b9 MOVEONLY: core.o -> core/block.o (jtimon) 561e9e9 MOVEONLY: Move script/compressor out of script and put CTxOutCompressor (from core) with it (jtimon) 999a2ab MOVEONLY: separate CTxUndo out of core (jtimon) 4a3587d MOVEONLY: Separate CTransaction and dependencies from core (jtimon) eda3733 MOVEONLY: Move CFeeRate and Amount constants to amount.o (jtimon)
2014-10-28Merge pull request #5065Wladimir J. van der Laan
16d78bd Add valid invert of invalid every numeric opcode tests (Peter Todd) 2b62e17 Clearly separate PUSHDATA and numeric argument MINIMALDATA tests (Peter Todd) dfeec18 Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule (Peter Todd) 554147a Ensure MINIMALDATA invalid tests can only fail one way (Peter Todd) 6004e77 Improve CScriptNum() comment (Peter Todd) 698c6ab Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4) (Pieter Wuille) d752ba8 Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2) (Pieter Wuille)
2014-10-28Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and ↵Luke Dashjr
document it
2014-10-27MOVEONLY: Move script/compressor out of script and put CTxOutCompressor (fromjtimon
core) with it
2014-10-27MOVEONLY: Separate CTransaction and dependencies from corejtimon
2014-10-25Add valid invert of invalid every numeric opcode testsPeter Todd
2014-10-25Clearly separate PUSHDATA and numeric argument MINIMALDATA testsPeter Todd
2014-10-25Test every numeric-accepting opcode for correct handling of the numeric ↵Peter Todd
minimal encoding rule
2014-10-25Ensure MINIMALDATA invalid tests can only fail one wayPeter Todd
Removes the need for the 'negated' versions of the tests, and ensures other failures don't mask what we're trying to test.
2014-10-25Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4)Pieter Wuille
Also use the new flag as a standard rule, and replace the IsCanonicalPush standardness check with it (as it is more complete).
2014-10-25Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2)Pieter Wuille
2014-10-22boost: split stream classes out of serialize.hCory Fields
serialization now has no dependencies.
2014-10-22Merge pull request #4981Wladimir J. van der Laan
85c579e script: add a slew of includes all around and drop includes from script.h (Cory Fields) db8eb54 script: move ToString and ValueString out of the header (Cory Fields) e9ca428 script: add ToByteVector() for converting anything with begin/end (Cory Fields) 066e2a1 script: move CScriptID to standard.h and add a ctor for creating them from CScripts (Cory Fields)
2014-10-22Merge pull request #5108Wladimir J. van der Laan
a873823 CAutoFile: Explicit Get() and remove unused methods (Wladimir J. van der Laan) fef24ca Add IsNull() to class CAutoFile and remove operator ! (Ruben Dario Ponticeli)
2014-10-22Merge pull request #5110Wladimir J. van der Laan
a3c26c2 Fixes for missing boost tuple.hpp header include. (randy-waterhouse)
2014-10-22CAutoFile: Explicit Get() and remove unused methodsWladimir J. van der Laan
Also add documentation to some methods.
2014-10-21Fixes for missing boost tuple.hpp header include.randy-waterhouse