chain_config

package
v0.0.0-...-7b0d77e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AspenHfConfig

type AspenHfConfig struct {
	BlockNumPartOne  uint64 // part 1 just starts to save minted tokens (rewards) in db
	BlockNumPartTwo  uint64 // part 2 implements new dynamic yield curve
	MaxSupply        *big.Int
	GeneratedRewards *big.Int // Total number of generated rewards between block 0 and AspenHf BlockNum
}

type ChainConfig

type ChainConfig struct {
	EVMChainConfig  params.ChainConfig
	GenesisBalances core.BalanceMap
	DPOS            DPOSConfig
	Hardforks       HardforksConfig
}

func (*ChainConfig) GenesisBalancesSum

func (self *ChainConfig) GenesisBalancesSum() *big.Int

func (*ChainConfig) RewardsEnabled

func (self *ChainConfig) RewardsEnabled() bool

type DPOSConfig

type DPOSConfig = struct {
	EligibilityBalanceThreshold *big.Int
	VoteEligibilityBalanceStep  *big.Int
	ValidatorMaximumStake       *big.Int
	MinimumDeposit              *big.Int
	MaxBlockAuthorReward        uint16
	DagProposersReward          uint16
	CommissionChangeDelta       uint16
	CommissionChangeFrequency   uint32 // [number of blocks]
	DelegationDelay             uint32 // [number of blocks]
	DelegationLockingPeriod     uint32 // [number of blocks]
	BlocksPerYear               uint32 // [count]
	YieldPercentage             uint16 // [%]
	InitialValidators           []GenesisValidator
}

type FicusHfConfig

type FicusHfConfig struct {
	BlockNum              uint64
	PillarBlocksInterval  uint64 // [number of blocks]
	BridgeContractAddress common.Address
}

type GenesisValidator

type GenesisValidator struct {
	Address     common.Address
	Owner       common.Address
	VrfKey      []byte
	Commission  uint16
	Endpoint    string
	Description string
	Delegations core.BalanceMap
}

type HardforksConfig

type HardforksConfig struct {
	FixRedelegateBlockNum        uint64
	Redelegations                []Redelegation
	RewardsDistributionFrequency map[uint64]uint32
	MagnoliaHf                   MagnoliaHfConfig
	PhalaenopsisHfBlockNum       uint64
	FixClaimAllBlockNum          uint64
	AspenHf                      AspenHfConfig
	FicusHf                      FicusHfConfig
}

func (*HardforksConfig) IsAspenHardforkPartOne

func (c *HardforksConfig) IsAspenHardforkPartOne(block types.BlockNum) bool

func (*HardforksConfig) IsAspenHardforkPartTwo

func (c *HardforksConfig) IsAspenHardforkPartTwo(block types.BlockNum) bool

func (*HardforksConfig) IsFicusHardfork

func (c *HardforksConfig) IsFicusHardfork(block types.BlockNum) bool

func (*HardforksConfig) IsFixClaimAllHardfork

func (c *HardforksConfig) IsFixClaimAllHardfork(block types.BlockNum) bool

func (*HardforksConfig) IsMagnoliaHardfork

func (c *HardforksConfig) IsMagnoliaHardfork(block types.BlockNum) bool

func (*HardforksConfig) IsPhalaenopsisHardfork

func (c *HardforksConfig) IsPhalaenopsisHardfork(block types.BlockNum) bool

func (*HardforksConfig) Rules

func (c *HardforksConfig) Rules(num types.BlockNum) vm.Rules

type MagnoliaHfConfig

type MagnoliaHfConfig struct {
	BlockNum uint64
	JailTime uint64 // [number of blocks]
}

type Redelegation

type Redelegation struct {
	Validator common.Address
	Delegator common.Address
	Amount    *big.Int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL