-
Notifications
You must be signed in to change notification settings - Fork 295
Consensus Limits
Definitions: Bitcoin Rules, Consensus Rules, Polies:
While Policies are rules local to any node, Bitcoin Rules and Consensus Rules are global and must be obeyed by all nodes. Bitcoin Rules are immutable while Consensus Rules can change over time.
Note that both Bitcoin and Consensus Rules must be honoured by all miners because otherwise this can lead to increased network load, unfair banning, selfish mining or even a fork in the worst case. For e.g., transactions may be rejected according to local policies, but they need to be accepted during block verification according to consensus rules. A relaying peer may not be banned if not honouring the local policy as long as it honours the consensus limits.
- 1 -genesisactivationheight=<n>
- 2 Maximum Coinbase ScriptSig Size = 100B
- 3 Coinbase Maturity
- 4 -maxtxsizepolicy=<n>
- 5 -maxscriptsizepolicy=<n>
- 6 -maxopsperscriptpolicy=<n>
- 7 -maxpubkeyspermultisigpolicy=<n>
- 8 -maxscriptnumlengthpolicy=<n>
- 9 -excessiveblocksize=<n>
- 10 -blockmaxsize=<n>
- 11 -maxtxsigopscountspolicy=<n>
Set block height at which genesis should be activated. (default: 620538). This value may not be changed on mainnet as it will break consensus.
Variables:
- GENESIS_ACTIVATION_MAIN = 620538
- GENESIS_ACTIVATION_STN = 100
- GENESIS_ACTIVATION_TESTNET = 1344302
- GENESIS_ACTIVATION_REGTEST = 10000
The maximum ScriptSig Size of a coinbase transaction output.
Variables:
- MAX_COINBASE_SCRIPTSIG_SIZE = 100B
Number of confirmations for a coinbase transaction to be spendable.
- COINBASE_MATURITY = 100
Set maximum transaction size in bytes we relay and mine (default: 10 MB, min: 99999 B, 0 = unlimited within consensus) after Genesis is activated.
The value may be given in bytes or with unit (B, kB, MB, GB).
Variables:
- MAX_TX_SIZE_CONSENSUS_AFTER_GENESIS = 1GB
- DEFAULT_MAX_TX_SIZE_POLICY_AFTER_GENESIS = 10MB
- MAX_TX_SIZE_CONSENSUS_BEFORE_GENESIS = 1MB
Note that transactions greater policy allowances while still within the consensus limits will not lead to banning of a node relaying such transactions.
Set maximum script size in bytes we're willing to relay/mine per script
Variables:
- DEFAULT_MAX_SCRIPT_SIZE_POLICY_AFTER_GENESIS = 500 * ONE_KILOBYTE
Set maximum number of non-push operations we're willing to relay/mine per script (default: unlimited, 0 = unlimited), after Genesis is activated
Variables:
- MAX_OPS_PER_SCRIPT_AFTER_GENESIS = UINT32_MAX
- DEFAULT_OPS_PER_SCRIPT_POLICY_AFTER_GENESIS = UINT32_MAX
- MAX_OPS_PER_SCRIPT_BEFORE_GENESIS = 500
- DEFAULT_OPS_PER_SCRIPT_POLICY_BEFORE_GENESIS = NA
Set maximum allowed number of public keys we're willing to relay/mine in a single CHECK_MULTISIG(VERIFY) operation (default: unlimited, 0 = unlimited), after Genesis is activated
Variables:
- DEFAULT_PUBKEYS_PER_MULTISIG_POLICY_AFTER_GENESIS = UINT32_MAX
- DEFAULT_PUBKEYS_PER_MULTISIG_POLICY_BEFORE_GENESIS = NA
- MAX_PUBKEYS_PER_MULTISIG_BEFORE_GENESIS = 20
- MAX_PUBKEYS_PER_MULTISIG_AFTER_GENESIS = UINT32_MAX
Set maximum allowed number length we're willing to relay/mine in scripts (default: 10000, 0 = unlimited) after Genesis is activated. The value may be given in bytes or with unit (B, kB, MB, GB).
Variables:
- DEFAULT_SCRIPT_NUM_LENGTH_POLICY_AFTER_GENESIS = 10KB
- MAX_PUBKEYS_PER_MULTISIG_AFTER_GENESIS = 750KB
- DEFAULT_SCRIPT_NUM_LENGTH_POLICY_BEFORE_GENESIS = NA
- MAX_PUBKEYS_PER_MULTISIG_BEFORE_GENESIS = 4KB
Set the maximum block size in bytes we will accept from any source. This is the effective block size hard limit and it is a required parameter (0 = unlimited). The value may be given in bytes or with unit (B, kB, MB, GB).
Variables:
- LEGACY_MAX_BLOCK_SIZE = 1MB
- MAIN_DEFAULT_MAX_BLOCK_SIZE = INT64_MAX
- REGTEST_DEFAULT_MAX_BLOCK_SIZE = INT64_MAX
- TESTNET_DEFAULT_MAX_BLOCK_SIZE = INT64_MAX
- STN_DEFAULT_MAX_BLOCK_SIZE = INT64_MAX
Set maximum block size in bytes we will mine. Size of the mined block will never exceed the maximum block size we will accept (-excessiveblocksize). The value may be given in bytes or with unit (B, kB, MB, GB). If not specified, the following defaults
Set maximum allowed number of signature operations we're willing to
relay/mine in a single transaction (default: unlimited, 0 =
unlimited) after Genesis is activated.