Skip to content

Commit b56f639

Browse files
authoredAug 9, 2025
Betanet Version 1.1 – Official Implementation Specification
1 parent 4c37dd9 commit b56f639

File tree

1 file changed

+216
-115
lines changed

1 file changed

+216
-115
lines changed
 

‎README.md

Lines changed: 216 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,48 @@
1-
# Betanet Version 1.0 – Official Implementation Specification
1+
# Betanet Version 1.1 – Official Implementation Specification
22

3-
> **Normative document.** All requirements marked **MUST**, **MUST NOT**, or **SHALL** are mandatory for compliance.
3+
> **Normative document.** All requirements marked **MUST**, **MUST NOT**, or **SHALL** are mandatory for compliance.
44
55
---
66

77
## 0 Status & Scope
88

99
Betanet is a fully decentralised, censorship-resistant network intended to replace the public Internet.
10-
The design eliminates single points of failure, disguises itself as ordinary HTTPS, and makes selective blocking economically or politically prohibitive.
10+
This revision finalises covert transport indistinguishability, removes linkability vectors, specifies liveness for naming, hardens governance and bootstrap economics, and standardises adaptive calibration.
1111

1212
---
1313

1414
## 1 General Encoding Rules
1515

1616
* Multi-byte integers: **unsigned big-endian**.
1717
* `varint`: QUIC variable-length integer (RFC 9000 §16).
18-
* Unless stated, all sizes are in bytes.
18+
* Unless stated, sizes are in bytes.
1919
* Binary examples use hexadecimal.
2020

2121
---
2222

2323
## 2 Cryptography
2424

25-
| Purpose | Primitive |
26-
| ------------------------------- | -------------------------------------------------- |
27-
| Hash | **SHA-256** (32 B) |
28-
| AEAD | **ChaCha20-Poly1305** (IETF, 12-B nonce, 16-B tag) |
29-
| KDF | **HKDF-SHA256** |
30-
| Signatures | **Ed25519** |
31-
| Diffie–Hellman | **X25519** |
32-
| Post-quantum hybrid<sup>†</sup> | **X25519-Kyber768** (draft-ietf-pqtls-00) |
25+
| Purpose | Primitive |
26+
| ------------------- | -------------------------------------------------- |
27+
| Hash | **SHA-256** (32) |
28+
| AEAD | **ChaCha20-Poly1305** (IETF, 12-B nonce, 16-B tag) |
29+
| KDF | **HKDF-SHA256** |
30+
| Signatures | **Ed25519** |
31+
| Diffie–Hellman | **X25519** |
32+
| Post-quantum hybrid | **X25519-Kyber768** (hybrid) |
3333

34-
> † Offering the hybrid ciphersuite **MUST** be after *2027-01-01*.
34+
**PQ requirement.** From *2027-01-01*, the **inner** key agreement (L2 §5.3) **MUST** be hybrid X25519-Kyber768. The **outer** TLS handshake (L2 §5.1) **MUST** mirror the front origin and **MUST NOT** advertise PQ that diverges from the origin’s canonical fingerprint.
35+
36+
**Algorithm agility.** Implementations **MUST** expose a registry of cryptographic parameters keyed by OIDs; future substitutions **MUST** be negotiated via governance (L7) without changing wire formats where lengths permit.
3537

3638
---
3739

3840
## 3 Layer Model
3941

4042
| Layer | Function |
4143
| ------ | ----------------------------------------------------------- |
42-
| **L0** | Access media (any IP bearer: fibre, 5 G, sat, LoRa, etc.) |
43-
| **L1** | Path selection & routing (SCION + IP-transition header) |
44+
| **L0** | Access media (any IP bearer: fibre, 5G, sat, LoRa, etc.) |
45+
| **L1** | Path selection & routing (SCION + HTX-tunnelled transition) |
4446
| **L2** | Cover transport (HTX over TCP-443 / QUIC-443) |
4547
| **L3** | Overlay mesh (libp2p-v2 object relay) |
4648
| **L4** | Optional privacy hop (Nym mixnet) |
@@ -71,82 +73,115 @@ The design eliminates single points of failure, disguises itself as ordinary HTT
7173
* **Type** MUST be `0x01` (single path) or `0x03` (path list).
7274
* Each AS-hop signature in every segment **MUST** verify before forwarding; otherwise drop.
7375

