zkSLLabs
zkSealevel_Division_I
TypeScript

An early stage research protocol to eliminate Solana's $34M+ annual decentralization tax through verifiable computation, powered by the Validator Lock economic engine. Developed and designed by ghostarchitects via zKSL Labs (zkSealevel Research Team)

Last updated Dec 2, 2025
17
Stars
4
Forks
2
Issues
0
Stars/day
Attention Score
36
Language breakdown
TypeScript 53.5%
Rust 35.2%
JavaScript 4.4%
Shell 3.5%
PowerShell 2.6%
Dockerfile 0.8%
โ–ธ Files click to expand
README
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—     
  โ•šโ•โ•โ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘     
    โ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘     
   โ–ˆโ–ˆโ–ˆโ•”โ•  โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•— โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•  โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ•โ•  โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•”โ•โ•โ•  โ–ˆโ–ˆโ•‘     
  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
  โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•  โ•šโ•โ•โ•โ•  โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•

zkSealevel

Zero-Knowledge Proof System for Solana Validator State Verification

Solana Rust TypeScript Anchor License CI Status

Documentation โ€ข Architecture โ€ข Deployment โ€ข API Reference


Table of Contents


Overview

zkSealevel is a production-grade zero-knowledge proof anchoring system for Solana, designed to cryptographically verify validator state transitions using STARK proofs and Ed25519-signed domain-separated messages. The system integrates on-chain program verification with off-chain proof generation, orchestration, and indexing to provide a complete end-to-end proof lifecycle.

Core Capabilities

  • Proof Generation: STARK-based zero-knowledge proofs for Solana state validation
  • On-Chain Anchoring: Immutable proof records anchored to Solana via Anchor program
  • Validator Registry: Token-gated validator registration with 1:1 escrow mechanics
  • State Indexing: Real-time synchronization of on-chain proof records to PostgreSQL
  • Cryptographic Integrity: Blake3 hashing, Ed25519 signatures, and strict domain separation

Key Features

  • Byte-precise protocol implementation matching formal specification
  • Deterministic artifact canonicalization for reproducibility
  • Strict transaction ordering enforcement (ComputeBudget โ†’ Ed25519 โ†’ Anchor)
  • Monotonic sequence and slot-range validation
  • Commitment-level reconciliation (processed โ†’ confirmed โ†’ finalized)
  • CI/CD with conformance testing (Node.js โ†” Rust proof_hash validation)

Architecture

The zkSealevel system comprises four primary components operating in concert:

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                            zkSealevel Architecture                           โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ CLIENT INTERFACE โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ–ผ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ ORCHESTRATOR SERVICE (TS) โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”‚ Artifact โ”‚ โ”‚ DS โ”‚ โ”‚ Tx โ”‚ โ”‚ RPC โ”‚ โ•‘ โ•‘ โ”‚Validationโ”‚ โ”‚ Build โ”‚ โ”‚ Assembly โ”‚ โ”‚ Submitterโ”‚ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ”‚ โ”‚ โ–ผ โ–ผ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ PROVER (Rust) โ•‘ โ•‘ INDEXER SERVICE (TS) โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”‚ STARK Circuit โ”‚ โ•‘ โ•‘ โ”‚ Account Monitor โ”‚ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”‚ Blake3 Hash โ”‚ โ•‘ โ•‘ โ”‚ Borsh Decoder โ”‚ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”‚ Ed25519 Sign โ”‚ โ•‘ โ•‘ โ”‚ Commitment Track โ”‚ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ”‚ โ”‚ โ”‚ โ–ผ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ PostgreSQL Databaseโ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ โ”‚ validators โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ proofs โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ indexer_state โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ–ผ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ SOLANA BLOCKCHAIN (Devnet) โ•‘ โ•‘ โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”‚ validator_lock Program (Anchor) โ”‚ โ•‘ โ•‘ โ”‚ Program ID: <YOURPROGRAMID> โ”‚ โ•‘ โ•‘ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ•‘ โ•‘ โ”‚ Instructions: โ”‚ โ•‘ โ•‘ โ”‚ โ€ข initialize โ€ข anchor_proof โ”‚ โ•‘ โ•‘ โ”‚ โ€ข registervalidator โ€ข unlockvalidator โ”‚ โ•‘ โ•‘ โ”‚ โ€ข updateconfig โ€ข initstate โ”‚ โ•‘ โ•‘ โ”‚ โ€ข echo_accounts โ€ข ping โ”‚ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•‘ โ•‘ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘ โ•‘ โ”‚ PDAs (Program Derived Addresses): โ”‚ โ•‘ โ•‘ โ”‚ โ€ข Config [zksl, config] โ”‚ โ•‘ โ•‘ โ”‚ โ€ข AggregatorState [zksl, aggregator] โ”‚ โ•‘ โ•‘ โ”‚ โ€ข RangeState [zksl, range] โ”‚ โ•‘ โ•‘ โ”‚ โ€ข ProofRecord [zksl, proof, hash, seq] โ”‚ โ•‘ โ•‘ โ”‚ โ€ข ValidatorRecord [zksl, validator, pubkey] โ”‚ โ•‘ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Component Interaction Flow

  • Prover generates canonical JSON artifact, computes proof_hash = blake3(artifact), constructs 110-byte Domain Separation (DS) message, signs with aggregator Ed25519 key
  • Orchestrator validates artifacts, enforces idempotency, builds transaction with strict instruction ordering, submits to Solana
  • On-Chain Program (validator_lock) verifies Ed25519 signature over DS, enforces sequence monotonicity, validates slot ranges, writes ProofRecord PDA
  • Indexer monitors program accounts via WebSocket/polling, decodes Borsh-serialized data, upserts to PostgreSQL with commitment tracking
  • CLI/API provides interface for proof submission, validator registration, and system status queries

