feat: TEE pipeline skeleton and fact registration split#48
Open
chudkowsky wants to merge 7 commits intomainfrom
Open
feat: TEE pipeline skeleton and fact registration split#48chudkowsky wants to merge 7 commits intomainfrom
chudkowsky wants to merge 7 commits intomainfrom
Conversation
…lement Introduce skeleton components for the full TEE proving pipeline (TeeAttestor → OffchainTeeVerifier → TeeProver → TeeOrchestrator) and decouple proof verification from state submission in the settlement layer. - Add `saya/core/src/tee/` with TeeAttestation and TeeTrace pipeline types - Add `saya/core/src/tee/attestor.rs` (TeeAttestor) and `verifier.rs` (OffchainTeeVerifier) as PipelineStage skeletons - Add `saya/core/src/prover/tee/` with TeeProver and TeeProof - Add `saya/core/src/orchestrator/tee.rs` wiring the full TEE pipeline - Introduce `FactRegistrar` trait in `settlement/fact_registration/`: returns `Option<Call>` so each strategy controls its own entry point - Implement IntegrityFactRegistrar, NoopFactRegistrar (moved from piltover), and TeeFactRegistrar (skeleton, returns Ok(None) until verifier deployed) - Refactor PiltoverSettlementBackend to be generic over `FR: FactRegistrar`, collapsing ~280-line run loop to ~60 lines - Add AnyFactRegistrar enum to bin/saya for runtime dispatch - Re-export `Call as SettlementCall` from saya-core to resolve starknet crate version mismatch between saya-core (0.17.0) and bin/saya (git fork) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wire TeeOrchestratorBuilder (attestor → offchain verifier → prover → settlement) into the CLI as the `tee` subcommand. Remove the old `persistent-tee` command (which used the simpler PersistentTeeOrchestrator) and the unimplemented `sharding` stub. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… logic - Remove Sovereign, Persistent, and PersistentTee orchestrators; only TEE mode remains in the binary - Remove Atlantic SNOS/layout-bridge provers, mock prover, PIE generator, data availability layer (Celestia), and fact registration — all STARK proving infrastructure is gone - Remove OffchainTeeVerifier stage; attestation now flows directly into the SP1 prover - PollingBlockIngestor rewritten to emit ordered Vec<BlockInfo> batches (configurable batch_size + idle_timeout) instead of individual blocks; BlockOrderer between ingestor and attestor is no longer needed - TeeAttestation extended with quote, state roots, block hashes, and block numbers carried from Katana through the full pipeline - Add bin/saya: attestor.rs (moved+reworked from saya-core), prover.rs, prover_impl.rs (SP1 Groth16 generation), settlement.rs (TeePiltoverSettlementBackend building PiltoverInput::TeeInput calldata) - TeeSettlementBackendBuilder trait replaces SettlementBackendBuilder and accepts Receiver<TeeProof> directly — no DA cursor adapter needed - TeeOrchestratorBuilder simplified from 5 stages to 3 (ingestor, attestor, prover, settlement) - Prover credentials and provider URL moved from hardcoded consts to CLI args read from env (--prover-rpc, --tee-registry-address, --prover-private-key) - Pin boundless-market to v1.1.0; pin alloy crates to v1.0.41 - Update rust-toolchain and recompile core_contract.json artifact Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove underscore prefix from poll_interval fields since they are used. Fix prev_block_number calculation to only subtract 1 when not block 0, avoiding off-by-one when the batch starts at block 1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
saya/core/src/tee/(TeeAttestation, TeeTrace, TeeAttestor, OffchainTeeVerifier),saya/core/src/prover/tee/(TeeProver, TeeProof), andsaya/core/src/orchestrator/tee.rs(TeeOrchestrator) — a full stub pipeline wiring BlockIngestor → BlockOrderer → TeeAttestor → OffchainTeeVerifier → TeeProver → Settlement.PiltoverSettlementBackendinto a newFactRegistrartrait (settlement/fact_registration/). The trait returnsOption<Call>so each strategy controls its own Piltover entry point. Three implementations:IntegrityFactRegistrar(STARK on-chain verifier),NoopFactRegistrar(dev/test),TeeFactRegistrar(skeleton, returnsOk(None)until verifier contract is deployed).FR: FactRegistrar, collapsing ~280 lines of mixed verification+submission logic to ~60 lines.bin/sayafor runtime dispatch between registrar implementations.Call as SettlementCallfromsaya-coresobin/saya(which overrides to a git fork) uses the same type through the core crate.Test plan
cargo build --workspacepasses with no errorscargo test --workspace --all-features --exclude saya-e2e— all 19 unit tests passpersistent-tee startstill compiles and wires correctly withTeeFactRegistrarpersistent startwith--mock-layout-bridge-program-hashusesNoopFactRegistrarpersistent startwith--settlement-integrity-addressusesIntegrityFactRegistrarsaya-e2e) require a running settlement chain and are unaffected by this change🤖 Generated with Claude Code