Module solver

Source
Expand description

Find Equi-X solutions.

This is a particular instance of Equihash, a tree-structured search for partial hash collisions using temporary memory. Equi-X modifies it to use sums instead of XOR, and chooses specific parameters.

Structs§

OverlayFirst 🔒
First memory overlay, contains the key portion of Layer0
OverlaySecond 🔒
Second overlay, with both parts of Layer2
SolverMemory
Temporary memory used by the Equi-X solver
SolverMemoryInner 🔒
Internal solver memory, inside the heap allocation

Functions§

find_solutions 🔒
Search for solutions, iterating the entire SolutionItem space and using temporary memory to locate partial sum collisions at each tree layer.

Type Aliases§

Layer0 🔒
First layer hash table, needs room for the full set of HashValues and SolutionItems. Key remainder is (EQUIHASH_N - 8 == 52) bits here.
Layer0Collision 🔒
Packed collision type for Layer0
Layer0KeyMem 🔒
Key backing storage for Layer0
Layer0ValueMem 🔒
Value backing storage for Layer0
Layer1 🔒
Next layer maps residual hash (3/4 full width == 45 bits) to packed Layer0Collision. Key remainder is 37 bits after this.
Layer2 🔒
Final layer maps the (N/2 == 30 bits) residual hash sum to packed Layer1Collision. Key remainder is 22 bits.
Layer1Collision 🔒
Packed collision type for Layer1
Layer1KeyMem 🔒
Key backing storage for Layer1
Layer1ValueMem 🔒
Value backing storage for Layer1
Layer2KeyMem 🔒
Key backing storage for Layer2
Layer2ValueMem 🔒
Value backing storage for Layer2
TempMem 🔒
Temporary value hash for resolving collisions between buckets. This removes 7 bits of key between each of the other layers. Value type may hold a SolutionItem or a temporary item-in-bucket index.

Unions§

Overlay 🔒
Union of overlay layouts used in solver memory