mirror/advertise.rs still carries is_globally_routable — the exact rival dig-stun was built to replace
Found by the dig-node#566 lane while adopting dig_stun::establish. Reported rather than fixed, correctly: the PR was already a security-gated change to the on-chain establishment path, and folding a predicate swap into it would have widened a diff that needed narrow scrutiny.
dig-stun's own SPEC.md names this exact pair as one of the two tables it was created to unify. So this is not a newly-noticed duplication — it is the last unclosed half of the consolidation.
Current state
|
|
dig-node mirror/advertise.rs |
is_globally_routable / _v4 / _v6 — still local |
dig-stun scope |
is_globally_routable — the reconciled union, published 0.2.0 |
dig-relay |
adopted (0.20.1) — its codec deleted, byte-identity proven |
dig-nat |
still local — blocked, see below |
Why this one matters more than an ordinary duplicate
This predicate is the gate on what gets written to a mirror coin. The two tables already disagree, and the disagreement runs the dangerous direction:
192.88.99.0/24 (deprecated 6to4 anycast) — refused by dig-nat's dial guard, ACCEPTED by dig-node's on-chain advertisement gate. The stricter tier had the hole.
192.0.0.0/24, 2001:2::/48, 100::/64 — accepted by dig-nat's dial guard, NeverDialable in the reconciled table.
So a node can currently advertise a 192.88.99.x address on chain, with collateral behind it, that the rest of the stack would refuse to dial. Adopting dig_stun::scope closes that, and it is the only behaviour change in the swap — everything else is mechanical.
What "done" looks like
Replace the local predicate with dig_stun::scope::is_globally_routable and delete the local copies. Name the 192.88.99.0/24 change explicitly in the PR — it is a real behaviour change on the money path and must not ride in as a refactor.
Add a regression test that 192.88.99.1 is refused for advertisement. Without it, nothing prevents the local table being reintroduced later by someone who wants "one fewer dependency".
Sequencing
dig-node #571 (0.254.85) is in flight and touches mirror/advertise.rs directly. Single-writer — this waits for that merge.
dig-nat's adoption (the other half of #3204) is likewise blocked behind it, since dig-node consumes dig_nat::stun. Both can then proceed, and dig-nat's re-export means dig-node needs no further change for the codec half — only this predicate swap.
Related
mirror/advertise.rsstill carriesis_globally_routable— the exact rivaldig-stunwas built to replaceFound by the dig-node#566 lane while adopting
dig_stun::establish. Reported rather than fixed, correctly: the PR was already a security-gated change to the on-chain establishment path, and folding a predicate swap into it would have widened a diff that needed narrow scrutiny.dig-stun's own
SPEC.mdnames this exact pair as one of the two tables it was created to unify. So this is not a newly-noticed duplication — it is the last unclosed half of the consolidation.Current state
dig-nodemirror/advertise.rsis_globally_routable/_v4/_v6— still localdig-stunscopeis_globally_routable— the reconciled union, published0.2.0dig-relay0.20.1) — its codec deleted, byte-identity provendig-natWhy this one matters more than an ordinary duplicate
This predicate is the gate on what gets written to a mirror coin. The two tables already disagree, and the disagreement runs the dangerous direction:
192.88.99.0/24(deprecated 6to4 anycast) — refused by dig-nat's dial guard, ACCEPTED by dig-node's on-chain advertisement gate. The stricter tier had the hole.192.0.0.0/24,2001:2::/48,100::/64— accepted by dig-nat's dial guard,NeverDialablein the reconciled table.So a node can currently advertise a
192.88.99.xaddress on chain, with collateral behind it, that the rest of the stack would refuse to dial. Adoptingdig_stun::scopecloses that, and it is the only behaviour change in the swap — everything else is mechanical.What "done" looks like
Replace the local predicate with
dig_stun::scope::is_globally_routableand delete the local copies. Name the192.88.99.0/24change explicitly in the PR — it is a real behaviour change on the money path and must not ride in as a refactor.Add a regression test that
192.88.99.1is refused for advertisement. Without it, nothing prevents the local table being reintroduced later by someone who wants "one fewer dependency".Sequencing
dig-node#571 (0.254.85) is in flight and touchesmirror/advertise.rsdirectly. Single-writer — this waits for that merge.dig-nat's adoption (the other half of #3204) is likewise blocked behind it, since dig-node consumesdig_nat::stun. Both can then proceed, and dig-nat's re-export means dig-node needs no further change for the codec half — only this predicate swap.Related
0.20.1