Skip to main content

Network constants

This page describes the constants governing the behavior of the network and their values (that are the same for all nodes of a given network). These tables are obtained from the source code of the node, in the massa repository, and are used in various massa projects, for instance:

The following constants directly impact the security of the network's consensus.

ConstantDescriptionValue
ROLL_PRICEThe price of a Roll, in MAS100
BLOCK_REWARDThe max number of MAS created as reward for block and endorsement production1.02
POS_MISS_RATE_DEACTIVATION_THRESHOLDA staker's roll will auto-sell if they miss more than the given threshold of selected block to produce during a given cycle70%
T0Time, in milliseconds, between two periods in the same thread16_000
PERIODS_PER_CYCLEThe number of periods in a cycle128
THREAD_COUNTThe number of threads32
ENDORSEMENT_COUNTThe max number of endorsements per block16
ROLL_COUNT_TO_SLASH_ON_DENUNCIATIONNumber of roll to remove per denunciation1
MAX_BOOTSTRAP_MESSAGE_SIZEMax message size for bootstrap, in bytes300_000_000
VERSIONING_THRESHOLD_TRANSITION_ACCEPTEDThreshold of votes to accept a new Massa Improvement Proposal (MIP), considering the latest MIP_STORE_STATS_BLOCK_CONSIDERED blocks75%
MIP_STORE_STATS_BLOCK_CONSIDEREDNumber of blocks to consider for votes on a MIP1_000

The following constants relate to Massa's execution module, and define ledger storage costs, gas usage and smart contract limitations.

Base constants

ConstantDescriptionValue
BURN_ADDRESSMassa address for which nobody knows the associated private key, where you can send funds to in order to burn them.AU1111111111111111111111111111111112m1s9K
LEDGER_COST_PER_BYTEThe cost, in MAS, to store 1 byte in the ledger0.0001
LEDGER_ENTRY_BASE_COSTThe cost, in MAS, to create a new address in the ledger0.001
MAX_ASYNC_POOL_LENGTHMaximum capacity of the asynchronous messages pool1_000
MAX_DATASTORE_KEY_LENGTHMaximum length of a datastore key, in bytes255
MAX_DATASTORE_VALUE_LENGTHMaximum length of a datastore value, in bytes10_000_000
MAX_BYTECODE_LENGTHMaximum length of the bytecode of an address, in bytes10_000_000
MAX_PARAMETERS_SIZEMaximum size of parameters in call SC, in bytes10_000_000
MAX_OPERATIONS_PER_BLOCKThe max number of operations per block5_000
MAX_BLOCK_SIZEThe max size of a block, in bytes300_000
MAX_GAS_PER_BLOCKMaximum of GAS allowed for a block4_294_967_295
MAX_ASYNC_GASMaximum of GAS allowed for asynchronous messages execution on one slot1_000_000_000
ASYNC_MSG_CST_GAS_COSTConstant cost applied to asynchronous messages750_000
BASE_OPERATION_GAS_COSTGas used by a base operation (transaction, roll buy, roll sell)800_000

Constants added/updated with MIP-0001

ConstantDescriptionValue
BLOCK_REWARDThe max number of MAS created as reward for block and endorsement production, following a community vote to reduce inflation (implemented only if the vote passes)0.40
MAX_EVENT_DATA_SIZEMaximum size, in bytes, of events emitted1_024. Before MIP-0001, the limit is 50_000
MAX_EVENT_PER_OPERATIONMaximum event number that can be emitted for an operation25
MAX_RECURSIVE_CALLS_DEPTHMaximum number of recursion for calls25
DEFERRED_CALL_MAX_FUTURE_SLOTSMaximum size of deferred call future slots1209600, 1 week
DEFERRED_CALL_MAX_ASYNC_GASMaximum gas for deferred call1_000_000_000
DEFERRED_CALL_MIN_GAS_COSTDeferred call min gas cost10 nanomassa
DEFERRED_CALL_CST_GAS_COSTDeferred call call gas cost750_000
MAX_RUNTIME_MODULE_DEFINED_FUNCTIONSMaximum number of function defined in a smart contract512
MAX_RUNTIME_MODULE_FUNCTION_ARGSMaximum number of arguments to a function64
MAX_RUNTIME_MODULE_FUNCTION_RETURN_VALUESMaximum number of value a function can return8
MAX_RUNTIME_MODULE_FUNCTION_NAME_LENMaximum length for the name of a function defined in a smart contract256
MAX_RUNTIME_MODULE_FUNCTION_IMPORTSMaximum number of functions a module can import256

Network dependant constants

The following constants directly depend on the network deployed.

ConstantDescriptionValue
GENESIS_TIMESTAMPUnix timestamp (in milliseconds) of the first block of the network1705312800000 Monday, January 15, 2024 10:00:00 AM UTC
VERSIONA string representing the network's version"MAIN.2.4" currently deployed. "MAIN.2.5" defines MIP-0001
CHAINIDA number representing the network77658377