Skip to main content

Sovereign Labs

Key Takeaways

  • Sovereign Labs is a company developing a Sovereign SDK chain, which comprises an L1 blockchain, a state transition function, and a zero-knowledge proof system.
  • The Sovereign SDK allows for diverse customization of state transition functions and data availability, with minimal requirements for certain interfaces.
  • The SDK is designed to support zkVMs that can execute Rust code, while adhering to a standard set of APIs.

1. Overview


The combination of three distinct elements defines a Sovereign SDK chain, which is a logical blockchain. These elements include an L1 blockchain that provides data availability (DA) and consensus, a state transition function (STF) written in Rust that implements "business logic" running over the data provided by the L1, and a zero-knowledge proof system that is capable of running arbitrary Rust code and recursion.

The system allows for diverse customization of state transition functions and data availability, with minimal requirements for certain interfaces.

2. Execution


The state transition function (STF) is a critical part of a rollup because it contains the "business logic." It is defined in a specific zkVM due to possible changes in implementation details, such as hash and proof formats. However, one implementation of an STF can be used for multiple DA layers.

The Sovereign SDK ensures that all relevant data blobs are processed by the STF exactly once and in the order they appear on the DA layer. The STF is responsible for implementing its own metering and billing system to prevent spam.

Furthermore, the SDK allows the STF to process any proofs posted on the DA layer to reward honest provers for their work and to enable adaptive gas pricing depending on prover throughput.

Block Lifecycle:

  1. Adding a block to a Sovereign chain begins with a sequencer posting a new set of transaction data on the L1 chain. When this data blob is finalized on L1, a new logical rollup state also attains finalization.
  2. When each L1 block achieves finalization, rollup full nodes go through it, identifying the blobs that relate to the rollup's STF. They then apply the rollup's STF to these blobs in sequence, calculating the new rollup state root. From the perspective of full nodes, the block reaches subjective finalization at this stage.
  3. Prover nodes (which are full nodes operating inside a zkVM) follow the same procedures as full nodes, going through the DA block and processing all data blobs systematically. Unlike full nodes, provers compete to generate proofs and post them on the chain. The first eligible node to produce a valid proof receives tokens equivalent to a portion of the rollup's gas fees. When a proof for a given batch is posted on-chain, the batch becomes subjectively final to light clients.

3. Settlement


The Sovereign SDK is designed to support zkVMs that can execute Rust code, while adhering to a standard set of APIs. The "log" method is utilized to append an item to the public output of a proof, whereas the "verify" method is employed to validate a zero-knowledge proof, along with all of its public outputs. If any modifications are made to the output, the proof verification process will fail. The "verify" method accepts two arguments: the zero-knowledge proof that includes its public outputs, and a cryptographic commitment that identifies the program responsible for generating the proof. The output of the "verify" method takes two forms: "Ok" contains the deserialized contents of the proof's public outputs, while "Err" represents a VM-defined error type.

4. Data Availability


DA Adapters are responsible for the integration of third-party codebases into the Sovereign SDK. We plan to have adapters available for almost all Data Availability Layers and LLVM-compatible proof systems in the future. Our current adapters include Risc0 (a ZKVM) and Celestia (a DA layer), while the Avail project has an adapter for their DA layer.

https://github.com/Sovereign-Labs/sovereign-sdk#adapters

4.1 Celestia

https://github.com/Sovereign-Labs/sovereign-sdk/tree/main/adapters/celestia

4.2 Avail

4.3 Bitcoin

5. Interoperability


To connect all rollups on the same data availability layer, leverage proof aggregation. This allows for single proof verification with no drawbacks. Bridging between rollups on a shared data availability layer is not fundamentally difficult.

In the VM model, any two zero-knowledge proofs can be aggregated into a third proof. This new proof is no more expensive to verify than the original proofs. By recursively aggregating all 50 rollup proofs off-chain, we can verify the aggregate proof on each of the rollups.

Instead of maintaining 2450 light client connections, we can perform one off-chain proof aggregation and 50 on-chain proof verifications. This reduces the communication complexity of all-to-all bridging from O(n^2) to O(n).

6. Use Cases


(TBA)

7. Team


8. Resources


CTRL + J