Graduates the consensus layer from the in-process LockstepCluster simulation to
a genuinely distributed node that decides from messages it receives over QUIC.
- joule-code-collab: add RoundNode — a single node's view of one lockstep BFT
round (validate, vote, tally, commit), holding only its own state. Two honest
nodes that received the same proposal set and per-node vote sets compute a
byte-identical log, with no leader, because validation is deterministic and
commits apply in op_id order. Unit test drives independent node states with a
Byzantine node withholding votes: a non-member's op is refused, the valid ops
commit at 2f+1, and all honest logs are byte-identical.
- joule-moq: add generate_self_signed_der + QuicEndpoint::server_from_der /
client_from_der so a transport consumer can carry the shared cert as raw DER
without depending on rustls types.
- lockstep-quic (new crate): a node binary that derives a deterministic signed
membership from indices, forms a QUIC mesh over joule-moq, exchanges signed
proposals and vote sets with round barriers, and commits via RoundNode — then
prints the agreed-log hash.
Live-verified: loopback n=4 (f=1, threshold 3) — four independent processes
commit a byte-identical log (same blake3 hash); and cross-machine n=2 over real
QUIC between two Macs — both commit the same log. The full n=4 cross-machine
mesh is blocked by an environment-specific outbound-dial issue on two of the
hosts (firewall ruled out — disabled there; the same binary succeeds loopback-n4
and cross-machine-n2), left for follow-up; the consensus and transport code are
not implicated.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
(cherry picked from commit a083120a0f)
23 lines
924 B
TOML
23 lines
924 B
TOML
[package]
|
|
name = "lockstep-quic"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
description = "Joule Code — distributed lockstep BFT consensus (joule-code-collab RoundNode) over the real-QUIC joule-moq transport. A node binary that forms a mesh, exchanges proposals + votes, and commits a byte-identical agreed log across machines."
|
|
|
|
[[bin]]
|
|
name = "lockstep-node"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
joule-code-collab = { path = "../joule-code-collab" }
|
|
joule-code-cargo.workspace = true
|
|
joule-code-schema.workspace = true
|
|
joule-moq = { path = "../joule-moq", features = ["quic"] }
|
|
ed25519-dalek = { workspace = true, features = ["rand_core"] }
|
|
blake3.workspace = true
|
|
serde = { workspace = true }
|
|
serde_json.workspace = true
|
|
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "net", "io-util", "time", "sync"] }
|