Bitcoin ABC 0.30.5
P2P Digital Currency
Functions | Variables
consensus.h File Reference
#include <cstdint>
Include dependency graph for consensus.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint64_t GetMaxBlockSigChecksCount (uint64_t maxBlockSize)
 Compute the maximum number of sigchecks that can be contained in a block given the MAXIMUM block size as parameter. More...
 

Variables

static const uint64_t ONE_MEGABYTE = 1000000
 1MB More...
 
static const uint64_t MAX_TX_SIZE = ONE_MEGABYTE
 The maximum allowed size for a transaction, in bytes. More...
 
static const uint64_t MIN_TX_SIZE = 100
 The minimum allowed size for a transaction, in bytes. More...
 
static const uint64_t LEGACY_MAX_BLOCK_SIZE = ONE_MEGABYTE
 The maximum allowed size for a block, before the UAHF. More...
 
static const uint64_t DEFAULT_MAX_BLOCK_SIZE = 32 * ONE_MEGABYTE
 Default setting for maximum allowed size for a block, in bytes. More...
 
static const uint64_t MAX_TX_SIGCHECKS = 3000
 Allowed number of signature check operations per transaction. More...
 
static const int BLOCK_MAXBYTES_MAXSIGCHECKS_RATIO = 141
 The ratio between the maximum allowable block size and the maximum allowable SigChecks (executed signature check operations) in the block. More...
 
static const int COINBASE_MATURITY = 100
 Coinbase transaction outputs can only be spent after this number of new blocks (network rule). More...
 
static const int MAX_COINBASE_SCRIPTSIG_SIZE = 100
 Coinbase scripts have their own script size limit. More...
 
static constexpr unsigned int LOCKTIME_VERIFY_SEQUENCE = (1 << 0)
 Flags for nSequence and nLockTime locks. More...
 

Function Documentation

◆ GetMaxBlockSigChecksCount()

uint64_t GetMaxBlockSigChecksCount ( uint64_t  maxBlockSize)
inline

Compute the maximum number of sigchecks that can be contained in a block given the MAXIMUM block size as parameter.

The maximum sigchecks scale linearly with the maximum block size and do not depend on the actual block size. The returned value is rounded down (there are no fractional sigchecks so the fractional part is meaningless).

Definition at line 47 of file consensus.h.

Here is the caller graph for this function:

Variable Documentation

◆ BLOCK_MAXBYTES_MAXSIGCHECKS_RATIO

const int BLOCK_MAXBYTES_MAXSIGCHECKS_RATIO = 141
static

The ratio between the maximum allowable block size and the maximum allowable SigChecks (executed signature check operations) in the block.

(network rule).

Definition at line 27 of file consensus.h.

◆ COINBASE_MATURITY

const int COINBASE_MATURITY = 100
static

Coinbase transaction outputs can only be spent after this number of new blocks (network rule).

Definition at line 32 of file consensus.h.

◆ DEFAULT_MAX_BLOCK_SIZE

const uint64_t DEFAULT_MAX_BLOCK_SIZE = 32 * ONE_MEGABYTE
static

Default setting for maximum allowed size for a block, in bytes.

Definition at line 20 of file consensus.h.

◆ LEGACY_MAX_BLOCK_SIZE

const uint64_t LEGACY_MAX_BLOCK_SIZE = ONE_MEGABYTE
static

The maximum allowed size for a block, before the UAHF.

Definition at line 18 of file consensus.h.

◆ LOCKTIME_VERIFY_SEQUENCE

constexpr unsigned int LOCKTIME_VERIFY_SEQUENCE = (1 << 0)
staticconstexpr

Flags for nSequence and nLockTime locks.

Interpret sequence numbers as relative lock-time constraints.

Definition at line 38 of file consensus.h.

◆ MAX_COINBASE_SCRIPTSIG_SIZE

const int MAX_COINBASE_SCRIPTSIG_SIZE = 100
static

Coinbase scripts have their own script size limit.

Definition at line 34 of file consensus.h.

◆ MAX_TX_SIGCHECKS

const uint64_t MAX_TX_SIGCHECKS = 3000
static

Allowed number of signature check operations per transaction.

Definition at line 22 of file consensus.h.

◆ MAX_TX_SIZE

const uint64_t MAX_TX_SIZE = ONE_MEGABYTE
static

The maximum allowed size for a transaction, in bytes.

Definition at line 14 of file consensus.h.

◆ MIN_TX_SIZE

const uint64_t MIN_TX_SIZE = 100
static

The minimum allowed size for a transaction, in bytes.

Definition at line 16 of file consensus.h.

◆ ONE_MEGABYTE

const uint64_t ONE_MEGABYTE = 1000000
static

1MB

Definition at line 12 of file consensus.h.