Home / Input Output / ouroboros-leios
Mar 18, 12-1 PM (0)
Mar 18, 1-2 PM (1)
Mar 18, 2-3 PM (1)
Mar 18, 3-4 PM (0)
Mar 18, 4-5 PM (0)
Mar 18, 5-6 PM (2)
Mar 18, 6-7 PM (0)
Mar 18, 7-8 PM (0)
Mar 18, 8-9 PM (0)
Mar 18, 9-10 PM (0)
Mar 18, 10-11 PM (0)
Mar 18, 11-12 AM (0)
Mar 19, 12-1 AM (0)
Mar 19, 1-2 AM (0)
Mar 19, 2-3 AM (0)
Mar 19, 3-4 AM (0)
Mar 19, 4-5 AM (0)
Mar 19, 5-6 AM (0)
Mar 19, 6-7 AM (0)
Mar 19, 7-8 AM (1)
Mar 19, 8-9 AM (0)
Mar 19, 9-10 AM (1)
Mar 19, 10-11 AM (0)
Mar 19, 11-12 PM (1)
Mar 19, 12-1 PM (0)
Mar 19, 1-2 PM (0)
Mar 19, 2-3 PM (0)
Mar 19, 3-4 PM (0)
Mar 19, 4-5 PM (0)
Mar 19, 5-6 PM (0)
Mar 19, 6-7 PM (0)
Mar 19, 7-8 PM (0)
Mar 19, 8-9 PM (0)
Mar 19, 9-10 PM (0)
Mar 19, 10-11 PM (0)
Mar 19, 11-12 AM (0)
Mar 20, 12-1 AM (0)
Mar 20, 1-2 AM (0)
Mar 20, 2-3 AM (0)
Mar 20, 3-4 AM (0)
Mar 20, 4-5 AM (0)
Mar 20, 5-6 AM (0)
Mar 20, 6-7 AM (0)
Mar 20, 7-8 AM (1)
Mar 20, 8-9 AM (2)
Mar 20, 9-10 AM (1)
Mar 20, 10-11 AM (0)
Mar 20, 11-12 PM (0)
Mar 20, 12-1 PM (1)
Mar 20, 1-2 PM (0)
Mar 20, 2-3 PM (1)
Mar 20, 3-4 PM (0)
Mar 20, 4-5 PM (0)
Mar 20, 5-6 PM (0)
Mar 20, 6-7 PM (0)
Mar 20, 7-8 PM (1)
Mar 20, 8-9 PM (1)
Mar 20, 9-10 PM (0)
Mar 20, 10-11 PM (0)
Mar 20, 11-12 AM (0)
Mar 21, 12-1 AM (0)
Mar 21, 1-2 AM (0)
Mar 21, 2-3 AM (0)
Mar 21, 3-4 AM (0)
Mar 21, 4-5 AM (0)
Mar 21, 5-6 AM (0)
Mar 21, 6-7 AM (0)
Mar 21, 7-8 AM (0)
Mar 21, 8-9 AM (0)
Mar 21, 9-10 AM (0)
Mar 21, 10-11 AM (0)
Mar 21, 11-12 PM (0)
Mar 21, 12-1 PM (0)
Mar 21, 1-2 PM (0)
Mar 21, 2-3 PM (0)
Mar 21, 3-4 PM (0)
Mar 21, 4-5 PM (0)
Mar 21, 5-6 PM (0)
Mar 21, 6-7 PM (0)
Mar 21, 7-8 PM (0)
Mar 21, 8-9 PM (0)
Mar 21, 9-10 PM (0)
Mar 21, 10-11 PM (0)
Mar 21, 11-12 AM (0)
Mar 22, 12-1 AM (0)
Mar 22, 1-2 AM (0)
Mar 22, 2-3 AM (0)
Mar 22, 3-4 AM (0)
Mar 22, 4-5 AM (0)
Mar 22, 5-6 AM (0)
Mar 22, 6-7 AM (0)
Mar 22, 7-8 AM (0)
Mar 22, 8-9 AM (0)
Mar 22, 9-10 AM (0)
Mar 22, 10-11 AM (0)
Mar 22, 11-12 PM (0)
Mar 22, 12-1 PM (0)
Mar 22, 1-2 PM (0)
Mar 22, 2-3 PM (0)
Mar 22, 3-4 PM (0)
Mar 22, 4-5 PM (0)
Mar 22, 5-6 PM (11)
Mar 22, 6-7 PM (0)
Mar 22, 7-8 PM (0)
Mar 22, 8-9 PM (0)
Mar 22, 9-10 PM (0)
Mar 22, 10-11 PM (0)
Mar 22, 11-12 AM (0)
Mar 23, 12-1 AM (0)
Mar 23, 1-2 AM (0)
Mar 23, 2-3 AM (0)
Mar 23, 3-4 AM (0)
Mar 23, 4-5 AM (0)
Mar 23, 5-6 AM (0)
Mar 23, 6-7 AM (0)
Mar 23, 7-8 AM (0)
Mar 23, 8-9 AM (0)
Mar 23, 9-10 AM (0)
Mar 23, 10-11 AM (0)
Mar 23, 11-12 PM (1)
Mar 23, 12-1 PM (3)
Mar 23, 1-2 PM (4)
Mar 23, 2-3 PM (4)
Mar 23, 3-4 PM (1)
Mar 23, 4-5 PM (2)
Mar 23, 5-6 PM (1)
Mar 23, 6-7 PM (0)
Mar 23, 7-8 PM (0)
Mar 23, 8-9 PM (0)
Mar 23, 9-10 PM (0)
Mar 23, 10-11 PM (0)
Mar 23, 11-12 AM (0)
Mar 24, 12-1 AM (0)
Mar 24, 1-2 AM (0)
Mar 24, 2-3 AM (0)
Mar 24, 3-4 AM (0)
Mar 24, 4-5 AM (0)
Mar 24, 5-6 AM (0)
Mar 24, 6-7 AM (0)
Mar 24, 7-8 AM (0)
Mar 24, 8-9 AM (1)
Mar 24, 9-10 AM (4)
Mar 24, 10-11 AM (1)
Mar 24, 11-12 PM (2)
Mar 24, 12-1 PM (2)
Mar 24, 1-2 PM (3)
Mar 24, 2-3 PM (1)
Mar 24, 3-4 PM (1)
Mar 24, 4-5 PM (5)
Mar 24, 5-6 PM (0)
Mar 24, 6-7 PM (0)
Mar 24, 7-8 PM (0)
Mar 24, 8-9 PM (0)
Mar 24, 9-10 PM (0)
Mar 24, 10-11 PM (0)
Mar 24, 11-12 AM (0)
Mar 25, 12-1 AM (0)
Mar 25, 1-2 AM (0)
Mar 25, 2-3 AM (0)
Mar 25, 3-4 AM (0)
Mar 25, 4-5 AM (0)
Mar 25, 5-6 AM (0)
Mar 25, 6-7 AM (0)
Mar 25, 7-8 AM (1)
Mar 25, 8-9 AM (0)
Mar 25, 9-10 AM (1)
Mar 25, 10-11 AM (1)
Mar 25, 11-12 PM (1)
Mar 25, 12-1 PM (0)
66 commits this week Mar 18, 2026 - Mar 25, 2026
net-rs: add Leios coordinator extensions (Phase 4e)
Replace stub-forwarded Leios events with smart coordinator logic:
- Slot-bounded dedup for EB, TX, and vote offers across peers
- Per-offer peer tracking for RTT-based smart fetch routing
- Pending fetch dedup and cleanup on peer failure
- Separate LeiosBlockTxsOffered/LeiosBlockTxsReceived events
- FetchLeiosBlockTxs (with bitmap) and FetchLeiosVotes commands
- leios_dedup_window config (default 1000 slots)
- 8 new coordinator tests (255 total)
- Live-tested: serve --leios → multi-follow --leios (two connections)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: add Leios per-peer task integration (Phase 4d)
Wire LeiosNotify (ID 18) and LeiosFetch (ID 19) into the per-peer task
architecture behind a `leios_enabled` config flag (default false).

