Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ overflow-checks = true
# standalone. `native-tls` is NOT patched: dig-gossip is pulled with
# `default-features = false, features = ["rustls", "relay"]`, so the OpenSSL/native-tls path is off.
[patch.crates-io]
chia-protocol = { git = "https://github.com/DIG-Network/dig-gossip", rev = "dbb03430f2a9c5cebd5b6f97ac86b03012be5a41" }
chia-sdk-client = { git = "https://github.com/DIG-Network/dig-gossip", rev = "dbb03430f2a9c5cebd5b6f97ac86b03012be5a41" }
chia-protocol = { git = "https://github.com/DIG-Network/dig-gossip", rev = "ce6cce753c7ac1407966a2a4aa8380fd79075009" }
chia-sdk-client = { git = "https://github.com/DIG-Network/dig-gossip", rev = "ce6cce753c7ac1407966a2a4aa8380fd79075009" }

# The dig-nat unification patch is RETIRED (#1280 crates.io cascade): dig-nat 0.7 is on crates.io and
# the ENTIRE peer stack (dig-gossip 0.7.1, dig-dht 0.2.2, dig-download 0.2.1, dig-peer-selector 0.2.1,
Expand Down
6 changes: 6 additions & 0 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ The server opens UP TO THREE listeners for the SAME router:

