Architecture
Overview of Bonsol's architecture for enabling verifiable off-chain computation on Solana.
Overview
Bonsol is a framework for building verifiable computation on Solana. It consists of tools and libraries that enable developers to create their own verifiable programs and prove computations that would be impossible to run on-chain. In addition to being a development framework, Bonsol also operates as a prover network, allowing computations to be executed by a distributed network of provers incentivized to process them as quickly as possible.
Incentive Mechanism
The prover network operates through a claim mechanism. Provers observe the blockchain for execution requests, and when they identify a request they consider worthwhile (based on various heuristics), they can claim it and submit the proof to the blockchain. The first prover to claim a request is allocated a specific timeframe (measured in blocks) to deliver the proof, which must be less than the execution request's expiry. If a prover fails to deliver within the deadline, the request expires, invalidating the claim and allowing other provers to step in. Once a claim is made, the execution request is marked as claimed, and the tip value decreases according to a predefined curve, providing an incentive for the prover to generate the proof quickly.
Core Components
Bonsol consists of several key components that work together to enable verifiable off-chain computation:
Workflow
The Bonsol workflow follows these steps:
Deployment: A zkprogram is deployed and registered on-chain
Request: An on-chain program requests computation through Bonsol
Observation: Prover nodes observe the request on the blockchain
Claim: A prover claims the request
Ingestion: The prover ingests the program and input data
Computation & Proving: Off-chain computation is performed and a proof is generated
Verification: Results and proofs are submitted on-chain for verification
Callback: The verifier forwards verified results to the callback program to perform actions based on the verified results
Last updated