74-
### 4.2 IP-Transition Header
76+
### 4.2 Transition Across Non-SCION Links (HTX-Tunnelled)
7577

76-
For links without native SCION support, prepend:
78+
Gateways bridging non-SCION segments **MUST** encapsulate SCION packets inside an **HTX control session** (L2) between gateways:
7779

78-
```
79-
+-------+-------------------------------------------------+
80-
| ID=0xF1 | 64-B Ed25519 sig over (prev-AS ‖ next-AS) |
81-
+-------+-------------------------------------------------+
82-
```
80+
* Establish an HTX session using §5 (origin-mirrored TLS).
81+
* Negotiate a **Transition Control Stream** opened by the gateway acting as the **server**, with **stream\_id=2** (first even stream).
82+
* The control stream payload is a single CBOR map:
83+
84+
```
85+
{ prevAS, nextAS, TS, FLOW, NONCE, SIG }
86+
```
87+
88+
where `TS` = unix-sec, `FLOW` = 8B random, `NONCE` = 8B random, and
89+
`SIG` = Ed25519 over `(prevAS ‖ nextAS ‖ TS ‖ FLOW ‖ NONCE ‖ "bn-t1")`.
90+
* Gateways **MUST** verify `TS` within **±300 s**, reject duplicate `(FLOW,TS)` for **2 h**, and apply per-peer token buckets.
91+
* SCION payloads are carried on subsequent HTX streams. No per-packet transition header appears on the public wire.
92+
* Gateways **MUST** close and re-establish the control stream on rekey (§5.3). Out-of-date control streams are invalid.
8393

84-
Gateways **MUST** verify and strip this header when re-entering a SCION-capable segment.
94+
**Public-Internet requirement.** The legacy on-wire transition header is **PROHIBITED** on public networks. It **MAY** be used only on private, administratively controlled links (§11).
8595

8696
### 4.3 Path Maintenance
8797

88-
End hosts **MUST** maintain **≥ 3** disjoint validated paths to every peer and switch within **300 ms** of failure detection.
98+
* Maintain **up to 3** disjoint validated paths per peer.
99+
* Switch within **300 ms** when an alternative validated path exists.
100+
* Probe with exponential back-off (min 1 s, max 60 s); **MUST NOT** exceed 1 probe per destination per **10 s** under persistent loss.
89101

90102
---
91103

92104
## 5 Cover Transport (L2) — HTX
93105

94-
### 5.1 Outer TLS 1.3 Handshake
106+
### 5.1 Outer TLS 1.3 Handshake (Origin Mirroring & Auto-Calibration)
95107

96-
* Client **MUST** mimic Chrome Stable (N-2) using uTLS rules.
97-
* **ECH** is attempted first; fallback is silent.
98-
* ALPN probabilities: `h3` 70 %, `h2` 25 %, `http/1.1` 5 %.
99-
* Hybrid ciphersuite (Kyber768) **MUST** be present once the date criterion is met.
108+
* Clients **MUST** mirror the front origin’s fingerprint class (JA3/JA4 family, ALPN set, extension order, GREASE, H2 SETTINGS, H3 availability).
109+
* A **per-connection calibration pre-flight** to the same origin (or same CDN POP if indicated) **MUST** be performed before inner handshake; any deviation **MUST** fail closed.
110+
* **Tolerances:** ALPN **set and order MUST match exactly**. Extension order **MUST match exactly**. H2 SETTINGS values **MUST** be within **±15 %** of calibrated origin values where the origin publishes variable ranges; otherwise **MUST** match exactly.
111+
* **POP selection:** If the origin presents geo/POP variance, clients **MUST** calibrate against the same POP as the target connection as indicated by authoritative DNS co-location or CDN route headers; otherwise calibration **MUST** be repeated until equality is achieved.
112+
* ALPN selection **MUST** match the origin; fixed global distributions are **PROHIBITED**.
113+
* Session resumption **MUST** follow origin policy; **0-RTT MUST NOT** be used for HTX initiation.
100114

