Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
interpreter.h
Go to the documentation of this file.
42 // Passing a non-strict-DER signature or one with undefined hashtype to a checksig operation causes script failure.
43 // Evaluating a pubkey that is not (0x04 + 64 bytes) or (0x02 or 0x03 + 32 bytes) by checksig causes script failure.
47 // Passing a non-strict-DER signature to a checksig operation causes script failure (BIP62 rule 1)
50 // Passing a non-strict-DER signature or one with S > order/2 to a checksig operation causes script failure
60 // Require minimal encodings for all push operations (OP_0... OP_16, OP_1NEGATE where possible, direct
61 // pushes up to 75 bytes, OP_PUSHDATA up to 255 bytes, OP_PUSHDATA2 for anything larger). Evaluating
63 // In addition, whenever a stack element is interpreted as a number, it must be of minimal length (BIP62 rule 4).
78 // Require that only a single stack element remains after evaluation. This changes the success criterion from
79 // "At least one stack element must remain, and when interpreted as a boolean, it must be true" to
100 bool CheckSignatureEncoding(const std::vector<unsigned char> &vchSig, unsigned int flags, ScriptError* serror);
114 uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const PrecomputedTransactionData* cache = nullptr);
119 virtual bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, SigVersion sigversion) const
146 virtual bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
149 TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn) : txTo(txToIn), nIn(nInIn), amount(amountIn), txdata(nullptr) {}
150 TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn, const PrecomputedTransactionData& txdataIn) : txTo(txToIn), nIn(nInIn), amount(amountIn), txdata(&txdataIn) {}
151 bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, SigVersion sigversion) const override;
162 MutableTransactionSignatureChecker(const CMutableTransaction* txToIn, unsigned int nInIn, const CAmount& amount) : TransactionSignatureChecker(&txTo, nInIn, amount), txTo(*txToIn) {}
165 bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker, SigVersion sigversion, ScriptError* error = nullptr);
166 bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* error = nullptr);
virtual bool CheckLockTime(const CScriptNum &nLockTime) const
Definition: interpreter.h:124
virtual ~BaseSignatureChecker()
Definition: interpreter.h:134
const PrecomputedTransactionData * txdata
Definition: interpreter.h:143
Definition: interpreter.h:25
enum ScriptError_t ScriptError
virtual bool VerifySignature(const std::vector< unsigned char > &vchSig, const CPubKey &vchPubKey, const uint256 &sighash) const
Definition: interpreter.cpp:1179
Definition: interpreter.h:116
Definition: interpreter.h:55
Definition: interpreter.h:102
Definition: interpreter.h:26
bool CheckSequence(const CScriptNum &nSequence) const override
Definition: interpreter.cpp:1241
MutableTransactionSignatureChecker(const CMutableTransaction *txToIn, unsigned int nInIn, const CAmount &amount)
Definition: interpreter.h:162
bool CheckSignatureEncoding(const std::vector< unsigned char > &vchSig, unsigned int flags, ScriptError *serror)
Definition: interpreter.cpp:188
TransactionSignatureChecker(const CTransaction *txToIn, unsigned int nInIn, const CAmount &amountIn, const PrecomputedTransactionData &txdataIn)
Definition: interpreter.h:150
Definition: interpreter.h:40
Definition: interpreter.h:45
bool CheckSig(const std::vector< unsigned char > &scriptSig, const std::vector< unsigned char > &vchPubKey, const CScript &scriptCode, SigVersion sigversion) const override
Definition: interpreter.cpp:1184
uint256 SignatureHash(const CScript &scriptCode, const CTransaction &txTo, unsigned int nIn, int nHashType, const CAmount &amount, SigVersion sigversion, const PrecomputedTransactionData *cache=nullptr)
Definition: interpreter.cpp:1156
Definition: interpreter.h:27
Definition: interpreter.h:111
bool EvalScript(std::vector< std::vector< unsigned char > > &stack, const CScript &script, unsigned int flags, const BaseSignatureChecker &checker, SigVersion sigversion, ScriptError *error=nullptr)
Definition: interpreter.cpp:235
Definition: script.h:205
bool VerifyScript(const CScript &scriptSig, const CScript &scriptPubKey, unsigned int flags, const BaseSignatureChecker &checker, ScriptError *error=nullptr)
Definition: interpreter.cpp:1287
Definition: interpreter.h:137
PrecomputedTransactionData(const CTransaction &tx)
Definition: interpreter.cpp:1149
bool CheckLockTime(const CScriptNum &nLockTime) const override
Definition: interpreter.cpp:1205
TransactionSignatureChecker(const CTransaction *txToIn, unsigned int nInIn, const CAmount &amountIn)
Definition: interpreter.h:149
Definition: interpreter.h:83
Definition: interpreter.h:64
Definition: interpreter.h:48
Definition: interpreter.h:97
Definition: interpreter.h:24
virtual bool CheckSig(const std::vector< unsigned char > &scriptSig, const std::vector< unsigned char > &vchPubKey, const CScript &scriptCode, SigVersion sigversion) const
Definition: interpreter.h:119
virtual bool CheckSequence(const CScriptNum &nSequence) const
Definition: interpreter.h:129
Definition: interpreter.h:37
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:198
Definition: interpreter.h:52
Definition: interpreter.h:58