Protocol Specifications

North Star Route: Public Inputs v2 (Cin, Cout, HB, Sin, S_out)

To strengthen auditability and align with Operation Ghost Ship โ€“ North Star Route, the prover now emits an expanded set of public inputs that bind the proof to a wellโ€‘defined block window and its touched accounts:

  • C_in: Blake3 commitment of the initial state (first slotโ€™s root in the window), hex32
  • C_out: Blake3 commitment of the final state (last slotโ€™s root in the window), hex32
  • H_B: Blockโ€‘window digest (Blake3 over perโ€‘slot state roots), hex32
  • S_in: List of accountโ†’value pairs at window start, serialized as [{ account, value }], value is hex32
  • S_out: List of accountโ†’value pairs at window end, serialized as [{ account, value }], value is hex32
Canonicalization:
  • The orchestrator canonicalizes the PI set as a JSON object with lexicographically sorted keys and stable array order, then computes:
  • starkpihash = blake3(UTF8(canonicaljson({ Cin, Cout, HB, Sin, Sout })))
Anchoring:
  • The orchestrator verifies the STARK sidecar and computes starkpihash from the PI set when present, falling back to the minimal legacy PI format if needed.
  • On v2, starkpihash and starkproofhash are submitted to the program and stored onโ€‘chain (and mirrored to DB), providing a durable receipt that binds the proof to the PI set.
Compatibility:
  • Older proofs without the PI set remain supported; the orchestrator automatically uses the legacy PI hash when v2 fields are absent.

Domain Separation (DS) Message Layout

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              Domain Separation Message (110 bytes)                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Offset  โ”‚ Length โ”‚  Type  โ”‚           Description                โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚    0    โ”‚   14   โ”‚ ASCII  โ”‚ Prefix: "zKSL/anchor/v1"             โ”‚
โ”‚   14    โ”‚    8   โ”‚ u64 LE โ”‚ Chain ID (103 = Devnet)              โ”‚
โ”‚   22    โ”‚   32   โ”‚ Pubkey โ”‚ Program ID                           โ”‚
โ”‚   54    โ”‚   32   โ”‚ Blake3 โ”‚ Proof Hash                           โ”‚
โ”‚   86    โ”‚    8   โ”‚ u64 LE โ”‚ Start Slot (inclusive)               โ”‚
โ”‚   94    โ”‚    8   โ”‚ u64 LE โ”‚ End Slot (inclusive)                 โ”‚
โ”‚  102    โ”‚    8   โ”‚ u64 LE โ”‚ Sequence Number (monotonic)          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        Total: 110 bytes

DS Hash = blake3(DS) โ†’ 32 bytes (stored on-chain)

The DS message is exactly 110 bytes, constructed as follows:

| Field | Offset | Length | Type | Description | |----------------|--------|--------|-----------|--------------------------------------| | Prefix | 0 | 14 | ASCII | "zKSL/anchor/v1" | | Chain ID | 14 | 8 | u64 LE | Solana chain identifier (103=devnet) | | Program ID | 22 | 32 | Pubkey | validator_lock program address | | Proof Hash | 54 | 32 | Blake3 | Hash of canonical artifact JSON | | Start Slot | 86 | 8 | u64 LE | Inclusive lower bound | | End Slot | 94 | 8 | u64 LE | Inclusive upper bound | | Sequence | 102 | 8 | u64 LE | Monotonic proof sequence number |

Total: 110 bytes

DS Hash: ds_hash = blake3(DS) (32 bytes) โ€” stored on-chain for integrity verification

Transaction Ordering Requirements

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘            TRANSACTION INSTRUCTION ORDERING (STRICT)              โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘                                                                   โ•‘
โ•‘   [1]  ComputeBudgetProgram::SetComputeUnitLimit                 โ•‘
โ•‘        โ””โ”€> units >= 200,000 CU                                   โ•‘
โ•‘             โ”‚                                                     โ•‘
โ•‘             โ–ผ                                                     โ•‘
โ•‘   [2]  Ed25519Program::Verify                                    โ•‘
โ•‘        โ”œโ”€> Public Key: aggregator_pubkey                         โ•‘
โ•‘        โ”œโ”€> Message: 110-byte DS                                  โ•‘
โ•‘        โ””โ”€> Signature: Ed25519 (64 bytes)                         โ•‘
โ•‘             โ”‚                                                     โ•‘
โ•‘             โ–ผ                                                     โ•‘
โ•‘   [3]  ValidatorLockProgram::anchor_proof                        โ•‘
โ•‘        โ””โ”€> Discriminator (8) + Borsh Payload (212)              โ•‘
โ•‘                                                                   โ•‘
โ•‘   WARNING: Reordering/omitting instructions โ†’ InvalidInstructionOrderโ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

All anchor_proof transactions MUST include the following instructions in exact order:

  • ComputeBudgetProgram::SetComputeUnitLimit (โ‰ฅ200,000 CU)
  • Ed25519Program::Verify (single signature over 110-byte DS)
  • ValidatorLockProgram::anchor_proof (Anchor instruction with Borsh payload)
Failure to maintain this ordering results in on-chain rejection with InvalidInstructionOrder.

Canonical Artifact Format

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           Canonical Artifact (JSON) - Deterministic                โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                    โ”‚
โ”‚  Canonicalization Rules:                                          โ”‚
โ”‚  - Map keys sorted lexicographically                              โ”‚
โ”‚  - No whitespace or extra formatting                              โ”‚
โ”‚  - Hex fields lowercased                                          โ”‚
โ”‚  - Numbers without scientific notation                            โ”‚
โ”‚  - artifact_id as lowercase UUID v4                               โ”‚
โ”‚                                                                    โ”‚
โ”‚  Storage Path: ARTIFACTDIR/YYYY/MM/DD/{artifactid}.json         โ”‚
โ”‚                                                                    โ”‚
โ”‚  proofhash = blake3(canonicaljson_bytes)                        โ”‚
โ”‚                                                                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Artifacts are deterministically canonicalized using JSON Canonicalization Scheme (JCS):

  • Map keys sorted lexicographically
  • No whitespace or formatting
  • Hex fields lowercased
  • Numbers serialized without scientific notation
  • artifact_id as lowercase UUID v4
  • File storage: ARTIFACTDIR/YYYY/MM/DD/{artifactid}.json