101-
### 5.2 Access-Ticket Bootstrap
115+
### 5.2 Access-Ticket Bootstrap (Negotiated Carrier, Replay-Bound)
102116

103-
1. The server’s decoy site embeds `ticketPub` (32-B X25519 public key, Base64URL).
104-
2. Client generates `ticketPriv`, computes `sharedSecret = X25519(ticketPriv, ticketPub)`.
105-
3. Client picks 32-B random `nonce32`.
106-
4. `accessTicket = HKDF(sharedSecret, "betanet-ticket", nonce32, 32)`.
107-
5. Client sends
117+
1. Decoy site publishes `ticketPub` (X25519, 32B), `ticketKeyID` (8B), and a **carrier policy** describing allowed carriers and probabilities:
108118

109119
```
110-
GET /bootstrap HTTP/1.1
111-
Host: <front-domain>
112-
x-px-ticket: <Base64URL(accessTicket)>
120+
BN-Ticket: v1; carriers=cookie:0.5,query:0.3,body:0.2; len=24..64
113121
```
114-
6. If ticket matches current UTC hour, server proceeds; else serves only decoy content.
115-
116-
### 5.3 Noise *XK* Handshake & Inner Keys
117-
118-
Unchanged from §2 .3 of prior draft: derive `K_inner = HKDF-Expand-Label(TLS-Exporter, "htx inner", "", 32)`.
119-
AEAD nonce: **96-bit little-endian counter** (wrap ≈2⁹⁶-1 frames).
122+
2. Client generates `cliPriv/cliPub` (X25519) and 32-B `nonce32`.
123+
3. `sharedSecret = X25519(cliPriv, ticketPub)`.
124+
4. `hour = floor(unixTime/3600)` (UTC).
125+
5. `salt = SHA256("betanet-ticket-v1" ‖ ticketKeyID ‖ uint64_be(hour))`.
126+
6. `accessTicket = HKDF(sharedSecret, salt, "", 32)`.
127+
7. Client sends **exactly one** carrier chosen per policy with **variable-length padding** to match `len`:
128+
129+
* **Cookie (recommended):**
130+
`Cookie: <site-name>=Base64URL( 0x01 ‖ cliPub32 ‖ ticketKeyID8 ‖ nonce32 ‖ accessTicket32 ‖ pad )`
131+
A `__Host-` prefix is RECOMMENDED.
132+
* **Query parameter:** `...?bn1=<Base64URL(payload)>`
133+
* **Body (POST)** with `Content-Type: application/x-www-form-urlencoded` containing `bn1=<Base64URL(payload)>`.
134+
8. Server verification:
135+
136+
* recompute for `hour ∈ {now-1, now, now+1}`,
137+
* reject duplicates for tuple `(cliPub, hour)` within **2 h**,
138+
* enforce per-/24 IPv4 and /56 IPv6 token buckets.
139+
9. Servers **MUST** parse fields in order (`version, cliPub32, ticketKeyID8, nonce32, accessTicket32`) and **MUST ignore trailing bytes** (padding). Accepted padding range is **24..64 bytes**.
140+
10. On duplicate rejection, clients **SHOULD** rotate `cliPub`.
141+
11. On failure, server serves only decoy content.
142+
143+
### 5.3 Noise *XK* Handshake & Inner Keys (with PQ)
144+
145+
* Inner handshake **MUST** be Noise *XK* over the outer TLS tunnel.
146+
* From *2027-01-01*, initiators **MUST** use hybrid (X25519-Kyber768); prior to that, X25519 is RECOMMENDED.
147+
* Derive `K0 = HKDF-Expand-Label(TLS-Exporter, "htx inner v1", "", 64)`.
148+
149+
* Split per direction: `K0c`, `K0s`.
150+
* Derive per-direction **nonce salt** `NS = HKDF(K0*, "ns", "", 12)`.
151+
* AEAD Nonce: `nonce = NS XOR (LE64(counter) ‖ LE32(0))`; counter starts at **0** and increments per frame.
152+
* Rekeying (**MUST** meet all):
153+
154+
* Send `KEY_UPDATE` when any: **≥ 8 GiB**, **≥ 2¹⁶ frames**, or **≥ 1 h** since last (re)key per direction.
155+
* New keys: `K' = HKDF(K, "next", transcript_hash, 64)`; reset counter; derive `NS'`.
156+
* Ordering: Receivers **MUST** accept `KEY_UPDATE` out-of-order relative to data frames and **MUST** discard frames that verify only under the previous key after receiving and acknowledging `KEY_UPDATE`. Senders **MUST** cease using the old key immediately after transmitting `KEY_UPDATE`.
120157

