Skip to content

Commit ceaa31e

Browse files
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 <cursoragent@cursor.com>
1 parent 2b6f982 commit ceaa31e

23 files changed

Lines changed: 125 additions & 125 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ducp-ledger = { path = "crates/ledger" }
2929
ducp-consensus = { path = "crates/consensus" }
3030
ducp-governance = { path = "crates/governance" }
3131

32-
# Canonical codec + hashing + identity (Profile 0 locked choices, spec/implementation/01).
32+
# Canonical codec + hashing + identity (reference-node binding choices, spec/bindings/01).
3333
borsh = { version = "1.7", features = ["derive"] }
3434
blake3 = "1.8"
3535
ed25519-dalek = "2"
@@ -46,7 +46,7 @@ clap = { version = "4", features = ["derive"] }
4646
tracing = "0.1"
4747
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
4848

49-
# WebAssembly DVM (spec/implementation/02).
49+
# WebAssembly DVM (spec/bindings/02).
5050
wasmtime = "46"
5151
wat = "1"
5252

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
The reference implementation of the **Decentralized Universal Compute Protocol (DUCP)**, in Rust.
44

5-
> **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.
5+
> **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.
66
77
> **"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.
88
99
## What this is
1010

11-
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/`).
11+
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).
1212

13-
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).
13+
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).
1414

1515
## Workspace layout
1616

@@ -49,7 +49,7 @@ This starts a sequencer and runs the beachhead workload against it over JSON-RPC
4949

5050
## Architecture & milestones
5151

52-
The node was built along the Profile 0 roadmap (`spec/implementation/README.md`):
52+
The node was built along the reference-node binding roadmap (`spec/bindings/README.md`):
5353

5454
| # | Milestone | What it delivers |
5555
|---|---|---|
@@ -71,11 +71,11 @@ Published in [`test-vectors/`](test-vectors/) and checked by `ducp-conformance`.
7171

7272
| Family | Source | Milestone |
7373
|---|---|---|
74-
| `codec/` | spec/implementation/01 §7 | M0 |
75-
| `metering/` | spec/implementation/02 §5 | M1 |
76-
| `settlement/` | spec/implementation/04 §3 | M2/M3/M5 |
77-
| `fraud/` | spec/implementation/03 §4, 04 §4 | M4/M5 |
78-
| `replication/` | spec/implementation/04 §6 | M6 |
74+
| `codec/` | spec/bindings/01 §7 | M0 |
75+
| `metering/` | spec/bindings/02 §5 | M1 |
76+
| `settlement/` | spec/bindings/04 §3 | M2/M3/M5 |
77+
| `fraud/` | spec/bindings/03 §4, 04 §4 | M4/M5 |
78+
| `replication/` | spec/bindings/04 §6 | M6 |
7979
| `q-observable/` | spec/09 §10, DP-0001 §9 ||
8080

8181
Regenerate after an intentional change:
@@ -84,9 +84,9 @@ Regenerate after an intentional change:
8484
cargo run -p ducp-conformance --bin gen-vectors
8585
```
8686

87-
## Profile 0 scope & deferred seams
87+
## Reference-node binding scope & deferred seams
8888

89-
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.
89+
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.
9090

9191
## Specification <-> implementation
9292

crates/conformance/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ducp-conformance"
3-
description = "DUCP Profile 0 conformance harness: loads the published test vectors and checks them against the reference crates"
3+
description = "DUCP Reference-node binding conformance harness: loads the published test vectors and checks them against the reference crates"
44
version.workspace = true
55
edition.workspace = true
66
rust-version.workspace = true

