aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.cpp
AgeCommit message (Collapse)Author
2015-02-03Merge pull request #5714Wladimir J. van der Laan
3916a81 Increase coverage of DERSIG edge cases (Pieter Wuille) 6da2028 Add RPC test for DERSIG BIP switchover logic (Pieter Wuille) 773c30d BIP66 changeover logic (Pieter Wuille) 18695f0 Example unit tests from BIP66 (Pieter Wuille) abfbeaf Change IsDERSignature to BIP66 implementation (Pieter Wuille)
2015-02-03Avoid storing a reference passed to SignatureChecker constructorsPieter Wuille
Rebased-From: 9fddceda44fb5592be179d783f0e5ac616c51c0d Github-Pull: #5719
2015-02-03Use separate SignatureChecker for CMutableTransactionPieter Wuille
Conflicts: src/main.cpp src/script/bitcoinconsensus.cpp Rebased-From: 858809a33e4f690c4ad213f44a6c4465fc2ef025 Github-Pull: #5719
2015-02-01Change IsDERSignature to BIP66 implementationPieter Wuille
2015-01-26Make empty byte arrays pass CheckSignatureEncoding()Peter Todd
Makes it possible to compactly provide a delibrately invalid signature for use with CHECK(MULTI)SIG. For instance with BIP19 if m != n invalid signatures need to be provided in the scriptSig; prior to this change those invalid signatures would need to be large DER-encoded signatures. Note that we may want to further expand on this change in the future by saying that only OP_0 is a "valid" invalid signature; BIP19 even with this change is inherently malleable as the invalid signatures can be any validly encoded DER signature. Rebased-From: 2fa9a8ec86033b809a1c48f0396c3482c0d5d33c Github-Pull: #5627
2014-12-03MOVEONLY: core/ -> primitives/Luke Dashjr
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-24libbitcoinconsensus: don't require any global constructorsCory Fields
These static objects are only used in once place, so declare them there instead.
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-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: create sane error return codes for script validation and remove loggingCory Fields
Attempt to codify the possible error statuses associated with script validation. script/types.h has been created with the expectation that it will be part of the public lib interface. The other flag enums will be moved here in a future commit. Logging has also been removed in order to drop the dependency on core.h. It can be re-added to bitcoind as-needed. This makes script verification finally free of application state and boost!
2014-11-10Make comments in /src/script doxygen compatibleMichael Ford
2014-10-31boost: moveonly: split CPubKey and friends to new filesCory Fields
2014-10-31boost: moveonly: create eccryptoverify.h|cpp and move helper functions thereCory Fields
Eventually (after 0.10) these files will hold the logic for crypto verification routines, and CKey/CPubKey will call into them.
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-27MOVEONLY: Separate CTransaction and dependencies from corejtimon
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-17script: add a slew of includes all around and drop includes from script.hCory Fields
Lots of files ended up with indirect includes from script.h.
2014-10-08Make SCRIPT_VERIFY_STRICTENC compatible with BIP62Pieter Wuille
* 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.
2014-10-02Replace SCRIPT_VERIFY_NOCACHE by flag directly to checkerPieter Wuille
2014-10-02Make signature cache optionalPieter Wuille
2014-10-02Abstract out SignatureCheckerPieter Wuille
2014-09-25script: don't read past the endCory Fields
2014-09-25script: Fix reference into empty vector run time exceptionENikS
Edit by laanwj: `begin_ptr(sourcedata) + sourcedata.size()` -> `end_ptr(sourcedata)`
2014-09-17Merge pull request #4555Wladimir J. van der Laan
6dcfda2 Don't pass nHashType to EvalScript nor CheckSig (jtimon) 2b23a87 Don't pass nHashType to VerifyScript (jtimon) ce3649fb Remove CScriptCheck::nHashType (was always 0) (jtimon) 358562b Remove unused function main:VerifySignature (jtimon)
2014-09-14cleanup new script files (no code changes)Philip Kaufmann
- add missing header end comments - ensure alphabetical ordering - update copyright year and license
2014-09-12Don't pass nHashType to EvalScript nor CheckSigjtimon
2014-09-12Don't pass nHashType to VerifyScriptjtimon
2014-09-08Separate script/interpreterjtimon