1. **`<DIG_NODE_HOST>:<DIG_NODE_PORT>`** (default `127.0.0.1:9778`, §3.2) — always on. A bind
failure here is FATAL (`serve` returns the error; CLI exit `BIND_FAILED`, §8.4).
The rendered authority MUST be a valid socket address for BOTH address families: an IPv6
`DIG_NODE_HOST` MUST be bracketed (`DIG_NODE_HOST=::1` ⇒ `[::1]:9778`). Implementations MUST
render it from the parsed `IpAddr` and the port (e.g. `SocketAddr`) and MUST NOT concatenate
host and port as text — the unbracketed form binds nowhere, and this bind failure is fatal.
The same rendering applies wherever the node reports or reuses that address: the
`/health` `addr` field, the CLI control-plane URL, and the `localhost`-tier serve URL (§5.3).
2. **`[::1]:<DIG_NODE_PORT>`** (§5.2 dual-stack loopback) — the SAME `localhost:<port>` on the
IPv6 loopback. Present ONLY when `DIG_NODE_HOST` is unset (the default): some resolvers return
`::1` before `127.0.0.1` for `localhost` (Windows by default), so without this listener such a
Expand Down
14 changes: 7 additions & 7 deletions crates/dig-node-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ getrandom = "0.2"
# DIG-Network/dig_ecosystem#1686 (release-first,
# §4.1); `tests/dependency_tree.rs` asserts the single-instance invariant against the resolved LOCK so
# a manifest edit cannot quietly reintroduce the duplicate.
dig-nat = "0.13"
dig-nat = "0.14"
# dig-gossip is the ONE peer-stack exception: at v0.15.2 (on dig-nat 0.11 + dig-tls 0.3, crates.io
# deps) but NOT yet published to crates.io — its own publish is guarded pending dig-peer-protocol (#681).
# So it stays a git dependency, PINNED to the v0.15.2 tag commit (rev dbb03430f2a9, #1584 — both
Expand All @@ -159,7 +159,7 @@ dig-nat = "0.13"
# graph still unifies to ONE of each. The vendored chia-protocol/chia-sdk-client forks it path-patches
# are re-declared at this SAME rev in the workspace `[patch.crates-io]` (a git dep's own patches do not
# apply transitively — the #1529 3-rev lockstep: this dep rev + the two patch revs move together).
dig-gossip = { git = "https://github.com/DIG-Network/dig-gossip", rev = "b065e70c5bc4ad8f343d363e71c605870a4923d2", default-features = false, features = ["rustls", "relay"] }
dig-gossip = { git = "https://github.com/DIG-Network/dig-gossip", rev = "ce6cce753c7ac1407966a2a4aa8380fd79075009", default-features = false, features = ["rustls", "relay"] }
# The canonical DIG network id (genesis challenge) for the gossip handshake / introducer scope. From
# crates.io: dig-nat 0.7 requires `>=0.4, <0.6` and dig-gossip 0.7.1 requires `>=0.2, <0.5`, so `0.4`
# sits in both windows and the whole graph resolves to ONE crates.io dig-constants 0.4.x.
Expand All @@ -175,7 +175,7 @@ dig-constants = "0.4"
# so cargo unifies to ONE dig-dht instance — dig-dht's `PeerId` / `Contact` / `DhtTransport` share the
# exact types `dig_nat::connect` returns. dig-dht 0.5 deps dig-nat "^0.10" (crates.io), the SAME
# dig-nat "0.10" this crate pins, so the whole graph shares ONE dig-nat 0.10 instance.
dig-dht = "0.7"
dig-dht = "0.8"
# -- L7 Peer Exchange (PEX, #166) --------------------------------------------------------------------
# The node<->node peer-sharing protocol: over each established mTLS peer connection, a dedicated PEX
# logical stream exchanges delta-based first-hand known-peer sets (handshake -> snapshot -> deltas),
Expand Down Expand Up @@ -210,7 +210,7 @@ dig-pex = "0.1"
# `seams/dig_peer/module_anchor.rs` (`ChainAnchoredModuleVerifier`). NOTE the `testkit` feature is
# deliberately NOT enabled: it is what makes the fail-OPEN `AcceptAnyModuleAnchor` nameable, and this
# crate's anchor gate is the reshare path's ONLY root of trust.
dig-download = "0.11"
dig-download = "0.12"
# -- The shared peer client (#1283/#1576) -------------------------------------------------------------
# `DigPeer` — the ONE DIG Network peer client: peer_id-pinned mTLS over the full NAT ladder plus typed
# RPC. Depended on DIRECTLY (not only transitively through dig-download) because dig-node supplies the
Expand All @@ -222,7 +222,7 @@ dig-download = "0.11"
# module pull's trust boundary — on the fields that drive the whole pull plan. dig-download 0.8.1 is on
# dig-peer 0.5 too, so exactly ONE dig-rpc-protocol + ONE dig-peer resolve here (asserted by
# `crates/dig-node-core/tests/dependency_tree.rs`).
dig-peer = "0.6"
dig-peer = "0.7"
# -- Self-optimizing peer selection (#178) ------------------------------------------------------------
# The decision + learning layer between dig-dht discovery and dig-download execution: it ranks the
# providers `find_providers` returns (learning throughput/rtt/reliability + a per-class saturation
Expand All @@ -239,7 +239,7 @@ dig-peer = "0.6"
# dig-nat/dig-dht types). The selector mirrors `dig_gossip::PoolEvent` LOCALLY (it does not depend on
# dig-gossip, which lags as a git dep), so the node maps `dig_gossip::PoolEvent` → the selector's local
# `PoolEvent` 1:1 (see `download.rs::pool_event_to_selector`).
dig-peer-selector = "0.6"
dig-peer-selector = "0.7"
# The canonical DIG mTLS certificate crate (L00, crates.io). The node's PERSISTENT machine identity
# is a CA-signed `dig_tls::NodeCert` minted from the node's own BLS identity key and persisted 0600 in
# the data dir (#908 identity boundary: this is the MACHINE key, never a user key). Replaces the
Expand Down Expand Up @@ -284,7 +284,7 @@ tempfile = "3"
#
# Pinned by the `the_fail_open_anchor_verifier_is_not_reachable_from_a_production_build` test, which
# fails if `testkit` ever appears on the production entry.
dig-download = { version = "0.11", features = ["testkit"] }
dig-download = { version = "0.12", features = ["testkit"] }
# Captures the peer-facing serve's real emitted tracing records into an in-memory buffer, so the
# serve-observability tests (#1595) assert what an operator would actually see in the node log —
# and that no payload byte or proof ever reaches it.
Expand Down
11 changes: 7 additions & 4 deletions crates/dig-node-core/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,10 +652,13 @@ impl NodeContent {
// already self-filtered but otherwise unranked; the selector refines the SOURCE choice at
// schedule time, not the discovered set. The same RAW `locator` stays on the engine for the
// redirect-on-miss path (a redirect offers ALL known non-self holders).
let config = DownloadConfig {
selector: Some(Arc::new(SelectorAdapter::new(selector.clone()))),
..DownloadConfig::default()
};
//
// Built by MUTATING the default rather than by a struct expression: `DownloadConfig` is
// `#[non_exhaustive]` as of dig-download 0.12, so a consumer names only the fields it means to
// override and inherits every field the crate adds later — which is the whole point of the
// attribute, and the reason a `..default()` functional update is rejected too.
let mut config = DownloadConfig::default();
config.selector = Some(Arc::new(SelectorAdapter::new(selector.clone())));
// The DOWNLOAD locator (#1590) = a [`PoolProviderLocator`] over the live connected-pool set
// UNIONed with the raw discovery `locator`. So a fetch's locate step also offers the peers the
// node is ALREADY CONNECTED to — reaching a holder whose DHT provider record is unreachable on
Expand Down
Loading
Loading