crates/conformance/src/bin/gen-vectors.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::fs;
1010
fn main() {
1111
let dir = ducp_conformance::vectors_dir();
1212

13-
// --- codec / hash (M0, spec/implementation/01 §7) ---
13+
// --- codec / hash (M0, spec/bindings/01 §7) ---
1414
let codec_dir = dir.join("codec");
1515
fs::create_dir_all(&codec_dir).expect("create codec dir");
1616
let records = ducp_conformance::codec_records();
@@ -19,7 +19,7 @@ fn main() {
1919
fs::write(&path, format!("{json}\n")).expect("write codec vectors");
2020
println!("wrote {} ({} records)", path.display(), records.len());
2121

22-
// --- metering (M1, spec/implementation/02 §5) ---
22+
// --- metering (M1, spec/bindings/02 §5) ---
2323
let metering_dir = dir.join("metering");
2424
fs::create_dir_all(&metering_dir).expect("create metering dir");
2525
let metering = ducp_conformance::metering_records();
@@ -28,7 +28,7 @@ fn main() {
2828
fs::write(&path, format!("{json}\n")).expect("write metering vectors");
2929
println!("wrote {} ({} records)", path.display(), metering.len());
3030

31-
// --- settlement (M2/M3, spec/implementation/04 §3) ---
31+
// --- settlement (M2/M3, spec/bindings/04 §3) ---
3232
let settlement_dir = dir.join("settlement");
3333
fs::create_dir_all(&settlement_dir).expect("create settlement dir");
3434
let settlement = ducp_conformance::settlement_record();
@@ -37,14 +37,14 @@ fn main() {
3737
fs::write(&path, format!("{json}\n")).expect("write settlement vector");
3838
println!("wrote {}", path.display());
3939

40-
// --- finality / clawback window (M5, spec/implementation/04 §3) ---
40+
// --- finality / clawback window (M5, spec/bindings/04 §3) ---
4141
let finality = ducp_conformance::finality_record();
4242
let json = serde_json::to_string_pretty(&finality).expect("serialize finality");
4343
let path = settlement_dir.join("finality.json");
4444
fs::write(&path, format!("{json}\n")).expect("write finality vector");
4545
println!("wrote {}", path.display());
4646

47-
// --- fraud (M4/M5, spec/implementation/03 §4, 04 §4) ---
47+
// --- fraud (M4/M5, spec/bindings/03 §4, 04 §4) ---
4848
let fraud_dir = dir.join("fraud");
4949
fs::create_dir_all(&fraud_dir).expect("create fraud dir");
5050
let fraud = ducp_conformance::fraud_record();
@@ -53,7 +53,7 @@ fn main() {
5353
fs::write(&path, format!("{json}\n")).expect("write fraud vector");
5454
println!("wrote {}", path.display());
5555

56-
// --- replication (M6, spec/implementation/04 §6) ---
56+
// --- replication (M6, spec/bindings/04 §6) ---
5757
let replication_dir = dir.join("replication");
5858
fs::create_dir_all(&replication_dir).expect("create replication dir");
5959
let replication = ducp_conformance::replication_record();

crates/conformance/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
//! # ducp-conformance
22
//!
3-
//! Profile 0 conformance harness. Loads the published golden vectors from the
3+
//! Reference-node binding conformance harness. Loads the published golden vectors from the
44
//! workspace-root `test-vectors/` directory and exposes helpers + canonical sample
55
//! values the per-milestone integration tests (under `tests/`) check the reference
66
//! crates against.
77
//!
8-
//! The six vector families (spec/implementation/05 §5, spec/09 §10):
8+
//! The six vector families (spec/bindings/05 §5, spec/09 §10):
99
//! `codec`, `metering`, `settlement`, `fraud`, `replication`, `q-observable`.
1010
//!
1111
//! Regenerate the committed vector files with the generator binary:
@@ -40,7 +40,7 @@ pub fn unhex(s: &str) -> Vec<u8> {
4040
hex::decode(s).unwrap_or_else(|e| panic!("bad hex {s:?}: {e}"))
4141
}
4242

43-
/// One codec/hash golden vector (spec/implementation/01 §7): a value, its canonical
43+
/// One codec/hash golden vector (spec/bindings/01 §7): a value, its canonical
4444
/// (borsh) bytes as hex, and the BLAKE3-256 of those bytes.
4545
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4646
pub struct CodecRecord {
@@ -199,7 +199,7 @@ pub mod samples {
199199
}
200200
}
201201

202-
/// One metering golden vector (spec/implementation/02 §5): a canonical module +
202+
/// One metering golden vector (spec/bindings/02 §5): a canonical module +
203203
/// input and its deterministic `{total_fuel, ucu_count, result_hash}` under the
204204
/// devnet benchmark. `total_fuel` is wasmtime-fuel-model-specific (provisional).
205205
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
@@ -248,7 +248,7 @@ pub fn metering_records() -> Vec<MeteringRecord> {
248248
.collect()
249249
}
250250

251-
/// The settlement golden vector (spec/implementation/04 §3): the post-state of a
251+
/// The settlement golden vector (spec/bindings/04 §3): the post-state of a
252252
/// `submit → claim → proof → settle` happy path. Pins the economic outcome, the
253253
/// Receipt, the (𝕌, ℚ) entry (ℚ null in P0), and the `state_root`.
254254
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
@@ -333,7 +333,7 @@ pub fn settlement_record() -> SettlementRecord {
333333
}
334334
}
335335

336-
/// The replication golden vector (spec/implementation/04 §6): producing then
336+
/// The replication golden vector (spec/bindings/04 §6): producing then
337337
/// replaying a sequence of blocks reaches the identical `state_root` — state-machine
338338
/// replication, so the devnet is verifiable even with one proposer.
339339
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
@@ -433,7 +433,7 @@ pub fn replication_record() -> ReplicationRecord {
433433
}
434434
}
435435

436-
/// The finality golden vector (spec/implementation/04 §3): a settled task whose
436+
/// The finality golden vector (spec/bindings/04 §3): a settled task whose
437437
/// clawback window closes, releasing the claim stake while the Receipt stays
438438
/// immutable (`I-ECON-FINAL`).
439439
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
@@ -519,7 +519,7 @@ pub fn finality_record() -> FinalityRecord {
519519
}
520520
}
521521

522-
/// The fraud golden vector (spec/implementation/03 §4, 04 §4): a forged proof, the
522+
/// The fraud golden vector (spec/bindings/03 §4, 04 §4): a forged proof, the
523523
/// re-execution verdict, and the post-resolution state (clawback, burn, fine,
524524
/// Standing floor). Verifies `I-LEDGER-CONSERVE` across the fraud path.
525525
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
@@ -778,7 +778,7 @@ mod tests {
778778

779779
#[test]
780780
fn all_six_vector_families_present() {
781-
// spec/implementation/05 §5 (five) + spec/09 §10 (ℚ).
781+
// spec/bindings/05 §5 (five) + spec/09 §10 (ℚ).
782782
let families = [
783783
("codec", "types.json"),
784784
("metering", "cases.json"),

crates/conformance/tests/codec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! M0 conformance: codec / hash golden vectors (spec/implementation/01 §7).
1+
//! M0 conformance: codec / hash golden vectors (spec/bindings/01 §7).
22
//!
33
//! Pins the canonical (borsh) bytes and BLAKE3-256 hashes of the core data model,
44
//! including the ℚ types. Regenerate with `cargo run -p ducp-conformance --bin

crates/conformance/tests/finality.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! M5 conformance: clawback-window finality (spec/implementation/04 §3).
1+
//! M5 conformance: clawback-window finality (spec/bindings/04 §3).
22
//!
33
//! After the clawback window closes with no successful challenge, the claim stake is
44
//! released while the settled Receipt stays immutable (`I-ECON-FINAL`).

crates/conformance/tests/fraud.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! M4/M5 conformance: fraud golden vector (spec/implementation/03 §4, 04 §4).
1+
//! M4/M5 conformance: fraud golden vector (spec/bindings/03 §4, 04 §4).
22
//!
33
//! A forged proof is settled optimistically, challenged, re-executed, and slashed.
44
//! Pins the post-state and verifies conservation across the fraud path.

crates/conformance/tests/metering.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! M1 conformance: metering golden vectors (spec/implementation/02 §5).
1+
//! M1 conformance: metering golden vectors (spec/bindings/02 §5).
22
//!
33
//! Verifies the deterministic 𝕌 derivation: the reference workload meters to
44
//! exactly one 𝕌, two independent runs agree, and the committed vectors match the

crates/conformance/tests/replication.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! M6 conformance: state-machine replication (spec/implementation/04 §6).
1+
//! M6 conformance: state-machine replication (spec/bindings/04 §6).
22
//!
33
//! Producing then replaying a block sequence reaches the identical `state_root`, so
44
//! every node converges on the same ledger state even with a single proposer.

0 commit comments

Comments
 (0)