{"id":24792554,"url":"https://github.com/dojoengine/saya","last_synced_at":"2026-05-13T01:06:22.403Z","repository":{"id":264152111,"uuid":"892417942","full_name":"dojoengine/saya","owner":"dojoengine","description":"Saya, the proving orchestrator of the Dojo stack.","archived":false,"fork":false,"pushed_at":"2026-04-29T19:24:43.000Z","size":2069,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-29T21:27:44.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dojoengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-11-22T04:24:24.000Z","updated_at":"2026-04-29T19:03:48.000Z","dependencies_parsed_at":"2024-11-22T10:24:15.812Z","dependency_job_id":"d09c9ec8-536d-4b6f-b865-6634c68c038c","html_url":"https://github.com/dojoengine/saya","commit_stats":null,"previous_names":["dojoengine/saya"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/dojoengine/saya","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojoengine%2Fsaya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojoengine%2Fsaya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojoengine%2Fsaya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojoengine%2Fsaya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dojoengine","download_url":"https://codeload.github.com/dojoengine/saya/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojoengine%2Fsaya/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32963180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"ssl_error","status_checked_at":"2026-05-12T23:30:18.191Z","response_time":102,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-29T20:37:35.399Z","updated_at":"2026-05-13T01:06:22.394Z","avatar_url":"https://github.com/dojoengine.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Saya\n\nSaya is the proving and settlement orchestrator for the Dojo/Katana stack. It reads finalized blocks from a Katana rollup node and settles them on-chain.\n\n---\n\n## Installation\n\n```bash\nasdf plugin add saya https://github.com/dojoengine/asdf-saya.git\nasdf install saya latest\n```\n\nThis installs three commands: `saya`, `saya-ops`, and `saya-tee`.\n\nAlternatively, grab pre-built binaries from the [releases page](https://github.com/dojoengine/saya/releases) or use the Docker image `ghcr.io/dojoengine/saya`.\n\n---\n\n## Overview\n\n### How it works\n\n```\nKatana L3 node  ──blocks──▶  Saya  ──proof + state──▶  Piltover (L2)\n```\n\nSaya polls Katana for finalized blocks, proves them (via Atlantic or TEE), and submits state updates to the Piltover settlement contract on L2.\n\n### Modes\n\n| Mode | Binary | How it proves | Settlement |\n|------|--------|---------------|------------|\n| Persistent | `persistent` | STARK proof via Atlantic (Herodotus) | Piltover on L2 |\n| Sovereign | `persistent` | STARK proof via Atlantic | Celestia DA (no on-chain settlement) |\n| Persistent-TEE | `persistent-tee` | AMD SEV-SNP attestation → SP1 Groth16 | Piltover on L2 |\n\n### What you need per mode\n\n| Requirement | Persistent | Sovereign | Persistent-TEE |\n|-------------|:---:|:---:|:---:|\n| Katana in provable mode | ✓ | ✓ | ✓ |\n| Piltover contract deployed | ✓ | — | ✓ |\n| Settlement account (L2) | ✓ | — | ✓ |\n| Atlantic API key | ✓ | ✓ | — |\n| `layout_bridge` program | ✓ | ✓ | — |\n| Katana-TEE node | — | — | ✓ |\n| TEE registry contract | — | — | ✓ |\n| Prover network account | — | — | ✓ |\n| Celestia light node | — | ✓ | — |\n\n---\n\n## Setup\n\nThese are one-time steps before running Saya.\n\n### 1. Deploy Piltover (`ops`)\n\nSet environment variables:\n\n```bash\nexport SETTLEMENT_ACCOUNT_PRIVATE_KEY=\u003cPRIVATE_KEY_IN_HEX\u003e\nexport SETTLEMENT_ACCOUNT_ADDRESS=\u003cACCOUNT_ADDRESS_IN_HEX\u003e\nexport SETTLEMENT_CHAIN_ID=\u003csepolia|mainnet|CUSTOM_CHAIN_ID\u003e\n# SETTLEMENT_RPC_URL is optional for sepolia/mainnet (default public RPC is used)\n```\n\nThen declare, deploy, and configure the contract:\n\n```bash\nsaya-ops core-contract declare\nsaya-ops core-contract deploy --salt 0x5\nsaya-ops core-contract setup-program \\\n  --core-contract-address \u003cADDRESS_FROM_DEPLOY\u003e \\\n  --chain-id example-chain\n```\n\nThe `deploy` command prints the **contract address** and **deployed block number** — save both for the next step.\n\n\u003e For local testing without real proofs, deploy a mock fact registry instead:\n\u003e ```bash\n\u003e saya-ops core-contract declare-and-deploy-fact-registry-mock --salt 0x1\n\u003e # then pass --fact-registry-address \u003cMOCK_ADDRESS\u003e to setup-program\n\u003e ```\n\n### 2. Initialize Katana\n\nKatana must run in **provable mode** (supported from Dojo `1.3.0`, Starknet v14.0.1 only).\n\n```bash\nkatana init \\\n  --settlement-chain sepolia \\\n  --id example-chain \\\n  --settlement-contract \u003cPILTOVER_ADDRESS\u003e \\\n  --settlement-contract-deployed-block \u003cDEPLOYED_BLOCK\u003e\n```\n\nStart Katana with a block time (required for provable mode — Katana never produces empty blocks):\n\n```bash\nkatana --chain example-chain --block-time 30000\n```\n\n### 3. Get Cairo programs (persistent mode only)\n\nThe `layout_bridge` program ships with the release. Download it from the [releases page](https://github.com/dojoengine/saya/releases) or build it locally:\n\n```bash\n./scripts/generate_layout_bridge.sh\n# Requires Docker (linux/amd64 only — emulation needs ~32 GB RAM)\n```\n\n---\n\n## Running\n\n### Persistent mode\n\n```bash\nsaya start \\\n  --rollup-rpc http://localhost:5050 \\\n  --settlement-rpc https://starknet-sepolia.public.blastapi.io \\\n  --settlement-piltover-address \u003cPILTOVER_ADDRESS\u003e \\\n  --settlement-account-address \u003cACCOUNT_ADDRESS\u003e \\\n  --settlement-account-private-key \u003cPRIVATE_KEY\u003e \\\n  --layout-bridge-program programs/layout_bridge.json \\\n  --atlantic-key \u003cATLANTIC_KEY\u003e \\\n  --settlement-integrity-address \u003cINTEGRITY_ADDRESS\u003e\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eAll options\u003c/summary\u003e\n\n```\n--rollup-rpc \u003cURL\u003e                           Katana L3 JSON-RPC endpoint\n--settlement-rpc \u003cURL\u003e                       Settlement chain JSON-RPC endpoint\n--settlement-piltover-address \u003cFELT\u003e         Piltover contract address\n--settlement-account-address \u003cFELT\u003e          Submitter account address\n--settlement-account-private-key \u003cFELT\u003e      Submitter account private key\n--layout-bridge-program \u003cPATH\u003e               Path to compiled layout_bridge program\n--atlantic-key \u003cKEY\u003e                         Atlantic (Herodotus) API key\n--settlement-integrity-address \u003cFELT\u003e        On-chain integrity/fact registry address\n--blocks-processed-in-parallel \u003cN\u003e           Parallel block pipeline depth (default: 60)\n--db-dir \u003cPATH\u003e                              SQLite database directory\n--mock-layout-bridge-program-hash \u003cHASH\u003e     Skip real Atlantic proving (testing only)\n--mock-snos-from-pie                         Derive SNOS proof from PIE (testing only)\n```\n\n\u003c/details\u003e\n\n### Sovereign mode\n\n```bash\nsaya sovereign start \\\n  --rollup-rpc http://localhost:5050 \\\n  --celestia-rpc http://localhost:26658 \\\n  --celestia-token \u003cTOKEN\u003e\n```\n\nA helper script for running a local Celestia light node is at `scripts/celestia.sh`.\n\n### Persistent-TEE mode\n\n```bash\nsaya-tee tee start \\\n  --rollup-rpc http://localhost:5050 \\\n  --settlement-rpc https://starknet-sepolia.public.blastapi.io \\\n  --settlement-piltover-address \u003cPILTOVER_ADDRESS\u003e \\\n  --settlement-account-address \u003cACCOUNT_ADDRESS\u003e \\\n  --settlement-account-private-key \u003cPRIVATE_KEY\u003e \\\n  --tee-registry-address \u003cTEE_REGISTRY_ADDRESS\u003e \\\n  --prover-private-key \u003cPROVER_PRIVATE_KEY\u003e\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eAll options\u003c/summary\u003e\n\n```\n--rollup-rpc \u003cURL\u003e                       Katana TEE node JSON-RPC endpoint\n--settlement-rpc \u003cURL\u003e                   Settlement chain JSON-RPC endpoint\n--settlement-piltover-address \u003cFELT\u003e     Piltover contract address\n--settlement-account-address \u003cFELT\u003e      Submitter account address\n--settlement-account-private-key \u003cFELT\u003e  Submitter account private key\n--tee-registry-address \u003cFELT\u003e            TEE registry contract on the prover network\n--prover-private-key \u003cSTRING\u003e            Prover network account private key\n--batch-size \u003cN\u003e                         Blocks per attestation batch (default: 10)\n--idle-timeout-secs \u003cN\u003e                  Flush partial batch after N idle seconds (default: 120)\n--attestor-poll-interval-ms \u003cN\u003e          Attestor poll interval in ms (default: 1000)\n--db-dir \u003cPATH\u003e                          SQLite database directory\n```\n\n\u003c/details\u003e\n\n---\n\n## Building from source\n\nOnly needed if you want to modify Saya.\n\n**One-time setup:**\n\n```bash\ngit clone --recursive https://github.com/dojoengine/saya\n# or, if you already cloned without --recursive:\n# git submodule update --init --recursive\n\nmake install-scarb\n```\n\n`make install-scarb` uses [asdf](https://asdf-vm.com/) to install the `scarb`\nversion pinned by `piltover/.tool-versions`. `saya-ops` rebuilds\ntwo Piltover mock contracts from that submodule on every cargo build via its\n`build.rs`, so scarb is a hard build-time dependency.\n\nRust `1.89` is also required — install via [rustup](https://rustup.rs);\n`rust-toolchain.toml` pins the version automatically.\n\n**Build:**\n\n```bash\ncd bin/persistent \u0026\u0026 cargo build --release\ncd bin/ops \u0026\u0026 cargo build --release\ncd bin/persistent-tee \u0026\u0026 cargo build --release\n```\n\n---\n\n## Testing\n\n```bash\n# Unit + integration tests\ncargo test --workspace --all-features\n\n# E2E (requires Docker)\ndocker compose -f compose.e2e.yml up\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdojoengine%2Fsaya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdojoengine%2Fsaya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdojoengine%2Fsaya/lists"}