Expand description
Values that should be shared across all modules, without necessarily having to pass them all over the place, but aren’t consensus values. should be used sparingly.
Structs§
- CHAIN_
TYPE - The mining parameter mode
- EPIC_
VERSION - Store the current epic version being executed
- FOUNDATION_
FILE - The path to the file that contains the foundation
- HEADER_
SYNC_ TIMEOUT - Store the timeout for the header sync
- POLICY_
CONFIG - The policy parameters
- POW_
CONTEXT_ TYPE - PoW context type to instantiate
- Version
- Strcut that store the major and minor release versions
Enums§
- Chain
Types - Types of chain a server can run with, dictates the genesis block and and mining parameters used.
- PoWContext
Types - PoW test mining and verifier context
Constants§
- AUTOMATED_
TESTING_ COINBASE_ MATURITY - Automated testing coinbase maturity
- AUTOMATED_
TESTING_ MIN_ EDGE_ BITS - Automated testing edge_bits
- AUTOMATED_
TESTING_ PROOF_ SIZE - Automated testing proof size
- COMPACTION_
CHECK - Trigger compaction check on average every day for all nodes. Randomized per node - roll the dice on every block to decide. Will compact the txhashset to remove pruned data. Will also remove old blocks and associated data from the database. For a node configured as “archival_mode = true” only the txhashset will be compacted.
- CURRENT_
HEADER_ VERSION - FLOONET_
COINBASE_ MATURITY - Foonet coinbase maturity
- FLOONET_
FOUNDATION_ JSON_ SHA256 - MAINNET_
FOUNDATION_ JSON_ SHA256 - PEER_
EXPIRATION_ REMOVE_ TIME - Constant that expresses defunct peer timeout in seconds to be used in checks.
- PROTOCOL_
VERSION - Define these here, as they should be developer-set, not really tweakable by users The default “local” protocol version for this node. We negotiate compatible versions with each peer via Hand/Shake. Note: We also use a specific (possible different) protocol version for both the backend database and MMR data files. This defines the p2p layer protocol version for this node.
- STUCK_
PEER_ KICK_ TIME - If a peer’s last updated difficulty is 2 hours ago and its difficulty’s lower than ours, we’re sure this peer is a stuck node, and we will kick out such kind of stuck peers.
- TESTING_
CUT_ THROUGH_ HORIZON - Testing cut through horizon in blocks
- TESTING_
INITIAL_ DIFFICULTY - Testing initial block difficulty
- TESTING_
INITIAL_ GRAPH_ WEIGHT - Testing initial graph weight
- TESTING_
MAX_ BLOCK_ WEIGHT - Testing max_block_weight (artifically low, just enough to support a few txs).
- TESTING_
STATE_ SYNC_ THRESHOLD - Testing state sync threshold in blocks
- TESTING_
TXHASHSET_ ARCHIVE_ INTERVAL - Number of blocks to reuse a txhashset zip for (automated testing and user testing).
- TXHASHSET_
ARCHIVE_ INTERVAL - Number of blocks to reuse a txhashset zip for.
- USER_
TESTING_ COINBASE_ MATURITY - User testing coinbase maturity
- USER_
TESTING_ MIN_ EDGE_ BITS - User testing edge_bits
- USER_
TESTING_ PROOF_ SIZE - User testing proof size
Functions§
- add_
allowed_ policy - base_
edge_ bits - Reference edge_bits used to compute factor on higher Cuck(at)oo graph sizes, while the min_edge_bits can be changed on a soft fork, changing base_edge_bits is a hard fork.
- chain_
shortname - Short name representing the current chain type (“floo”, “main”, etc.)
- check_
foundation - Check if the foundation file is correct
- coinbase_
maturity - Coinbase maturity for coinbases to be spent
- create_
pow_ context - Return either a cuckoo context or a cuckatoo context Single change point
- cut_
through_ horizon - Horizon at which we can cut-through and do full local pruning
- difficulty_
data_ to_ vector - Converts an iterator of block difficulty data to more a more manageable vector and pads if needed (which will) only be needed for the first few blocks after genesis
- foundation_
json_ sha256 - get_
allowed_ policies - get_
emitted_ policy - get_
epic_ version - Get the version of the current epic executable
- get_
file_ sha256 - Get the sha256 of file
- get_
foundation_ path - Get the current path to the foundation.json file (file with the foundation wallet outputs/kernels)
- get_
genesis_ nonce - Helper function to get a nonce known to create a valid POW on the genesis block, to prevent it taking ages. Should be fine for now as the genesis block POW solution turns out to be the same for every new block chain at the moment
- get_
header_ sync_ timeout - Get the current Timeout without the verification of the existence of more headers to be synced, after all header were processed
- get_
policies - get_
policy_ config - Get the policy configuration that is being used by the blockchain
- initial_
block_ difficulty - Initial mining difficulty
- initial_
graph_ weight - Initial mining secondary scale
- is_
automated_ testing_ mode - Are we in automated testing mode?
- is_
floonet - Are we in floonet? Note: We do not have a corresponding is_mainnet() as we want any tests to be as close as possible to “mainnet” configuration as possible. We want to avoid missing any mainnet only code paths.
- is_
mainnet - Are we for real?
- is_
production_ mode - Are we in production mode? Production defined as a live public network, testnet[n] or mainnet.
- is_
user_ testing_ mode - Are we in user testing mode?
- max_
block_ weight - Maximum allowed block weight.
- min_
edge_ bits - The minimum acceptable edge_bits
- proofsize
- The proofsize
- set_
epic_ version - Set the version of the current epic executable
- set_
foundation_ path - Set the path to the foundation.json file (file with the foundation wallet outputs/kernels)
- set_
header_ sync_ timeout - Set the current Timeout without the verification of the existence of more headers to be synced, after all header were processed
- set_
mining_ mode - Set the mining mode
- set_
policy_ config - Set the policy configuration that will be used by the blockchain
- state_
sync_ threshold - Threshold at which we can request a txhashset (and full blocks from)
- ts_
data_ to_ vector - txhashset_
archive_ interval - Number of blocks to reuse a txhashset zip for.
- use_
alternative_ path - Check if the foundation.json exists in the directory appointed by the .toml file, if not, use the alternative path ../../debian/foundation.json relative to the folder where the executable is in. If we are running floonet, it will look for the file foundation_floonet.json .