121158
### 5.4 Inner Frame Format
122159

123160
```c
124161
struct Frame {
125162
uint24 length; // ciphertext length (excl. tag)
126-
uint8 type; // 0=STREAM, 1=PING, 2=CLOSE
127-
varint stream_id; // present if type==STREAM
163+
uint8 type; // 0=STREAM, 1=PING, 2=CLOSE, 3=KEY_UPDATE, 4=WINDOW_UPDATE
164+
varint stream_id; // present if type==STREAM or type==WINDOW_UPDATE
128165
uint8[] ciphertext;
129166
}
130167
```
131168

132-
* Client streams use **odd** `stream_id`; server streams **even**.
133-
* Flow-control window: **65 535 B**; `WINDOW_UPDATE` frames substitute when 50 % consumed.
169+
* Client streams **odd**; server streams **even**.
170+
* Flow-control window: **65 535**; send `WINDOW_UPDATE` when **50 %** consumed.
134171

135-
### 5.5 HTTP/2 Behaviour Emulation
172+
### 5.5 HTTP/2 / HTTP/3 Behaviour Emulation (Adaptive)
136173

137-
| Frame | Requirement |
138-
| -------------- | ----------------------------- |
139-
| SETTINGS | Within 30 ms of stream 0 open |
140-
| WINDOW\_UPDATE | When ≥ 50 % of window used |
141-
| PING | Every 15 s ± 3 s |
142-
| PRIORITY | On ≈1 % of connections |
174+
* H2 SETTINGS **MUST** mirror origin within tolerances learned during pre-flight (§5.1).
175+
* PING cadence **MUST** be random in **\[10 s, 60 s]** with ±10 % jitter; periodicity is **PROHIBITED**.
176+
* PRIORITY frames **SHOULD** follow the origin’s baseline rate; if unknown, send on **\[0.5 %, 3 %]** of connections at random.
177+
* Idle padding: if no DATA for **\[200 ms, 1 200 ms]**, send **\[0, 3 KiB]** dummy encrypted DATA (uniform in both).
143178

144-
Idle padding: if no DATA for 512 ± 128 ms, send dummy 1 KiB encrypted DATA.
179+
### 5.6 UDP Variant & Anti-Correlation Fallback
145180

146-
### 5.6 UDP Variant
147-
148-
* Attempt QUIC v1 on UDP-443 + MASQUE `CONNECT-UDP`.
149-
* On failure, retry TCP within **500 ms**.
181+
* Attempt QUIC v1 on UDP-443 with MASQUE `CONNECT-UDP`.
182+
* On failure, retry TCP with randomized back-off **\[200 ms, 1 200 ms]**, **fresh** ClientHello randomness, no session resumption, and fresh QUIC CIDs when applicable.
183+
* To defeat induced linkability, clients **MUST** launch **cover connections** to **≥ 2** unrelated origins (non-HTX) within **\[0, 1 000 ms]** of the retry; HTX start **MUST** be delayed by an additional **\[100, 700 ms]** chosen independently.
184+
* Cover connections **MUST NOT** exceed **2** retries per minute and **MUST** be torn down within **\[3, 15] s** unless they carry user traffic.
150185

