RandomX

Proof of work algorithm based on random code execution

BSD-3-CLAUSE License

Stars
1.4K

Bot releases are visible (Hide)

RandomX - RandomX v1.2.1 Latest Release

Published by tevador almost 1 year ago

Changes:

  • RISC-V: Avoid zext.b #286
  • Optimized randomx_reciprocal #284
  • Fixed UB in ARM64 JIT compiler #282
  • ARM64 JIT: don't use x18 register #281
  • Preserve const qualifier when casting #278
  • JIT compiler for RISC-V #275
  • Fixed GCC 13 compilation #268
  • RandomX commitments with double-hashing #265
  • Invalidate CPU I-cache on Apple Silicon #259
RandomX - RandomX v1.2.0

Published by tevador almost 1 year ago

Changes:

  • Optimized randomx_reciprocal #284
  • Fixed UB in ARM64 JIT compiler #282
  • ARM64 JIT: don't use x18 register #281
  • Preserve const qualifier when casting #278
  • JIT compiler for RISC-V #275
  • Fixed GCC 13 compilation #268
  • RandomX commitments with double-hashing #265
  • Invalidate CPU I-cache on Apple Silicon #259
RandomX - RandomX v1.1.10

Published by tevador almost 3 years ago

Full list of changes:

  • __cpuidex: explicit MSVC check, fix MinGW GCC 5.3 cross-compilation #192
  • MacOS JIT privs are not ARM-specific #217
  • cmake: set nonancient minimum version #220
  • Fix absolute address references #222
  • Fix native code generator using the wrong hash function #224
  • Fixed a crash in MSVC Debug and RelWithDebInfo builds #225
RandomX - Benchmark v1.1.9

Published by tevador over 3 years ago

This release brings support for the new ARM-based Apple silicon and a small speed-up for all CPUs.

Full list of changes:

  • Apple silicon: force W^X, enable hardware AES #198
  • Remove unnecessary first-load initialization code #201
  • Fix illegal instruction crash on some ARM systems #202
  • Optimized dataset read #211
  • Faster W^X policy for apple silicon macs #212
  • Fix typo for M1 Mac build #213
RandomX - Benchmark v1.1.8

Published by tevador over 4 years ago

Changes:

  • Add a missing function to calculate a batch of hashes #179
  • Preserve floating point state when calling randomx_calculate_hash #182
  • Fix windows-target cross-compilation #185
  • Fix compilation and JIT support on NetBSD #187
  • replace hardcoded literal with its appropriate symbol #188
  • Fix potential use-after-free when reallocating cache #189
  • Benchmark: new --noBatch option
RandomX benchmark v1.1.8
Usage: ./randomx-benchmark [OPTIONS]
Supported options:
  --help        shows this message
  --mine        mining mode: 2080 MiB
  --verify      verification mode: 256 MiB
  --jit         JIT compiled mode (default: interpreter)
  --secure      W^X policy for JIT pages (default: off)
  --largePages  use large pages (default: small pages)
  --softAes     use software AES (default: hardware AES)
  --threads T   use T threads (default: 1)
  --affinity A  thread affinity bitmask (default: 0)
  --init Q      initialize dataset with Q threads (default: 1)
  --nonces N    run N nonces (default: 1000)
  --seed S      seed for cache initialization (default: 0)
  --ssse3       use optimized Argon2 for SSSE3 CPUs
  --avx2        use optimized Argon2 for AVX2 CPUs
  --auto        select the best options for the current CPU
  --noBatch     calculate hashes one by one (default: batch)

Check the GPG signature of the archive using tevador's public key (fingerprint 3285A32D513076632CE825105A28C86AE7BD73A6).

RandomX - Benchmark v1.1.7

Published by tevador almost 5 years ago

Relevant changes:

  • Combined hash and fill AES loop #166 (major performance improvement)

Check the GPG signature of the archive using tevador's public key (fingerprint 3285A32D513076632CE825105A28C86AE7BD73A6).

RandomX - Benchmark v1.1.5

Published by tevador almost 5 years ago

Changes:

  • Fixed mmap on OpenBSD #139
  • Fix CMakeLists.txt for xcode #140
  • Fix alignment for ARMv8 code #141
  • Fixed tests on OpenBSD #142
RandomX - Benchmark v1.1.4

Published by tevador about 5 years ago

When running the benchmark, it is recommended to use the new --auto option, for example:

./randomx-benchmark --mine --auto --largePages --threads 16 --nonces 100000

Changes:

  • Optimized Argon2 (SSSE3/AVX2) #134
  • Automatic detection of CPU capabilities #136
  • Fix a possible out-of-bounds access in superscalar generator #137
