Golang implementation of RandomX
Go to file
DataHoarder d20dd880ce
All checks were successful
continuous-integration/drone/push Build is passing
amd64: Implemented VM JIT
2024-04-20 19:53:47 +02:00
aes amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
argon2 Move argon2 / float packages to their own folders, cleanup vm Run 2024-04-15 04:14:15 +02:00
asm amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
keys Generate constants from hashes on startup, generate LUT for aes, cleanup endianness to be all little-endian 2024-04-12 17:53:28 +02:00
.drone.yml Added wasm testing to CI 2024-04-19 18:33:50 +02:00
blake2b.go Version v2.1.0, cleaned up useless printf and string comparisons 2024-04-13 00:07:49 +02:00
cache.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
config.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
dataset.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
dataset_light.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
exec.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
exec_generic.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
exec_mmap_unix.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
float.go Include softfloat64 and allow for purego implementation 2024-04-17 06:04:29 +02:00
go.mod Include softfloat64 and allow for purego implementation 2024-04-17 06:04:29 +02:00
go.sum Include softfloat64 and allow for purego implementation 2024-04-17 06:04:29 +02:00
jit_amd64.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
jit_generic.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
LICENSE Working RandomX with minimal assembly for rounding mode (AMD64,ARM64) 2024-04-11 08:46:34 +02:00
randomx.go Update 'randomx.go' 2019-10-15 20:31:51 +02:00
randomx_test.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
README.md amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
register.go hash register file memory at once instead on loop calls 2024-04-17 09:53:24 +02:00
superscalar.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
superscalar_jit_amd64.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
superscalar_jit_amd64.s amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
superscalar_noasm.go redo JIT superscalar to include less custom assembly 2024-04-19 17:53:43 +02:00
vm.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
vm_bytecode.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
vm_bytecode_jit_amd64.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
vm_bytecode_jit_amd64.s amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
vm_bytecode_jit_generic.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
vm_bytecode_native.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
vm_bytecode_purego.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
vm_instruction.go amd64: Implemented VM JIT 2024-04-20 19:53:47 +02:00
vm_instruction_native.go Include softfloat64 and allow for purego implementation 2024-04-17 06:04:29 +02:00
vm_instruction_purego.go Include softfloat64 and allow for purego implementation 2024-04-17 06:04:29 +02:00

RandomX (Golang Implementation)

Fork from git.dero.io/DERO_Foundation/RandomX. Also related, their Analysis of RandomX writeup.

Original code failed RandomX testcases and was implemented using big.Float.

This package implements RandomX without CGO, using only Golang code, pure float64 ops and two small assembly sections to implement CFROUND modes, with optional soft float implementation.

All test cases pass properly.

JIT is supported on a few platforms but can be hard-disabled via the disable_jit build flag, or at runtime.

A pure Golang implementation can be used on platforms without hard float support or via the purego build flag manually.

Platform Hard Float Hard AES JIT Native purego Notes
386
amd64 * JIT only on Unix
arm
arm64
mips
mips64
riscv64
wasm

Any platform with no hard float support (soft float using softfloat64) will be vastly slow.

Native hard float can be added with supporting rounding mode under asm.