Required Fields:
{
  "artifact_id": "550e8400-e29b-41d4-a716-446655440000",
  "start_slot": 1000,
  "end_slot": 1064,
  "staterootbefore": "0000000000000000000000000000000000000000000000000000000000000001",
  "staterootafter": "0000000000000000000000000000000000000000000000000000000000000002"
}

PDA Seeds and Account Sizes

| Account Type | Seeds | Size (bytes) | |-------------------|----------------------------------------|--------------| | Config | [b"zksl", b"config"] | 168 | | AggregatorState | [b"zksl", b"aggregator"] | 126 | | RangeState | [b"zksl", b"range"] | 128 | | ProofRecord | [b"zksl", b"proof", proof_hash, seq] | 262 | | ValidatorRecord | [b"zksl", b"validator", pubkey] | 136 |


System Components

1. Prover Service (Rust)

Location: prover/src/main.rs

Responsibilities:

  • Generate STARK proofs for constrained computations
  • Canonicalize proof artifacts to deterministic JSON
  • Compute proofhash = blake3(canonicaljson)
  • Construct 110-byte DS message
  • Sign DS with Ed25519 aggregator keypair
  • Output signed proof artifact
Key Dependencies:
  • blake3 1.5
  • ed25519-dalek 2.1
  • serde_json 1.0
  • bs58 0.5
Invocation:
cargo run -p zksl-prover -- \   --input artifact.json \   --out signed_artifact.json \   --agg-key keys/aggregator.json \   --chain-id 103 \   --programid <YOURPROGRAM_ID> \   --seq 1

2. Orchestrator Service (TypeScript/Node.js)

Location: orchestrator/src/server.ts

Responsibilities:

  • REST API for artifact submission (POST /artifact, POST /prove)
  • Idempotency enforcement via Idempotency-Key header
  • Artifact validation and canonicalization
  • DS message construction and verification
  • Transaction assembly with strict instruction ordering
  • On-chain submission via @solana/web3.js
  • Proof anchoring endpoint (POST /anchor)
  • Validator and proof status queries
Endpoints:

| Method | Path | Description | |--------|-------------------------|--------------------------------------| | POST | /artifact | Submit proof artifact for validation | | POST | /prove | Submit + canonicalize artifact | | POST | /anchor | Anchor validated artifact on-chain | | GET | /proof/:artifact_id | Query proof record status | | GET | /validator/:pubkey | Query validator registration | | GET | /health | Service health check |

Configuration (via environment):

PORT=8080 RPC_URL=https://api/devnet.solana.com PROGRAMIDVALIDATORLOCK=<YOURPROGRAM_ID> CHAIN_ID=103 AGGREGATORKEYPAIRPATH=./keys/aggregator.example.json ARTIFACT_DIR=./orchestrator/data/artifacts DATABASE_URL=postgresql://postgres:postgres@localhost:5432/zksl

3. Indexer Service (TypeScript/Node.js)

Location: indexer/src/index.ts

Responsibilities:

  • Monitor Solana program accounts via WebSocket subscriptions
  • Poll for missed account updates
  • Decode Borsh-serialized account data
  • Upsert validators and proofs tables in PostgreSQL
  • Track commitment levels (processed โ†’ confirmed โ†’ finalized)
  • Persist scan position for crash recovery
Database Tables:
  • validators: validator pubkey, status, escrow, lock/unlock timestamps
  • proofs: artifactid, proofhash, seq, dshash, state roots, commitmentlevel, txid
  • indexerstate: lastscan_ts for cursor persistence
Configuration:
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/zksl RPC_URL=https://api.devnet.solana.com PROGRAMIDVALIDATORLOCK=<YOURPROGRAM_ID> MINFINALITYCOMMITMENT=finalized

4. On-Chain Program (Anchor/Rust)

Location: programs/validator_lock/src/lib.rs

Program ID (Devnet): <YOURPROGRAMID>

Instructions:

| Instruction | Description | |----------------------|--------------------------------------------------| | initialize | Admin-only: set mint, aggregator, chain_id | | register_validator | Lock exactly 1 token, create ValidatorRecord | | unlock_validator | Release escrowed token, mark validator unlocked | | update_config | Admin-only: update aggregator keys, pause state | | anchor_proof | Verify Ed25519 signature, write ProofRecord PDA | | init_state | Initialize AggregatorState and RangeState PDAs | | echo_accounts | Debug: log resolved account addresses | | ping | No-op instruction for testing |

Validation Rules (enforced in anchor_proof):

  • ComputeBudget instruction present with โ‰ฅ200,000 CU
  • Exactly 1 Ed25519 instruction immediately preceding anchor_proof
  • Ed25519 public key matches current aggregator (or next if seq โ‰ฅ activation_seq)
  • Ed25519 message matches constructed 110-byte DS
  • ds_hash in instruction payload matches blake3(DS)
  • seq is monotonically increasing (first proof must be seq=1)
  • startslot โ‰ค endslot and endslot - startslot + 1 โ‰ค 2048
  • Slot ranges contiguous (startslot = lastend_slot + 1, first range starts at 1)
  • Clock skew โ‰ค 120 seconds
  • Config not paused
