by jlokier · 4y ago · 0 comments
It's almost magical how it's possible to prove that N billion steps of a simulated virtual computer, run exactly according to specification, complete with CPU and memory, given a particular set of input files (or even a hash of an input) and program (or hash of a program), produces a particular set of output files.
All summarised in a short proof that a verifier can easily and quickly check, so it doesn't have to redo the computation itself - it can trust the outputs it receives, due to the proof.
The cost of proving execution is high compared with the cost of execution without proof.
(Even in a dedicated proof-of-execution hardware CPU, which by the way I'm also working on a little, in case someone out there finds themselves looking to hire someone doing this sort of thing ;-)
On the other hand, for proof-of-stake and similar systems, these kinds of proofs completely change the dynamics because there is no need for every node to duplicate all the state machine updates. Current blockchains have hundreds or thousands of full nodes, each of them executing the same code to verify the behaviour is the same. They can accept proofs instead, so that executions are done by only a few nodes. That greatly changes the scaling cost.
With a few more tricks it starts to look more like a giant CRDT with lightweight nodes maintaining just a "view" of the part they are interested in, and some more tricks on top of that for latency hiding, it starts to look more real-time, as in MMO levels of interactive performance, not the blockchain you are used to.
What ratio are we talking about here roughly? Is is 10% higher or 1000x higher?
It's possible to build more standard CPUs as well which use ordinary arithmetic, logic and memory, at some cost to efficiency. But the cost is almost entirely borne by the prover.
The Cairo system from Starkware is a pretty good, modern CPU-like system (albeit using finite fields and an unusual CPU model, instead of normal numbers), which is simpler than its predecessors in some ways because the techniques have matured and they have been able to use techniques devised by many different R&D groups before that iteration.
As far as I'm aware, however, performance at the billions of steps level is more on the frontier.
I'd love to share details of what I've been working on, and I hope I will be able to one day. One problem is I'm looking for work, and there's an interesting company I'm negotiating with but their view of IP may prevent me from publishing my own work in this area after I've started. Meanwhile, I haven't published yet, even though I've done a lot of work on it. I do not like this, I always want to share, but...