forks

package
v0.0.0-...-f077743 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NumberOf32GOnePB = (1 << 50) >> 35
)

Variables

This section is empty.

Functions

func CalcEffectiveStakingPeriod

func CalcEffectiveStakingPeriod(blockHeight uint64, stakingTx StakingTx) (period uint64)

func CalcStakingNodeWeight

func CalcStakingNodeWeight(blockHeight uint64, stakingNode StakingNode) (*safetype.Uint128, error)

func CalcTotalStakingWeight

func CalcTotalStakingWeight(blockHeight uint64, stakingNodes ...StakingNode) (*safetype.Uint128, error)

func EnforceMASSIP0002

func EnforceMASSIP0002(blockHeight uint64) bool

1. Disable old binding, enfore new binding.

2. Allow set coinbase related to pool_pk.

3. Disallow minting without binding.

4. New reward logic.

5. Both MASS and Chia miner available.

func EnforceMASSIP0002WarmUp

func EnforceMASSIP0002WarmUp(blockHeight uint64) bool

1. Disable old binding, enfore new binding.

2. Allow set coinbase related to pool_pk.

3. Base minting reward (no binding reward).

4. Only MASS miner available.

func GetBlockVersion

func GetBlockVersion(height uint64) uint64

func GetRequiredBinding

func GetRequiredBinding(nextHeight, plotSize uint64, massBitlength int, networkBinding massutil.Amount) (massutil.Amount, error)

func SortStakingNodesByWeight

func SortStakingNodesByWeight(blockHeight uint64) bool

Types

type GenesisBindingPrices

type GenesisBindingPrices map[int]massutil.Amount

type NetworkBindingPrice

type NetworkBindingPrice struct {
	AccumulativeUpperBound massutil.Amount
	PricePer32G            massutil.Amount
}

type StakingNode

type StakingNode interface {
	GetValue() int64
	GetWeight() *safetype.Uint128
}

type StakingTx

type StakingTx interface {
	GetBlockHeight() uint64
	GetFrozenPeriod() uint64
}

Jump to

Keyboard shortcuts

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