aboutsummaryrefslogtreecommitdiff
path: root/src/script
AgeCommit message (Collapse)Author
2017-05-23Merge #10313: [Consensus] Add constant for maximum stack sizePieter Wuille
cb184b3 Add constant for maximum stack size (Gregory Sanders) Tree-SHA512: 0ec4a28552a6eee7fba8c69278f63c61f095e4ba06cb34456bd0162cd702370d10cca621ae1797a0d5e62fb39814cbb8245d3a7adc007ca39dab7a49cbc925dc
2017-05-19Use range-based for loops (C++11) when looping over vector elementspracticalswift
2017-05-02Add constant for maximum stack sizeGregory Sanders
2017-04-26Remove unused C++ code not covered by unit testspracticalswift
2017-04-12Deduplicate SignatureCacheHasherJeremy Rubin
This moves the SignatureCacheHasher to the sigcache header, out of the anonymous namespace, so that the tests can import it.
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-02-24Trivial: fix comments referencing AppInit2Marko Bencun
It was refactored into multiple functions in 0cc8b6bc44bea29e24fa4e13d8a9bbe4f1483680.
2017-02-17Ensure `-maxsigcachesize` is in valid rangeJohn Newbery
- If the -maxsigcachesize parameter is set to zero, setup a minimum sized sigcache (2 elements) rather than segfaulting. - Handle maxsigcachesize being negative - Handle maxsigcachesize being too large
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-21Make CScript (and prevector) c++11 movable.Pieter Wuille
Such moves are used when reallocating vectors that contain them, for example.
2016-12-21Merge #8589: Inline CTxInWitness inside CTxInWladimir J. van der Laan
f6fb7ac Move CTxInWitness inside CTxIn (Pieter Wuille)
2016-12-14Merge #8895: Better SigCache ImplementationPieter Wuille
67dac4e Add unit tests for the CuckooCache (Jeremy Rubin) c9e69fb Add CuckooCache implementation and replace the sigcache map_type with it (Jeremy Rubin)
2016-12-14Add CuckooCache implementation and replace the sigcache map_type with itJeremy Rubin
SQUASHME: Change cuckoocache to only work for powers of two, to avoid mod operator SQUASHME: Update Documentation and simplify logarithm logic SQUASHME: OSX Build Errors SQUASHME: minor Feedback from sipa + bluematt SQUASHME: DOCONLY: Clarify a few comments.
2016-12-09Refactor: Removed begin/end_ptr functions.Karl-Johan Alm
2016-12-05Do not shadow variables (gcc set)Pavel Janík
2016-12-04Move CTxInWitness inside CTxInPieter Wuille
2016-12-02Make CTransaction actually immutablePieter Wuille
2016-11-07Get rid of nType and nVersionPieter Wuille
Remove the nType and nVersion as parameters to all serialization methods and functions. There is only one place where it's read and has an impact (in CAddress), and even there it does not impact any of the recursively invoked serializers. Instead, the few places that need nType or nVersion are changed to read it directly from the stream object, through GetType() and GetVersion() methods which are added to all stream classes.
2016-11-07Make GetSerializeSize a wrapper on top of CSizeComputerPieter Wuille
Given that in default GetSerializeSize implementations created by ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid of the specialized GetSerializeSize methods everywhere, and just use CSizeComputer. This removes a lot of code which isn't actually used anywhere. For CCompactSize and CVarInt this actually removes a more efficient size computing algorithm, which is brought back in a later commit.
2016-11-07Make streams' read and write return voidPieter Wuille
The stream implementations had two cascading layers (the upper one with operator<< and operator>>, and a lower one with read and write). The lower layer's functions are never cascaded (nor should they, as they should only be used from the higher layer), so make them return void instead.
2016-10-20libconsensus: Add input validation of flagsWladimir J. van der Laan
Makes it an error to use flags that have not been defined on the libconsensus API. There has been some confusion as to what pass to libconsensus, and (combined with mention in the release notes) this should clear it up. Using undocumented flags is a risk because their meaning, and what combinations are allowed, changes from release to release. E.g. it is no longer possible to pass (CLEANSTACK | P2SH) without running into an assertion after the segwit changes.
2016-10-19Merge #8927: Add script tests for FindAndDelete in pre-segwit and segwit scriptsWladimir J. van der Laan
acf853d Add script tests for FindAndDelete in pre-segwit and segwit scripts (Johnson Lau)
2016-10-17Fix ismine and addwitnessaddress: no uncompressed keys in segwitPieter Wuille
2016-10-16Require compressed keys in segwit as policy and disable signing with ↵Johnson Lau
uncompressed keys for segwit scripts
2016-10-16Add script tests for FindAndDelete in pre-segwit and segwit scriptsJohnson Lau
2016-09-30Add NULLDUMMY verify flag in bitcoinconsensus.hJohnson Lau
2016-09-27Add policy: null signature for failed CHECK(MULTI)SIGJohnson Lau
2016-09-23Make non-minimal OP_IF/NOTIF argument non-standard for P2WSHJohnson Lau
2016-09-01Merge #8524: Precompute sighashesPieter Wuille
35fe039 Rename to PrecomputedTransactionData (Pieter Wuille) ab48c5e Unit test for sighash caching (Nicolas DORIER) d2c5d04 Precompute sighashes (Pieter Wuille)
2016-08-28Merge #8607: [doc] Fix doxygen off-by-one comments, fix typosWladimir J. van der Laan
fafe7b3 contrib: Make fix-copyright-headers.py more portable (MarcoFalke) fa27c0a [doc] Fix typos in comments, doxygen: Fix comment syntax (MarcoFalke) fabfd5d [qa] pull-tester: Don't mute zmq ImportError (MarcoFalke) 67a5502 init: Fix typo in help message for -whitelistforcerelay (Wladimir J. van der Laan)
2016-08-26Rename to PrecomputedTransactionDataPieter Wuille
2016-08-22[doc] Fix typos in comments, doxygen: Fix comment syntaxMarcoFalke
2016-08-16Precompute sighashesPieter Wuille
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
2016-07-28libconsensus: Expose a flag for BIP112Jorge Timón
We added the segwit one, but we forgot CHECKSEQUENCEVERIFY
2016-06-28Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFYBtcDrak
2016-06-22[RPC] signrawtransaction can sign P2WSHNicolasDorier
2016-06-22BIP143: Signing logicPieter Wuille
2016-06-22[libconsensus] Script verification API with amountsThomas Kerin
script_tests: always test bitcoinconsensus_verify_script_with_amount if VERIFY_WITNESS isn't set Rename internal method + make it static trim bitcoinconsensus_ prefix Add SERIALIZE_TRANSACTION_WITNESS flag
2016-06-22BIP141: Other consensus critical limits, and BIP145Pieter Wuille
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22BIP143: Verification logicPieter Wuille
Includes simplifications by Eric Lombrozo.
2016-06-22Refactor script validation to observe amountsPieter Wuille
This is a preparation for BIP143 support.
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-05-05Merge #7907: Optimize and Cleanup CScript::FindAndDeleteWladimir J. van der Laan
d1d7775 Improve worst-case behavior of CScript::FindAndDelete (Patrick Strateman) e2a30bc Unit test for CScript::FindAndDelete (Gavin Andresen) c0f660c Replace c-style cast with c++ style static_cast. (Patrick Strateman) ec9ad5f Replace memcmp with std::equal in CScript::FindAndDelete (Patrick Strateman)
2016-04-25Treat overly long scriptPubKeys as unspendablePieter Wuille
2016-04-25Introduce constant for maximum CScript lengthPieter Wuille
2016-04-21Improve worst-case behavior of CScript::FindAndDeletePatrick Strateman
Thanks to Sergio Lerner for identifying this issue and suggesting this kind of solution.
2016-04-19Replace c-style cast with c++ style static_cast.Patrick Strateman