Error Codes:
  • 6000: InvalidMint
  • 6001: InvalidLockAmount
  • 6002: AlreadyRegistered
  • 6003: NotRegistered
  • 6004: EscrowMismatch
  • 6005: InvalidSignature
  • 6006: AggregatorMismatch
  • 6007: ProofAlreadyAnchored
  • 6008: StatusNotActive
  • 6009: MathOverflow
  • 6010: Paused
  • 6011: Unauthorized
  • 6012: NonMonotonicSeq
  • 6013: RangeOverlap
  • 6014: ClockSkew
  • 6015: BadEd25519Order
  • 6016: BadDomainSeparation
  • 6017: InsufficientBudget

5. CLI Tool (TypeScript/Node.js)

Location: cli/src/main.ts

Commands:

# Initialize on-chain config npx tsx cli/src/main.ts init-config \   --keypair payer.json \   --mint <MINT_PUBKEY> \   --agg-key keys/aggregator.json \   --chain-id 103

Register validator (lock 1 token)

npx tsx cli/src/main.ts register \ --keypair validator.json \ --mint <MINT_PUBKEY>

Unlock validator (release token)

npx tsx cli/src/main.ts unlock \ --keypair validator.json

Query validator status

npx tsx cli/src/main.ts status --validator <PUBKEY>

Submit proof artifact

npx tsx cli/src/main.ts prove \ --keypair submitter.json \ --artifact artifact.json

Deployment Guide

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    DEPLOYMENT WORKFLOW                             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                    โ”‚
โ”‚  [Phase 1] Environment Setup                                      โ”‚
โ”‚    โ”œโ”€ Install: Node.js 20.x, Rust 1.70+, Solana CLI 1.18+        โ”‚
โ”‚    โ”œโ”€ Configure: Devnet RPC, wallet keypair                       โ”‚
โ”‚    โ””โ”€ Dependencies: npm install, cargo build                      โ”‚
โ”‚                                                                    โ”‚
โ”‚  [Phase 2] Program Deployment                                     โ”‚
โ”‚    โ”œโ”€ Build: anchor build                                         โ”‚
โ”‚    โ”œโ”€ Deploy: anchor deploy --provider.cluster devnet             โ”‚
โ”‚    โ””โ”€ Verify: solana program show <PROGRAM_ID>                    โ”‚
โ”‚                                                                    โ”‚
โ”‚  [Phase 3] Infrastructure Provisioning                            โ”‚
โ”‚    โ”œโ”€ PostgreSQL: docker run postgres:15                          โ”‚
โ”‚    โ”œโ”€ Migrations: bash scripts/db_migrate.sh                      โ”‚
โ”‚    โ””โ”€ Keys: node scripts/genaggregatorkey.js                    โ”‚
โ”‚                                                                    โ”‚
โ”‚  [Phase 4] On-Chain Initialization                                โ”‚
โ”‚    โ”œโ”€ Config: npx tsx cli/src/main.ts init-config                โ”‚
โ”‚    โ””โ”€ Validator: npx tsx cli/src/main.ts register                โ”‚
โ”‚                                                                    โ”‚
โ”‚  [Phase 5] Service Launch                                         โ”‚
โ”‚    โ”œโ”€ Orchestrator: node orchestrator/dist/server.js              โ”‚
โ”‚    โ”œโ”€ Indexer: node indexer/dist/index.js                         โ”‚
โ”‚    โ””โ”€ Health: curl http://localhost:8080/health                   โ”‚
โ”‚                                                                    โ”‚
โ”‚  [Phase 6] Operational Verification                               โ”‚
โ”‚    โ”œโ”€ Submit: curl -X POST /prove                                 โ”‚
โ”‚    โ”œโ”€ Anchor: curl -X POST /anchor                                โ”‚
โ”‚    โ””โ”€ Query: psql -c "SELECT * FROM proofs"                       โ”‚
โ”‚                                                                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Prerequisites

| Tool | Version | Purpose | |--------------|---------|--------------------------------------------| | Node.js | 20.x | TypeScript service runtime | | Rust | 1.70+ | Prover and Anchor program compilation | | Anchor CLI | 0.30.1 | Solana program framework | | Solana CLI | 1.18+ | Blockchain interaction | | PostgreSQL | 15+ | Indexer database backend | | Docker | 20+ | Optional containerized deployment |

Environment Setup

  • Clone Repository
git clone https://github.com/zkSLLabs/zkSealevelDivisionI.git
   cd zkSealevelDivisionI
  • Install Dependencies
npm install
   npm --prefix orchestrator install
   npm --prefix indexer install
   npm --prefix cli install
  • Build Services
npm run build:services
   cargo build --release --manifest-path prover/Cargo.toml

Devnet Deployment

Step 1: Deploy Program

# Configure Solana CLI for Devnet
solana config set --url https://api.devnet.solana.com

Ensure sufficient SOL balance (โ‰ฅ3.2 SOL for deployment)

solana balance solana airdrop 5 # if needed

Build and deploy program

anchor build anchor deploy --provider.cluster devnet --program-name validator_lock

Note the deployed program ID

anchor keys list

validatorlock: <YOURPROGRAM_ID>

Step 2: Configure Environment

Create .env in project root:

# Solana Configuration RPC_URL=https://api.devnet.solana.com PROGRAMIDVALIDATORLOCK=<YOURPROGRAM_ID> CHAIN_ID=103 MINFINALITYCOMMITMENT=finalized

Service Configuration

PORT=8080 ARTIFACT_DIR=./orchestrator/data/artifacts AGGREGATORKEYPAIRPATH=./keys/aggregator.json

Database Configuration

DATABASE_URL=postgresql://postgres:postgres@localhost:5432/zksl

Step 3: Generate Aggregator Key

mkdir -p keys
node scripts/genaggregatorkey.js keys/aggregator.json

Output format (keys/aggregator.json):