151186
---
152187

@@ -159,45 +194,70 @@ Idle padding: if no DATA for 512 ± 128 ms, send dummy 1 KiB encrypted DATA.
159194
### 6.2 Transports
160195

161196
```
162-
/betanet/htx/1.0.0 (TCP-443)
163-
/betanet/htxquic/1.0.0 (QUIC-443)
197+
/betanet/htx/1.1.0 (TCP-443)
198+
/betanet/htxquic/1.1.0 (QUIC-443)
164199
/betanet/webrtc/1.0.0 (optional)
165200
```
166201

167-
### 6.3 Bootstrap Discovery
202+
### 6.3 Bootstrap Discovery (Rotating, PoW-Bound)
203+
204+
Clients **MUST** iterate methods **a → e** until **≥ 5** peers respond:
168205

169-
The client **MUST** keep trying methods **a → e** until ≥ 5 peers respond:
206+
| Order | Method | Central infra? |
207+
| ----- | ------------------------------------------------------------------------------------------- | -------------- |
208+
| a | **Rotating Rendezvous DHT**: 64 ephemeral IDs `SHA256("bn-seed" ‖ BeaconSet(epochDay) ‖ i)` | No |
209+
| b | **mDNS** service `_betanet._udp` | No |
210+
| c | **Bluetooth LE** UUID `0xB7A7` | No |
211+
| d | Onion v3 list (signed, mirrored via IPFS) | Minimal |
212+
| e | DNS fallback list | Yes (fallback) |
170213

171-
| Order | Method | Central infra? |
172-
| ----- | ------------------------------------------------------------------ | ------------------- |
173-
| a | **Deterministic DHT**: 32 synthetic IDs `SHA256("betanet-seed-i")` | No |
174-
| b | **mDNS** service `_betanet._udp` | No |
175-
| c | **Bluetooth LE** UUID `0xB7A7` | No |
176-
| d | Onion v3 list (signed, mirrored via IPFS) | Minimal |
177-
| e | DNS fallback list | Yes (fallback only) |
214+
* Deterministic seeds from 1.0 are **REMOVED**.
215+
* Responders **MUST** require proof-of-work (initial **≥ 22 bits**, adaptive per §6.5) and rate-limit per source prefix; verification **MUST** be constant-time.
216+
* **Epoch definition:** `epochDay = floor(unixTime/86 400)` in **UTC**.
178217

179218
### 6.4 Block Exchange
180219

181-
* CID =`multihash(SHA-256(content))`.
182-
* Bitswap-v2 on `/betanet/bitswap/2.1.0`.
183-
* Requester **SHOULD** open ≥ 3 parallel streams on distinct SCION paths.
220+
* CID = `multihash(SHA-256(content))`.
221+
* Bitswap-v2 on `/betanet/bitswap/2.2.0`.
222+
* Requesters **SHOULD** open **≥ 2** parallel streams on distinct SCION paths and **MAY** open a third under good conditions.
223+
224+
### 6.5 Adaptive Anti-Abuse
225+
226+
* Each bootstrap responder **MUST** maintain sliding-window metrics and adjust PoW difficulty to keep accept rate at the 95th percentile of capacity.
227+
* Rate-limits **MUST** apply per `/24` IPv4, `/56` IPv6, and per-AS aggregates; any bucket **MUST NOT** exceed **5 %** of responder capacity.
184228

185229
---
186230

187231
## 7 Privacy Layer (L4)
188232

189233
### 7.1 Modes
190234

