Documentation ¶
Index ¶
- Constants
- func CalculateHash(vm VM, in []byte) []byte
- func CalculateHashFirst(vm VM, in []byte)
- func CalculateHashNext(vm VM, in []byte) []byte
- func DatasetItemCount() uint32
- func DestroyVM(vm VM)
- func GetDatasetMemory(dataset Dataset) unsafe.Pointer
- func GetFlags() C.randomx_flags
- func InitCache(cache Cache, seed []byte)
- func InitDataset(dataset Dataset, cache Cache, startItem uint32, itemCount uint32)
- func RandomY(vm *RandyVm, mutex *sync.Mutex, hash []byte, nonce uint64) ([]byte, error)
- func ReleaseCache(cache Cache)
- func ReleaseDataset(dataset Dataset)
- func SHA3_512(data ...[]byte) []byte
- func SetVMCache(vm VM, cache Cache)
- func SetVMDataset(vm VM, dataset Dataset)
- type Cache
- type Dataset
- type RandyVm
- type VM
Constants ¶
View Source
const ( FlagDefault C.randomx_flags = 8 + 4 // for all default FlagLargePages C.randomx_flags = 1 // for dataset & rxCache & vm FlagHardAES C.randomx_flags = 2 // for vm FlagFullMEM C.randomx_flags = 4 // for vm FlagJIT C.randomx_flags = 8 // for vm & cache FlagSecure C.randomx_flags = 16 FlagArgon2SSSE3 C.randomx_flags = 32 // for cache FlagArgon2AVX2 C.randomx_flags = 64 // for cache FlagArgon2 C.randomx_flags = 96 // = avx2 + sse3 )
All flags
View Source
const RxHashSize = C.RANDOMX_HASH_SIZE
Variables ¶
This section is empty.
Functions ¶
func CalculateHash ¶
func CalculateHashFirst ¶
func CalculateHashNext ¶
func DatasetItemCount ¶
func DatasetItemCount() uint32
func GetDatasetMemory ¶
func GetFlags ¶
func GetFlags() C.randomx_flags
func InitDataset ¶
func ReleaseCache ¶
func ReleaseCache(cache Cache)
func ReleaseDataset ¶
func ReleaseDataset(dataset Dataset)
func SetVMCache ¶
func SetVMDataset ¶
Types ¶
type Cache ¶
type Cache *C.randomx_cache
func AllocCache ¶
func AllocCache(flags ...C.randomx_flags) (Cache, error)
type Dataset ¶
type Dataset *C.randomx_dataset
func AllocDataset ¶
func AllocDataset(flags ...C.randomx_flags) (Dataset, error)
type RandyVm ¶ added in v0.0.9
type RandyVm struct {
// contains filtered or unexported fields
}
func NewRandomYVMWithKeyAndMutex ¶ added in v0.0.9
func NewRandyVm ¶ added in v0.0.9
Click to show internal directories.
Click to hide internal directories.