Documentation ¶
Overview ¶
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file.
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file. Reference resources of rust bitVector
Index ¶
- Constants
- Variables
- func BigToCompact(n *big.Int) uint32
- func CalcCuckooDiff(scale uint64, blockHash hash.Hash) *big.Int
- func CalcWork(bits uint32, powType PowType) *big.Int
- func CompactToBig(compact uint32) *big.Int
- func ConvertBytesToUint32Array(data []byte) []uint32
- func CuckooDiffToTarget(scale uint64, diff *big.Int) string
- func GetPowName(powType PowType) string
- func HashToBig(hash *hash.Hash) *big.Int
- type Blake2bd
- func (this *Blake2bd) BlockData() PowBytes
- func (this *Blake2bd) Bytes() PowBytes
- func (this *Blake2bd) CompareDiff(newTarget *big.Int, target *big.Int) bool
- func (this *Blake2bd) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
- func (this *Blake2bd) GetNextDiffBig(weightedSumDiv *big.Int, oldDiffBig *big.Int, currentPowPercent *big.Int) *big.Int
- func (this *Blake2bd) GetPowResult() json.PowResult
- func (this *Blake2bd) GetSafeDiff(cur_reduce_diff uint64) *big.Int
- func (this *Blake2bd) Verify(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) error
- type CryptoNight
- func (this *CryptoNight) BlockData() PowBytes
- func (this *CryptoNight) Bytes() PowBytes
- func (this *CryptoNight) CompareDiff(newTarget *big.Int, target *big.Int) bool
- func (this *CryptoNight) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
- func (this *CryptoNight) GetNextDiffBig(weightedSumDiv *big.Int, oldDiffBig *big.Int, currentPowPercent *big.Int) *big.Int
- func (this *CryptoNight) GetPowResult() json.PowResult
- func (this *CryptoNight) GetSafeDiff(cur_reduce_diff uint64) *big.Int
- func (this *CryptoNight) Verify(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) error
- type Cuckaroo
- func (this *Cuckaroo) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
- func (this *Cuckaroo) GetNextDiffBig(weightedSumDiv *big.Int, oldDiffBig *big.Int, currentPowPercent *big.Int) *big.Int
- func (this *Cuckaroo) GetSafeDiff(cur_reduce_diff uint64) *big.Int
- func (this *Cuckaroo) GraphWeight() uint64
- func (this *Cuckaroo) Verify(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) error
- type Cuckaroom
- func (this *Cuckaroom) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
- func (this *Cuckaroom) GetNextDiffBig(weightedSumDiv *big.Int, oldDiffBig *big.Int, currentPowPercent *big.Int) *big.Int
- func (this *Cuckaroom) GetSafeDiff(cur_reduce_diff uint64) *big.Int
- func (this *Cuckaroom) GraphWeight() uint64
- func (this *Cuckaroom) Verify(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) error
- type Cuckatoo
- func (this *Cuckatoo) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
- func (this *Cuckatoo) GetNextDiffBig(weightedSumDiv *big.Int, oldDiffBig *big.Int, currentPowPercent *big.Int) *big.Int
- func (this *Cuckatoo) GetSafeDiff(cur_reduce_diff uint64) *big.Int
- func (this *Cuckatoo) GraphWeight() uint64
- func (this *Cuckatoo) Verify(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) error
- type Cuckoo
- func (this *Cuckoo) BlockData() PowBytes
- func (this *Cuckoo) Bytes() PowBytes
- func (this *Cuckoo) CompareDiff(newTarget *big.Int, target *big.Int) bool
- func (this *Cuckoo) GetCircleNonces() (nonces [cuckoo.ProofSize]uint32)
- func (this *Cuckoo) GetEdgeBits() uint8
- func (this *Cuckoo) GetPowResult() json.PowResult
- func (this *Cuckoo) GetSipHash(headerData []byte) hash.Hash
- func (this *Cuckoo) GraphWeight() uint64
- func (this *Cuckoo) SetCircleEdges(edges []uint32)
- func (this *Cuckoo) SetEdgeBits(edge_bits uint8)
- type IPow
- type MainHeight
- type MeerXKeccakV1
- func (this *MeerXKeccakV1) BlockData() PowBytes
- func (this *MeerXKeccakV1) Bytes() PowBytes
- func (this *MeerXKeccakV1) CompareDiff(newTarget *big.Int, target *big.Int) bool
- func (this *MeerXKeccakV1) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
- func (this *MeerXKeccakV1) GetNextDiffBig(weightedSumDiv *big.Int, oldDiffBig *big.Int, currentPowPercent *big.Int) *big.Int
- func (this *MeerXKeccakV1) GetPowResult() json.PowResult
- func (this *MeerXKeccakV1) GetSafeDiff(cur_reduce_diff uint64) *big.Int
- func (this *MeerXKeccakV1) Verify(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) error
- type Percent
- type PercentItem
- type PercentValue
- type Pow
- func (this *Pow) CheckAvailable() bool
- func (this *Pow) GetNonce() uint64
- func (this *Pow) GetPowType() PowType
- func (this *Pow) GetProofData() string
- func (this *Pow) PowPercent() *big.Int
- func (this *Pow) SetMainHeight(mainHeight MainHeight)
- func (this *Pow) SetNonce(nonce uint64)
- func (this *Pow) SetParams(params *PowConfig)
- func (this *Pow) SetPowType(powType PowType)
- func (this *Pow) SetProofData(data []byte)
- type PowBytes
- type PowConfig
- type PowType
- type ProofDataType
- type QitmeerKeccak256
- func (this *QitmeerKeccak256) BlockData() PowBytes
- func (this *QitmeerKeccak256) Bytes() PowBytes
- func (this *QitmeerKeccak256) CompareDiff(newTarget *big.Int, target *big.Int) bool
- func (this *QitmeerKeccak256) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
- func (this *QitmeerKeccak256) GetNextDiffBig(weightedSumDiv *big.Int, oldDiffBig *big.Int, currentPowPercent *big.Int) *big.Int
- func (this *QitmeerKeccak256) GetPowResult() json.PowResult
- func (this *QitmeerKeccak256) GetSafeDiff(cur_reduce_diff uint64) *big.Int
- func (this *QitmeerKeccak256) Verify(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) error
- type X16rv3
- func (this *X16rv3) BlockData() PowBytes
- func (this *X16rv3) Bytes() PowBytes
- func (this *X16rv3) CompareDiff(newTarget *big.Int, target *big.Int) bool
- func (this *X16rv3) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
- func (this *X16rv3) GetNextDiffBig(weightedSumDiv *big.Int, oldDiffBig *big.Int, currentPowPercent *big.Int) *big.Int
- func (this *X16rv3) GetPowResult() json.PowResult
- func (this *X16rv3) GetSafeDiff(cur_reduce_diff uint64) *big.Int
- func (this *X16rv3) Verify(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) error
- type X8r16
- func (this *X8r16) BlockData() PowBytes
- func (this *X8r16) Bytes() PowBytes
- func (this *X8r16) CompareDiff(newTarget *big.Int, target *big.Int) bool
- func (this *X8r16) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
- func (this *X8r16) GetNextDiffBig(weightedSumDiv *big.Int, oldDiffBig *big.Int, currentPowPercent *big.Int) *big.Int
- func (this *X8r16) GetPowResult() json.PowResult
- func (this *X8r16) GetSafeDiff(cur_reduce_diff uint64) *big.Int
- func (this *X8r16) Verify(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) error
Constants ¶
const ( PROOF_DATA_EDGE_BITS_START = 0 PROOF_DATA_EDGE_BITS_END = 1 PROOF_DATA_CIRCLE_NONCE_END = 169 )
const MAX_CUCKAROOEDGEBITS = 32
const MAX_CUCKAROOMMEDGEBITS = 29
const MAX_CUCKATOOEDGEBITS = 32
const MIN_CUCKAROOEDGEBITS = 24
const MIN_CUCKAROOMMEDGEBITS = 29
const MIN_CUCKATOOEDGEBITS = 29
const POW_LENGTH = 178
the pow length is 178
const PROOFDATA_LENGTH = 169
proof data length is 169
Variables ¶
var ( // oneLsh256 is 1 shifted left 256 bits. It is defined here to avoid // the overhead of creating it multiple times. OneLsh256 = new(big.Int).Lsh(bigOne, 256) )
var PowMapString = map[PowType]interface{}{ BLAKE2BD: "blake2bd", CUCKAROO: "cuckaroo", CUCKATOO: "cuckatoo", CUCKAROOM: "cuckaroom", X16RV3: "x16rv3", X8R16: "x8r16", QITMEERKECCAK256: "qitmeer_keccak256", CRYPTONIGHT: "cryptonight", MEERXKECCAKV1: "meer_xkeccak_v1", }
Functions ¶
func BigToCompact ¶
BigToCompact converts a whole number N to a compact representation using an unsigned 32-bit number. The compact representation only provides 23 bits of precision, so values larger than (2^23 - 1) only encode the most significant digits of the number. See CompactToBig for details.
func CalcCuckooDiff ¶
calc cuckoo diff
func CalcWork ¶
CalcWork calculates a work value from difficulty bits. it increases the difficulty for generating a block by decreasing the value which the generated hash must be less than.
This difficulty target is stored in each block header using a compact representation as described in the documentation for CompactToBig.
The main chain is selected by choosing the chain that has the most proof of work (highest difficulty).
Since a lower target difficulty value equates to higher actual difficulty, the work value which will be accumulated must be the inverse of the difficulty. Also, in order to avoid potential division by zero and really small floating point numbers, the result adds 1 to the denominator and multiplies the numerator by 2^256.
func CompactToBig ¶
CompactToBig converts a compact representation of a whole number N to an unsigned 32-bit number. The representation is similar to IEEE754 floating point numbers.
Like IEEE754 floating point, there are three basic components: the sign, the exponent, and the mantissa. They are broken out as follows:
the most significant 8 bits represent the unsigned base 256 exponent
bit 23 (the 24th bit) represents the sign bit
the least significant 23 bits represent the mantissa
------------------------------------------------- | Exponent | Sign | Mantissa | ------------------------------------------------- | 8 bits [31-24] | 1 bit [23] | 23 bits [22-00] | -------------------------------------------------
The formula to calculate N is:
N = (-1^sign) * mantissa * 256^(exponent-3)
This compact form is only used to encode unsigned 256-bit numbers which represent difficulty targets, thus there really is not a need for a sign bit, but it is implemented here to stay consistent with bitcoind. TODO, revisit the compact difficulty form design
func CuckooDiffToTarget ¶
calc cuckoo diff convert to target hash like 7fff000000000000000000000000000000000000000000000000000000000000
func GetPowName ¶ added in v0.10.1
Types ¶
type Blake2bd ¶
type Blake2bd struct {
Pow
}
func (*Blake2bd) CompareDiff ¶
compare the target wether target match the target diff
func (*Blake2bd) FindSolver ¶ added in v0.10.1
func (this *Blake2bd) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
solve solution
func (*Blake2bd) GetNextDiffBig ¶
func (*Blake2bd) GetPowResult ¶
type CryptoNight ¶ added in v0.10.1
type CryptoNight struct {
Pow
}
func (*CryptoNight) BlockData ¶ added in v0.10.1
func (this *CryptoNight) BlockData() PowBytes
pow proof data
func (*CryptoNight) Bytes ¶ added in v0.10.1
func (this *CryptoNight) Bytes() PowBytes
pow proof data
func (*CryptoNight) CompareDiff ¶ added in v0.10.1
compare the target wether target match the target diff
func (*CryptoNight) FindSolver ¶ added in v0.10.1
func (this *CryptoNight) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
not support
func (*CryptoNight) GetNextDiffBig ¶ added in v0.10.1
func (*CryptoNight) GetPowResult ¶ added in v0.10.1
func (this *CryptoNight) GetPowResult() json.PowResult
func (*CryptoNight) GetSafeDiff ¶ added in v0.10.1
func (this *CryptoNight) GetSafeDiff(cur_reduce_diff uint64) *big.Int
type Cuckaroo ¶
type Cuckaroo struct {
Cuckoo
}
func (*Cuckaroo) FindSolver ¶ added in v0.10.1
func (this *Cuckaroo) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
solve solution
func (*Cuckaroo) GetNextDiffBig ¶
func (*Cuckaroo) GraphWeight ¶
calc scale the edge_bits is bigger ,then scale is bigger Reference resources https://eprint.iacr.org/2014/059.pdf 9. Difficulty control page 6 while the average number of cycles found increases slowly with size; from 2 at 2^20 to 3 at 2^30 Less times of hash calculation with the same difficulty 24 => 48 25 => 100 26 => 208 27 => 432 28 => 896 29 => 1856 30 => 3840 31 => 7936 assume init difficulty is 1000 24 target is 0c49ba5e353f7ced000000000000000000000000000000000000000000000000 (The meaning of difficulty needs to be found 1000/48 * 50 ≈ 1000 times in edge_bits 24, and the answer may be obtained once.) why * 50 , because the when edge_count/nodes = 1/2,to find 42 cycles the probality is 2.2% 29 target is db22d0e560418937000000000000000000000000000000000000000000000000 (The difficulty needs to be found 1000/1856 * 50 ≈ 26 times in edge_bits 29, and the answer may be obtained once.) so In order to ensure the fairness of different edge indexes, the mining difficulty is different.
type Cuckaroom ¶ added in v0.10.1
type Cuckaroom struct {
Cuckoo
}
func (*Cuckaroom) FindSolver ¶ added in v0.10.1
func (this *Cuckaroom) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
not support
func (*Cuckaroom) GetNextDiffBig ¶ added in v0.10.1
func (*Cuckaroom) GetSafeDiff ¶ added in v0.10.1
func (*Cuckaroom) GraphWeight ¶ added in v0.10.1
calc scale the edge_bits is bigger ,then scale is bigger Reference resources https://eprint.iacr.org/2014/059.pdf 9. Difficulty control page 6 while the average number of cycles found increases slowly with size; from 2 at 2^20 to 3 at 2^30 Less times of hash calculation with the same difficulty 24 => 48 25 => 100 26 => 208 27 => 432 28 => 896 29 => 1856 30 => 3840 31 => 7936 assume init difficulty is 1000 24 target is 0c49ba5e353f7ced000000000000000000000000000000000000000000000000 (The meaning of difficulty needs to be found 1000/48 * 50 ≈ 1000 times in edge_bits 24, and the answer may be obtained once.) why * 50 , because the when edge_count/nodes = 1/2,to find 42 cycles the probality is 2.2% 29 target is db22d0e560418937000000000000000000000000000000000000000000000000 (The difficulty needs to be found 1000/1856 * 50 ≈ 26 times in edge_bits 29, and the answer may be obtained once.) so In order to ensure the fairness of different edge indexes, the mining difficulty is different.
type Cuckatoo ¶
type Cuckatoo struct {
Cuckoo
}
func (*Cuckatoo) FindSolver ¶ added in v0.10.1
func (this *Cuckatoo) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
not support
func (*Cuckatoo) GetNextDiffBig ¶
func (*Cuckatoo) GraphWeight ¶
calc scale the edge_bits is bigger ,then scale is bigger Reference resources https://eprint.iacr.org/2014/059.pdf 9. Difficulty control page 6 while the average number of cycles found increases slowly with size; from 2 at 2^20 to 3 at 2^30 Less times of hash calculation with the same difficulty 24 => 48 25 => 100 26 => 208 27 => 432 28 => 896 29 => 1856 30 => 3840 31 => 7936 assume init difficulty is 1000 24 target is 0c49ba5e353f7ced000000000000000000000000000000000000000000000000 (The meaning of difficulty needs to be found 1000/48 * 50 ≈ 1000 times in edge_bits 24, and the answer may be obtained once.) why * 50 , because the when edge_count/nodes = 1/2,to find 42 cycles the probality is 2.2% 29 target is db22d0e560418937000000000000000000000000000000000000000000000000 (The difficulty needs to be found 1000/1856 * 50 ≈ 26 times in edge_bits 29, and the answer may be obtained once.) so In order to ensure the fairness of different edge indexes, the mining difficulty is different.
type Cuckoo ¶
type Cuckoo struct {
Pow
}
func (*Cuckoo) CompareDiff ¶
compare the target wether target match the target diff
func (*Cuckoo) GetCircleNonces ¶
func (*Cuckoo) GetPowResult ¶
func (*Cuckoo) GetSipHash ¶
get sip hash first header data 113 bytes hash
func (*Cuckoo) GraphWeight ¶
type IPow ¶
type IPow interface { // verify result difficulty Verify(headerData []byte, blockHash hash.Hash, targetDiff uint32) error //set header nonce SetNonce(nonce uint64) //calc next diff GetNextDiffBig(weightedSumDiv *big.Int, oldDiffBig *big.Int, currentPowPercent *big.Int) *big.Int GetNonce() uint64 GetPowType() PowType //set pow type SetPowType(powType PowType) GetProofData() string //set proof data SetProofData([]byte) Bytes() PowBytes BlockData() PowBytes //if cur_reduce_diff > 0 compare cur_reduce_diff with powLimitBits or minDiff ,the cur_reduce_diff should less than powLimitBits , and should more than min diff //if cur_reduce_diff <=0 return powLimit or min diff GetSafeDiff(cur_reduce_diff uint64) *big.Int // pow percent PowPercent() *big.Int //pow result GetPowResult() json.PowResult //SetParams SetParams(params *PowConfig) //SetHeight SetMainHeight(height MainHeight) CheckAvailable() bool CompareDiff(newtarget *big.Int, target *big.Int) bool FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool }
type MainHeight ¶ added in v0.10.1
type MainHeight uint32
type MeerXKeccakV1 ¶ added in v0.10.1
type MeerXKeccakV1 struct {
Pow
}
func (*MeerXKeccakV1) BlockData ¶ added in v0.10.1
func (this *MeerXKeccakV1) BlockData() PowBytes
pow proof data
func (*MeerXKeccakV1) Bytes ¶ added in v0.10.1
func (this *MeerXKeccakV1) Bytes() PowBytes
pow proof data
func (*MeerXKeccakV1) CompareDiff ¶ added in v0.10.1
compare the target wether target match the target diff
func (*MeerXKeccakV1) FindSolver ¶ added in v0.10.1
func (this *MeerXKeccakV1) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
not support
func (*MeerXKeccakV1) GetNextDiffBig ¶ added in v0.10.1
func (*MeerXKeccakV1) GetPowResult ¶ added in v0.10.1
func (this *MeerXKeccakV1) GetPowResult() json.PowResult
func (*MeerXKeccakV1) GetSafeDiff ¶ added in v0.10.1
func (this *MeerXKeccakV1) GetSafeDiff(cur_reduce_diff uint64) *big.Int
type Percent ¶
type Percent map[MainHeight]PercentItem
type PercentItem ¶ added in v0.10.1
type PercentItem map[PowType]PercentValue
type PercentValue ¶ added in v0.10.1
type PercentValue uint32
type Pow ¶
type Pow struct { PowType PowType //header pow type 1 bytes Nonce uint64 //header nonce 4 bytes ProofData ProofDataType // 1 edge_bits 168 bytes circle length total 169 bytes // contains filtered or unexported fields }
func (*Pow) CheckAvailable ¶ added in v0.10.1
check pow is available
func (*Pow) GetPowType ¶
func (*Pow) GetProofData ¶
func (*Pow) PowPercent ¶ added in v0.10.1
func (*Pow) SetMainHeight ¶
func (this *Pow) SetMainHeight(mainHeight MainHeight)
func (*Pow) SetPowType ¶
func (*Pow) SetProofData ¶
set proof data except pow type
type PowConfig ¶
type PowConfig struct { // PowLimit defines the highest allowed proof of work value for a block // as a uint256. Blake2bdPowLimit *big.Int // PowLimitBits defines the highest allowed proof of work value for a // block in compact form. // highest value is mean min difficulty Blake2bdPowLimitBits uint32 X16rv3PowLimit *big.Int X16rv3PowLimitBits uint32 X8r16PowLimit *big.Int X8r16PowLimitBits uint32 CryptoNightPowLimit *big.Int CryptoNightPowLimitBits uint32 QitmeerKeccak256PowLimit *big.Int QitmeerKeccak256PowLimitBits uint32 MeerXKeccakV1PowLimit *big.Int MeerXKeccakV1PowLimitBits uint32 // cuckoo difficulty calc params min difficulty CuckarooMinDifficulty uint32 CuckaroomMinDifficulty uint32 CuckatooMinDifficulty uint32 Percent map[MainHeight]PercentItem AdjustmentStartMainHeight MainHeight // contains filtered or unexported fields }
var PowConfigInstance *PowConfig
func (*PowConfig) GetPercentByHeightAndType ¶ added in v0.10.1
func (this *PowConfig) GetPercentByHeightAndType(h MainHeight, powType PowType) PercentValue
get Percent By height
type ProofDataType ¶
type ProofDataType [PROOFDATA_LENGTH]byte
func (*ProofDataType) Bytes ¶
func (this *ProofDataType) Bytes() []byte
func (*ProofDataType) String ¶
func (this *ProofDataType) String() string
type QitmeerKeccak256 ¶ added in v0.10.1
type QitmeerKeccak256 struct {
Pow
}
func (*QitmeerKeccak256) BlockData ¶ added in v0.10.1
func (this *QitmeerKeccak256) BlockData() PowBytes
pow proof data
func (*QitmeerKeccak256) Bytes ¶ added in v0.10.1
func (this *QitmeerKeccak256) Bytes() PowBytes
pow proof data
func (*QitmeerKeccak256) CompareDiff ¶ added in v0.10.1
compare the target wether target match the target diff
func (*QitmeerKeccak256) FindSolver ¶ added in v0.10.1
func (this *QitmeerKeccak256) FindSolver(headerData []byte, blockHash hash.Hash, targetDiffBits uint32) bool
not support
func (*QitmeerKeccak256) GetNextDiffBig ¶ added in v0.10.1
func (*QitmeerKeccak256) GetPowResult ¶ added in v0.10.1
func (this *QitmeerKeccak256) GetPowResult() json.PowResult
func (*QitmeerKeccak256) GetSafeDiff ¶ added in v0.10.1
func (this *QitmeerKeccak256) GetSafeDiff(cur_reduce_diff uint64) *big.Int
type X16rv3 ¶ added in v0.10.1
type X16rv3 struct {
Pow
}
func (*X16rv3) CompareDiff ¶ added in v0.10.1
compare the target wether target match the target diff
func (*X16rv3) FindSolver ¶ added in v0.10.1
not support
func (*X16rv3) GetNextDiffBig ¶ added in v0.10.1
func (*X16rv3) GetPowResult ¶ added in v0.10.1
func (*X16rv3) GetSafeDiff ¶ added in v0.10.1
type X8r16 ¶ added in v0.10.1
type X8r16 struct {
Pow
}
func (*X8r16) CompareDiff ¶ added in v0.10.1
compare the target wether target match the target diff
func (*X8r16) FindSolver ¶ added in v0.10.1
not support