One of the very interesting things about the LXRHash used by the PegNet is the fact that it does not target computation.
LXRHash targets the memory bottleneck.
Each byte of source data being hashed involves creating a complex state, and that state is created by xors and shifts, and random bytes selected from a 1 gb byte buffer.
In the end, the state is used to derive the resulting hash.
Because a random byte is selected intermittently in the computation of the state, the result is over 90% of the time used to compute the hash is waiting on memory. As the largest cache on commercial processors is about 128 MB, the cache is nearly always blown, doing very little to speed up the hash.
Benefits of this for CPU mining:
- Computation takes only 10% of the time. Driving computation to near zero with an ASIC only gets you a 10% boost in hash power
- When processors are waiting on memory, they are idle. On an I7 running 8 LXRHash miners full blast, the power consumption only goes up 10 Watts .... roughly the draw of a LED light bulb
- The most effective mining hardware becomes Single Board Computers like the Raspberry Pi 4. With 2 GB, the hardware cost per hash is half conventional hardware, likely a quarter or less of GPUs or ASICs
Because the target isn't computation, but the memory bandwidth to 1 GB of memory, the best way to improve hash power is to fix a fundamental limitation of all hardware: I/O speed on and off chip. So we don't have to worry about a new ASIC coming out that blows away CPU mining. And when caches do become effective at 1 GB, we can increase the map to 2 GB, or 4 GB, or more. So the hash can scale with hardware advancements.
LXRHash is a Proof of Work hash, not a cryptographic hash. As such it has been evaluated for avalanche properties, and compared to Sha256 for bits modified due to any change in the value being hashed. Hash restarts don't work because it does a quick first past to initialize the state prior to the main loop. Append attacks don't work because LXRHash does an additional pass over the 32 byte hash produced by the main loop.
The cryptographic hashing securing the PegNet come from Factom, and are based on Sha256 and Sha512.