misc

package
v0.35.0 Latest Latest
Warning

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

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

Documentation

Index

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

func CalculateKQuai(parent *types.WorkObject, beta0 *big.Int, beta1 *big.Int) *big.Int

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

func FindMinDenominations(reward *big.Int) map[uint8]uint64

FindMinDenominations finds the minimum number of denominations to make up the reward

func LogBig added in v0.35.0

func LogBig(diff *big.Int) *big.Int

IntrinsicLogEntropy returns the logarithm of the intrinsic entropy reduction of a PoW hash

func QiToQuai added in v0.29.0

func QiToQuai(parent *types.WorkObject, qiAmt *big.Int) *big.Int

Calculate the amount of Quai that Qi can be converted to. Expect the current Header and the Qi amount in "qits", returns the quai amount in "its"

func QuaiToQi added in v0.29.0

func QuaiToQi(header *types.WorkObject, quaiAmt *big.Int) *big.Int

Calculate the amount of Qi that Quai can be converted to. Expect the current Header and the Quai amount in "its", returns the Qi amount in "qits"

Types

This section is empty.

Jump to

Keyboard shortcuts

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