rewardc

package
v1.9.8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	POCReward       = uint64(600)
	FutureBlockTime = uint64(18)
	BlockTotal      = 360 * 24 * 60 * 60 / FutureBlockTime

	Blocks = subsidyHalvingInterval - 576000

	GenesisDifficulty   = uint64(40000000000000000) // Difficulty of the Genesis block.
	MinimumDifficulty   = uint64(40000000000000000) // The minimum that the difficulty may ever be.
	GenesisNumber       = 0
	PledgeNumber        = GenesisNumber + 100
	DayBlock            = 24 * 60 * 60 / FutureBlockTime
	Day60               = 60 //Received in 60 days
	GenesisTimestamp    = 1638167432
	MinSectorExpiration = 180
	ChainID             = 37021
	BaseCapacity        = 102 //GB
	TotalCapacity       = 100 // default 100PB
	BasePB              = 1024 * 1024

	StakingNum = 50
)

Variables

View Source
var (
	ExpectedMin = new(big.Int).Mul(big.NewInt(0).SetUint64(10000), big.NewInt(1e+18))
	ExpectedMax = new(big.Int).Mul(big.NewInt(0).SetUint64(20000), big.NewInt(1e+18))
)
View Source
var (
	StakingBase = map[uint64]float64{
		90:   0.1,
		180:  0.2,
		360:  0.3,
		1080: 0.5,
	}

	StakingRewardProportion = big.NewInt(20)
	MineRewardProportion    = big.NewInt(80)

	StakingLowerLimit = new(big.Int).Mul(big.NewInt(1000), big.NewInt(1e+18))
)
View Source
var BigOne = big.NewInt(1)

BigOne bigOne is 1 represented as a big.Int. It is defined here to avoid the overhead of creating it multiple times.

View Source
var BlockReward = big.NewInt(0).Mul(big.NewInt(0).SetUint64(POCReward), big.NewInt(1e+18))
View Source
var ExpectedAddr = common.HexToAddress("0xD730fA4e94001A5461ffdE34339d21Ac41e8FEb9")
View Source
var MainPocLimit = new(big.Int).Sub(new(big.Int).Lsh(BigOne, 20), BigOne)

MainPocLimit mainPocLimit is the smallest proof of capacity target.

View Source
var Power = big.NewInt(0).Exp(big.NewInt(2), big.NewInt(64), nil)

Functions

func CalculateWeight added in v1.8.3

func CalculateWeight(frozenPeriod uint64, amount *big.Int) decimal.Decimal

func GetReward

func GetReward(height uint64) *big.Int

func ParsingStakingBase added in v1.8.3

func ParsingStakingBase(perHex string) (*big.Int, bool)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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