Proposed Prolog interpreter for Zircuit pre-execution for improved security and efficiency
Zircuit as Validium (popularly but imprecisely called ZK) Layer 2 EVM blockchain is transitioning from execution proof generation using Halo 2 to using Succinct Labs SP1. Among other benefits, this presents an opportunity to offload most on-chain computation, move it off-chain and compress it to merely a ZK verification on-chain. Instead of procedural we consider implementing this computation in a declarative language such as Prolog. This can produce an execution trace that would speculatively be understandable to AI models, such as the ones that can be used in Zircuit's pre-execution transaction Quarantine system. This arguably would improve the insightfulness in the process of detecting fraudulent transactions. On top of this, the pre-calculation can include assertions that could allow for pre-screened policies, in addition to the Zircuit's existing Customizable Transaction Policies for Institutions.
This is a proposal for an implementation, which caters to the bounty for Zircuit: Best App Idea. Technology to be used:
As the EVM is untouched, and the AI Quarantine sequencer system is unchanged, the existing applications would not see any change in behavior.
As computation is offloaded from the blockchain, most of it's function would reduce to checking and state updates, all done using the usual EVM. Most of the computation would be done off-chain. And not only off-chain, but also off-proof, as the Prolog program does most of the solution searching to produce a relatively short execution trace. Only the execution trace is fed into the prover, and not the entire execution. This reduces the proving time significantly.
As the Prolog execution trace contains meaningful calculations and constrain checks, the AI model can easily understand them, parse them and possibly quarantine more programs justifiably. For example, it could understand that wrapping large amounts of tokens and providing virtual liquidity could be a genuine function of an atomic liquidation program.