191-
| Mode | Requirement |
192-
| ---------------------- | ------------------------------------- |
193-
| **strict** | Every stream through ≥ 3 Nym hops |
194-
| **balanced** (default) | ≥ 1 hop until peer-trust ≥ 0.8 |
195-
| **performance** | No mixnet unless dest label `.mixreq` |
235+
| Mode | Requirement |
236+
| ---------------------- | -------------------------------------------- |
237+
| **strict** | Every stream through **≥ 3** Nym hops |
238+
| **balanced** (default) | **≥ 2** hops until peer-trust ≥ **0.8** |
239+
| **performance** | No mixnet unless destination label `.mixreq` |
240+
241+
### 7.2 Mixnode Selection (BeaconSet + Per-Stream Entropy)
242+
243+
* `epoch = floor(unixTime/3600)`.
244+
* `BeaconSet(epoch) = XOR32(drand(epoch), nistRBv2(epoch), ethL1_finalized_hash(epoch))`, each a 32-byte value; components **MAY** be substituted by governance.
245+
* If **all** components are unavailable, use fallback
246+
`BeaconSet(epoch) = SHA256("bn-fallback" ‖ K0c ‖ uint64_be(epoch))` and **MUST** log the condition.
247+
* For each stream, initiator picks 16-B `streamNonce`.
248+
* `seed = SHA256( BeaconSet(epoch) ‖ srcPeerID ‖ dstPeerID ‖ streamNonce )`.
249+
* Hops chosen by VRF over `seed` from the advertised mixnode set.
250+
* **Diversity:** within `(src,dst,epoch)`, avoid reusing the exact hop set until **≥ 8** distinct sets are tried.
251+
* **Topology:** include at least one hop outside both source and destination AS groups.
196252

197-
### 7.2 Mixnode Selection
253+
### 7.3 Peer-Trust (for “balanced”)
198254

199-
`seed = SHA256(srcPeerID || dstPeerID || unixHour)`
200-
— used as VRF input to pick hops.
255+
Computed from:
256+
257+
* uptime attestations signed by **≥ 8** distinct AS groups over a 30-day window,
258+
* observed relay behaviour,
259+
* staked ecash capped by per-AS limits (L7 §10.2).
260+
Thresholds are normative; combination is implementation-defined.
201261

202262
---
203263

@@ -211,38 +271,61 @@ betanet://<hex SHA-256(service-pubkey)>[/resource]
211271

212272
Verify that the peer’s presented pubkey hashes to the ID.
213273

214-
### 8.2 Human-Readable Alias Ledger
274+
### 8.2 Human-Readable Alias Ledger (Finality-Bound 2-of-3 with Liveness)
275+
276+
A record is **valid** iff an identical payload hash appears **finalized** on at least **2 of 3** chains, each with native finality:
215277

216-
A record is valid **only if** identical payload appears at the same height on at least **2 of 3** chains:
278+
* **Handshake** L1: **≥ 12** confirmations and not reorged for **≥ 1 h**.
279+
* **Filecoin FVM**: chain reports **finalized**.
280+
* **Ethereum L2 “Raven-Names”**: block marked **finalized** by the rollup.
217281

218-
* **Handshake** Layer-1
219-
* **Filecoin FVM**
220-
* **Ethereum L2 “Raven-Names”**
282+
Record payload (UTF-8):
221283

222-
Re-orgs deeper than 12 blocks are ignored.
284+
```
285+
betanet1 pk=<hex32> seq=<u64> sig=<base64sig> exp=<unixSec>
286+
```
223287

224-
Record format (UTF-8):
288+
* `seq` **MUST** increase monotonically per `pk`.
289+
* Conflicts: higher `seq` wins once finality condition is met.
290+
291+
**Liveness rule.** If fewer than 2 chains provide finality for **≥ 14 days**, nodes **MAY** accept an **Emergency Advance** for a `pk` when all hold:
292+
293+
1. A quorum certificate with **≥ 67 %** of **effective governance weight** (§10.2–§10.3) over the payload hash (`pk,seq,sig,exp`).
294+
2. The certificate is anchored once on any available chain (best-effort).
295+
3. When 2-of-3 finality resumes, the first finalized record at **≥ seq** supersedes emergency records.
296+
297+
**Quorum certificate format (CBOR map).**
225298

