From ceaa31e6c40ec5146a764ba688cf16f017fe0f26 Mon Sep 17 00:00:00 2001 From: Pawan Singh Date: Mon, 29 Jun 2026 21:33:38 -0700 Subject: [PATCH] Align docs and comments with spec/bindings reference-node binding. Update path references from spec/implementation to spec/bindings and replace Profile 0 terminology with reference-node binding language. Co-authored-by: Cursor --- Cargo.toml | 4 +-- README.md | 22 ++++++------- crates/conformance/Cargo.toml | 2 +- crates/conformance/src/bin/gen-vectors.rs | 12 +++---- crates/conformance/src/lib.rs | 18 +++++------ crates/conformance/tests/codec.rs | 2 +- crates/conformance/tests/finality.rs | 2 +- crates/conformance/tests/fraud.rs | 2 +- crates/conformance/tests/metering.rs | 2 +- crates/conformance/tests/replication.rs | 2 +- crates/conformance/tests/settlement.rs | 4 +-- crates/consensus/Cargo.toml | 2 +- crates/consensus/src/lib.rs | 10 +++--- crates/ducp-types/src/lib.rs | 20 ++++++------ crates/dvm/src/lib.rs | 24 +++++++------- crates/governance/Cargo.toml | 2 +- crates/governance/src/lib.rs | 18 +++++------ crates/ledger/src/lib.rs | 24 +++++++------- crates/verification/src/lib.rs | 38 +++++++++++------------ ducp-node/src/lib.rs | 18 +++++------ ducp-node/src/main.rs | 6 ++-- scripts/devnet.sh | 2 +- test-vectors/README.md | 14 ++++----- 23 files changed, 125 insertions(+), 125 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0772d09..91dac4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ ducp-ledger = { path = "crates/ledger" } ducp-consensus = { path = "crates/consensus" } ducp-governance = { path = "crates/governance" } -# Canonical codec + hashing + identity (Profile 0 locked choices, spec/implementation/01). +# Canonical codec + hashing + identity (reference-node binding choices, spec/bindings/01). borsh = { version = "1.7", features = ["derive"] } blake3 = "1.8" ed25519-dalek = "2" @@ -46,7 +46,7 @@ clap = { version = "4", features = ["derive"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } -# WebAssembly DVM (spec/implementation/02). +# WebAssembly DVM (spec/bindings/02). wasmtime = "46" wat = "1" diff --git a/README.md b/README.md index 6d1ab98..94cde02 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,15 @@ The reference implementation of the **Decentralized Universal Compute Protocol (DUCP)**, in Rust. -> **Status:** **Profile 0** (MVP / devnet) reference node for spec **v0.2.0** — functional end to end. A single-sequencer devnet accepts a task, executes it deterministically, verifies it by sampled re-execution / open challenge, and settles it with real 𝕌 and Standing accounting. Advanced tiers (TEE/ZK, BFT, trustless energy attestation, on-chain governance) sit behind traits as documented seams. +> **Status:** **Reference implementation** for DUCP-SPEC **v0.2.0** (reference-node binding, MVP / devnet) — functional end to end. A single-sequencer devnet accepts a task, executes it deterministically, verifies it by sampled re-execution / open challenge, and settles it with real 𝕌 and Standing accounting. Advanced tiers (TEE/ZK, BFT, trustless energy attestation, on-chain governance) sit behind traits as documented seams. > **"node" means a network participant** — the software you run to take part in the DUCP network (as a Provider, Validator, etc.). It is **not** Node.js and contains no JavaScript. ## What this is -A node implementation of the DUCP protocol. The protocol itself — the white paper and the normative specification — lives in [`ducp-protocol/spec`](https://github.com/ducp-protocol/spec). This repository implements **spec v0.2.0**, **Profile 0** (the build-ready subset in `spec/implementation/`). +A node implementation of the DUCP protocol. The protocol itself — the white paper, normative specification, and reference-node binding — lives in [`ducp-protocol/spec`](https://github.com/ducp-protocol/spec). This repository is the **reference implementation** for **DUCP-SPEC v0.2.0**, conforming to the pinned choices in [`spec/bindings/`](https://github.com/ducp-protocol/spec/tree/main/spec/bindings). -Profile 0 locks the buildable choices — **WebAssembly** IR (wasmtime), **single-sequencer** devnet, **sampled re-execution** — while preserving every protocol invariant. The Quant (ℚ) efficiency observable is recorded as the reward-neutral **(𝕌, ℚ)** pair from genesis (ℚ null until energy attestation exists). +The reference-node binding pins the buildable choices — **WebAssembly** IR (wasmtime), **single-sequencer** devnet, **sampled re-execution** — while preserving every protocol invariant. The Quant (ℚ) efficiency observable is recorded as the reward-neutral **(𝕌, ℚ)** pair from genesis (ℚ null until energy attestation exists). ## Workspace layout @@ -49,7 +49,7 @@ This starts a sequencer and runs the beachhead workload against it over JSON-RPC ## Architecture & milestones -The node was built along the Profile 0 roadmap (`spec/implementation/README.md`): +The node was built along the reference-node binding roadmap (`spec/bindings/README.md`): | # | Milestone | What it delivers | |---|---|---| @@ -71,11 +71,11 @@ Published in [`test-vectors/`](test-vectors/) and checked by `ducp-conformance`. | Family | Source | Milestone | |---|---|---| -| `codec/` | spec/implementation/01 §7 | M0 | -| `metering/` | spec/implementation/02 §5 | M1 | -| `settlement/` | spec/implementation/04 §3 | M2/M3/M5 | -| `fraud/` | spec/implementation/03 §4, 04 §4 | M4/M5 | -| `replication/` | spec/implementation/04 §6 | M6 | +| `codec/` | spec/bindings/01 §7 | M0 | +| `metering/` | spec/bindings/02 §5 | M1 | +| `settlement/` | spec/bindings/04 §3 | M2/M3/M5 | +| `fraud/` | spec/bindings/03 §4, 04 §4 | M4/M5 | +| `replication/` | spec/bindings/04 §6 | M6 | | `q-observable/` | spec/09 §10, DP-0001 §9 | ℚ | Regenerate after an intentional change: @@ -84,9 +84,9 @@ Regenerate after an intentional change: cargo run -p ducp-conformance --bin gen-vectors ``` -## Profile 0 scope & deferred seams +## Reference-node binding scope & deferred seams -Out of scope for Profile 0, each represented by a trait so it is additive later: TEE/ZK tiers (`Verifier`), BFT consensus (`ConsensusEngine`), trustless energy attestation and the efficiency bonus (`EnergyAttestor`), multiple IRs (`IrRegistry`), on-chain governance (`ParamSource`), and persistent/Merkle state (`Storage`). Provisional choices (borsh, BLAKE3, Ed25519, `UCU_DECIMALS = 9`, the fuel cost model) are tuned on devnet and frozen toward 1.0. +Out of scope for this binding, each represented by a trait so it is additive later: TEE/ZK tiers (`Verifier`), BFT consensus (`ConsensusEngine`), trustless energy attestation and the efficiency bonus (`EnergyAttestor`), multiple IRs (`IrRegistry`), on-chain governance (`ParamSource`), and persistent/Merkle state (`Storage`). Provisional choices (borsh, BLAKE3, Ed25519, `UCU_DECIMALS = 9`, the fuel cost model) are tuned on devnet and frozen toward 1.0. ## Specification <-> implementation diff --git a/crates/conformance/Cargo.toml b/crates/conformance/Cargo.toml index 2f7479d..87de966 100644 --- a/crates/conformance/Cargo.toml +++ b/crates/conformance/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ducp-conformance" -description = "DUCP Profile 0 conformance harness: loads the published test vectors and checks them against the reference crates" +description = "DUCP Reference-node binding conformance harness: loads the published test vectors and checks them against the reference crates" version.workspace = true edition.workspace = true rust-version.workspace = true diff --git a/crates/conformance/src/bin/gen-vectors.rs b/crates/conformance/src/bin/gen-vectors.rs index eff272c..7821611 100644 --- a/crates/conformance/src/bin/gen-vectors.rs +++ b/crates/conformance/src/bin/gen-vectors.rs @@ -10,7 +10,7 @@ use std::fs; fn main() { let dir = ducp_conformance::vectors_dir(); - // --- codec / hash (M0, spec/implementation/01 §7) --- + // --- codec / hash (M0, spec/bindings/01 §7) --- let codec_dir = dir.join("codec"); fs::create_dir_all(&codec_dir).expect("create codec dir"); let records = ducp_conformance::codec_records(); @@ -19,7 +19,7 @@ fn main() { fs::write(&path, format!("{json}\n")).expect("write codec vectors"); println!("wrote {} ({} records)", path.display(), records.len()); - // --- metering (M1, spec/implementation/02 §5) --- + // --- metering (M1, spec/bindings/02 §5) --- let metering_dir = dir.join("metering"); fs::create_dir_all(&metering_dir).expect("create metering dir"); let metering = ducp_conformance::metering_records(); @@ -28,7 +28,7 @@ fn main() { fs::write(&path, format!("{json}\n")).expect("write metering vectors"); println!("wrote {} ({} records)", path.display(), metering.len()); - // --- settlement (M2/M3, spec/implementation/04 §3) --- + // --- settlement (M2/M3, spec/bindings/04 §3) --- let settlement_dir = dir.join("settlement"); fs::create_dir_all(&settlement_dir).expect("create settlement dir"); let settlement = ducp_conformance::settlement_record(); @@ -37,14 +37,14 @@ fn main() { fs::write(&path, format!("{json}\n")).expect("write settlement vector"); println!("wrote {}", path.display()); - // --- finality / clawback window (M5, spec/implementation/04 §3) --- + // --- finality / clawback window (M5, spec/bindings/04 §3) --- let finality = ducp_conformance::finality_record(); let json = serde_json::to_string_pretty(&finality).expect("serialize finality"); let path = settlement_dir.join("finality.json"); fs::write(&path, format!("{json}\n")).expect("write finality vector"); println!("wrote {}", path.display()); - // --- fraud (M4/M5, spec/implementation/03 §4, 04 §4) --- + // --- fraud (M4/M5, spec/bindings/03 §4, 04 §4) --- let fraud_dir = dir.join("fraud"); fs::create_dir_all(&fraud_dir).expect("create fraud dir"); let fraud = ducp_conformance::fraud_record(); @@ -53,7 +53,7 @@ fn main() { fs::write(&path, format!("{json}\n")).expect("write fraud vector"); println!("wrote {}", path.display()); - // --- replication (M6, spec/implementation/04 §6) --- + // --- replication (M6, spec/bindings/04 §6) --- let replication_dir = dir.join("replication"); fs::create_dir_all(&replication_dir).expect("create replication dir"); let replication = ducp_conformance::replication_record(); diff --git a/crates/conformance/src/lib.rs b/crates/conformance/src/lib.rs index 4ed378a..0194ff7 100644 --- a/crates/conformance/src/lib.rs +++ b/crates/conformance/src/lib.rs @@ -1,11 +1,11 @@ //! # ducp-conformance //! -//! Profile 0 conformance harness. Loads the published golden vectors from the +//! Reference-node binding conformance harness. Loads the published golden vectors from the //! workspace-root `test-vectors/` directory and exposes helpers + canonical sample //! values the per-milestone integration tests (under `tests/`) check the reference //! crates against. //! -//! The six vector families (spec/implementation/05 §5, spec/09 §10): +//! The six vector families (spec/bindings/05 §5, spec/09 §10): //! `codec`, `metering`, `settlement`, `fraud`, `replication`, `q-observable`. //! //! Regenerate the committed vector files with the generator binary: @@ -40,7 +40,7 @@ pub fn unhex(s: &str) -> Vec { hex::decode(s).unwrap_or_else(|e| panic!("bad hex {s:?}: {e}")) } -/// One codec/hash golden vector (spec/implementation/01 §7): a value, its canonical +/// One codec/hash golden vector (spec/bindings/01 §7): a value, its canonical /// (borsh) bytes as hex, and the BLAKE3-256 of those bytes. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CodecRecord { @@ -199,7 +199,7 @@ pub mod samples { } } -/// One metering golden vector (spec/implementation/02 §5): a canonical module + +/// One metering golden vector (spec/bindings/02 §5): a canonical module + /// input and its deterministic `{total_fuel, ucu_count, result_hash}` under the /// devnet benchmark. `total_fuel` is wasmtime-fuel-model-specific (provisional). #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -248,7 +248,7 @@ pub fn metering_records() -> Vec { .collect() } -/// The settlement golden vector (spec/implementation/04 §3): the post-state of a +/// The settlement golden vector (spec/bindings/04 §3): the post-state of a /// `submit → claim → proof → settle` happy path. Pins the economic outcome, the /// Receipt, the (𝕌, ℚ) entry (ℚ null in P0), and the `state_root`. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -333,7 +333,7 @@ pub fn settlement_record() -> SettlementRecord { } } -/// The replication golden vector (spec/implementation/04 §6): producing then +/// The replication golden vector (spec/bindings/04 §6): producing then /// replaying a sequence of blocks reaches the identical `state_root` — state-machine /// replication, so the devnet is verifiable even with one proposer. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -433,7 +433,7 @@ pub fn replication_record() -> ReplicationRecord { } } -/// The finality golden vector (spec/implementation/04 §3): a settled task whose +/// The finality golden vector (spec/bindings/04 §3): a settled task whose /// clawback window closes, releasing the claim stake while the Receipt stays /// immutable (`I-ECON-FINAL`). #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -519,7 +519,7 @@ pub fn finality_record() -> FinalityRecord { } } -/// The fraud golden vector (spec/implementation/03 §4, 04 §4): a forged proof, the +/// The fraud golden vector (spec/bindings/03 §4, 04 §4): a forged proof, the /// re-execution verdict, and the post-resolution state (clawback, burn, fine, /// Standing floor). Verifies `I-LEDGER-CONSERVE` across the fraud path. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -778,7 +778,7 @@ mod tests { #[test] fn all_six_vector_families_present() { - // spec/implementation/05 §5 (five) + spec/09 §10 (ℚ). + // spec/bindings/05 §5 (five) + spec/09 §10 (ℚ). let families = [ ("codec", "types.json"), ("metering", "cases.json"), diff --git a/crates/conformance/tests/codec.rs b/crates/conformance/tests/codec.rs index aadbcfa..3f9fec6 100644 --- a/crates/conformance/tests/codec.rs +++ b/crates/conformance/tests/codec.rs @@ -1,4 +1,4 @@ -//! M0 conformance: codec / hash golden vectors (spec/implementation/01 §7). +//! M0 conformance: codec / hash golden vectors (spec/bindings/01 §7). //! //! Pins the canonical (borsh) bytes and BLAKE3-256 hashes of the core data model, //! including the ℚ types. Regenerate with `cargo run -p ducp-conformance --bin diff --git a/crates/conformance/tests/finality.rs b/crates/conformance/tests/finality.rs index 6a677dd..a9bd302 100644 --- a/crates/conformance/tests/finality.rs +++ b/crates/conformance/tests/finality.rs @@ -1,4 +1,4 @@ -//! M5 conformance: clawback-window finality (spec/implementation/04 §3). +//! M5 conformance: clawback-window finality (spec/bindings/04 §3). //! //! After the clawback window closes with no successful challenge, the claim stake is //! released while the settled Receipt stays immutable (`I-ECON-FINAL`). diff --git a/crates/conformance/tests/fraud.rs b/crates/conformance/tests/fraud.rs index aee6e95..0216fd4 100644 --- a/crates/conformance/tests/fraud.rs +++ b/crates/conformance/tests/fraud.rs @@ -1,4 +1,4 @@ -//! M4/M5 conformance: fraud golden vector (spec/implementation/03 §4, 04 §4). +//! M4/M5 conformance: fraud golden vector (spec/bindings/03 §4, 04 §4). //! //! A forged proof is settled optimistically, challenged, re-executed, and slashed. //! Pins the post-state and verifies conservation across the fraud path. diff --git a/crates/conformance/tests/metering.rs b/crates/conformance/tests/metering.rs index 36c4ae8..49c42a2 100644 --- a/crates/conformance/tests/metering.rs +++ b/crates/conformance/tests/metering.rs @@ -1,4 +1,4 @@ -//! M1 conformance: metering golden vectors (spec/implementation/02 §5). +//! M1 conformance: metering golden vectors (spec/bindings/02 §5). //! //! Verifies the deterministic 𝕌 derivation: the reference workload meters to //! exactly one 𝕌, two independent runs agree, and the committed vectors match the diff --git a/crates/conformance/tests/replication.rs b/crates/conformance/tests/replication.rs index ecf0b7c..e439801 100644 --- a/crates/conformance/tests/replication.rs +++ b/crates/conformance/tests/replication.rs @@ -1,4 +1,4 @@ -//! M6 conformance: state-machine replication (spec/implementation/04 §6). +//! M6 conformance: state-machine replication (spec/bindings/04 §6). //! //! Producing then replaying a block sequence reaches the identical `state_root`, so //! every node converges on the same ledger state even with a single proposer. diff --git a/crates/conformance/tests/settlement.rs b/crates/conformance/tests/settlement.rs index b456020..742a8a0 100644 --- a/crates/conformance/tests/settlement.rs +++ b/crates/conformance/tests/settlement.rs @@ -1,8 +1,8 @@ -//! M2/M3 conformance: settlement golden vector (spec/implementation/04 §3). +//! M2/M3 conformance: settlement golden vector (spec/bindings/04 §3). //! //! Pins the post-state of a happy-path settlement and checks the cross-cutting //! invariants on the published vector: conservation (`I-LEDGER-CONSERVE`) and the -//! reward-neutral (𝕌, ℚ) entry with ℚ null in Profile 0 (`I-Q-NULL`). +//! reward-neutral (𝕌, ℚ) entry with ℚ null in this binding (`I-Q-NULL`). use ducp_conformance::{load_json, settlement_record, SettlementRecord}; diff --git a/crates/consensus/Cargo.toml b/crates/consensus/Cargo.toml index 0a1eb65..36d358e 100644 --- a/crates/consensus/Cargo.toml +++ b/crates/consensus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ducp-consensus" -description = "Transaction ordering and finality (Profile 0: single-sequencer devnet)" +description = "Transaction ordering and finality (binding: single-sequencer devnet)" version.workspace = true edition.workspace = true rust-version.workspace = true diff --git a/crates/consensus/src/lib.rs b/crates/consensus/src/lib.rs index 65c91e1..e898ab4 100644 --- a/crates/consensus/src/lib.rs +++ b/crates/consensus/src/lib.rs @@ -1,15 +1,15 @@ //! # ducp-consensus //! -//! Transaction ordering and finality. Profile 0 ships [`SingleSequencer`]: one +//! Transaction ordering and finality. The reference-node binding uses [`SingleSequencer`]: one //! designated node orders admitted txs (FIFO by arrival, ties by `TxId`), applies //! the ledger transition in order, and commits a `state_root`. Other nodes //! **replay** [`SingleSequencer::commit`] and MUST reach the identical root — this //! is state-machine replication, so the devnet is verifiable even with one proposer -//! (spec/implementation/04 §6). A BFT engine is a later `impl ConsensusEngine` with +//! (spec/bindings/04 §6). A BFT engine is a later `impl ConsensusEngine` with //! no change to the ledger. //! //! Specification: -//! Status: Profile 0 implementation for spec v0.2.0. +//! Status: Reference implementation for DUCP-SPEC v0.2.0. use ducp_governance::Params; use ducp_ledger::{apply, State}; @@ -38,7 +38,7 @@ pub struct Proposal { pub results: Vec, } -/// The consensus interface (spec/implementation/04 §6). `produce` orders + applies +/// The consensus interface (spec/bindings/04 §6). `produce` orders + applies /// admitted txs into a candidate block; `commit` deterministically replays a block, /// which is how replicas reach the identical `state_root`. pub trait ConsensusEngine { @@ -57,7 +57,7 @@ pub trait ConsensusEngine { ) -> Result; } -/// The Profile 0 single-sequencer engine. Tracks the chain head (`height`, +/// The binding single-sequencer engine. Tracks the chain head (`height`, /// `parent`) and the current `epoch`. `produce`/`commit` are pure with respect to /// the head; the head advances only via [`SingleSequencer::adopt`]. #[derive(Debug, Clone)] diff --git a/crates/ducp-types/src/lib.rs b/crates/ducp-types/src/lib.rs index 72e7ec0..2f66740 100644 --- a/crates/ducp-types/src/lib.rs +++ b/crates/ducp-types/src/lib.rs @@ -2,11 +2,11 @@ //! //! Canonical DUCP data model shared by every conforming node — identifiers, tasks, //! on-ledger records, transactions, blocks, and the **Quant (ℚ)** efficiency -//! observable. Field shapes and encodings follow the Profile 0 specification -//! ([`spec/implementation/01`](https://github.com/ducp-protocol/spec)) and +//! observable. Field shapes and encodings follow the reference-node binding specification +//! ([`spec/bindings/01`](https://github.com/ducp-protocol/spec)) and //! [`spec/09`](https://github.com/ducp-protocol/spec) (DP-0001). //! -//! ## Encoding & hashing (spec/implementation/01 §1) +//! ## Encoding & hashing (spec/bindings/01 §1) //! - **Canonical bytes**: `borsh`, fields in declaration order; no floats in any //! hashed structure (the ℚ types are integer-only by construction). //! - **Hash**: BLAKE3-256 over canonical bytes ([`hash_canonical`]). @@ -16,7 +16,7 @@ //! (see the `serde(with = ...)` field attributes). //! //! Specification: -//! Status: Profile 0 implementation for spec v0.2.0. +//! Status: Reference implementation for DUCP-SPEC v0.2.0. use borsh::{BorshDeserialize, BorshSerialize}; use serde::{Deserialize, Serialize}; @@ -29,7 +29,7 @@ pub fn version() -> &'static str { // ============================ Identifiers (01 §2) ============================ pub type Hash = [u8; 32]; -pub type Identity = [u8; 32]; // Ed25519 public key (Profile 0) +pub type Identity = [u8; 32]; // Ed25519 public key (reference-node binding) pub type Signature = [u8; 64]; // Ed25519 signature pub type ContentId = Hash; // hash of an off-ledger payload pub type TaskId = Hash; // = hash(canonical(TaskBody)) @@ -120,7 +120,7 @@ pub enum Reject { // ============================ Tasks (01 §3) ================================= -/// Intermediate representation. Profile 0 has exactly one IR. +/// Intermediate representation. This binding has exactly one IR. #[derive( Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, BorshSerialize, BorshDeserialize, )] @@ -140,7 +140,7 @@ pub struct Limits { } /// Verification tier, assigned by the DVM at submit — never chosen -/// (`I-VERIFY-NOCHOICE`). Profile 0 assigns `SampledReexec` to every task. +/// (`I-VERIFY-NOCHOICE`). This binding assigns `SampledReexec` to every task. #[derive( Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, BorshSerialize, BorshDeserialize, )] @@ -223,7 +223,7 @@ pub struct Submission { #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, BorshSerialize, BorshDeserialize)] #[serde(rename_all = "snake_case")] pub enum TierData { - SampledReexec, // Profile 0: determinism enables exact re-check + SampledReexec, // binding: determinism enables exact re-check Tee { #[serde(with = "wire::bytes_vec")] attestation: Vec, @@ -364,7 +364,7 @@ pub enum Boundary { /// A recorded ℚ value as fixed-point **micro-ℚ** (ℚ × 1_000_000). /// /// Integer by construction: no floats appear in any hashed structure -/// (spec/implementation/01 §1). ℚ = 1.0 (`micro_q == 1_000_000`) is frontier-grade; +/// (spec/bindings/01 §1). ℚ = 1.0 (`micro_q == 1_000_000`) is frontier-grade; /// below 1.0 is behind the frontier, above 1.0 is ahead of it. #[derive( Debug, @@ -432,7 +432,7 @@ pub struct QLedgerEntry { } impl QLedgerEntry { - /// A reward-neutral entry with no energy attestation — the Profile 0 default for + /// A reward-neutral entry with no energy attestation — the binding default for /// every task: 𝕌 recorded, ℚ unmeasured (`I-Q-NULL`). pub fn unmeasured(task: TaskId, ucu: Ucu, benchmark: BenchmarkVersion) -> Self { QLedgerEntry { diff --git a/crates/dvm/src/lib.rs b/crates/dvm/src/lib.rs index 0dfa19a..f1ec7b3 100644 --- a/crates/dvm/src/lib.rs +++ b/crates/dvm/src/lib.rs @@ -1,8 +1,8 @@ //! # ducp-dvm //! -//! The Profile 0 DUCP Virtual Machine: a **deterministic WebAssembly runtime** +//! The binding DUCP Virtual Machine: a **deterministic WebAssembly runtime** //! ([wasmtime]) that executes a task once and derives its 𝕌 count by fuel metering -//! (spec/implementation/02). +//! (spec/bindings/02). //! //! Determinism (`I-DVM-DET`): NaN canonicalization on; single-threaded; no ambient //! capabilities (no clock, randomness, filesystem, or network); the only host @@ -11,7 +11,7 @@ //! identical `output`, `result_hash`, and `ucu_count`. //! //! Specification: -//! Status: Profile 0 implementation for spec v0.2.0. +//! Status: Reference implementation for DUCP-SPEC v0.2.0. use borsh::{BorshDeserialize, BorshSerialize}; use ducp_types::{hash_bytes, Hash, IrId, Limits, Ucu, UCU_SCALE}; @@ -32,7 +32,7 @@ const METER_FUEL_CEILING: u64 = 1 << 40; // =============================== Benchmark ================================= /// The single consensus reference that fixes the scale of 𝕌 (`I-UNIT-ONEBENCH`, -/// spec/implementation/02 §5). `fuel_per_ucu` is calibrated from the canonical +/// spec/bindings/02 §5). `fuel_per_ucu` is calibrated from the canonical /// reference workload so that workload meters to exactly one 𝕌. #[derive(Debug, Clone, PartialEq, Eq)] pub struct Benchmark { @@ -89,7 +89,7 @@ const FUEL_COST_MODEL_ID: &[u8] = b"ducp.fuel.wasmtime.v46.profile0"; // ============================ Execution outcome =========================== /// Why a task execution did not complete successfully. Deterministic and part of -/// the canonical `result_hash` for failed runs (spec/implementation/02 §6). +/// the canonical `result_hash` for failed runs (spec/bindings/02 §6). #[derive(Debug, Clone, PartialEq, Eq, BorshSerialize, BorshDeserialize)] pub enum FailureKind { /// Fuel ceiling (from `Limits.max_ucu`) exhausted before completion. @@ -98,7 +98,7 @@ pub enum FailureKind { UserAbort(i32), /// A wasm trap (illegal instruction, OOB access, unreachable, …). Trap, - /// The module failed to validate/compile under the Profile 0 feature set. + /// The module failed to validate/compile under the binding Wasm feature set. InvalidModule, /// The module could not be instantiated (e.g. an unsatisfiable import — no /// ambient capabilities are provided). @@ -137,11 +137,11 @@ fn failure_result_hash(kind: &FailureKind) -> Hash { // ================================ Dvm trait =============================== -/// The DUCP Virtual Machine interface (spec/implementation/02 §7). `execute` is +/// The DUCP Virtual Machine interface (spec/bindings/02 §7). `execute` is /// called once by the Provider; `execute`/`meter` are called by re-executors during /// sampling/challenge. Because both are deterministic, comparison is exact. pub trait Dvm { - /// Validate a module against the Profile 0 feature set. A module using a + /// Validate a module against the binding Wasm feature set. A module using a /// forbidden feature MUST be rejected at submit (`Reject::UnsupportedFeature`) /// and never reach metering. fn validate(&self, module: &[u8]) -> Result<(), ducp_types::Reject>; @@ -205,19 +205,19 @@ impl Default for WasmtimeDvm { } impl WasmtimeDvm { - /// Build a DVM with the Profile 0 determinism configuration. + /// Build a DVM with the binding determinism configuration. pub fn new() -> Self { let mut config = Config::new(); config.consume_fuel(true); config.cranelift_nan_canonicalization(true); - // No nondeterministic / out-of-scope proposals (spec/implementation/02 §1). + // No nondeterministic / out-of-scope proposals (spec/bindings/02 §1). config.wasm_simd(false); config.wasm_relaxed_simd(false); config.wasm_threads(false); config.wasm_reference_types(false); config.wasm_function_references(false); config.wasm_gc(false); - // Allowed Profile 0 features. + // Allowed binding Wasm features. config.wasm_bulk_memory(true); config.wasm_multi_value(true); let engine = Engine::new(&config).expect("valid deterministic wasmtime config"); @@ -372,7 +372,7 @@ impl WasmtimeDvm { } } -/// Registry mapping an IR to its deterministic executor. Profile 0 has exactly one +/// Registry mapping an IR to its deterministic executor. This binding has exactly one /// IR (WebAssembly); RISC-V / tensor IRs are added as additional entries here with /// no change to the task lifecycle (the `Ir` registry seam, spec/implementation /// README). diff --git a/crates/governance/Cargo.toml b/crates/governance/Cargo.toml index 5271647..5f885e7 100644 --- a/crates/governance/Cargo.toml +++ b/crates/governance/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ducp-governance" -description = "Reputation-weighted, role-chamber governance (Profile 0: static parameter set)" +description = "Reputation-weighted, role-chamber governance (binding: static parameter set)" version.workspace = true edition.workspace = true rust-version.workspace = true diff --git a/crates/governance/src/lib.rs b/crates/governance/src/lib.rs index d7256d3..3b0fed0 100644 --- a/crates/governance/src/lib.rs +++ b/crates/governance/src/lib.rs @@ -1,7 +1,7 @@ //! # ducp-governance //! -//! Profile 0 governance is a **static parameter set** ([`Params`]) held as config -//! and set by the maintainer (spec/implementation/05 §4). At v1.0 these become +//! Reference-node binding governance is a **static parameter set** ([`Params`]) held as config +//! and set by the maintainer (spec/bindings/05 §4). At v1.0 these become //! on-chain, role-chamber governance parameters; here they fix the economic //! constants the ledger reads. They are **parameters, not invariants**. //! @@ -9,7 +9,7 @@ //! exact integer arithmetic — no floats anywhere on a consensus path. //! //! Specification: -//! Status: Profile 0 implementation for spec v0.2.0. +//! Status: Reference implementation for DUCP-SPEC v0.2.0. use ducp_types::{Sp, Ucu, UCU_SCALE}; use serde::{Deserialize, Serialize}; @@ -22,7 +22,7 @@ pub fn version() -> &'static str { /// One million — the ppm denominator. pub const PPM: u128 = 1_000_000; -/// The devnet parameter set (spec/implementation/05 §4). Values are provisional and +/// The devnet parameter set (spec/bindings/05 §4). Values are provisional and /// tuned on devnet; they are config, not consensus invariants. #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub struct Params { @@ -33,7 +33,7 @@ pub struct Params { pub fee_ppm: u128, /// Standing accrual rate (ppm of metered 𝕌). Default 1 SP per 𝕌 (1:1 at base scale). pub sp_rate_ppm: u128, - /// Efficiency multiplier on Standing accrual (ppm). Profile 0 = 1.0 (no energy + /// Efficiency multiplier on Standing accrual (ppm). this binding sets 1.0 (no energy /// measured); ℚ is recorded but inert (`I-Q-REWARDNEUTRAL`). pub efficiency_mult_ppm: u128, /// Standing decay per epoch (ppm). Default 2%. @@ -63,7 +63,7 @@ impl Default for Params { } impl Params { - /// The Profile 0 devnet defaults (spec/implementation/05 §4). + /// The binding devnet defaults (spec/bindings/05 §4). pub const fn devnet() -> Self { Params { issuance_rate_ppm: 10_000, // 1% @@ -93,7 +93,7 @@ impl Params { } /// Standing accrual for metered work `u` under an efficiency multiplier (ppm): - /// `⌊sp_rate · u · efficiency_mult⌋`. Profile 0 passes `efficiency_mult = PPM`. + /// `⌊sp_rate · u · efficiency_mult⌋`. This binding passes `efficiency_mult = PPM`. pub fn standing_accrual(&self, u: Ucu, efficiency_mult_ppm: u128) -> Sp { (u * self.sp_rate_ppm / PPM * efficiency_mult_ppm / PPM) as Sp } @@ -142,7 +142,7 @@ impl Params { } } -/// Source of protocol parameters. Profile 0 uses [`StaticParams`] (a fixed set the +/// Source of protocol parameters. This binding uses [`StaticParams`] (a fixed set the /// maintainer configures); at v1.0 an on-chain, role-chamber governance engine is a /// later `impl ParamSource` with no change to the ledger (spec 07). This is the /// governance seam. @@ -151,7 +151,7 @@ pub trait ParamSource { fn params(&self) -> Params; } -/// The Profile 0 static parameter source. +/// The binding static parameter source. #[derive(Debug, Clone, Copy, Default)] pub struct StaticParams(pub Params); diff --git a/crates/ledger/src/lib.rs b/crates/ledger/src/lib.rs index 3e62d35..b7a5834 100644 --- a/crates/ledger/src/lib.rs +++ b/crates/ledger/src/lib.rs @@ -1,19 +1,19 @@ //! # ducp-ledger //! //! The deterministic ledger state machine: accounts and 𝕌, the separate Standing -//! reputation ledger, and the on-chain **ℚ-ledger** (spec/implementation/04, +//! reputation ledger, and the on-chain **ℚ-ledger** (spec/bindings/04, //! spec/09 §7). [`apply`] is a pure transition `State × SignedTx → State`. //! //! Base reward is strictly **𝕌-proportional**. The efficiency multiplier (DP-0001, -//! spec/09) is the only place ℚ could touch accrual — and in Profile 0 it is fixed +//! spec/09) is the only place ℚ could touch accrual — and in this binding it is fixed //! at 1.0, so ℚ is recorded but inert (`I-Q-REWARDNEUTRAL`). Every settled task -//! records a `(𝕌, ℚ)` entry from genesis, with ℚ null in Profile 0 (`I-Q-NULL`). +//! records a `(𝕌, ℚ)` entry from genesis, with ℚ null in this binding (`I-Q-NULL`). //! //! Conservation (`I-LEDGER-CONSERVE`): after every transition, //! `Σ(balance + escrowed + bonded) + fee_pool == minted − burned`. //! //! Specification: -//! Status: Profile 0 implementation for spec v0.2.0. +//! Status: Reference implementation for DUCP-SPEC v0.2.0. use borsh::{BorshDeserialize, BorshSerialize}; use ducp_governance::Params; @@ -37,7 +37,7 @@ pub struct Supply { } /// An open challenge against a settled task: the challenger and their posted bond -/// (spec/implementation/03 §3). Resolved by re-execution within the clawback window. +/// (spec/bindings/03 §3). Resolved by re-execution within the clawback window. #[derive(Debug, Clone, Copy, PartialEq, Eq, BorshSerialize, BorshDeserialize)] pub struct ChallengeRecord { pub challenger: Identity, @@ -90,7 +90,7 @@ impl State { } /// The 𝕌 commitment to the whole state: `BLAKE3(canonical(State))` (provisional; - /// a Merkle commitment replaces it later — spec/implementation/04 §6). + /// a Merkle commitment replaces it later — spec/bindings/04 §6). pub fn state_root(&self) -> Hash { hash_canonical(self) } @@ -306,7 +306,7 @@ impl State { s.status = TaskStatus::Settled; } - // ℚ-ledger genesis MUST (spec/09 §7.1): record (𝕌, ℚ). In Profile 0 the + // ℚ-ledger genesis MUST (spec/09 §7.1): record (𝕌, ℚ). In this binding the // EnergyAttestor is Null, so ℚ is null regardless of any `power_seal` // (I-Q-NULL, I-Q-REWARDNEUTRAL). self.q_ledger.insert( @@ -316,7 +316,7 @@ impl State { } /// Open a challenge against a settled task within its clawback window - /// (spec/implementation/03 §3): lock the challenger's bond and record it. + /// (spec/bindings/03 §3): lock the challenger's bond and record it. fn open_challenge( &mut self, challenger: Identity, @@ -389,7 +389,7 @@ pub fn apply(state: &State, stx: &SignedTx, params: &Params) -> Result State { @@ -440,13 +440,13 @@ pub fn advance_to_epoch(state: &State, target: Epoch, params: &Params) -> State s } -/// Convenience: build the Profile 0 reward-neutral ℚ-ledger entry for a settled task +/// Convenience: build the binding's reward-neutral ℚ-ledger entry for a settled task /// (𝕌 recorded, ℚ null — `I-Q-NULL`). pub fn q_ledger_entry_p0(task: TaskId, ucu: Ucu, benchmark: BenchmarkVersion) -> QLedgerEntry { QLedgerEntry::unmeasured(task, ucu, benchmark) } -/// Apply the penalties for proven fraud on a settled task (spec/implementation/04 +/// Apply the penalties for proven fraud on a settled task (spec/bindings/04 /// §4): clawback the payment from bonded stake, burn the work-issuance, slash a /// fine (rewarding the auditor), and floor the offender's Standing. Economic /// reversal is via **stake**, never by rewriting the settled tx (`I-ECON-FINAL`). @@ -526,7 +526,7 @@ pub fn resolve_fraud( /// Resolve an open challenge given the re-execution verdict (`fraud`). On fraud: /// apply penalties (rewarding the challenger) and return the challenger's bond. On a /// failed challenge: the challenger forfeits the bond (burned, anti-spam, -/// spec/implementation/03 §3). +/// spec/bindings/03 §3). pub fn resolve_challenge(state: &State, task: TaskId, fraud: bool, params: &Params) -> State { let mut s = state.clone(); let pc = match s.pending_challenges.remove(&task) { diff --git a/crates/verification/src/lib.rs b/crates/verification/src/lib.rs index 22ae8fb..439b38a 100644 --- a/crates/verification/src/lib.rs +++ b/crates/verification/src/lib.rs @@ -1,18 +1,18 @@ //! # ducp-verification //! -//! Profile 0 verification: the universal **sampled re-execution** floor plus open -//! challenge (spec/implementation/03). Because the DVM is deterministic, a check is +//! Reference-node binding verification: the universal **sampled re-execution** floor plus open +//! challenge (spec/bindings/03). Because the DVM is deterministic, a check is //! exact — re-run on the same `{module, input, benchmark}` and compare the //! `result_hash` and `ucu_count` byte-for-byte. TEE/ZK are reserved tiers. //! //! The optional [`EnergyAttestor`] seam (DP-0001, spec/09) validates a Power Seal -//! into a recorded ℚ. On the live path Profile 0 wires [`NullAttestor`], so ℚ stays +//! into a recorded ℚ. On the live path This binding wires [`NullAttestor`], so ℚ stays //! a reward-neutral, unmeasured observable; a real `impl EnergyAttestor` lands later //! with no change to the proof path. Verifiers validate attestations as evidence — //! they never re-measure energy (`I-VERIFY-RUNONCE`). //! //! Specification: -//! Status: Profile 0 implementation for spec v0.2.0. +//! Status: Reference implementation for DUCP-SPEC v0.2.0. use ducp_dvm::{Benchmark, Dvm}; use ducp_types::{ @@ -45,13 +45,13 @@ impl VerifyOutcome { /// A verification tier. Adding a tier is an additional `impl Verifier` plus a /// tier-assignment rule, with no change to the lifecycle or ledger -/// (spec/implementation/03 §5). +/// (spec/bindings/03 §5). pub trait Verifier { /// The tier this verifier implements. fn tier(&self) -> VerificationTier; /// Re-derive and compare. For sampled re-execution this re-runs the DVM and - /// compares the `result_hash` **and** `ucu_count` exactly (spec/implementation/03 + /// compares the `result_hash` **and** `ucu_count` exactly (spec/bindings/03 /// §2.2). fn check( &self, @@ -64,7 +64,7 @@ pub trait Verifier { ) -> VerifyOutcome; } -/// The Profile 0 verifier: exact re-execution. +/// The binding verifier: exact re-execution. pub struct SampledReexecVerifier; impl Verifier for SampledReexecVerifier { @@ -93,9 +93,9 @@ impl Verifier for SampledReexecVerifier { } } -/// **Reserved** TEE-attestation verifier (spec/implementation/03; out of scope for -/// Profile 0). Present as a seam: a later profile implements `check` to validate a -/// hardware attestation cheaply. Profile 0 never assigns this tier, so `check` is +/// **Reserved** TEE-attestation verifier (spec/bindings/03; out of scope for +/// this binding). Present as a seam: a later tier implements `check` to validate a +/// hardware attestation cheaply. This binding never assigns this tier, so `check` is /// unreachable here. pub struct TeeVerifier; @@ -113,14 +113,14 @@ impl Verifier for TeeVerifier { _dvm: &dyn Dvm, ) -> VerifyOutcome { unimplemented!( - "TEE tier is reserved; not implemented in Profile 0 (spec/implementation/03)" + "TEE tier is reserved; not implemented in this binding (spec/bindings/03)" ) } } -/// **Reserved** ZK-proof verifier (spec/implementation/03; out of scope for Profile -/// 0). Present as a seam; a later profile implements `check` to verify a succinct -/// proof. Profile 0 never assigns this tier. +/// **Reserved** ZK-proof verifier (spec/bindings/03; out of scope for this binding +/// 0). Present as a seam; a later tier implements `check` to verify a succinct +/// proof. This binding never assigns this tier. pub struct ZkVerifier; impl Verifier for ZkVerifier { @@ -136,7 +136,7 @@ impl Verifier for ZkVerifier { _benchmark: &Benchmark, _dvm: &dyn Dvm, ) -> VerifyOutcome { - unimplemented!("ZK tier is reserved; not implemented in Profile 0 (spec/implementation/03)") + unimplemented!("ZK tier is reserved; not implemented in this binding (spec/bindings/03)") } } @@ -144,7 +144,7 @@ impl Verifier for ZkVerifier { const PPM: u128 = 1_000_000; -/// Deterministic audit draw (spec/implementation/03 §2.1): +/// Deterministic audit draw (spec/bindings/03 §2.1): /// `selected = blake3(block_hash ‖ task_id)[0..8] < p · 2^64`. Reproducible and not /// gameable by the Provider. pub fn is_sampled(block_hash: &Hash, task: &TaskId, audit_prob_ppm: u128) -> bool { @@ -158,7 +158,7 @@ pub fn is_sampled(block_hash: &Hash, task: &TaskId, audit_prob_ppm: u128) -> boo } /// Deterministically choose a re-executor from the eligible set, excluding the -/// original Provider (spec/implementation/03 §2.2), by the same seed. `None` if no +/// original Provider (spec/bindings/03 §2.2), by the same seed. `None` if no /// eligible worker remains. pub fn select_reexecutor( block_hash: &Hash, @@ -190,7 +190,7 @@ pub trait EnergyAttestor { fn attest(&self, seal: &PowerSeal, ucu_count: Ucu, benchmark: &Benchmark) -> Option; } -/// Profile 0 **live** attestor: no energy is measured, so ℚ is always `None` +/// This binding's **live** attestor: no energy is measured, so ℚ is always `None` /// (`efficiency_mult = 1.0`). This is what the devnet wires, keeping base settlement /// strictly 𝕌-proportional. pub struct NullAttestor; @@ -218,7 +218,7 @@ impl EnergyAttestor for SealedAttestor { } /// (a) Evidence validity (spec/09 §6.1): the attestation must be present (chains to a -/// root of trust and binds the Task Hash). Profile 0 checks the evidence reference is +/// root of trust and binds the Task Hash). This binding checks the evidence reference is /// non-empty; real chain validation lands with the TEE tier. fn evidence_valid(seal: &PowerSeal) -> bool { seal.attestation_evidence != [0u8; 32] diff --git a/ducp-node/src/lib.rs b/ducp-node/src/lib.rs index 34448f1..4e72431 100644 --- a/ducp-node/src/lib.rs +++ b/ducp-node/src/lib.rs @@ -1,7 +1,7 @@ //! # ducp_node //! -//! Profile 0 reference node: wires the DVM, ledger, single-sequencer consensus, and -//! governance parameters behind a JSON-RPC server (spec/implementation/05). +//! Reference node: wires the DVM, ledger, single-sequencer consensus, and +//! governance parameters behind a JSON-RPC server (spec/bindings/05). //! //! The node accepts signed transactions, orders them into single-sequencer blocks, //! applies the deterministic ledger transition, and exposes read queries — including @@ -10,7 +10,7 @@ //! "node" means a *network participant*; it is unrelated to Node.js. //! //! Specification: -//! Status: Profile 0 implementation for spec v0.2.0. +//! Status: Reference implementation for DUCP-SPEC v0.2.0. use std::collections::BTreeMap; use std::net::SocketAddr; @@ -39,8 +39,8 @@ pub fn version() -> &'static str { // ============================ Node state =================================== -/// Persistence seam for ledger state (spec/implementation/04: the state commitment -/// scheme is provisional). Profile 0 ships [`InMemoryStorage`]; a disk/Merkle-backed +/// Persistence seam for ledger state (spec/bindings/04: the state commitment +/// scheme is provisional). The reference-node binding uses [`InMemoryStorage`]; a disk/Merkle-backed /// store is a later `impl Storage` with no change to the node. pub trait Storage: Send + Sync { /// Persist the latest committed state snapshot. @@ -49,7 +49,7 @@ pub trait Storage: Send + Sync { fn load(&self) -> Option; } -/// The Profile 0 in-memory state store (no durability). +/// The binding in-memory state store (no durability). #[derive(Default)] pub struct InMemoryStorage { last: Mutex>, @@ -118,7 +118,7 @@ impl NodeHandle { } /// Admit a signed transaction and produce a single-sequencer block immediately - /// (Profile 0 devnet finality). Returns the `TxId` on acceptance, or the ledger + /// (binding devnet finality). Returns the `TxId` on acceptance, or the ledger /// `Reject` reason. The block carries any settlement, mint, Standing update, and /// the (𝕌, ℚ) entry that the transition produced. pub fn submit(&self, stx: SignedTx) -> Result { @@ -148,7 +148,7 @@ impl NodeHandle { } /// Resolve an open challenge against `task` by re-executing the proof and - /// applying the verdict on-chain (spec/implementation/03 §3). Returns whether + /// applying the verdict on-chain (spec/bindings/03 §3). Returns whether /// fraud was found. The bond must already be locked (via a Challenge tx). The /// resolution is committed as a system block so the head and `state_root` /// advance. @@ -387,7 +387,7 @@ pub struct GetBlobResp { // ============================ RPC API ====================================== -/// The Profile 0 JSON-RPC API (spec/implementation/05 §3). State-changing methods +/// The binding JSON-RPC API (spec/bindings/05 §3). State-changing methods /// take a single positional `SignedTx`; read methods take positional scalar args. #[rpc(server, client, namespace_separator = "_")] pub trait DucpApi { diff --git a/ducp-node/src/main.rs b/ducp-node/src/main.rs index d2c725d..c00aab4 100644 --- a/ducp-node/src/main.rs +++ b/ducp-node/src/main.rs @@ -5,7 +5,7 @@ //! It is unrelated to Node.js and contains no JavaScript. //! //! Specification: -//! Status: Profile 0 reference node for spec v0.2.0. +//! Status: Reference node for DUCP-SPEC v0.2.0 (reference-node binding). use std::net::SocketAddr; @@ -13,7 +13,7 @@ use clap::Parser; use ducp_node::{start_server, NodeHandle}; use ducp_types::{keys, Identity, Ucu, UCU_SCALE}; -/// Run a DUCP Profile 0 node (single-sequencer devnet). +/// Run a DUCP reference node (single-sequencer devnet). #[derive(Parser, Debug)] #[command(name = "ducp-node", version, about)] struct Cli { @@ -87,7 +87,7 @@ async fn main() -> anyhow::Result<()> { "DUCP node (Rust reference implementation) v{}", env!("CARGO_PKG_VERSION") ); - println!(" implements DUCP specification v0.2.0 (Profile 0)"); + println!(" implements DUCP specification v0.2.0 (reference-node binding)"); println!(" sequencer {}", hex::encode(proposer)); println!( " benchmark v{} (fuel_per_ucu={})", diff --git a/scripts/devnet.sh b/scripts/devnet.sh index ba18cfe..ef86e6f 100755 --- a/scripts/devnet.sh +++ b/scripts/devnet.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Profile 0 devnet demo: 1 single-sequencer node + 1 worker. +# reference-node binding devnet demo: 1 single-sequencer node + 1 worker. # # Starts a ducp-node sequencer, then runs the beachhead workload against it via # JSON-RPC (submit -> claim -> execute -> proof -> settle), repeatedly. diff --git a/test-vectors/README.md b/test-vectors/README.md index 1137987..4f2c2fa 100644 --- a/test-vectors/README.md +++ b/test-vectors/README.md @@ -1,18 +1,18 @@ -# DUCP Profile 0 — Conformance Test Vectors +# DUCP reference-node binding — Conformance Test Vectors Golden vectors published with the reference implementation. A conforming node MUST -reproduce all of them (spec/implementation/05 §5, spec/09 §10). They are the +reproduce all of them (spec/bindings/05 §5, spec/09 §10). They are the per-milestone acceptance gates and the cross-implementation interop contract. Loaded by the [`ducp-conformance`](../crates/conformance) harness. | Family | Dir | Source | Milestone | |---|---|---|---| -| Codec / hash | `codec/` | spec/implementation/01 §7 | M0 | -| Metering | `metering/` | spec/implementation/02 §5 | M1 | -| Settlement | `settlement/` | spec/implementation/04 §3 | M2/M3 | -| Fraud | `fraud/` | spec/implementation/03 §4 | M4/M5 | -| Replication | `replication/` | spec/implementation/04 §6 | M6 | +| Codec / hash | `codec/` | spec/bindings/01 §7 | M0 | +| Metering | `metering/` | spec/bindings/02 §5 | M1 | +| Settlement | `settlement/` | spec/bindings/04 §3 | M2/M3 | +| Fraud | `fraud/` | spec/bindings/03 §4 | M4/M5 | +| Replication | `replication/` | spec/bindings/04 §6 | M6 | | ℚ observable | `q-observable/` | spec/09 §10, DP-0001 §9 | cross-cutting | Binary values are hex-encoded strings. Amounts are decimal strings (𝕌 base units,