{   "secretKey": "64-byte-hex-seed-and-key-concatenated" }

Step 4: Initialize On-Chain Config

npx tsx cli/src/main.ts init-config \
  --keypair ~/.config/solana/id.json \
  --mint <YOURZKSLMINT_PUBKEY> \
  --agg-key keys/aggregator.json \
  --chain-id 103

Requirements:

  • Payer must have sufficient SOL for rent
  • <YOURZKSLMINT_PUBKEY> must be a valid SPL token mint
  • Config can only be initialized once

Step 5: Apply Database Migrations

# Start PostgreSQL (if not running)
docker run -d \
  --name zksl-postgres \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=postgres \
  -e POSTGRES_DB=zksl \
  -p 5432:5432 \
  postgres:15

Apply migrations

bash scripts/db_migrate.sh

Migrations applied:

  • 001_init.sql: Create validators and proofs tables
  • 002indexerstate.sql: Create indexer_state tracking
  • 003indexercursor.sql: Add cursor fields for scan position
  • 004indexerlastsignature.sql: Add lastsignature for deduplication

Step 6: Start Services

Orchestrator:

npm --prefix orchestrator run build node orchestrator/dist/src/server.js 

Listening on port 8080

Indexer:

npm --prefix indexer run build node indexer/dist/index.js 

Monitoring program accounts...

Step 7: Register Validator

npx tsx cli/src/main.ts register \
  --keypair validator.json \
  --mint <YOURZKSLMINT_PUBKEY>

Requirements:

  • Validator ATA must hold exactly 1 token (respecting mint decimals)
  • Token will be transferred to escrow PDA
  • ValidatorRecord created with status='Active'

Step 8: Submit and Anchor Proof

Create artifact:

curl -X POST http://localhost:8080/prove \   -H 'Idempotency-Key: proof-001' \   -H 'Content-Type: application/json' \   -d '{     "start_slot": 1000,     "end_slot": 1064,     "staterootbefore": "0000000000000000000000000000000000000000000000000000000000000001",     "staterootafter": "0000000000000000000000000000000000000000000000000000000000000002"   }'

Response:

{   "artifact_id": "550e8400-e29b-41d4-a716-446655440000",   "proof_hash": "abcd1234...",   "status": "canonicalized" }

Anchor proof:

curl -X POST http://localhost:8080/anchor \   -H 'Idempotency-Key: anchor-001' \   -H 'Content-Type: application/json' \   -d '{     "artifact_id": "550e8400-e29b-41d4-a716-446655440000"   }'

Response:

{   "txid": "5J7Z...",   "seq": 1,   "status": "anchored" }

Step 9: Verify Indexer Sync

# Query orchestrator
curl http://localhost:8080/proof/550e8400-e29b-41d4-a716-446655440000

Query database

psql $DATABASEURL -c "SELECT * FROM proofs WHERE artifactid = '550e8400-e29b-41d4-a716-446655440000';"

Expected: commitment_level progresses from 0 โ†’ 1 โ†’ 2 as transaction confirms.


API Reference

Orchestrator Endpoints

POST /artifact

Submit proof artifact for validation and canonicalization.

Request Headers:

  • Idempotency-Key (required): Unique key for deduplication
  • Content-Type: application/json
Request Body:
{   "start_slot": 1000,   "end_slot": 1064,   "staterootbefore": "hex(32 bytes)",   "staterootafter": "hex(32 bytes)" }

Response (201 Created):

{   "artifact_id": "uuid-v4",   "proof_hash": "hex(32 bytes)",   "ds_hash": "hex(32 bytes)",   "status": "canonicalized",   "filepath": "orchestrator/data/artifacts/YYYY/MM/DD/artifactid.json" }

Error Responses:

  • 400: Invalid artifact format
  • 409: Idempotency key conflict
  • 500: Internal server error

POST /prove

Submit artifact and automatically anchor on-chain (combines /artifact + /anchor).

Request/Response: Same as /artifact + /anchor combined

POST /anchor

Anchor previously submitted artifact on-chain.

Request Headers:

  • Idempotency-Key (required)
  • Content-Type: application/json
Request Body:
{   "artifact_id": "uuid-v4" }

Response (200 OK):

{   "txid": "base58-signature",   "seq": 1,   "ds_hash": "hex(32 bytes)",   "status": "anchored",   "commitment": "processed" }

Error Responses:

  • 404: Artifact not found
  • 409: Already anchored or idempotency conflict
  • 500: Transaction failed

GET /proof/:artifact_id

Query proof record status.

Response (200 OK):

{   "artifact_id": "uuid-v4",   "proof_hash": "hex(32 bytes)",   "seq": 1,   "txid": "base58-signature",   "commitment_level": 2,   "start_slot": 1000,   "end_slot": 1064,   "staterootbefore": "hex(32 bytes)",   "staterootafter": "hex(32 bytes)",   "submitted_by": "base58-pubkey",   "ts": "ISO-8601 timestamp" }

GET /validator/:pubkey

Query validator registration status.

Response (200 OK):

{   "pubkey": "base58-pubkey",   "status": "Active",   "escrow": "base58-pubkey",   "lock_ts": "ISO-8601 timestamp",   "unlock_ts": null,   "num_accepts": 5,   "last_seen": "ISO-8601 timestamp" }

GET /health

Service health check.

Response (200 OK):

{   "status": "healthy",   "version": "0.1.0",   "uptime_seconds": 3600,   "rpc_url": "https://api.devnet.solana.com" }


Database Schema

Table: validators

Tracks registered validators and their escrow state.

CREATE TABLE validators (
  pubkey TEXT PRIMARY KEY,
  status TEXT NOT NULL CHECK (status IN ('Active', 'Unlocked')),
  escrow TEXT NOT NULL,
  lock_ts TIMESTAMPTZ NOT NULL,
  unlock_ts TIMESTAMPTZ,
  num_accepts BIGINT NOT NULL DEFAULT 0,
  last_seen TIMESTAMPTZ
);

