Commit bb787dc
committed
feat: add Rings Network Python SDK + Blackboard Adapter
Phase 1 of Rings Network integration — foundation layer.
New module: src/asi_build/rings/ (4 files, ~1,300 LOC)
- client.py: Async RingsClient — DHT ops, Chord ring, Sub-Rings, sessions,
connection lifecycle, VID computation. InMemoryTransport for testing.
- did.py: RingsDID — DID creation (secp256k1/ed25519), W3C DID Documents,
proof generation/verification, VID addressing, service registration.
- reputation.py: ReputationClient — Ranking Protocol local scoring (3-factor
with exponential decay), trust tiers, trustworthiness checks, slash reports,
median game reward, network statistics.
- __init__.py: Clean public API with all 18 exported symbols.
New adapter: integration/adapters/rings_adapter.py (~500 LOC)
- RingsNetworkAdapter: BlackboardParticipant + Producer + Consumer + Transformer
- Posts: peer discovery, DID auth, reputation updates, slash reports, Sub-Ring
events, network status
- Consumes: reasoning/KG/consciousness entries for P2P replication
- Transforms: enriches entries with reputation scores
- Event emission: threshold crossing detection, connection state
- Graceful degradation: all components optional (None → skip)
Tests: tests/test_rings.py (108 tests, all passing)
- RingsClient: connection, DHT, ring, sub-ring, session, DID resolution (36)
- RingsDID: creation, proof gen/verify, resolution, VIDs, documents (19)
- ReputationClient: scoring, trust tiers, slash, median game, stats (18)
- RingsNetworkAdapter: registration, events, produce, consume, transform (32)
- End-to-end integration flow (1)
- Graceful degradation (3)
Full suite: 3152 passed, 25 skipped, 0 failures (no regressions).1 parent ba16d0b commit bb787dc
7 files changed
Lines changed: 3759 additions & 0 deletions
File tree
- src/asi_build
- integration/adapters
- rings
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
0 commit comments