To read in-depth about Symphony architecture, reference the architecture
page.
Existing consensus protocols
Most blockchains today operate on a simple principle: replicated execution, where all nodes re-execute each block to achieve two goals:- Verify transactions through re-execution
- Compute and apply state updates to their local state
With Ritual’s heterogeneous, resource-intensive workloads, such replicated
execution across all validator nodes becomes redundant, inefficient, and
unscalable.
Symphony
To address this heterogeneous workload challenge, we developed an optimized execution and verification model via a new consensus protocol, dubbed Symphony. Symphony builds upon an Execute-Once-Verify-Many-Times (EOVMT) model by which select compute nodes act as sole executors of workloads, generating succinct sub-proofs for executed compute.Execute Once
Ritual executes inference SPC opcodes externally to the EVM, with the resulting outputs seamlessly integrated back into the EVM. Inference SPC opcodes can take several minutes and even hours to execute, and synchronously processing them in a replicated fashion would drastically increase block times, potentially bringing block production to a halt and severely impacting the chain’s performance and liveness. To address this, we adopt anExecute-Once
model for inference opcodes.
In this approach, these opcodes are executed asynchronously off-chain by
selected compute nodes in a specialized environment.
To eliminate the need for verification of off-chain computations through
replicated execution, we use succinct proofs that can be efficiently verified by
validators.
Notably, since SPC opcode execution and proof generation occur asynchronously
off-chain, proof generation does not impact the on-chain critical path.
Ritual prioritizes prover-friendly systems with linear or near-linear proof
generation time, closely aligning with the execution’s complexity.
Additionally, prover time can be further optimized through techniques such as
parallel proof generation using multi-core or multi-machine setups.
Execute-Once
semantic, inference opcodes are executed once by the
designated compute node, and validators efficiently verify the proofs to accept
the results, without redundant re-execution.
Verify Many Times
AlthoughExecute Once
addresses the unscalability of replicated execution,
verifying proofs for complete model inference opcodes poses significant
scalability challenges.
While the proofs are succinct, their sizes grow polylogarithmically with
machine learning model complexity. For models with tens of billions of
parameters, individual proofs can reach megabytes in size, inflating block
sizes and hindering timely network propagation.
Verify Many Times
primitive as an
improvement over replicated verification.
Model partitioning
Large models are partitioned into smaller sub-models, with separate
sub-proofs generated for each partition. This produces smaller proofs that
can be efficiently propagated and verified.
Distributed verification
Sub-proofs are assigned to different validator subsets, distributing
verification load across the network. A quorum of these assigned validators
verifies each proof shard, and their consensus is accepted by the network.
Verification committees
Validators are organized into committees specializing in specific model
types, enabling efficient proof verification.
Optimistic verification
Sub-proofs are verified optimistically, allowing blocks to be processed
without waiting for full verification.
Partitioned proofs
To further optimize proof generation, gossip, and verification, we introduce novel optimizations:- Model partitioning: large models are partitioned into smaller sub-models, with separate sub-proofs generated for each partition. This produces smaller sub-proofs that are easier to propagate, handle, and verify.
- Proof sharding: depending on the proof system being utilized, each sub-proof can be further divided into proof shards by breaking the computation trace of the original proof into smaller fragments, leveraging the inherent structure of the proof system.
- Storing proof shards off-chain: instead of embedding these proof shards (for each SPC opcode of an inference transaction) directly on-chain, they are stored off-chain. Blocks include only the outputs of inference SPC opcodes and references to the corresponding proofs, keeping verification metadata minimal.
- Distributed verification: instead of requiring all validator nodes to verify every proof shard for every transaction (replicated verification bottleneck), Ritual distributes the verification workload. Each proof shard is assigned to a subset of validators through uniform deterministic assignment. A quorum of these assigned validators verifies each proof shard, and their consensus is accepted by the network. The output of an inference SPC opcode is considered trusted and fully validated when all of its associated proof shards validated by the quorum of assigned validators. It is worth noting that, in addition to uniform deterministic assignment, EOVMT is compatible with broker-based solutions for verifier assignment, such as Resonance.
Lifecycle
Putting it all together, EOVMT works as follows:1
Sole executor selected
A single node is selected as the sole executor for a heterogeneous workload.
Often, this is done via our optimized fee mechanism and matching protocol,
Resonance.
2
Executor processes request
Next, the node executes the compute workload, generating succinct
sub-proofs for the computation in the process.
3
Sub-proofs gossiped and verified
Then, rather than the complete workload being re-executed to assert
correctness, the generated sub-proofs are verified by a subset of validator
nodes.
4
Validators assert correctness
Finally, the decentralized subset of validators ensure that all sub-proofs
are valid, and the rest of the network applies the state changes without
redundant re-execution or verification. The network relies on the safety
guarantees of the consensus protocol rather than individually verifying
every sub-proof within a block.
Flexible proof systems
Symphony’s EOVMT approach supports multiple proof systems to balance performance and security:- TEE Attestations: Our initial implementation uses Trusted Execution Environments for rapid verification. TEEs provide hardware-backed security guarantees and enable quick transaction confirmation.
- Zero-Knowledge Proofs: We are developing ZK-based implementations in parallel, which will offer stronger cryptographic guarantees for computations requiring enhanced privacy and security.
- Hybrid Solutions: Future implementations may combine both approaches— using TEEs for fast transaction confirmation while adding ZK proofs for additional security guarantees.
Key benefits
With EOVMT, consensus is: Optimized: A single node executes resource-intensive workload and generates
sub-proofs. Decentralized: Each sub-proof is assigned
to a subset of validators in a decentralized manner. Streamlined: The network collectively reaches consensus on the execution’s validity through
validators sharing their approvals on sub-proofs’ verification.