Scalable layer-2 registry and prover for subspaces

Overview

Subspacer

Note: this does not fully implement the functionality described in the Spaces protocol yet and should be considered a proof of concept.

Scalable layer-2 registry and prover for subspaces.

How it works

The registry uses a zero-knowledge virtual machine (zkVM) to prove the correct execution of transactions associated with subspaces. It produces a receipt which contains a verifiable proof for the execution of the Spaces program and some public outputs.

Installation

Clone the repo and build binaries with cargo:

cargo build --release

To build the registry binary with GPU acceleration, use metal or cuda features depending on your machine.

cargo build --release --package registry --features "metal"

Quick Start

The subs command line utility can be used to generate keys and interact with the registry to create new subspaces, transfer ownership and renew names.

First, let's create a public/private key pair to use:

$ subs key gen
Generated k-db732761.priv
Public key: db732761ee9d82ba26aedc593d5c263bacd91f4b75a71712215ea94c5ece9ffe

Create a transaction to register bob@example:

$ subs create bob@example --private-key k-49f8d3a9.priv
{
  "example": {
    "version": 0,
    "transactions": [
      {
        "name": "bob",
        "owner": "db732761ee9d82ba26aedc593d5c263bacd91f4b75a71712215ea94c5ece9ffe"
      }
    ]
  }
}

We'll assume that we're operating @example and responsible for including this transaction.

$ registry add bob.json

Check the status of our changes

$ registry status
Changes to prove and commit:
Total spaces: 1, Total Registrations: 1, Total Updates: 0
  (use "registry commit" to prove and commit changes)

Prove and commit the changes:

$ registry commit

Initial commit does not requiring proving as the tree is empty but adding more names will run the prover and should produce something like this:

-------------------------------------
- Using Prover: local
- Took: 2.34743775s
- Receipt Verified

Journal Output
-------------------------------------
Total Spaces: 1

        ID: 50d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c
        Merkle Root Changes: 
        - Initial: a08d760a9cd74c8bb4b9a0acba82ee31473faa5d654d2f25caf716033c67d0be
        - Final: 8fe93aad37f12e1d11126f2fd3d77fb08eff4f59222cc64e4eacbc64413bd9ad

Using Bonsai

If you have a bonsai API key, you can run the prover remotely.

BONSAI_API_KEY="YOUR_API_KEY" BONSAI_API_URL="BONSAI_URL" registry commit

License

This project is licensed under the Apache 2.0.

You might also like...
As part of the IOP Stack™ Morpheus is a toolset to have gatekeeper-free identity management and verifiable claims as a 2nd layer on top of a blockchain

Internet of People Internet of People (IoP) is a software project creating a decentralized software stack that provides the building blocks and tools

Official implementation of the YeeCo Root Chain (Layer 1)
Official implementation of the YeeCo Root Chain (Layer 1)

yeeroot Official implementation of the YeeCo Root Chain (Layer 1) YeeCo is a permissionless, secure, high performance and scalable public blockchain p

A Rust implementation of the Message Layer Security group messaging protocol

Molasses An extremely early implementation of the Message Layer Security group messaging protocol. This repo is based on draft 4 of the MLS protocol s

OpenSSL compatibility layer for the Rust SSL/TLS stack
OpenSSL compatibility layer for the Rust SSL/TLS stack

An OpenSSL compatibility layer for the Rust SSL/TLS stack. MesaLink is an OpenSSL compatibility layer for the Rust SSL/TLS stack, namely rustls, webpk

Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer of security for your most sensitive files.

Koofr Vault https://vault.koofr.net Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer o

Consensus layer peer-to-peer connection setup

Consensus Layer P2P This project is a basic setup for a consensus layer peer-to-peer connection, as specified in the consensus layer specifications of

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.

stress4844 Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844 blobs. ca

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.

A Bitcoin Native Smart Contract & Finance Layer
A Bitcoin Native Smart Contract & Finance Layer

What's bitcoinOS bitcoinOS A Bitcoin Native Smart Contract & Finance Layer. Bitcoin Wallet as a Smart Contract The first Turing-complete native smart

Owner
Spaces Protocol
Scalable & Permissionless Bitcoin Identities
Spaces Protocol
A standalone Aleo prover build upon snarkOS and snarkVM, with multi-threading optimization

Aleo Light Prover Introduction A standalone Aleo prover build upon snarkOS and snarkVM, with multi-threading optimization. It's called "light" because

Haruka Ma 91 Dec 29, 2022
An experimental rust zksnarks compiler with embeeded bellman-bn128 prover

Za! An experimental port of the circom zk-SNARK compiler in Rust with embedded bellman-bn128 prover. I created it as a PoC port of the existing JavaSc

adria0.eth 39 Aug 26, 2022
STARK Cairo prover using lambdaworks

STARK Cairo prover using lambdaworks. Cairo (CPU Algebraic Intermediate Representation) is a programming language for writing provable programs, where one party can prove to another that a certain computation was executed correctly. Cairo and similar proof systems can be used to provide scalability to blockchains.

Lambdaclass 18 Jun 13, 2023
Create a Stark prover & verifier from zero

stark-from-zero Create a Stark prover and verifier from zero, with Rust. Hopefully without external libraries. The point is to create a minimal versio

Lauri Peltonen 7 May 7, 2024
✈️A private, authenticated, permissioned cargo registry

chartered a little dig at creating a private cargo repository with authenticated downloads, the plan is to have git connect to a git server we setup t

Jordan Doyle 121 Dec 26, 2022
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.

Building 1. Install rustc, cargo and rustfmt. $ curl https://sh.rustup.rs -sSf | sh $ source $HOME/.cargo/env $ rustup component add rustfmt When buil

Solana Foundation 9.8k Jan 3, 2023
A vertically scalable stream processing framework focusing on low latency, helping you scale and consume financial data feeds.

DragonflyBot A vertically scalable stream processing framework focusing on low latency, helping you scale and consume financial data feeds. Design The

null 17 Jul 12, 2023
The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.

Nervos CKB - The Common Knowledge Base master develop About CKB CKB is the layer 1 of Nervos Network, a public/permissionless blockchain. CKB uses Pro

Nervos Network 1k Dec 30, 2022
Dione is an anonymize and encrypted messaging system build on top on a peer to peer layer.

Secure and Anonymous Messaging WARNING: Currently Dione is not ready to be used nor does it fulfill its goal of being an anonymous messenger. In order

Dione 41 Jan 5, 2023