![]() |
Bitcoin Core 32.99.0
P2P Digital Currency
|
#include <consensus/amount.h>#include <hash.h>#include <primitives/transaction.h>#include <script/script.h>#include <script/script_error.h>#include <script/verify_flags.h>#include <uint256.h>#include <cstddef>#include <cstdint>#include <map>#include <optional>#include <span>#include <string>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | PrecomputedTransactionData |
| struct | ScriptExecutionData |
| class | SigHashCache |
| Data structure to cache SHA256 midstates for the ECDSA sighash calculations (bare, P2SH, P2WPKH, P2WSH). More... | |
| class | BaseSignatureChecker |
| class | GenericTransactionSignatureChecker< T > |
| class | DeferringSignatureChecker |
Typedefs | |
| using | TransactionSignatureChecker = GenericTransactionSignatureChecker< CTransaction > |
| using | MutableTransactionSignatureChecker = GenericTransactionSignatureChecker< CMutableTransaction > |
Definition at line 338 of file interpreter.h.
Definition at line 337 of file interpreter.h.
| anonymous enum |
Signature hash types/flags.
Definition at line 30 of file interpreter.h.
|
strong |
Enum to specify what *TransactionSignatureChecker's behavior should be when dealing with missing transaction data.
| Enumerator | |
|---|---|
| ASSERT_FAIL | Abort execution through assertion failure (for consensus code) |
| FAIL | Just act as if the signature was invalid. |
Definition at line 304 of file interpreter.h.
|
strong |
Definition at line 50 of file interpreter.h.
|
strong |
Definition at line 201 of file interpreter.h.
| bool CheckSignatureEncoding | ( | const std::vector< unsigned char > & | vchSig, |
| script_verify_flags | flags, | ||
| ScriptError * | serror | ||
| ) |
Definition at line 211 of file interpreter.cpp.
| uint256 ComputeTapbranchHash | ( | std::span< const unsigned char > | a, |
| std::span< const unsigned char > | b | ||
| ) |
Compute the BIP341 tapbranch hash from two branches.
Spans must be 32 bytes each.
Definition at line 1887 of file interpreter.cpp.
Compute the BIP341 tapleaf hash from leaf version & script.
Definition at line 1882 of file interpreter.cpp.
| uint256 ComputeTaprootMerkleRoot | ( | std::span< const unsigned char > | control, |
| const uint256 & | tapleaf_hash | ||
| ) |
Compute the BIP341 taproot script tree Merkle root from control block and leaf hash.
Requires control block to have valid length (33 + k*32, with k in {0,1,..,128}).
Definition at line 1898 of file interpreter.cpp.
| size_t CountWitnessSigOps | ( | const CScript & | scriptSig, |
| const CScript & | scriptPubKey, | ||
| const CScriptWitness & | witness, | ||
| script_verify_flags | flags | ||
| ) |
Definition at line 2149 of file interpreter.cpp.
| bool EvalScript | ( | std::vector< std::vector< unsigned char > > & | stack, |
| const CScript & | script, | ||
| script_verify_flags | flags, | ||
| const BaseSignatureChecker & | checker, | ||
| SigVersion | sigversion, | ||
| ScriptError * | error = nullptr |
||
| ) |
| bool EvalScript | ( | std::vector< std::vector< unsigned char > > & | stack, |
| const CScript & | script, | ||
| script_verify_flags | flags, | ||
| const BaseSignatureChecker & | checker, | ||
| SigVersion | sigversion, | ||
| ScriptExecutionData & | execdata, | ||
| ScriptError * | error = nullptr |
||
| ) |
Definition at line 417 of file interpreter.cpp.
Definition at line 239 of file interpreter.cpp.
| std::vector< std::string > GetScriptFlagNames | ( | script_verify_flags | flags | ) |
Definition at line 2208 of file interpreter.cpp.
| const std::map< std::string, script_verify_flag_name > & ScriptFlagNamesToEnum | ( | ) |
Definition at line 2178 of file interpreter.cpp.
| uint256 SignatureHash | ( | const CScript & | scriptCode, |
| const T & | txTo, | ||
| unsigned int | nIn, | ||
| int32_t | nHashType, | ||
| const CAmount & | amount, | ||
| SigVersion | sigversion, | ||
| const PrecomputedTransactionData * | cache = nullptr, |
||
| SigHashCache * | sighash_cache = nullptr |
||
| ) |
Definition at line 1610 of file interpreter.cpp.
| bool SignatureHashSchnorr | ( | uint256 & | hash_out, |
| ScriptExecutionData & | execdata, | ||
| const T & | tx_to, | ||
| uint32_t | in_pos, | ||
| uint8_t | hash_type, | ||
| SigVersion | sigversion, | ||
| const PrecomputedTransactionData & | cache, | ||
| MissingDataBehavior | mdb | ||
| ) |
Definition at line 1493 of file interpreter.cpp.
| bool VerifyScript | ( | const CScript & | scriptSig, |
| const CScript & | scriptPubKey, | ||
| const CScriptWitness * | witness, | ||
| script_verify_flags | flags, | ||
| const BaseSignatureChecker & | checker, | ||
| ScriptError * | serror = nullptr |
||
| ) |
Definition at line 2012 of file interpreter.cpp.
|
extern |
Hasher with tag "TapBranch" pre-fed to it.
Definition at line 1478 of file interpreter.cpp.
|
extern |
Hasher with tag "TapLeaf" pre-fed to it.
Definition at line 1477 of file interpreter.cpp.
|
extern |
Hasher with tag "TapSighash" pre-fed to it.
Definition at line 1476 of file interpreter.cpp.
|
inlineconstexpr |
Definition at line 160 of file interpreter.h.
|
inlineconstexpr |
Definition at line 155 of file interpreter.h.
|
inlineconstexpr |
Script verification flags.
All flags are intended to be soft forks: the set of acceptable scripts under flags (A | B) is a subset of the acceptable scripts under flag (A).
Definition at line 48 of file interpreter.h.
Definition at line 244 of file interpreter.h.
Definition at line 246 of file interpreter.h.
|
inlineconstexpr |
Definition at line 247 of file interpreter.h.
Definition at line 245 of file interpreter.h.
Definition at line 242 of file interpreter.h.
Definition at line 243 of file interpreter.h.
Definition at line 239 of file interpreter.h.
Signature hash sizes.
Definition at line 238 of file interpreter.h.
Definition at line 240 of file interpreter.h.