aboutsummaryrefslogtreecommitdiff
path: root/src/script
AgeCommit message (Collapse)Author
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-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
2016-04-19Replace memcmp with std::equal in CScript::FindAndDeletePatrick Strateman
Function is stl; std::equal just makes more sense.
2016-04-18wallet_ismine.h → script/ismine.hWladimir J. van der Laan
Removes conditional dependency of `src/test` on wallet. Makes multisig and P2SH tests complete without wallet built-in.
2016-04-03[doc] Fix doxygen comments for membersMarcoFalke
2016-02-16Code style fix.BtcDrak
This if statement is a little obtuse and using braces here improves readability.
2016-02-14Separate CheckLockTime() and CheckSequence() logicBtcDrak
For the sake of a little repetition, make code more readable.
2016-02-14BIP112: Implement CHECKSEQUENCEVERIFYMark Friedenbach
- Replace NOP3 with CHECKSEQUENCEVERIFY (BIP112) <nSequence> CHECKSEQUENCEVERIFY -> <nSequence> - Fails if txin.nSequence < nSequence, allowing funds of a txout to be locked for a number of blocks or a duration of time after its inclusion in a block. - Pull most of CheckLockTime() out into VerifyLockTime(), a local function that will be reused for CheckSequence() - Add bitwise AND operator to CScriptNum - Enable CHECKSEQUENCEVERIFY as a standard script verify flag - Transactions that fail CSV verification will be rejected from the mempool, making it easy to test the feature. However blocks containing "invalid" CSV-using transactions will still be accepted; this is *not* the soft-fork required to actually enable CSV for production use.
2016-02-12Merge #7184: Implement SequenceLocks functions for BIP 68Wladimir J. van der Laan
b043c4b fix sdaftuar's nits again (Alex Morcos) a51c79b Bug fix to RPC test (Alex Morcos) da6ad5f Add RPC test exercising BIP68 (mempool only) (Suhas Daftuar) c6c2f0f Implement SequenceLocks functions (Alex Morcos)
2016-02-10Implement SequenceLocks functionsAlex Morcos
SequenceLocks functions are used to evaluate sequence lock times or heights per BIP 68. The majority of this code is copied from maaku in #6312 Further credit: btcdrak, sipa, NicolasDorier
2016-02-10Correctly report high-S violationsPieter Wuille
2016-02-01Get rid of inaccurate ScriptSigArgsExpectedPieter Wuille
(cherry picked from commit 52b29dca7670c3f6d2ab918c0fff1d17c4e494ad)