Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

144 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logos Blockchain Circuits

ZK-SNARK circuits for the Logos Blockchain, built with Circom and distributed as linkable static libraries.

Circuits

Circuit What it proves
PoQ — Proof of Quota A node has quota to participate in a blend session
PoL — Proof of Leadership A note holder would win the leadership lottery for a given slot
PoC — Proof of Claim A voucher is validly owned and its nullifier is correctly derived
Signature Knowledge of secret keys and their corresponding public keys

Architecture

flowchart TD
    A["Source circuit\n({circuit}.circom)"]
    B("Circom compilation")
    C["{circuit}_cpp/"]
    R["{circuit}.r1cs"]
    PK("Proving key generation")
    Z["proving_key.zkey\nverification_key.json"]
    DAT["{circuit}.dat"]
    D["src/\n(circom_adapter, types, ...)"]
    D2["src/{circuit}/ffi.cpp"]
    E("Makefile")
    F["lib{circuit}.a\nlibgmp.a"]
    G["lbc-{circuit}-sys"]

    A --> B -->|Generates| C
    B -->|Generates| R --> PK --> Z
    B -->|Generates| DAT
    D -.-> C
    D2 -.-> C
    C --> E -->|Produces| F
    F -->|Linked by| G
    DAT -->|Embedded into| G
Loading

Each circuit is compiled from Circom source to C++, combined with shared common files (circom_adapter, types, ...) and a circuit-specific FFI layer (src/{circuit}/ffi.cpp), and built into a static library.

The Rust sys crates link directly against these libraries.

Nix

The flake packages the release bundle of the version in rust/Cargo.toml, for x86_64-linux, aarch64-linux and aarch64-darwin. Pin it to a release tag:

{
  inputs.logos-blockchain-circuits.url = "github:logos-blockchain/logos-blockchain-circuits/<tag>";

  # logos-blockchain-circuits.packages.${system}.default
}

Docs

Document What's in it
CHANGELOG.md What changed and why, by version
CONTRIBUTING.md Dev setup, build details, and release process
rust/README.md How to use the Rust sys crates
docs/build-pipeline.md CI build steps, from .circom source to release artifacts

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages