Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Typedefs | Enumerations | Functions | Variables
node Namespace Reference

Classes

struct  AncestorFeerateComparator
 
class  BlockAssembler
 Generate a new block, without valid proof-of-work. More...
 
struct  BlockCreateOptions
 
struct  BlockfileCursor
 
class  BlockManager
 Maintains a tree of blocks (stored in m_block_index) which is consulted to determine where the most-work tip is. More...
 
struct  CacheSizes
 
struct  CBlockIndexHeightOnlyComparator
 
struct  CBlockIndexWorkComparator
 
struct  CBlockTemplate
 
struct  ChainstateLoadOptions
 
struct  CompareCTxMemPoolIter
 Comparator for CTxMemPool::txiter objects. More...
 
struct  CompareTxIterByAncestorCount
 
struct  CTxMemPoolModifiedEntry
 
struct  CTxMemPoolModifiedEntry_Indices
 
class  ImportingNow
 
struct  ImportMempoolOptions
 
struct  IteratorComparator
 
class  KernelNotifications
 
class  MiniMiner
 A minimal version of BlockAssembler, using the same ancestor set scoring algorithm. More...
 
class  MiniMinerMempoolEntry
 
struct  modifiedentry_iter
 
struct  NodeContext
 NodeContext struct containing references to chain state and connection state. More...
 
struct  PackageToValidate
 
struct  PruneLockInfo
 
struct  PSBTAnalysis
 Holds the results of AnalyzePSBT (miscellaneous information about a PSBT) More...
 
struct  PSBTInputAnalysis
 Holds an analysis of one input from a PSBT. More...
 
struct  RejectedTxTodo
 
class  SnapshotMetadata
 Metadata describing a serialized version of a UTXO set from which an assumeutxo Chainstate can be constructed. More...
 
struct  TxDownloadConnectionInfo
 
class  TxDownloadManager
 Class responsible for deciding what transactions to request and, once downloaded, whether and how to validate them. More...
 
class  TxDownloadManagerImpl
 
struct  TxDownloadOptions
 
struct  update_for_parent_inclusion
 
class  Warnings
 Manages warning messages within a node. More...
 

Typedefs

using BlockMap = std::unordered_map< uint256, CBlockIndex, BlockHasher >
 
using ChainstateLoadResult = std::tuple< ChainstateLoadStatus, bilingual_str >
 Chainstate load status code and optional error string. More...
 
typedef boost::multi_index_container< CTxMemPoolModifiedEntry, CTxMemPoolModifiedEntry_Indicesindexed_modified_transaction_set
 
typedef indexed_modified_transaction_set::nth_index< 0 >::type::iterator modtxiter
 
typedef indexed_modified_transaction_set::index< ancestor_score >::type::iterator modtxscoreiter
 

Enumerations

enum  BlockfileType { NORMAL = 0 , ASSUMED = 1 , NUM_TYPES = 2 }
 
enum class  ChainstateLoadStatus {
  SUCCESS , FAILURE , FAILURE_FATAL , FAILURE_INCOMPATIBLE_DB ,
  FAILURE_INSUFFICIENT_DBCACHE , INTERRUPTED
}
 Chainstate load status. More...
 
enum class  TransactionError {
  OK , MISSING_INPUTS , ALREADY_IN_UTXO_SET , MEMPOOL_REJECTED ,
  MEMPOOL_ERROR , MAX_FEE_EXCEEDED , MAX_BURN_EXCEEDED , INVALID_PACKAGE
}
 
enum class  Warning { CLOCK_OUT_OF_SYNC , PRE_RELEASE_TEST_BUILD , FATAL_INTERNAL_ERROR }
 

Functions

void AbortNode (const std::function< bool()> &shutdown_request, std::atomic< int > &exit_status, const bilingual_str &message, node::Warnings *warnings)
 
util::Result< void > ApplyArgsManOptions (const ArgsManager &args, BlockManager::Options &opts)
 
static auto InitBlocksdirXorKey (const BlockManager::Options &opts)
 
void ImportBlocks (ChainstateManager &chainman, std::span< const fs::path > import_paths)
 
std::ostream & operator<< (std::ostream &os, const BlockfileType &type)
 
std::ostream & operator<< (std::ostream &os, const BlockfileCursor &cursor)
 
CacheSizes CalculateCacheSizes (const ArgsManager &args, size_t n_indexes)
 
