Skip to content

Commit c957b0b

Browse files
committed
Sketch outline for dependencies and interactions chapter
1 parent d377adf commit c957b0b

File tree

1 file changed

+59
-85
lines changed

1 file changed

+59
-85
lines changed

docs/leios-design/README.md

Lines changed: 59 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ As it was the case for the Praos variant of Ouroboros (TODO: cite shelley networ
9393

9494
Ouroboros Leios is a significant change to the consensus protocol, but does not require fundamental changes to the overall architecture of the Cardano node. Several new components will be needed for the new responsibilities related to producing and relaying Endorser Blocks (EBs) and voting on them, as well as changes to existing components to support higher throughput and freshest-first-delivery. The following diagram illustrates the key components of a relay node where new and updated components are marked in purple:
9595

96+
> [!WARNING]
97+
> TODO: Should consider adding Leios prefixes to VoteStore (to not confuse with PerasVoteDB), i.e. LeiosVoteDB?
98+
9699
![](./relay-leios-component-diagram.svg)
97100

98101
> [!WARNING]
@@ -602,100 +605,71 @@ instance DSIGNAlgorithm BLS_DSIGN where
602605

603606
---
604607

608+
## Client interfaces
609+
610+
> [!WARNING]
611+
> TODO: concrete discussion on how the `cardano-node` will need to change on the N2C interface, based on https://github.com/input-output-hk/ouroboros-leios/blob/main/docs/ImpactAnalysis.md#client-interfaces
612+
605613
# Dependencies and interactions
606614

607615
> [!WARNING]
608-
> TODO: Identify and explain dependencies, synergies and potential conflicts with other existing or future features of the node. Potential topics:
616+
> TODO: Identify and explain dependencies, synergies and potential conflicts with other existing or future features of the node. Outline:
609617
>
610-
> - On-disk storage of ledger state (UTxO-/Ledger-HD)
611-
> - Interactions with Genesis (catching up node)
618+
> - On-disk storage of ledger state
619+
> - ongoing work on transitioning the ledger state from being fully in memory to being stored mostly on disk
620+
> - at the time of writing the released node version supports utxo state storage on disk (UTxO-HD), while other parts (e.g. reward accounts) are currently being transitioned (Ledger-HD)
621+
> - is a prerequisite for being able to handle the increased throughput Leios enables
622+
> - will shift resource requirements from RAM to disk I/O and storage capacity
623+
> - access latency will necessarily increase and needs to be accounted for in transaction validation timing constraints
624+
> - requires early validation through benchmarking, to identify any required optimizations in how the ledger state is accessed during block and transaction validation
625+
>
612626
> - Synergies with Peras:
613-
> - immediate: sharing key material, same key generation, registration, rotation
614-
> - to research: protocol-level interactions between certified EBs and boosting blocks
615-
> - Impact onto Mithril
627+
> - no dependency between, but orthogonal (in agreement with characterisation in https://tweag.github.io/cardano-peras/peras-design.pdf#section.3.2)
628+
> - competing for bandwidth and priorization similar to Praos > Leios is needed; see also relevant sections above + [resource management section in the impact analysis](https://github.com/input-output-hk/ouroboros-leios/blob/main/docs/ImpactAnalysis.md#resource-management)
629+
> - on the other hand, vote diffusion protocol definition and implementation _may_ be re-usable
630+
> - leios prototypes will evaluate the proposed protocols from CIP-164 first and whether they are sufficient to withstand protocol burst attacks
631+
> - once the peras mini-protocols are available, they should be evaluated for use in leios the same way
632+
> - while structurally this seems promising, we should be prepared that performance requirements and timing constraints demand two distinct implementations
633+
> - immediate synergy on cryptography
634+
> - both protocols are posed to be based on the BLS signature scheme with BLS12-381 key material
635+
> - peras might require an additional mechanism for forward secrecy, but that can be independent
636+
> - if we can share the key material, SPOs will only need to generate and register one new key
637+
> - this will avoid bootstrapping on the second-to-deploy protocol (likely leios)
638+
> - requires further research: protocol-level interactions between certified EBs and boosting blocks, i.e. re-using leios votes for peras boosting
639+
> - likely not feasible in the near-term, or would introduce unnecessary dependencies
640+
> - mid- to long-term, this could be an interesting avenue to explore and further improve throughput and finality jointly
641+
>
616642
> - Which era to target and hard-fork schedule
617-
618-
> [!CAUTION]
619-
> FIXME: The remainder of this chapter is AI generated based on rough notes
620-
621-
## Synergies with Peras
622-
623-
Peras and Leios share several design elements that enable synergistic development:
624-
625-
### Common Infrastructure
626-
627-
**Shared Components:**
628-
1. **BLS Signature Scheme:**
629-
- Both protocols use BLS12-381 for voting
630-
- Shared cryptographic infrastructure
631-
- Common key management tooling
632-
- Unified audit and testing
633-
634-
2. **Voting Mechanisms:**
635-
- Similar sortition-based committee selection
636-
- Overlapping vote diffusion requirements
637-
- Potential for unified vote aggregation logic
638-
639-
3. **Priority Scheduling:**
640-
- Peras votes also need prioritization over Leios
641-
- Shared multiplexer design: Peras > Praos > Leios
642-
- Common freshest-first delivery mechanisms
643-
644-
### Development Coordination
645-
646-
**Parallel Development Strategy:**
647-
```
648-
Peras Leios
649-
│ │
650-
├─── BLS Crypto ───────────┤ (Shared)
651-
│ │
652-
├─── Voting Logic ─────────┤ (Coordinate)
653-
│ │
654-
├─── Network Priority ─────┤ (Coordinate)
655-
│ │
656-
(Checkpoint (Throughput
657-
Voting) Scaling)
658-
```
659-
660-
**Integration Considerations:**
661-
- Leios vote production thread can be generalized for Peras votes
662-
- Network multiplexer handles three priority levels: Peras > Praos > Leios
663-
- Shared telemetry and monitoring infrastructure
664-
665-
### Combined Benefits
666-
667-
With both Peras and Leios deployed:
668-
- **Faster finality** via Peras checkpointing
669-
- **Higher throughput** via Leios EBs
670-
- **Better security** through voting committee diversity
671-
- **Unified cryptographic framework** reduces complexity
672-
673-
**Deployment Sequencing:**
674-
- Option A: Deploy Leios first, add Peras later (prioritizes throughput)
675-
- Option B: Deploy Peras first, add Leios later (prioritizes finality)
676-
- Option C: Joint deployment (maximum benefit, higher complexity)
677-
678-
**Recommendation:** Deploy Leios first to address economic sustainability concerns, then add Peras for faster finality. This sequencing:
679-
- Addresses immediate throughput bottleneck
680-
- Validates BLS infrastructure before Peras relies on it
681-
- Enables incremental complexity management
643+
> - as already identified in the [impact analysis](https://github.com/input-output-hk/ouroboros-leios/blob/main/docs/ImpactAnalysis.md#ledger), a new ledger era is required to change block structure and validation rules
644+
> - the currently deployed era is Conway, with Dijkstra being prepared as the follow-up
645+
> - before the hard-fork introducing Dijkstra, at least one intra-era hard fork is planned for early 2026
646+
> - current plans for Dijkstra include nested transactions and maybe already Peras
647+
> - having peras and leios in the same hard-fork is possible, but could increase risks as both are consensus protocol changes and impact network traffic
648+
> - should avoid targeting Dijkstra now, but shifting Leios functionality later into an even later era (Euler) once the hard-fork schedule is better understood
649+
> - instead, conservatively targeting Euler with the option to merge functionality forward into Dijkstra if the schedule allows is preferrable
650+
>
651+
> - Impact onto Mithril
652+
> - no protocol level interactions
653+
> - but: mithril relies on a consistent view of the chain acroos signers
654+
> - the client APIs (link/see above) will slightly change, hence `mithril-signer` might be impacted depending on what N2C interfaces are in use
655+
> - initially, mithril was only digesting and signing the ImmutableDB as persisted on disk, but using the local chain sync protocol to digest and sign block ranges was considered
656+
> - in any case, the cardano db snapshots served through mithril will need to include new persisted data: EBStore and potentially even the VoteStore
682657
683658
## Interactions with Genesis
684659

685-
Genesis (Ouroboros Genesis) enables nodes to bootstrap from the genesis block without trusted checkpoints. Leios requires the following considerations for Genesis compatibility:
686-
687-
**Key Considerations:**
688-
- Syncing nodes must fetch both RBs and their certified EBs
689-
- LeiosFetch `MsgLeiosBlockRangeRequest` enables efficient batch fetching during sync
690-
- EB closures needed to validate chain density
691-
- Chain density calculations must include transactions from certified EBs (RB-only view underestimates chain quality)
692-
- Certified EBs must be stored permanently alongside RBs
693-
- Immutable storage grows at ~13TB/year at sustained 200 TxkB/s throughput
694-
- Uncertified EBs can be pruned after settlement window
695-
- Parallel fetching from multiple peers critical for sync performance
696-
- Genesis nodes must understand Euler era blocks and track EB certification status
697-
- Initial Leios deployment can use trusted snapshots; full Genesis integration follows after Leios stabilization
698-
660+
> [!WARNING]
661+
> TODO: write section based on outline:
662+
> - recap catching up nodes (if not done already in architecture/changes chapter)
663+
> - syncing nodes must fetch both RBs and their certified EBs, ideally efficiently
664+
> - LeiosFetch mini-protocol already considers this via `MsgLeiosBlockRangeRequest` for efficient batch fetching during sync
665+
> - Parallel fetching from multiple peers critical for sync performance
666+
> - chain density changes
667+
> - EB closures needed to validate chain density
668+
> - density calculations must include transactions from certified EBs (RB-only view underestimates chain quality)
669+
> - not needed for initial testnet deployments
670+
> - follow approach of Peras and deploy Leios without Genesis support on a public testnet initially (https://tweag.github.io/cardano-peras/peras-design.pdf#section.4.1)
671+
> - only needed for a mainnet release-candidate, but must validate genesis changes long enough on public testnets (and obviously integration testing beforehand)
672+
699673
# Implementation plan
700674

701675
> [!WARNING]

0 commit comments

Comments
 (0)