Documentation
¶
Index ¶
- Constants
- Variables
- func GetStateLockup(r chain.Rules) (uint64, error)
- type CustomAllocation
- type Genesis
- type Rules
- func (r *Rules) FetchCustom(f string) (any, bool)
- func (r *Rules) GetBaseUnits() uint64
- func (r *Rules) GetBlockCostChangeDenominator() uint64
- func (r *Rules) GetChainID() ids.ID
- func (r *Rules) GetMaxBlockTxs() int
- func (r *Rules) GetMaxBlockUnits() uint64
- func (r *Rules) GetMinBlockCost() uint64
- func (r *Rules) GetMinUnitPrice() uint64
- func (r *Rules) GetUnitPriceChangeDenominator() uint64
- func (r *Rules) GetValidityWindow() int64
- func (r *Rules) GetWindowTargetBlocks() uint64
- func (r *Rules) GetWindowTargetUnits() uint64
Constants ¶
View Source
const (
StateLockupField = "state_lockup"
)
Variables ¶
View Source
var ( ErrInvalidTarget = errors.New("invalid target") ErrStateLockupMissing = errors.New("state lockup parameter missing") )
Functions ¶
Types ¶
type CustomAllocation ¶
type Genesis ¶
type Genesis struct {
// Address prefix
HRP string `json:"hrp"`
// Block params
MaxBlockTxs int `json:"maxBlockTxs"`
MaxBlockUnits uint64 `json:"maxBlockUnits"` // must be possible to reach before block too large
// Tx params
BaseUnits uint64 `json:"baseUnits"`
StateLockup uint64 `json:"stateLockup"` // cost per key added to state
ValidityWindow int64 `json:"validityWindow"` // seconds
// Unit pricing
MinUnitPrice uint64 `json:"minUnitPrice"`
UnitPriceChangeDenominator uint64 `json:"unitPriceChangeDenominator"`
WindowTargetUnits uint64 `json:"windowTargetUnits"` // 10s
// Block pricing
MinBlockCost uint64 `json:"minBlockCost"`
BlockCostChangeDenominator uint64 `json:"blockCostChangeDenominator"`
WindowTargetBlocks uint64 `json:"windowTargetBlocks"` // 10s
// Allocations
CustomAllocation []*CustomAllocation `json:"customAllocation"`
}
type Rules ¶
type Rules struct {
// contains filtered or unexported fields
}
func (*Rules) GetBaseUnits ¶
func (*Rules) GetBlockCostChangeDenominator ¶
func (*Rules) GetChainID ¶
func (*Rules) GetMaxBlockTxs ¶
func (*Rules) GetMaxBlockUnits ¶
func (*Rules) GetMinBlockCost ¶
func (*Rules) GetMinUnitPrice ¶
func (*Rules) GetUnitPriceChangeDenominator ¶
func (*Rules) GetValidityWindow ¶
func (*Rules) GetWindowTargetBlocks ¶
func (*Rules) GetWindowTargetUnits ¶
Click to show internal directories.
Click to hide internal directories.