static ChainstateLoadResult CompleteChainstateInitialization (ChainstateManager &chainman, const CacheSizes &cache_sizes, const ChainstateLoadOptions &options) EXCLUSIVE_LOCKS_REQUIRED(
 
ChainstateLoadResult LoadChainstate (ChainstateManager &chainman, const CacheSizes &cache_sizes, const ChainstateLoadOptions &options)
 This sequence can have 4 types of outcomes: More...
 
ChainstateLoadResult VerifyLoadedChainstate (ChainstateManager &chainman, const ChainstateLoadOptions &options)
 
util::Result< void > ApplyArgsManOptions (const ArgsManager &args, ChainstateManager::Options &opts)
 
void FindCoins (const node::NodeContext &node, std::map< COutPoint, Coin > &coins)
 Look up unspent output information. More...
 
void ReadCoinsViewArgs (const ArgsManager &args, CoinsViewOptions &options)
 
void ReadDatabaseArgs (const ArgsManager &args, DBOptions &options)
 
void ReadNotificationArgs (const ArgsManager &args, KernelNotifications &notifications)
 
bool LoadMempool (CTxMemPool &pool, const fs::path &load_path, Chainstate &active_chainstate, ImportMempoolOptions &&opts)
 Import the file and attempt to add its contents to the mempool. More...
 
bool DumpMempool (const CTxMemPool &pool, const fs::path &dump_path, FopenFn mockable_fopen_function, bool skip_file_commit)
 
bool DumpMempool (const CTxMemPool &pool, const fs::path &dump_path, fsbridge::FopenFn mockable_fopen_function=fsbridge::fopen, bool skip_file_commit=false)
 Dump the mempool to a file. More...
 
bool ShouldPersistMempool (const ArgsManager &argsman)
 
fs::path MempoolPath (const ArgsManager &argsman)
 
int64_t UpdateTime (CBlockHeader *pblock, const Consensus::Params &consensusParams, const CBlockIndex *pindexPrev)
 
void RegenerateCommitments (CBlock &block, ChainstateManager &chainman)
 Update an old GenerateCoinbaseCommitment from CreateNewBlock after the block txs have changed. More...
 
static BlockAssembler::Options ClampOptions (BlockAssembler::Options options)
 
void ApplyArgsManOptions (const ArgsManager &gArgs, BlockAssembler::Options &options)
 Apply -blockmintxfee and -blockmaxweight options from ArgsManager to BlockAssembler options. More...
 
static int UpdatePackagesForAdded (const CTxMemPool &mempool, const CTxMemPool::setEntries &alreadyAdded, indexed_modified_transaction_set &mapModifiedTx) EXCLUSIVE_LOCKS_REQUIRED(mempool.cs)
 Add descendants of given transactions to mapModifiedTx with ancestor state updated assuming given transactions are inBlock. More...
 
Minisketch MakeMinisketch32 (size_t capacity)
 Wrapper around Minisketch::Minisketch(32, implementation, capacity). More...
 
Minisketch MakeMinisketch32FP (size_t max_elements, uint32_t fpbits)
 Wrapper around Minisketch::CreateFP. More...
 
void ApplyArgsManOptions (const ArgsManager &argsman, PeerManager::Options &options)
 
PSBTAnalysis AnalyzePSBT (PartiallySignedTransaction psbtx)
 Provides helpful miscellaneous information about where a PSBT is in the signing workflow. More...
 
static TransactionError HandleATMPError (const TxValidationState &state, std::string &err_string_out)
 
TransactionError BroadcastTransaction (NodeContext &node, CTransactionRef tx, std::string &err_string, const CAmount &max_tx_fee, bool relay, bool wait_callback)
 Submit a transaction to the mempool and (optionally) relay it to all P2P peers. More...
 
CTransactionRef GetTransaction (const CBlockIndex *const block_index, const CTxMemPool *const mempool, const uint256 &hash, uint256 &hashBlock, const BlockManager &blockman)
 Return transaction with a given hash. More...
 
bool WriteSnapshotBaseBlockhash (Chainstate &snapshot_chainstate)
 
std::optional< uint256ReadSnapshotBaseBlockhash (fs::path chaindir)
 
std::optional< fs::pathFindSnapshotChainstateDir (const fs::path &data_dir)
 Return a path to the snapshot-based chainstate dir, if one exists. More...
 
UniValue GetWarningsForRpc (const Warnings &warnings, bool use_deprecated)
 RPC helper function that wraps warnings.GetMessages(). More...
 

Variables

static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000
 The pre-allocation chunk size for blk?????.dat files (since 0.8) More...
 
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000
 The pre-allocation chunk size for rev?????.dat files (since 0.8) More...
 
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000
 The maximum size of a blk?????.dat file (since 0.8) More...
 
static constexpr size_t BLOCK_SERIALIZATION_HEADER_SIZE = std::tuple_size_v<MessageStartChars> + sizeof(unsigned int)
 Size of header written by WriteBlockToDisk before a serialized CBlock. More...
 
static constexpr int DEFAULT_STOPATHEIGHT {0}
 
static const uint64_t MEMPOOL_DUMP_VERSION_NO_XOR_KEY {1}
 
static const uint64_t MEMPOOL_DUMP_VERSION {2}
 
static constexpr bool DEFAULT_PERSIST_MEMPOOL {true}
 Default for -persistmempool, indicating whether the node should attempt to automatically load the mempool on start and save to disk on shutdown. More...
 
static const bool DEFAULT_PRINT_MODIFIED_FEE = false
 
static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE {COIN / 10}
 Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls. More...
 
static const CAmount DEFAULT_MAX_BURN_AMOUNT {0}
 Maximum burn value for sendrawtransaction, submitpackage, and testmempoolaccept RPC calls. More...
 
static constexpr int32_t MAX_PEER_TX_REQUEST_IN_FLIGHT = 100
 Maximum number of in-flight transaction requests from a peer. More...
 
static constexpr int32_t MAX_PEER_TX_ANNOUNCEMENTS = 5000
 Maximum number of transactions to consider for requesting, per peer. More...
 
static constexpr auto TXID_RELAY_DELAY {2s}
 How long to delay requesting transactions via txids, if we have wtxid-relaying peers. More...
 
static constexpr auto NONPREF_PEER_TX_DELAY {2s}
 How long to delay requesting transactions from non-preferred peers. More...
 
static constexpr auto OVERLOADED_PEER_TX_DELAY {2s}
 How long to delay requesting transactions from overloaded peers (see MAX_PEER_TX_REQUEST_IN_FLIGHT). More...
 
static constexpr auto GETDATA_TX_INTERVAL {60s}
 How long to wait before downloading a transaction from an additional peer. More...
 
const fs::path SNAPSHOT_BLOCKHASH_FILENAME {"base_blockhash"}
 The file in the snapshot chainstate dir which stores the base blockhash. More...
 
bool WriteSnapshotBaseBlockhash(Chainstate &snapshot_chainstate) EXCLUSIVE_LOCKS_REQUIRED(std::optional< uint256 > ReadSnapshotBaseBlockhash(fs::path chaindir) EXCLUSIVE_LOCKS_REQUIRED(constexpr std::string_view SNAPSHOT_CHAINSTATE_SUFFIX = "_snapshot"
 Write out the blockhash of the snapshot base block that was used to construct this chainstate. More...
 

Typedef Documentation

◆ BlockMap

using node::BlockMap = typedef std::unordered_map<uint256, CBlockIndex, BlockHasher>

Definition at line 84 of file blockstorage.h.

◆ ChainstateLoadResult

Chainstate load status code and optional error string.

Definition at line 57 of file chainstate.h.

◆ indexed_modified_transaction_set

Definition at line 119 of file miner.h.

◆ modtxiter

typedef indexed_modified_transaction_set::nth_index<0>::type::iterator node::modtxiter

Definition at line 121 of file miner.h.

◆ modtxscoreiter

typedef indexed_modified_transaction_set::index<ancestor_score>::type::iterator node::modtxscoreiter

Definition at line 122 of file miner.h.

Enumeration Type Documentation

◆ BlockfileType

Enumerator
NORMAL 
ASSUMED 
NUM_TYPES 

Definition at line 99 of file blockstorage.h.

◆ ChainstateLoadStatus

enum class node::ChainstateLoadStatus
strong

Chainstate load status.

Simple applications can just check for the success case, and treat other cases as errors. More complex applications may want to try reindexing in the generic failure case, and pass an interrupt callback and exit cleanly in the interrupted case.

Enumerator
SUCCESS 
FAILURE 

Generic failure which reindexing may fix.

FAILURE_FATAL 

Fatal error which should not prompt to reindex.

FAILURE_INCOMPATIBLE_DB 
FAILURE_INSUFFICIENT_DBCACHE 
INTERRUPTED 

Definition at line 47 of file chainstate.h.

◆ TransactionError

enum class node::TransactionError
strong
Enumerator
OK 

No error.

MISSING_INPUTS 
ALREADY_IN_UTXO_SET 
MEMPOOL_REJECTED 
MEMPOOL_ERROR 
MAX_FEE_EXCEEDED 
MAX_BURN_EXCEEDED 
INVALID_PACKAGE 

Definition at line 20 of file types.h.

◆ Warning

enum class node::Warning
strong
Enumerator
CLOCK_OUT_OF_SYNC 
PRE_RELEASE_TEST_BUILD 
FATAL_INTERNAL_ERROR 

Definition at line 23 of file warnings.h.

Function Documentation

◆ AbortNode()

void node::AbortNode ( const std::function< bool()> &  shutdown_request,
std::atomic< int > &  exit_status,
const bilingual_str message,
node::Warnings warnings 
)

Definition at line 18 of file abort.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AnalyzePSBT()

PSBTAnalysis node::AnalyzePSBT ( PartiallySignedTransaction  psbtx)

Provides helpful miscellaneous information about where a PSBT is in the signing workflow.

Parameters
[in]psbtxthe PSBT to analyze
Returns
A PSBTAnalysis with information about the provided PSBT.

Definition at line 16 of file psbt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ApplyArgsManOptions() [1/4]

util::Result< void > node::ApplyArgsManOptions ( const ArgsManager args,
BlockManager::Options opts 
)

Definition at line 17 of file blockmanager_args.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ApplyArgsManOptions() [2/4]

util::Result< void > node::ApplyArgsManOptions ( const ArgsManager args,
ChainstateManager::Options opts 
)

Definition at line 25 of file chainstatemanager_args.cpp.

Here is the call graph for this function:

◆ ApplyArgsManOptions() [3/4]

void node::ApplyArgsManOptions ( const ArgsManager argsman,
PeerManager::Options options 
)

Definition at line 11 of file peerman_args.cpp.

Here is the call graph for this function:

◆ ApplyArgsManOptions() [4/4]

void node::ApplyArgsManOptions ( const ArgsManager args,
BlockAssembler::Options options 
)

Apply -blockmintxfee and -blockmaxweight options from ArgsManager to BlockAssembler options.

Definition at line 86 of file miner.cpp.

Here is the call graph for this function:

◆ BroadcastTransaction()

TransactionError node::BroadcastTransaction ( NodeContext node,
CTransactionRef  tx,
std::string &  err_string,
const CAmount max_tx_fee,
bool  relay,
bool  wait_callback 
)

Submit a transaction to the mempool and (optionally) relay it to all P2P peers.

Mempool submission can be synchronous (will await mempool entry notification over the CValidationInterface) or asynchronous (will submit and not wait for notification), depending on the value of wait_callback. wait_callback MUST NOT be set while cs_main, cs_mempool or cs_wallet are held to avoid deadlock.

Parameters
[in]nodereference to node context
[in]txthe transaction to broadcast
[out]err_stringreference to std::string to fill with error string if available
[in]max_tx_feereject txs with fees higher than this (if 0, accept any fee)
[in]relayflag if both mempool insertion and p2p relay are requested
[in]wait_callbackwait until callbacks have been processed to avoid stale result due to a sequentially RPC. return error

Definition at line 34 of file transaction.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateCacheSizes()

CacheSizes node::CalculateCacheSizes ( const ArgsManager args,
size_t  n_indexes 
)

Definition at line 12 of file caches.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClampOptions()

static BlockAssembler::Options node::ClampOptions ( BlockAssembler::Options  options)
static

Definition at line 68 of file miner.cpp.

◆ CompleteChainstateInitialization()

static ChainstateLoadResult node::CompleteChainstateInitialization ( ChainstateManager chainman,
const CacheSizes cache_sizes,
const ChainstateLoadOptions options 
)
static

Definition at line 35 of file chainstate.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DumpMempool() [1/2]

bool node::DumpMempool ( const CTxMemPool pool,
const fs::path dump_path,
FopenFn  mockable_fopen_function,
bool  skip_file_commit 
)

Definition at line 149 of file mempool_persist.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DumpMempool() [2/2]

bool node::DumpMempool ( const CTxMemPool pool,
const fs::path dump_path,
fsbridge::FopenFn  mockable_fopen_function = fsbridge::fopen,
bool  skip_file_commit = false 
)

Dump the mempool to a file.

◆ FindCoins()

void node::FindCoins ( const node::NodeContext node,
std::map< COutPoint, Coin > &  coins 
)

Look up unspent output information.

Returns coins in the mempool and in the current chain UTXO set. Iterates through all the keys in the map and populates the values.

Parameters
[in]nodeThe node context to use for lookup
[in,out]coinsmap to fill

Definition at line 12 of file coin.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindSnapshotChainstateDir()

std::optional< fs::path > node::FindSnapshotChainstateDir ( const fs::path data_dir)

Return a path to the snapshot-based chainstate dir, if one exists.

Definition at line 84 of file utxo_snapshot.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTransaction()

CTransactionRef node::GetTransaction ( const CBlockIndex *const  block_index,
const CTxMemPool *const  mempool,
const uint256 hash,
uint256 hashBlock,
const BlockManager blockman 
)

Return transaction with a given hash.

If mempool is provided and block_index is not provided, check it first for the tx. If -txindex is available, check it next for the tx. Finally, if block_index is provided, check for tx by reading entire block from disk.

Parameters
[in]block_indexThe block to read from disk, or nullptr
[in]mempoolIf provided, check mempool for tx
[in]hashThe txid
[out]hashBlockThe block hash, if the tx was found via -txindex or block_index
Returns
The tx if found, otherwise nullptr

Definition at line 126 of file transaction.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWarningsForRpc()

UniValue node::GetWarningsForRpc ( const Warnings warnings,
bool  use_deprecated 
)

RPC helper function that wraps warnings.GetMessages().

Returns a UniValue::VSTR with the latest warning if use_deprecated is set to true, or a UniValue::VARR with all warnings otherwise.

Definition at line 54 of file warnings.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleATMPError()

static TransactionError node::HandleATMPError ( const TxValidationState state,
std::string &  err_string_out 
)
static

Definition at line 21 of file transaction.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ImportBlocks()

void node::ImportBlocks ( ChainstateManager chainman,
std::span< const fs::path import_paths 
)

Definition at line 1205 of file blockstorage.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitBlocksdirXorKey()

static auto node::InitBlocksdirXorKey ( const BlockManager::Options opts)
static

Definition at line 1140 of file blockstorage.cpp.

Here is the call graph for this function:

◆ LoadChainstate()

ChainstateLoadResult node::LoadChainstate ( ChainstateManager chainman,
const CacheSizes cache_sizes,
const ChainstateLoadOptions options 
)

This sequence can have 4 types of outcomes:

  1. Success
  2. Shutdown requested
    • nothing failed but a shutdown was triggered in the middle of the sequence
  3. Soft failure
    • a failure that might be recovered from with a reindex
  4. Hard failure
    • a failure that definitively cannot be recovered from with a reindex

LoadChainstate returns a (status code, error string) tuple.

Definition at line 173 of file chainstate.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadMempool()

bool node::LoadMempool ( CTxMemPool pool,
const fs::path load_path,
Chainstate active_chainstate,
ImportMempoolOptions &&  opts 
)

Import the file and attempt to add its contents to the mempool.

Definition at line 41 of file mempool_persist.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeMinisketch32()

Minisketch node::MakeMinisketch32 ( size_t  capacity)

Wrapper around Minisketch::Minisketch(32, implementation, capacity).

Definition at line 70 of file minisketchwrapper.cpp.

Here is the caller graph for this function:

◆ MakeMinisketch32FP()

Minisketch node::MakeMinisketch32FP ( size_t  max_elements,
uint32_t  fpbits 
)

Wrapper around Minisketch::CreateFP.

Definition at line 75 of file minisketchwrapper.cpp.

◆ MempoolPath()

fs::path node::MempoolPath ( const ArgsManager argsman)

Definition at line 18 of file mempool_persist_args.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<<() [1/2]

std::ostream & node::operator<< ( std::ostream &  os,
const BlockfileCursor cursor 
)

Definition at line 1278 of file blockstorage.cpp.

◆ operator<<() [2/2]

std::ostream & node::operator<< ( std::ostream &  os,
const BlockfileType type 
)

Definition at line 1269 of file blockstorage.cpp.

◆ ReadCoinsViewArgs()

void node::ReadCoinsViewArgs ( const ArgsManager args,
CoinsViewOptions options 
)

Definition at line 11 of file coins_view_args.cpp.

Here is the call graph for this function:

◆ ReadDatabaseArgs()

void node::ReadDatabaseArgs ( const ArgsManager args,
DBOptions options 
)

Definition at line 11 of file database_args.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadNotificationArgs()

void node::ReadNotificationArgs ( const ArgsManager args,
KernelNotifications notifications 
)

Definition at line 110 of file kernel_notifications.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadSnapshotBaseBlockhash()

std::optional< uint256 > node::ReadSnapshotBaseBlockhash ( fs::path  chaindir)

Definition at line 49 of file utxo_snapshot.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegenerateCommitments()

void node::RegenerateCommitments ( CBlock block,
ChainstateManager chainman 
)

Update an old GenerateCoinbaseCommitment from CreateNewBlock after the block txs have changed.

Definition at line 56 of file miner.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShouldPersistMempool()

bool node::ShouldPersistMempool ( const ArgsManager argsman)

Definition at line 13 of file mempool_persist_args.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdatePackagesForAdded()

static int node::UpdatePackagesForAdded ( const CTxMemPool mempool,
const CTxMemPool::setEntries alreadyAdded,
indexed_modified_transaction_set mapModifiedTx 
)
static

Add descendants of given transactions to mapModifiedTx with ancestor state updated assuming given transactions are inBlock.

Returns number of updated descendants.

Definition at line 242 of file miner.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateTime()

int64_t node::UpdateTime ( CBlockHeader pblock,
const Consensus::Params consensusParams,
const CBlockIndex pindexPrev 
)

Definition at line 31 of file miner.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VerifyLoadedChainstate()

ChainstateLoadResult node::VerifyLoadedChainstate ( ChainstateManager chainman,
const ChainstateLoadOptions options 
)

Definition at line 258 of file chainstate.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteSnapshotBaseBlockhash()

bool node::WriteSnapshotBaseBlockhash ( Chainstate snapshot_chainstate)

Definition at line 23 of file utxo_snapshot.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ BLOCK_SERIALIZATION_HEADER_SIZE

constexpr size_t node::BLOCK_SERIALIZATION_HEADER_SIZE = std::tuple_size_v<MessageStartChars> + sizeof(unsigned int)
staticconstexpr

Size of header written by WriteBlockToDisk before a serialized CBlock.

Definition at line 78 of file blockstorage.h.

◆ BLOCKFILE_CHUNK_SIZE

const unsigned int node::BLOCKFILE_CHUNK_SIZE = 0x1000000
static

The pre-allocation chunk size for blk?????.dat files (since 0.8)

Definition at line 71 of file blockstorage.h.

◆ DEFAULT_MAX_BURN_AMOUNT

const CAmount node::DEFAULT_MAX_BURN_AMOUNT {0}
static

Maximum burn value for sendrawtransaction, submitpackage, and testmempoolaccept RPC calls.

By default, a transaction with a burn value higher than this will be rejected by these RPCs and the GUI. This can be overridden with the maxburnamount argument.

Definition at line 33 of file transaction.h.

◆ DEFAULT_MAX_RAW_TX_FEE_RATE

const CFeeRate node::DEFAULT_MAX_RAW_TX_FEE_RATE {COIN / 10}
static

Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls.

Also used by the GUI when broadcasting a completed PSBT. By default, a transaction with a fee rate higher than this will be rejected by these RPCs and the GUI. This can be overridden with the maxfeerate argument.

Definition at line 27 of file transaction.h.

◆ DEFAULT_PERSIST_MEMPOOL

constexpr bool node::DEFAULT_PERSIST_MEMPOOL {true}
staticconstexpr

Default for -persistmempool, indicating whether the node should attempt to automatically load the mempool on start and save to disk on shutdown.

Definition at line 18 of file mempool_persist_args.h.

◆ DEFAULT_PRINT_MODIFIED_FEE

const bool node::DEFAULT_PRINT_MODIFIED_FEE = false
static

Definition at line 34 of file miner.h.

◆ DEFAULT_STOPATHEIGHT

constexpr int node::DEFAULT_STOPATHEIGHT {0}
staticconstexpr

Definition at line 30 of file kernel_notifications.h.

◆ GETDATA_TX_INTERVAL

constexpr auto node::GETDATA_TX_INTERVAL {60s}
staticconstexpr

How long to wait before downloading a transaction from an additional peer.

Definition at line 38 of file txdownloadman.h.

◆ MAX_BLOCKFILE_SIZE

const unsigned int node::MAX_BLOCKFILE_SIZE = 0x8000000
static

The maximum size of a blk?????.dat file (since 0.8)

Definition at line 75 of file blockstorage.h.

◆ MAX_PEER_TX_ANNOUNCEMENTS

constexpr int32_t node::MAX_PEER_TX_ANNOUNCEMENTS = 5000
staticconstexpr

Maximum number of transactions to consider for requesting, per peer.

It provides a reasonable DoS limit to per-peer memory usage spent on announcements, while covering peers continuously sending INVs at the maximum rate (by our own policy, see INVENTORY_BROADCAST_PER_SECOND) for several minutes, while not receiving the actual transaction (from any peer) in response to requests for them.

Definition at line 30 of file txdownloadman.h.

◆ MAX_PEER_TX_REQUEST_IN_FLIGHT

constexpr int32_t node::MAX_PEER_TX_REQUEST_IN_FLIGHT = 100
staticconstexpr

Maximum number of in-flight transaction requests from a peer.

It is not a hard limit, but the threshold at which point the OVERLOADED_PEER_TX_DELAY kicks in.

Definition at line 25 of file txdownloadman.h.

◆ MEMPOOL_DUMP_VERSION

const uint64_t node::MEMPOOL_DUMP_VERSION {2}
static

Definition at line 39 of file mempool_persist.cpp.

◆ MEMPOOL_DUMP_VERSION_NO_XOR_KEY

const uint64_t node::MEMPOOL_DUMP_VERSION_NO_XOR_KEY {1}
static

Definition at line 38 of file mempool_persist.cpp.

◆ NONPREF_PEER_TX_DELAY

constexpr auto node::NONPREF_PEER_TX_DELAY {2s}
staticconstexpr

How long to delay requesting transactions from non-preferred peers.

Definition at line 34 of file txdownloadman.h.

◆ OVERLOADED_PEER_TX_DELAY

constexpr auto node::OVERLOADED_PEER_TX_DELAY {2s}
staticconstexpr

How long to delay requesting transactions from overloaded peers (see MAX_PEER_TX_REQUEST_IN_FLIGHT).

Definition at line 36 of file txdownloadman.h.

◆ SNAPSHOT_BLOCKHASH_FILENAME

const fs::path node::SNAPSHOT_BLOCKHASH_FILENAME {"base_blockhash"}

The file in the snapshot chainstate dir which stores the base blockhash.

This is needed to reconstruct snapshot chainstates on init.

Because we only allow loading a single snapshot at a time, there will only be one chainstate directory with this filename present within it.

Definition at line 109 of file utxo_snapshot.h.

◆ SNAPSHOT_CHAINSTATE_SUFFIX

bool WriteSnapshotBaseBlockhash (Chainstate& snapshot_chainstate) EXCLUSIVE_LOCKS_REQUIRED( std::optional<uint256> ReadSnapshotBaseBlockhash (fs::path chaindir) EXCLUSIVE_LOCKS_REQUIRED( constexpr std::string_view node::SNAPSHOT_CHAINSTATE_SUFFIX = "_snapshot"
constexpr

Write out the blockhash of the snapshot base block that was used to construct this chainstate.

This value is read in during subsequent initializations and used to reconstruct snapshot-based chainstates. Read the blockhash of the snapshot base block that was used to construct the chainstate. Suffix appended to the chainstate (leveldb) dir when created based upon a snapshot.

Definition at line 124 of file utxo_snapshot.h.

◆ TXID_RELAY_DELAY

constexpr auto node::TXID_RELAY_DELAY {2s}
staticconstexpr

How long to delay requesting transactions via txids, if we have wtxid-relaying peers.

Definition at line 32 of file txdownloadman.h.

◆ UNDOFILE_CHUNK_SIZE

const unsigned int node::UNDOFILE_CHUNK_SIZE = 0x100000
static

The pre-allocation chunk size for rev?????.dat files (since 0.8)

Definition at line 73 of file blockstorage.h.