Peach agorithm

From Mochimo Wiki
Revision as of 02:48, 19 July 2019 by Maty (talk | contribs) (Created page with "A new mining algorithm from the creators of Mochimo meant to level the playing field among miners and prevent FPGA dominance. == Story == thumb|right In th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A new mining algorithm from the creators of Mochimo meant to level the playing field among miners and prevent FPGA dominance.

Story

Peach.png

In the original Super Mario Brother’s game, players were tasked with rescuing Princess Peach from the evil Bowser. To do so, they’d often find themselves jumping from tile-to-tile trying to reach the castle, only to be told “Our princess is in another castle”. The Peach algorithm was named after this process, as one of the core mechanics of the algorithm is the inclusion of an enormous sparse matrix, where the algorithm jumps from tile to tile, attempting to solve the block (and usually getting to the end of the process without finding a solve).

How it works

The Peach algorithm is a proof-of-work mining algorithm for the Mochimo network that is designed to be GPU optimized. The Peach algorithm uses various FPGA-deterrent features such as pseudorandom deterministic floating-point operations, pseudorandom byte transformations, a 1 gibibyte sparse matrix, and the “Nighthash” function, which applies one of 8 dynamically chosen hashing algorithms to each tile. The Peach algorithm begins its function by hashing the starting tile using the contents of the block trailer. The resulting hash points the algorithm to the first tile in the matrix, where some work will be performed. Once the starting tile is known, the tile data (as well as the nonce and index data from the block trailer) is passed through the “Nighthash” function. It performs the “work” in our proof of work system and also points the system to the next tile. This sequence occurs several times. The hash of the final tile represents a potential block solve. If the final hash is equal to (or better than) the block difficulty, then you have solved the block (and, of course, saved the princess)! If however, you have not, then the cycle will continue until you or a peer have solved the block. The Peach algorithm rewards computers with high memory because they can store previous tiles in a cache, reducing the work of any cached tile. This becomes increasingly important as difficulty increases and the number of attempts needed to solve a block pushes into the many-billions.

FPGA resistance

One of the Peach algorithms main benefits is its FPGA-resistant design. While it is not technically impossible to implement the Peach algorithm in an FPGA, it is definitely impractical. Further, an FPGA implementation would not be expected to perform as well as a GPU when mining with Peach. There are a few main ways in which the Peach algorithm discourages FPGA implementations: The Peach algorithm rewards miners running higher amounts of memory (RAM), which most FPGAs do not have. Caching tile data can be recalled later so as to reduce the workload of solving. The Peach algorithm uses a complex arrangement of randomly chosen operations, making it ridiculously hard to code for an FPGA. Peach leverages the extensive floating-point operation capabilities of GPUs in a deterministic way. Attempting to do the same thing in an FPGA is programmatically prohibitive at best. These factors together make the implementation of the Peach algorithm infeasible on an FPGA; even if someone went to the trouble of making it work, GPU miners would still out perform them.

Reason for change

The Peach algorithm is another step towards discouraging the use of non-GPU hardware, thereby keeping Mochimo a currency that can be mined effectively as long as you have a couple of graphics cards and some spare time.