aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.h
AgeCommit message (Collapse)Author
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
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-03Fix all header definesPavel Janík
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-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-06minor license, header end comment etc. cleanup in /scriptPhilip Kaufmann
- ensure all licenses are just MIT - add a missing header end comment - ensure alphabetical ordering
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-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