226299
```
227-
betanet1 pk=<hex32> sig=<base64sig> exp=<unixSec>
300+
{ payloadHash, epoch, signers[], weights[], sigs[] }
228301
```
229302

303+
Each `sig` is Ed25519 over `("bn-aa1" ‖ payloadHash ‖ epoch)`. Verifiers **MUST** validate weights per §10.2–§10.3 and reject duplicates or lower-epoch certificates.
304+
230305
---
231306

232307
## 9 Payment System (L6)
233308

234309
### 9.1 Federated Cashu Mints
235310

236311
* Each mint = FROST-Ed25519 **(n ≥ 5, t = 3)** group.
237-
* Keyset ID =`SHA-256(sorted pubkeys)`.
238-
* Relays **MUST** accept vouchers from any announced keyset (topic `betanet.mints`).
312+
* Keyset ID = `SHA-256(sorted pubkeys)`.
313+
* Mints announce on `betanet.mints` with **≥ 22-bit** PoW and an HTX contact endpoint.
314+
315+
**Voucher (128 B):**
316+
317+
```
318+
keysetID32 ‖ secret32 ‖ aggregatedSig64
319+
```
239320

240-
Voucher (64 B): `secret32 || aggregatedSig32`.
321+
* `aggregatedSig64` is the 64-B Ed25519 aggregate signature over `secret32`.
322+
* Relays **MUST** accept vouchers only for known keysets; unknown keysets **MAY** be cached pending validation.
323+
* Per-keyset and per-peer rate-limits **MUST** apply.
241324

242325
### 9.2 Settlement
243326

244327
Relays **MAY** redeem ≥ 10 000 sat via their own Lightning node or swap with peers.
245-
Vouchers never leave encrypted streams.
328+
Vouchers **MUST NOT** leave encrypted streams.
246329

247330
---
248331

@@ -251,43 +334,61 @@ Vouchers never leave encrypted streams.
251334
### 10.1 Node Uptime Score
252335

253336
```
254-
score = log2(1 + seconds_uptime / 86 400) // capped at 16
337+
score = log2(1 + seconds_uptime / 86_400) // capped at 16
255338
```
256339

257-
### 10.2 Voting Power
340+
### 10.2 Voting Power & Anti-Concentration
258341

259342
```
260-
vote_weight = uptime_score + log10(total_ecash_staked / 1 000 sat + 1)
343+
vote_weight_raw = uptime_score + log10(total_ecash_staked / 1_000 sat + 1)
261344
```
262345

263-
A version proposal passes when
346+
* **Per-AS cap:** the **sum** of `vote_weight_raw` across all nodes within the same L1 AS **MUST** be capped to **20 %** of the global total.
347+
* **Per-Org cap:** nodes mapped to the same RPKI organisation (or equivalent attestation) **MUST** be capped to **25 %** combined.
348+
* Effective weight: `vote_weight = min(vote_weight_raw, caps)`.
264349

265-
```
266-
Σ weight(ACK) ≥ 0.67 × Σ weight(all_reachable_nodes)
267-
```
350+
### 10.3 Quorum, Diversity & Partition Safety
351+
352+
A proposal passes when **all** hold:
353+
354+
1. `Σ weight(ACK) ≥ 0.67 × Σ weight(active_nodes_14d)`, where `active_nodes_14d` are nodes seen on HTX within **14 days**.
355+
2. ACKs span **≥ 24** distinct AS groups and **≥ 3** SCION ISDs; no single AS contributes **> 20 %** nor single Org **> 25 %** of ACK weight.
356+
3. ACKs are observed over **≥ 2** disjoint path classes per §4 with consistent reachability (median loss < 2 %).
357+
4. A **partition check** confirms the median path diversity and ACK composition did not degrade by > 20 % in the **7 days** prior to close.
268358

