aboutsummaryrefslogtreecommitdiff
path: root/src/script/script.cpp
AgeCommit message (Collapse)Author
2018-07-27Update copyright headers to 2018DrahtBot
2018-05-29Remove template matching and pseudo opcodesPieter Wuille
The current code contains a rather complex script template matching engine, which is only used for 3 particular script types (P2PK, P2PKH, multisig). The first two of these are trivial to match for otherwise, and a specialized matcher for multisig is both more compact and more efficient than a generic one. The goal is being more flexible, so that for example larger standard multisigs inside SegWit outputs are more easy to implement. As a side-effect, it also gets rid of the pseudo opcodes hack.
2018-04-13[MOVEONLY] Turn CScript::GetOp2 into a function and move to cppPieter Wuille
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-11-16scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider
-BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
2017-06-07Sanity check transaction scripts in DecodeHexTxAndrew Chow
Make sure that the scripts of decoded transactions are valid scripts.
2017-06-07Add a valid opcode sanity check to CScriptAndrew Chow
Added a function in CScript that checks if the script contains valid opcodes. Add a test for that function
2017-03-08Refactor: Remove using namespace <xxx> from script/Karl-Johan Alm
2017-03-03Merge #8808: Do not shadow variables (gcc set)Wladimir J. van der Laan
ad1ae7a Check and enable -Wshadow by default. (Pavel Janík) 9de90bb Do not shadow variables (gcc set) (Pavel Janík) Tree-SHA512: 9517feb423dc8ddd63896016b25324673bfbe0bffa97f22996f59d7a3fcbdc2ebf2e43ac02bc067546f54e293e9b2f2514be145f867321e9031f895c063d9fb8
2017-01-27[trivial] Fix typos in commentspracticalswift
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-05Do not shadow variables (gcc set)Pavel Janík
2016-06-28Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFYBtcDrak
2016-06-22[RPC] signrawtransaction can sign P2WSHNicolasDorier
2016-06-22BIP141: Witness programPieter Wuille
2016-06-22BIP144: Serialization, hashes, relay (sender side)Pieter Wuille
Contains refactorings by Eric Lombrozo. Contains fixup by Nicolas Dorier. Contains cleanup of CInv::GetCommand by Alex Morcos
2016-01-05Merge pull request #7205Wladimir J. van der Laan
fa71669 [devtools] Use git pretty-format for year parsing (MarcoFalke) fa24439 Bump copyright headers to 2015 (MarcoFalke) fa6ad85 [devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
2015-12-15Rename OP_NOP2 to OP_CHECKLOCKTIMEVERIFY.mb300sd
2015-12-13Bump copyright headers to 2015MarcoFalke
2015-11-13Prevector typePieter Wuille
2015-10-15script: Remove magic numbersDavid Hill
This adds two new constants, MAX_OPS_PER_SCRIPT and MAX_PUBKEYS_PER_MULTISIG.
2015-10-01Accept any sequence of PUSHDATAs in OP_RETURN outputsPeter Todd
Previously only one PUSHDATA was allowed, needlessly limiting applications such as matching OP_RETURN contents with bloom filters that operate on a per-PUSHDATA level. Now any combination that passes IsPushOnly() is allowed, so long as the total size of the scriptPubKey is less than 42 bytes. (unchanged modulo non-minimal PUSHDATA encodings) Also, this fixes the odd bug where previously the PUSHDATA could be replaced by any single opcode, even sigops consuming opcodes such as CHECKMULTISIG. (20 sigops!)
2015-10-01Add IsPushOnly(const_iterator pc)Peter Todd
Allows IsPushOnly() to be applied to just part of the script for OP_RETURN outputs.
2015-07-30Resolve issue 3166.mruddy
These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts. This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa.
2015-07-20Separate core memory usage computation in core_memusage.hPieter Wuille
2015-07-10Implement accurate memory accounting for mempoolPieter Wuille
2014-12-19Added "Core" to copyright headerssandakersmann
Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
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-17script: move ToString and ValueString out of the headerCory Fields
2014-09-16Move CTxDestination from script/script to script/standardPieter Wuille
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-08Move CScript class and dependencies to script/scriptjtimon