CREATE INDEX idxvalidatorsstatus ON validators(status); CREATE INDEX idxvalidatorslastseen ON validators(lastseen);

Table: proofs

Stores anchored proof records with commitment tracking.

CREATE TABLE proofs (
  artifact_id UUID NOT NULL UNIQUE,
  start_slot BIGINT NOT NULL,
  end_slot BIGINT NOT NULL,
  proofhash BYTEA NOT NULL CHECK (octetlength(proof_hash) = 32),
  dshash BYTEA NOT NULL CHECK (octetlength(ds_hash) = 32),
  artifactlen INT NOT NULL CHECK (artifactlen BETWEEN 0 AND 524288),
  staterootbefore BYTEA NOT NULL CHECK (octetlength(stateroot_before) = 32),
  staterootafter BYTEA NOT NULL CHECK (octetlength(stateroot_after) = 32),
  submitted_by TEXT NOT NULL,
  aggregator_pubkey TEXT NOT NULL,
  ts TIMESTAMPTZ NOT NULL,
  seq BIGINT NOT NULL,
  commitmentlevel SMALLINT NOT NULL CHECK (commitmentlevel IN (0, 1, 2)),
  da_params BYTEA,
  txid TEXT NOT NULL UNIQUE,
  PRIMARY KEY (proof_hash, seq)
);

CREATE INDEX idxproofsartifactid ON proofs(artifactid); CREATE INDEX idxproofsseq ON proofs(seq); CREATE INDEX idxproofscommitment ON proofs(commitment_level); CREATE INDEX idxproofsslotrange ON proofs(startslot, end_slot);

Commitment Levels:

  • 0: Processed
  • 1: Confirmed
  • 2: Finalized

Table: indexer_state

Tracks indexer scan position for crash recovery.

CREATE TABLE indexer_state (
  id SMALLINT PRIMARY KEY DEFAULT 1 CHECK (id = 1),
  lastscants TIMESTAMPTZ,
  last_slot BIGINT,
  last_signature TEXT
);

Development Workflow

Running Tests

Unit Tests (Orchestrator):

npm --prefix orchestrator run test

Unit Tests (Indexer):

npm --prefix indexer run test

Known Answer Tests (KATs):

npm run test:kats

KATs validate:

  • DS hash construction
  • PDA derivation
  • Canonical JSON serialization
  • Borsh encoding
  • Ed25519 signature layout
  • Negative test cases (invalid DS, wrong pubkey, etc.)
Conformance Tests (Node.js โ†” Rust):
npm run conformance

Ensures proof_hash and DS construction match between TypeScript and Rust implementations.

Rust Tests (Prover):

cargo test --manifest-path prover/Cargo.toml

Anchor Tests (Program):

cd programs/validator_lock anchor test

Continuous Integration

GitHub Actions workflow (.github/workflows/ci.yml) runs on every push/PR:

  • node-tests: Install deps, lint, build services, run orchestrator tests, run KATs
  • indexer-tests: Spin up PostgreSQL service, apply migrations, run indexer tests
  • rust-tests: Run cargo test --workspace --all-features
  • conformance: Generate aggregator key, run Node vs Rust proof_hash validation
All jobs must pass before merging.

Local Development with Docker

# Start infrastructure (Postgres, Redis, local validator)
docker compose -f docker/compose.yml up -d

Build and start services

npm run build:services npm --prefix orchestrator run start & npm --prefix indexer run start &

Tail logs

docker compose -f docker/compose.yml logs -f orchestrator indexer

Testing & Validation

Conformance Test Suite

Located in scripts/:

| Test | Purpose | |-----------------------|--------------------------------------------------| | dskat.js | Validate DS message construction and dshash | | dsnegativekat.js | Test error handling for invalid DS | | anchorproofkat.js | Verify Anchor instruction Borsh encoding | | canonical_kat.js | Test artifact canonicalization determinism | | pda_kat.js | Validate PDA derivation against known addresses | | conformance.js | Cross-language proof_hash validation (TS vs Rust)|

Running Individual KATs

node scripts/kats/ds_kat.js
node scripts/kats/pda_kat.js
node scripts/kats/anchorproofkat.js

End-to-End Test (Localnet)

# Start local validator
solana-test-validator -r

Deploy program

anchor deploy --provider.cluster localnet

Run E2E script

npx tsx scripts/e2e_localnet.ts

E2E script performs:

  • Initialize config
  • Register validator
  • Submit proof artifact
  • Anchor proof on-chain
  • Wait for indexer sync
  • Query proof status from API and DB
  • Verify commitment progression

