Skip to content
/ equix Public

A CPU-friendly client puzzle with instant verification

License

Notifications You must be signed in to change notification settings

tevador/equix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Equi-X

Equi-X is a CPU-friendly client puzzle with fast verification and small solution size (16 bytes). It is based on Equihash(60,3) with two major changes:

  1. Blake2b hash function is replaced with HashX.
  2. XOR is replaced with modular addition.

An Equi-X solution for nonce X is a set of eight 16-bit indices i0, ..., i7 such that:

HX(i0) + HX(i1) + HX(i2) + HX(i3) + HX(i4) + HX(i5) + HX(i6) + HX(i7) = 0 (mod 260)

where HX is a HashX function generated for nonce X. Equi-X is therefore a variant of the subset sum problem. Each nonce value provides 2 solutions on average.

Equi-X also has additional requirements that prove that the solution was found using the Wagner's algorithm. See the Equihash paper for details.

Example solution

H(0x6c31) = 0xcfa5375c0a7f5d7 \
                              (+) = 0xa73d9777f110000 \
H(0x8803) = 0xd798601be690a29 /                        |
                                                      (+) = 0xefdaadb00000000 \
H(0x80c2) = 0xcabd8974bbee8d5 \                        |                       |
                              (+) = 0x489d16380ef0000 /                        |
H(0xa1db) = 0x7ddf8cc3530172b /                                                |
                                                                              (+) = 0
H(0x6592) = 0x348a96fd685dcba \                                                |
                              (+) = 0x357120e8ffb8000 \                        |
H(0x76b7) = 0x00e689eb975a346 /                        |                       |
                                                      (+) = 0x102552500000000 /
H(0x74a6) = 0xacccc4ad2d06bcd \                        |
                              (+) = 0xdab431670048000 /
H(0xe259) = 0x2de76cb9d341433 /

Performance

Algorithm n k memory solution size verification 1 CPU perf. 2 GPU perf. 3
Equi-X 60 3 1.8 MiB 16 bytes ~50 μs 2400 Sol/s ?
Zcash 200 9 144 MiB 1344 bytes >150 μs 30 Sol/s ~400 Sol/s 4
BTG 144 5 2.5 GiB 100 bytes ~10 μs 1 Sol/s ~45 Sol/s 5
  1. Using AMD Ryzen 1700 with 1 thread.
  2. Using AMD Ryzen 1700 with 16 threads.
  3. Using NVIDIA GTX 1660 Ti.
  4. Estimated from http://www.zcashbenchmarks.info/ (GTX 1070)
  5. Estimated from https://miniz.ch/features/

Build

git clone --recursive https://github.com/tevador/equix.git
cd equix
mkdir build
cd build
cmake ..
make
./equix-tests
./equix-bench --help

Design notes

See devlog.md

Donations

You can support the development of Equi-X by sending XMR to this address:

85GkKXSD8EQ22EMC2ZKF64S6L6Lcm8Gr23VbAKB1zg6FUW81sUEmrvvRPoM3GCpUZSC9azCLdeityW2N3CVsV4CAC3p1evV

About

A CPU-friendly client puzzle with instant verification

Resources

License

Stars

Watchers

Forks

Packages

No packages published