- LeiosStore: content-addressed blob store for EBs/votes (separate from
  ChainStore since Leios data is keyed by (slot, hash), not a linear chain)
- Client tasks: spawn_leios_notify (continuous request_next loop),
  spawn_leios_fetch (command-driven, like BlockFetch)
- Server handlers: serve_leios_notify (from LeiosStore + subscribe),
  serve_leios_fetch (block/txs/vote lookups)
- Types: 6 PeerEvent, 2 PeerCommand, 5 NetworkEvent, 3 NetworkCommand variants
- Coordinator: stub-forwards Leios events, populates LeiosStore on fetch
- Wiring: peer_task, responder_task, duplex_task all conditionally register
  and spawn Leios protocol sub-tasks
- CLI: --leios flag on serve (synthetic EB/vote generation) and multi-follow
  (logs Leios notifications) for local end-to-end testing

247 total tests (9 new). Locally tested: serve --leios -> multi-follow --leios.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: add Shelley+ header and block body parsers (Phase 4c)
Convert WrappedHeader from opaque tuple struct to named-field struct
with parsed HeaderInfo. Parser navigates era-tagged #6.24-wrapped CBOR
to extract block_number, slot, prev_hash, issuer_vkey, body_size, and
block_body_hash, plus CIP-0164 optional Leios fields (announced_eb,
certified_eb). Array length alone disambiguates which optional fields
are present (10=none, 11=certified_eb, 12=announced_eb, 13=both).