Project Status

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                        PROJECT STATUS                            โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘                                                                  โ•‘
โ•‘  Deployment Status:          [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ] 100%    โ•‘
โ•‘    โ””โ”€ Devnet Program: <YOURPROGRAMID>                              โ•‘
โ•‘                                                                  โ•‘
โ•‘  Core Services:              [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ] 100%    โ•‘
โ•‘    โ”œโ”€ Orchestrator:          OPERATIONAL                        โ•‘
โ•‘    โ”œโ”€ Indexer:               OPERATIONAL                        โ•‘
โ•‘    โ”œโ”€ Prover:                REFERENCE IMPL COMPLETE            โ•‘
โ•‘    โ””โ”€ CLI:                   COMPLETE                           โ•‘
โ•‘                                                                  โ•‘
โ•‘  Protocol Implementation:    [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ] 100%    โ•‘
โ•‘    โ”œโ”€ DS Message:            VALIDATED                          โ•‘
โ•‘    โ”œโ”€ Ed25519 Preflight:     ENFORCED                           โ•‘
โ•‘    โ”œโ”€ Transaction Ordering:  STRICT                             โ•‘
โ•‘    โ””โ”€ PDA Derivation:        VERIFIED                           โ•‘
โ•‘                                                                  โ•‘
โ•‘  Testing & Validation:       [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  ] 95%     โ•‘
โ•‘    โ”œโ”€ Unit Tests:            PASSING (12 orchestrator, 4 idx)   โ•‘
โ•‘    โ”œโ”€ KATs:                  PASSING (7 suites)                 โ•‘
โ•‘    โ”œโ”€ Conformance:           PASSING (Node โ†” Rust)              โ•‘
โ•‘    โ””โ”€ CI/CD:                 CONFIGURED                         โ•‘
โ•‘                                                                  โ•‘
โ•‘  Documentation:              [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ] 100%    โ•‘
โ•‘    โ”œโ”€ README:                COMPREHENSIVE                      โ•‘
โ•‘    โ”œโ”€ Execution Plan:        COMPLETE                           โ•‘
โ•‘    โ””โ”€ API Reference:         DOCUMENTED                         โ•‘
โ•‘                                                                  โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ NEXT MILESTONES โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ [ ] Full STARK AIR for zk-BPF bytecode validation โ”‚ โ”‚ [ ] Production aggregator key rotation ceremony โ”‚ โ”‚ [ ] Mainnet deployment + security audit โ”‚ โ”‚ [ ] Performance benchmarking (target: <2s latency) โ”‚ โ”‚ [ ] Grafana + Prometheus monitoring dashboard โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Current State

  • Program Deployment: Successfully deployed to Devnet at <YOURPROGRAMID>
  • Orchestrator: Operational on Devnet with full artifact handling and transaction submission
  • Indexer: Monitoring Devnet program accounts and syncing to PostgreSQL with commitment tracking
  • Prover: Reference implementation complete with Blake3 hashing and Ed25519 signing; STARK circuit integration in progress
  • CI/CD: Test suites configured with conformance validation
  • Test Coverage:
- Orchestrator: Unit tests + KATs + idempotency tests - Indexer: Unit tests + Borsh codec tests + commitment reconciliation - Conformance: Node โ†” Rust proof_hash validation passing - Program: Rust unit tests covering account sizes (Config=168, ValidatorRecord=136, ProofRecord=262), DS prefix (14 bytes), error codes (6000-6017)

Completed Objectives (Devnet POC Execution Plan)

  • [x] On-chain program with DS/Ed25519/sequence/range/skew checks
  • [x] Orchestrator endpoints (/artifact, /anchor, /prove) with DS construction
  • [x] Indexer + PostgreSQL migrations with commitment tracking
  • [x] CLI for init-config, register, unlock, prove, status
  • [x] Devnet deployment runbook and CI workflow
  • [x] Deterministic artifact canonicalization with stable artifact_id
  • [x] Transaction ordering enforcement (ComputeBudget โ†’ Ed25519 โ†’ Anchor)
  • [x] Conformance test suite (Node vs Rust)
  • [x] PDA derivation validation
  • [x] Known Answer Tests for DS, Borsh, Ed25519 layout
  • [x] Idempotency via Idempotency-Key header
  • [x] Database schema with validators, proofs, indexer_state
  • [x] Commitment-level reconciliation (processed โ†’ confirmed โ†’ finalized)
  • [x] Error mapping and comprehensive error codes

In Progress

  • [ ] STARK prover integration with full AIR for Sealevel VM bytecode validation
  • [ ] Production aggregator key rotation ceremony
  • [ ] Mainnet deployment preparation and security audit
  • [ ] Performance benchmarking and optimization (target: <2s end-to-end latency)
  • [ ] Monitoring dashboard with Grafana + Prometheus

Known Limitations and Implementation Notes

  • BPF Stack Constraints: The initstate instruction must be called before the first anchorproof to initialize AggregatorState and RangeState PDAs. This separation was necessary to avoid BPF stack overflow (4096 byte limit) when combining initialization with full proof validation logic.
  • Prover Integration: Prover currently uses reference computation for DS signing; full zk-BPF AIR with Winterfell STARK circuits is available via feature flag (stark) but not yet integrated into orchestrator verification hook.
  • Aggregator Key Rotation: Rotation mechanism implemented with activationseq support; admin can update aggregator keys via updateconfig instruction.
  • Data Availability: da_params field (12 bytes) in ProofRecord is reserved for future data availability sampling parameters; currently zeroed.
  • Indexer Scalability: Current implementation uses WebSocket subscriptions with polling fallback; for high-throughput production use, consider dedicated Geyser plugin.
  • Key Management: CLI requires manual Solana keypair files; production deployments should consider hardware wallet or MPC integration.
  • Commitment Tracking: Indexer reconciles commitment levels asynchronously; initial proofs appear with commitment_level=0 (processed) and upgrade to 1 (confirmed) and 2 (finalized) within minutes.

Technical Documentation

Comprehensive Test Report

