Golang implementation of RandomX
Go to file
2024-04-11 09:40:11 +02:00
fpu Optimize vm/superscalar, add generic fpu round as panic fallback 2024-04-11 09:40:11 +02:00
.drone.yml Working RandomX with minimal assembly for rounding mode (AMD64,ARM64) 2024-04-11 08:46:34 +02:00
aes_const.go Upload files to '' 2019-10-15 19:45:39 +02:00
aes_hash.go Remove superfluous logging 2022-10-24 20:17:59 +02:00
config.go Optimize vm/superscalar, add generic fpu round as panic fallback 2024-04-11 09:40:11 +02:00
go.mod Working RandomX with minimal assembly for rounding mode (AMD64,ARM64) 2024-04-11 08:46:34 +02:00
go.sum Working RandomX with minimal assembly for rounding mode (AMD64,ARM64) 2024-04-11 08:46:34 +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 Working RandomX with minimal assembly for rounding mode (AMD64,ARM64) 2024-04-11 08:46:34 +02:00
README.md Update 'README.md' 2019-11-14 06:09:42 +01:00
superscalar.go Optimize vm/superscalar, add generic fpu round as panic fallback 2024-04-11 09:40:11 +02:00
vm.go Optimize vm/superscalar, add generic fpu round as panic fallback 2024-04-11 09:40:11 +02:00
vm_instruction.go Optimize vm/superscalar, add generic fpu round as panic fallback 2024-04-11 09:40:11 +02:00

RandomX (Golang Implementation)

Proposed Use and Analysis of RandomX on the DERO Network

https://medium.com/deroproject/analysis-of-randomx-dde9dfe9bbc6

RandomX POW Golang Implementation and Analysis by the DERO Team. We are looking for an ASIC-resistant POW algorithm, so we decided to evaluate RandomX.

Findings:

The sum total of the protection depends on the CFROUND instruction, which basically defines rounding in different modes. This is a hardware dependent implementation. This means, if Intel/AMD/ARM or others change/fix their implementation for whatever reason, all RandomX blockchains implementations will encounter issues. This is too big a risk to undertake, almost handing over the control to others.

This is a Pure GO software implementation as Proof-OF-Concept. The test cases are same as the original RandomX implementation. All test cases passed except Test B, which is due to different round instruction. This is because the actual implementation of rounding is not documented by processor manufacturers. Also, note that the rounding functionality used is not used in 99.9999% of software. Thus, it can be removed/modified anytime.

NOTE: Rounding CFROUND instruction in vm_instruction.go line 822, still has a bug which showcases for Test B.

Based on above findings we have decided not to use the RandomX algorithm on the DERO Network to avoid any breakdown in future.

Please find attached RandomX Golang implementation. Code needs severe cleanup and formating.

NB: Above views are limited and personal of DERO Team.