Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PreStakedBlocks is the block reward, to be split evenly among block signers in pre-staking era. // 0.001 POSI per block. PreStakedBlocks = new(big.Int).Mul(big.NewInt(0.001*denominations.Nano), big.NewInt(denominations.Nano)) // StakedBlocks is the DEFAULT flat-rate block reward for epos staking launch. // 0.001 POSI per block. StakedBlocks = numeric.NewDecFromBigInt(new(big.Int).Mul( big.NewInt(0.001*denominations.Nano), big.NewInt(denominations.Nano), )) TwoSecStakedBlocks20222023 = numeric.NewDecFromBigInt(big.NewInt(0.1167975157 * denominations.One)) TwoSecStakedBlocks20242025 = numeric.NewDecFromBigInt(big.NewInt(0.1016296444 * denominations.One)) TwoSecStakedBlocks20262027 = numeric.NewDecFromBigInt(big.NewInt(0.0508148222 * denominations.One)) TwoSecStakedBlocks20282029 = numeric.NewDecFromBigInt(big.NewInt(0.0254074111 * denominations.One)) TwoSecStakedBlocks20302031 = numeric.NewDecFromBigInt(big.NewInt(0.0127037055 * denominations.One)) TwoSecStakedBlocks20322033 = numeric.NewDecFromBigInt(big.NewInt(0.0063518528 * denominations.One)) TwoSecStakedBlocks20342035 = numeric.NewDecFromBigInt(big.NewInt(0.0031759264 * denominations.One)) // TotalInitialTokens is the total amount of tokens (in POSI) at block 0 of the network. // This should be set/change on the node's init according to the core.GenesisSpec. TotalInitialTokens = numeric.Dec{Int: big.NewInt(0)} // None .. None = big.NewInt(0) // ErrInvalidBeaconChain if given chain is not beacon chain ErrInvalidBeaconChain = fmt.Errorf("given chain is not beaconchain") )
Functions ¶
func GetTotalPreStakingTokens ¶
GetTotalPreStakingTokens returns the total amount of tokens (in POSI) in the network at the the last block of the pre-staking era (epoch < staking epoch).
func GetTotalTokens ¶
func GetTotalTokens(chain engine.ChainReader) (numeric.Dec, error)
GetTotalTokens in the network for all shards in POSI. This can only be computed with beaconchain if in staking era. If not in staking era, returns the rewards given out by the start of staking era.
func SetTotalInitialTokens ¶
SetTotalInitialTokens with the given initial tokens (from genesis in ATTO).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.