Documentation ¶
Index ¶
- func CalcStateLimit(parent *types.WorkObject, stateCeil uint64) uint64
- func CalculateKQuai(parent *types.WorkObject, beta0 *big.Int, beta1 *big.Int) *big.Int
- func CalculateQiReward(header *types.WorkObjectHeader) *big.Int
- func CalculateQuaiReward(header *types.WorkObject) *big.Int
- func CalculateReward(parent *types.WorkObject, header *types.WorkObjectHeader) *big.Int
- func FindMinDenominations(reward *big.Int) map[uint8]uint64
- func LogBig(diff *big.Int) *big.Int
- func QiToQuai(parent *types.WorkObject, qiAmt *big.Int) *big.Int
- func QuaiToQi(header *types.WorkObject, quaiAmt *big.Int) *big.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcStateLimit ¶ added in v0.32.0
func CalcStateLimit(parent *types.WorkObject, stateCeil uint64) uint64
func CalculateKQuai ¶ added in v0.35.0
CalculateQuaiReward calculates the quai that can be recieved for mining a block and returns value in its k_quai = state["K Quai"] alpha = params["Controller Alpha Parameter"] D = spaces[0]["Block Difficulty"] D = sum(D) / len(D) d1 = D d2 = log(D, params["Quai Reward Base Parameter"]) x_d = d1 / d2 x_b_star = -spaces[1]["Beta"][0] / spaces[1]["Beta"][1] k_quai += alpha * (x_b_star / x_d - 1) * k_quai spaces = [{"K Qi": state["K Qi"], "K Quai": k_quai}, spaces[1]] return spaces
func CalculateQiReward ¶ added in v0.32.0
func CalculateQiReward(header *types.WorkObjectHeader) *big.Int
CalculateQiReward caculates the qi that can be received for mining a block and returns value in qits
func CalculateQuaiReward ¶ added in v0.32.0
func CalculateQuaiReward(header *types.WorkObject) *big.Int
func CalculateReward ¶
func CalculateReward(parent *types.WorkObject, header *types.WorkObjectHeader) *big.Int
func FindMinDenominations ¶ added in v0.29.0
FindMinDenominations finds the minimum number of denominations to make up the reward
func LogBig ¶ added in v0.35.0
IntrinsicLogEntropy returns the logarithm of the intrinsic entropy reduction of a PoW hash
Types ¶
This section is empty.