Convert BlockBody similarly with parsed LeiosBlockInfo. Block parser
extracts the optional eb_certificate from the 5th element of the
Shelley+ block array. Byron headers/blocks return None gracefully.

Box InjectBlock header to fix large_enum_variant. Update all call
sites (~20 files). 238 total tests, 17 new parser tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: document Phase 4 Leios protocol implementation plan
Sub-phases 4a-4f: LeiosNotify/LeiosFetch protocols, Praos header/body
extensions, per-peer task integration, coordinator/ChainStore extensions,
and priority scheduling. Working assumptions: protocol IDs 18/19, opaque
types, two protocols initially, freshest-first deferred.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: document multi-peer coordinator design decision
Choose thread-per-peer with shared coordinator over Pallas v2
event-driven (single-threaded bottleneck) and Haskell actor model
(over-engineered for ~20 peers). Document PeerHandle sketch,
peer-agnostic consensus interface, and ordering rationale
(multi-peer before Leios protocols).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: add PeerSharing protocol (Phase 3, step 2)
Implement PeerSharing mini-protocol (protocol ID 10) — simple
request/reply for peer discovery with IPv4/IPv6 address support.
CLI 'peer-share' command with peer_sharing=1 handshake negotiation
and graceful rejection when node doesn't support it.
18 new tests (147 total), live-tested against mainnet relays.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: add TxSubmission protocol (Phase 3, step 1)
Implement the TxSubmission mini-protocol (protocol ID 4, version 2) —
pull-based transaction dissemination with blocking/non-blocking modes,
flow control, and full CBOR codec with indefinite-length inner lists.

Includes client-side run_client helper, server handler in fake server,
and CLI 'submit' command with single-tx and Poisson stream modes.
20 new tests (129 total), live-tested against fake server.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: update CLAUDE.md and implementation plan for Phase 2 completion
Document all Phase 2 deliverables: shared types, ChainSync/BlockFetch/
KeepAlive protocols (client + server), persistent chain follower, fake
server with Poisson blocks/rollbacks, serve.rs in workspace structure,
server-uses-Message-directly design decision. Add Phase 3 detail for
TxSubmission and PeerSharing protocols.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: add random rollbacks to fake server (Poisson distributed)
New --rollback-rate flag for the serve command generates random chain
rollbacks (depth 1-3) on an independent Poisson schedule. The ChainSync
server detects when a client's read pointer is invalidated by a rollback
and sends MsgRollBackward. Default rate is 0 (no rollbacks).

Example: --block-rate 1.0 --rollback-rate 0.1

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: remove server Request/Response boilerplate, use Message directly
The server-side Request/Response enums were 1:1 mappings of Message
variants, and receive_request()/send_response() were pure conversion
boilerplate. The Runner already enforces agency and state transitions,
so these types added no safety.

Server code now uses runner.recv()/runner.send() with Message directly,
matching the simplicity of the protocol framework design.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: add server-side protocol helpers and fake server CLI
Add symmetric Request/Response enum pairs with receive_request() and
send_response() functions for ChainSync, BlockFetch, and KeepAlive
protocols. Add accept_and_handshake() server connection helper.

New `serve` CLI command runs a fake Cardano node that generates blocks
on a Poisson schedule (configurable rate), serves ChainSync/BlockFetch/
KeepAlive to connecting clients. Live-tested with the `follow` command.

Also fix all pre-existing clippy warnings (matches! macro, io::Error::other,
map key iteration).

109 tests, zero clippy warnings.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
net-rs: add KeepAlive protocol to prevent peer disconnects
Without KeepAlive (protocol ID 8), the peer drops idle connections after
~60-90s. Add KeepAlive protocol implementation (state machine, CBOR codec,
cookie validation) and run it as a background task in the follow command,
pinging every 20s. Live-tested: connection now stays alive indefinitely.

109 tests total (11 new for KeepAlive).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>