269-
### 10.3 Upgrade Delay
359+
### 10.4 Upgrade Delay
270360

271-
After threshold reached, activation waits **≥ 30 days**.
272-
Raven Development Team publishes a time-lock hash of the final spec text.
361+
After threshold, activation waits **≥ 30 days**. If §10.3 fails at any time ≥ 7 days before activation, activation **MUST** be deferred until criteria are met for **7** consecutive days.
362+
Raven Development Team publishes a time-lock hash of the final text.
273363

274364
---
275365

276366
## 11 Compliance Summary
277367

278368
An implementation is **compliant** if it:
279369

280-
1. Implements HTX over TCP-443 **and** QUIC-443 with TLS 1.3 mimic + ECH.
281-
2. Uses rotating access tickets (§5.2).
282-
3. Encrypts inner frames with ChaCha20-Poly1305, 24-bit length, 96-bit nonce.
283-
4. Maintains ≥ 3 signed SCION paths **or** attaches a valid IP-transition header.
284-
5. Offers `/betanet/htx/1.0.0` **and** `/betanet/htxquic/1.0.0` transports.
285-
6. Implements deterministic DHT seed bootstrap.
286-
7. Verifies alias ledger with 2-of-3 chain consensus.
287-
8. Accepts Cashu vouchers from federated mints & supports Lightning settlement.
288-
9. Builds reproducibly and publishes **SLSA 3** provenance.
289-
10. Presents X25519-Kyber768 suites once the mandatory date is reached.
370+
1. Implements HTX over TCP-443 **and** QUIC-443 with origin-mirrored TLS + ECH; performs per-connection calibration (§5.1).
371+
2. Uses **negotiated-carrier, replay-bound** access tickets (§5.2) with variable lengths and rate-limits.
372+
3. Performs inner Noise *XK* with key separation, nonce lifecycle, and rekeying (§5.3); uses hybrid X25519-Kyber768 from *2027-01-01*.
373+
4. Emulates HTTP/2/3 with adaptive cadences and origin-mirrored parameters (§5.5).
374+
5. Bridges non-SCION links by **HTX-tunnelled transition**; no on-wire transition header on public networks (§4.2).
375+
6. Offers `/betanet/htx/1.1.0` and `/betanet/htxquic/1.1.0` transports (§6.2).
376+
7. Bootstraps via rotating rendezvous IDs derived from **BeaconSet** with PoW and multi-bucket rate-limits; deterministic seeds not used (§6.3–§6.5).
377+
8. Selects mixnodes using BeaconSet randomness with per-stream entropy and path diversity (§7.2); “balanced” mode enforces **≥ 2** hops until trust ≥ **0.8** (§7.1–§7.3).
378+
9. Verifies alias ledger with **finality-bound 2-of-3** and applies **Emergency Advance** liveness only under §8.2 conditions; validates quorum certificates as specified.
379+
10. Accepts 128-B Cashu vouchers for known keysets with PoW adverts and rate-limits; supports Lightning settlement (§9).
380+
11. Enforces anti-concentration caps, diversity, and partition checks for governance (§10).
381+
12. Implements anti-correlation fallback with cover connections on UDP→TCP retries (§5.6).
382+
13. Builds are reproducible and publish **SLSA 3** provenance artifacts for release binaries.
383+
384+
---
385+
386+
## 12 Interoperability Notes (1.0 Compatibility)
387+
388+
* 1.1 peers **MAY** offer `/betanet/htx/1.0.0` ALPN for legacy interop.
389+
* Legacy on-wire transition headers **MUST NOT** be used on public networks; bridge via HTX tunnels.
390+
* 64-B vouchers **MAY** be issued only to legacy peers; 1.1 receivers **MUST** accept both for the operator-defined deprecation window.
290391

291392
---
292393

293-
## 12 End of Betanet Specification 1.0
394+
## 13 End of Betanet Specification 1.1

0 commit comments

Comments
 (0)
Please sign in to comment.