Test Validation Summary

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘              zkSealevel Test Validation Status                   โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘                                                                  โ•‘
โ•‘  Test Coverage:                                                  โ•‘
โ•‘  โ€ข Known Answer Tests (KATs)                     [5 suites]      โ•‘
โ•‘  โ€ข Rust Unit Tests                               [2 tests]       โ•‘
โ•‘  โ€ข On-Chain Program Verification                 [DEPLOYED]      โ•‘
โ•‘  โ€ข Protocol Conformance Validation               [PASSING]       โ•‘
โ•‘                                                                  โ•‘
โ•‘  Test Methodology:                                               โ•‘
โ•‘  โ€ข Domain Separation (DS) layout verification                    โ•‘
โ•‘  โ€ข Anchor instruction Borsh encoding validation                  โ•‘
โ•‘  โ€ข Canonical JSON serialization compliance                       โ•‘
โ•‘  โ€ข Program Derived Address (PDA) derivation                      โ•‘
โ•‘  โ€ข Account size specification matching                           โ•‘
โ•‘                                                                  โ•‘
โ•‘  Golden Vectors (Known Answer Tests):                            โ•‘
โ•‘  โ€ข scripts/kats/ds_kat.js            - DS construction           โ•‘
โ•‘  โ€ข scripts/kats/dsnegativekat.js   - Error handling            โ•‘
โ•‘  โ€ข scripts/kats/anchorproofkat.js  - Borsh encoding            โ•‘
โ•‘  โ€ข scripts/kats/canonical_kat.js     - JSON canonicalization     โ•‘
โ•‘  โ€ข scripts/kats/pda_kat.js           - PDA derivation            โ•‘
โ•‘                                                                  โ•‘
โ•‘  Conformance Testing:                                            โ•‘
โ•‘  โ€ข scripts/conformance.js            - Node โ†” Rust validation    โ•‘
โ•‘                                                                  โ•‘
โ•‘  Quality Metrics:                                                โ•‘
โ•‘  โ€ข #![forbid(unsafe_code)] enforced                              โ•‘
โ•‘  โ€ข #![deny(clippy::unwrapused, clippy::expectused)]            โ•‘
โ•‘  โ€ข All errors via Result<T,E>                                    โ•‘
โ•‘  โ€ข Account sizes verified: Config=168, ValidatorRecord=136,      โ•‘
โ•‘    AggregatorState=126, RangeState=128, ProofRecord=262          โ•‘
โ•‘  โ€ข DS prefix verified: "zKSL/anchor/v1" (14 bytes)               โ•‘
โ•‘  โ€ข DS total length verified: 110 bytes                           โ•‘
โ•‘                                                                  โ•‘
โ•‘  Deployment Status:                                              โ•‘
โ•‘  โ€ข Program ID: <YOURPROGRAMID>                                  โ•‘
โ•‘  โ€ข Network: Solana Devnet                                        โ•‘
โ•‘  โ€ข Status: OPERATIONAL                                           โ•‘
โ•‘                                                                  โ•‘
โ•‘  Test Execution:                                                 โ•‘
โ•‘  โ€ข npm run test:kats     - Run all KATs                          โ•‘
โ•‘  โ€ข npm run conformance   - Cross-language validation             โ•‘
โ•‘  โ€ข cargo test            - Rust unit tests                       โ•‘
โ•‘                                                                  โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Validation Highlights:

The zkSealevel test suite provides comprehensive validation of the protocol implementation:

  • Account Size Verification: Byte-precise validation of all on-chain account layouts matching specification exactly
- Config: 168 bytes (32+32+32+32+8+8+1+1+22) - ValidatorRecord: 136 bytes (32+32+8+1+8+55) - AggregatorState: 126 bytes (32+8+86) - RangeState: 128 bytes (8+120) - ProofRecord: 262 bytes (16+8+8+32+4+32+32+32+32+8+8+32+1+12+5)
  • Protocol Constants: All constants verified against specification
- DS_PREFIX: "zKSL/anchor/v1" (14 bytes) - MAXSLOTSPER_ARTIFACT: 2048 - MAXCLOCKSKEW_SECS: 120
  • Cryptographic Integrity: Blake3 hash computation, Ed25519 signature verification, 110-byte domain separation message construction
  • Code Quality: Strictest Rust lints enforced
- #![forbid(unsafe_code)] - #![deny(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)] - #![deny(clippy::unwrapused, clippy::expectused, clippy::panic)]

Key Validation Areas:

| Category | Tests | Status | Location | |----------|-------|--------|----------| | Domain Separation Protocol | 2 KATs | PASSING | scripts/kats/dskat.js, dsnegative_kat.js | | Anchor Instruction Encoding | 1 KAT | PASSING | scripts/kats/anchorproofkat.js | | Canonical JSON | 1 KAT | PASSING | scripts/kats/canonical_kat.js | | PDA Derivation | 1 KAT | PASSING | scripts/kats/pda_kat.js | | Rust Unit Tests | 2 tests | PASSING | programs/validator_lock/src/lib.rs | | Conformance (Node โ†” Rust) | 1 suite | PASSING | scripts/conformance.js | | On-Chain Deployment | Verified | OPERATIONAL | PROGRAMID> |


Protocol Specifications

For detailed protocol specifications, refer to:

  • Technical Specification: TECHNICAL_SPECIFICATION.md โ€” byte-precise protocol contracts, account layouts, instruction encodings
  • Sprint Plan: Devnet-Sprint-Plan.md โ€” development tasks and acceptance criteria
  • Testing Gap Analysis: Devnet-Testing-Gap-Analysis.md โ€” test coverage matrix and validation strategy

Contributing

This is a research project developed by zKSL Labs (zkSealevel Research Team). For inquiries or collaboration proposals, please contact the development team.

Code Standards

  • Rust: Follow cargo fmt and cargo clippy recommendations
  • TypeScript: ESLint + Prettier with strict type checking
  • Git: Conventional commits (feat, fix, chore, docs, test)
  • Testing: All new features must include unit tests and update KATs if protocol-impacting

Pull Request Process

  • Create feature branch from main
  • Implement changes with tests
  • Run full test suite locally (npm run test:all, cargo test --workspace)
  • Push and open PR with description linking to issue/spec
  • CI must pass (node-tests, indexer-tests, rust-tests, conformance)
  • Maintainer review and approval required before merge

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License in the LICENSE file at the repository root.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Developed by Ghost Architects via zKSL Labs

zkSealevel Research Team

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท zkSLLabs/zkSealevel_Division_I ยท Updated daily from GitHub