Decentralized needle-finders 🧲 — Improving software security 🔒 and network reliability through architectural Proof-of-Test ✓

New RISC-V architectural primitives in support of PoT rewards

Exergy Connect
3 min readApr 7, 2022

The Bitcoin industry is booming; though estimates vary, sources put the global energy usage invested in mining activities around 100 TWh per year — more than my home country of The Netherlands. Opinions vary on the usefulness and merit of these economic activities, often as a function of the benefits accrued.

As further testament to these statements, several traditional players from established industries like telecom and financial services are now joining the crypto party (after having tried and failed to block it):

There are several initiatives that focus on using more sustainable sources of energy to power these crypto networks. In contrast, this article explores the possibility of having the miners perform some more useful work: Testing software, simulating the universe, …

Needle 💉 injection— mimicking Bitcoin hashing

The Bitcoin hashing algorithm is designed to provide a statistical probability of reward based on the number of participating miners and the state of computational power.

The miners in Bitcoin’s network try to come up with a 64-digit hexadecimal number, called a hash, that is less than or equal to a target hash in SHA256, Bitcoin’s PoW algorithm

The algorithm executed by the miners is hardwired into the ASICs, and immutable. The benefit function is a single valued spike, with zero return on investments for the vast majority of computations — an unbalanced, sub-optimal solution.

In nature, efficient solutions have multiple spikes of different shapes and sizes

Imagine a system in which software producers make available self-contained executable functions in the form of assembler instructions (Intel x86 being a popular format). Miners are asked to evaluate these “testlets” for a large set of possible combinations of input parameters. A special crypto function (e.g. specified as a RISC-V open hardware chiplet) would calculate a hash based on the input assembly program, and return a reward signal (“HIT”) when one of the corresponding 64-bit input parameter value combinations is tested. The size of the “spike set” could be chosen in different ways; for example, it could depend on the size of the reward offered by the software producer.

x86/RISC-V calling conventions and POT-ENTER/LEAVE

There are specific x86 calling conventions for C-compilers; for example, historically the 8086 processor had some variations in which 16-bit registers AX,DX,BX,CX were used for the first 4 parameters of a function call, in that order. Those would constitute a 64-bit value (4x16) — just like a Bitcoin hash.

Similarly, the standard x86 ‘RET’ instruction is used at the end of a routine to return control to the caller. ENTER and LEAVE would prepare and restore the stack pointer respectively.

RISC-V has similar conventions, though arguably somewhat simplified.

Now imagine adding 2 instructions:

➊ POT-ENTER — records the input parameter combination (buy lottery ticket)
➋ POT-LEAVE — validates that the test was performed & checks for a reward

Obviously, there remain several challenges and loopholes to be solved, humans being humans and all.

Who can help build that magnet? 🧲

--

--