RandomX - Benchmark v1.1.3

Published by tevador about 5 years ago

RandomX benchmark v1.1.3
Usage: ./randomx-benchmark [OPTIONS]
Supported options:
  --help        shows this message
  --mine        mining mode: 2080 MiB
  --verify      verification mode: 256 MiB
  --jit         JIT compiled mode (default: interpreter)
  --secure      W^X policy for JIT pages (default: off)
  --largePages  use large pages (default: small pages)
  --softAes     use software AES (default: hardware AES)
  --threads T   use T threads (default: 1)
  --affinity A  thread affinity bitmask (default: 0)
  --init Q      initialize dataset with Q threads (default: 1)
  --nonces N    run N nonces (default: 1000)
  --seed S      seed for cache initialization (default: 0)

Changes:

  • CMake install target for randomx library (#131)
  • Remember cache input data (#133)
RandomX - Benchmark v1.1.2

Published by tevador about 5 years ago

Usage: ./randomx-benchmark [OPTIONS]
Supported options:
  --help        shows this message
  --mine        mining mode: 2080 MiB
  --verify      verification mode: 256 MiB
  --jit         JIT compiled mode (default: interpreter)
  --secure      W^X policy for JIT pages (default: off)
  --largePages  use large pages (default: small pages)
  --softAes     use software AES (default: hardware AES)
  --threads T   use T threads (default: 1)
  --affinity A  thread affinity bitmask (default: 0)
  --init Q      initialize dataset with Q threads (default: 1)
  --nonces N    run N nonces (default: 1000)
  --seed S      seed for cache initialization (default: 0)

Changes:

  • Set scratchpad pointer to null by default (#127)
  • Workaround for a bug in binutils-2.32-1 on ARM (#128)
  • Fix for win32 build with gcc (#130)
RandomX - Benchmark v1.1.1

Published by tevador about 5 years ago

Usage:

Usage: ./randomx-benchmark [OPTIONS]
Supported options:
  --help        shows this message
  --mine        mining mode: 2080 MiB
  --verify      verification mode: 256 MiB
  --jit         JIT compiled mode (default: interpreter)
  --secure      W^X policy for JIT pages (default: off)
  --largePages  use large pages (default: small pages)
  --softAes     use software AES (default: hardware AES)
  --threads T   use T threads (default: 1)
  --affinity A  thread affinity bitmask (default: 0)
  --init Q      initialize dataset with Q threads (default: 1)
  --nonces N    run N nonces (default: 1000)
  --seed S      seed for cache initialization (default: 0)

Changes:

  • fix MSYS thread handle cast #121
  • Optimized loading from scratchpad #124
  • JIT compiler for ARMv8 #125
RandomX - Benchmark v1.1.0

Published by tevador about 5 years ago

Performance may be slightly lower than v1.0.4 on some CPUs due to #118.

Using the new --secure option may decrease mining performance by up to 30%, but provides slightly more secure memory permission management.

Usage: ./randomx-benchmark [OPTIONS]
Supported options:
  --help        shows this message
  --mine        mining mode: 2080 MiB
  --verify      verification mode: 256 MiB
  --jit         x86-64 JIT compiled mode (default: interpreter)
  --secure      W^X policy for JIT pages (default: off)
  --largePages  use large pages (default: small pages)
  --softAes     use software AES (default: hardware AES)
  --threads T   use T threads (default: 1)
  --affinity A  thread affinity bitmask (default: 0)
  --init Q      initialize dataset with Q threads (default: 1)
  --nonces N    run N nonces (default: 1000)
  --seed S      seed for cache initialization (default: 0)

Changes:

  • Fix undefined behavior in rotr/rotl (#86)
  • Fix: possible overflow when using non-standard Dataset size (#87)
  • Sanity checks (#88)
  • Use cmake for building (#90)
  • Vector intrinsics for ARMv8 (#93)
  • Refactoring (#95)
  • benchmark: affinity cast for mingw (#96)
  • Do not attempt to allocate >= 4 GiB on 32-bit systems (#99)
  • Fix: hardcoded JIT code buffer size (#98)
  • Fix a compiler error on Apple OSX (#110)
  • Fix use-after-free in benchmark (debug build)
  • Changes recommended by Quarkslab (#111)
  • Optional W^X policy for JIT pages (#112)
  • Increase the frequency of CBRANCH (#118)
RandomX -

Published by tevador over 5 years ago

Benchmark usage:

RandomX benchmark v1.0.4
Usage: bin/randomx-benchmark [OPTIONS]
Supported options:
  --help        shows this message
  --mine        mining mode: 2080 MiB
  --verify      verification mode: 256 MiB
  --jit         x86-64 JIT compiled mode (default: interpreter)
  --largePages  use large pages
  --softAes     use software AES (default: x86 AES-NI)
  --threads T   use T threads (default: 1)
  --affinity A  thread affinity bitmask (default: 0)
  --init Q      initialize dataset with Q threads (default: 1)
  --nonces N    run N nonces (default: 1000)
  --seed S      seed for cache initialization (default: 0)

Changes:

  • Dataset prefetch in interpreted VM #52
  • Support building a shared library #53
  • Use strongly typed enums #55
  • Fix cmake standalone build #56
  • Fix Windows detection #58
  • Configuration guidelines #59
  • Fix possible overflow in static_assert #67
  • benchmark: add thread affinity mask option #68
  • Regression tests #73
  • Large page support for FreeBSD #74
  • Different round keys for columns 0,1 and 2,3 in AesGenerator4R #76
  • Decrease the frequency of FADD/FSUB in favor of FMUL #77
RandomX - Improved program generation

Published by tevador over 5 years ago

RandomX benchmark
Usage: benchmark.exe [OPTIONS]
Supported options:
  --help        shows this message
  --mine        mining mode: 2080 MiB
  --verify      verification mode: 256 MiB
  --jit         x86-64 JIT compiled mode (default: interpreter)
  --largePages  use large pages
  --softAes     use software AES (default: x86 AES-NI)
  --threads T   use T threads (default: 1)
  --init Q      initialize dataset with Q threads (default: 1)
  --nonces N    run N nonces (default: 1000)
  --seed S      seed for cache initialization (default: 0)

Changes in this release:

  • the number of AES rounds for program generation increased from 1 to 4
RandomX - Minor changes

Published by tevador over 5 years ago

RandomX benchmark
Usage: benchmark.exe [OPTIONS]
Supported options:
  --help        shows this message
  --mine        mining mode: 2080 MiB
  --verify      verification mode: 256 MiB
  --jit         x86-64 JIT compiled mode (default: interpreter)
  --largePages  use large pages
  --softAes     use software AES (default: x86 AES-NI)
  --threads T   use T threads (default: 1)
  --init Q      initialize dataset with Q threads (default: 1)
  --nonces N    run N nonces (default: 1000)
  --seed S      seed for cache initialization (default: 0)

Minor changes in this release:

  • improved condition register selection for CBRANCH instruction
  • added support for building under MinGW
  • fixed a possible memory leak
RandomX - Legacy 32-bit support

Published by tevador over 5 years ago

RandomX benchmark
Usage: benchmark.exe [OPTIONS]
Supported options:
  --help        shows this message
  --mine        mining mode: 2080 MiB
  --verify      verification mode: 256 MiB
  --jit         x86-64 JIT compiled mode (default: interpreter)
  --largePages  use large pages
  --softAes     use software AES (default: x86 AES-NI)
  --threads T   use T threads (default: 1)
  --init Q      initialize dataset with Q threads (default: 1)
  --nonces N    run N nonces (default: 1000)
  --seed S      seed for cache initialization (default: 0)

Changes:

  • Added support for legacy x87 floating point on 32-bit systems
  • Fixed FSCAL instruction causing group F registers to exceed their intended maximum value
RandomX - Benchmark

Published by tevador over 5 years ago

Benchmark to test RandomX.

RandomX benchmark
Usage: benchmark [OPTIONS]
Supported options:
  --help        shows this message
  --mine        mining mode: 2 GiB
  --verify      verification mode: 256 MiB
  --jit         x86-64 JIT compiled mode (default: interpreter)
  --largePages  use large pages
  --softAes     use software AES (default: x86 AES-NI)
  --threads T   use T threads (default: 1)
  --init Q      initialize dataset with Q threads (default: 1)
  --nonces N    run N nonces (default: 1000)
  --seed S      seed for cache initialization (default: 0)
RandomX - Faster verification

Published by tevador over 5 years ago

Major improvement of verification speed. Mining performance should be mostly unaffected.

Changes:

  • Dataset size decreased from 4 GiB to 2 GiB
  • Added new verification option --jit for x86 systems (2-3 times faster verification)
  • Added random branches in generated programs
RandomX - Floating point portability fix

Published by tevador over 5 years ago

Reworked int -> float conversion for group E registers to avoid a small chance of denormal results.

RandomX - Reworked division instructions

Published by tevador over 5 years ago

Issue #26 : Division instructions were replaced by a single multiplication by a 64-bit reciprocal. Performance is increased by 1-5% depending on the CPU.