Documentation ¶
Index ¶
- Constants
- func CalculateNbit(targetTime uint64, lastNbit []byte, windowSize uint64, windowTimeStart uint64, ...) []byte
- func CudaGetX(deviceID int, m int, n int, whichXWidth int, startSMCount uint64, ...) string
- func GetDeviceCount() int32
- func GetNbit(ctx context.Context, p PqcPowAPI) ([]byte, error)
- func GetNumOfExecution(n int32, m int32) uint64
- func NewController(mqphash *mqphash.MQPHash, nbit []byte, whichXWidth int) (*controller, error)
- func NewDev(mqphash *mqphash.MQPHash, nbit []byte, whichXWidth int, ctr *controller, ...) *dev
- func NewFix(mh *mqphash.MQPHash, fixLenght int) *fix
- func PqcPowProof(ctx context.Context, seed []byte, nbit []byte, p PqcPowAPI) ([]byte, error)
- func VerifyPoW(seed []byte, nbit []byte, x []byte) bool
- type PqcPowAPI
Constants ¶
View Source
const ( EquationsOffset = 31 NbitSampleRate = 1 ReferenceSeconds = 15 * 1000 //15s )
Variables ¶
This section is empty.
Functions ¶
func CalculateNbit ¶
func GetDeviceCount ¶
func GetDeviceCount() int32
func GetNumOfExecution ¶
func NewController ¶
func PqcPowProof ¶
Types ¶
type PqcPowAPI ¶
type PqcPowAPI interface { ChainGetTipSetByHeight(context.Context, abi.ChainEpoch, types.TipSetKey) (*types.TipSet, error) ChainHead(context.Context) (*types.TipSet, error) //perm:read ChainNotify(context.Context) (<-chan []*api.HeadChange, error) }
const powParameter = { equationsOffset: 31, nbitSampleRate: 200, referenceSeconds: 600 }
Click to show internal directories.
Click to hide internal directories.