Skip to content

Commit 87d97fa

Browse files
committed
Sketch outline for dependencies and interactions chapter
1 parent 4b49ab2 commit 87d97fa

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]
@@ -549,100 +552,71 @@ instance DSIGNAlgorithm BLS_DSIGN where
549552

550553
---
551554

555+
## Client interfaces
556+
557+
> [!WARNING]
558+
> 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
559+
552560
# Dependencies and interactions
553561

554562
> [!WARNING]
555-
> TODO: Identify and explain dependencies, synergies and potential conflicts with other existing or future features of the node. Potential topics:
563+
> TODO: Identify and explain dependencies, synergies and potential conflicts with other existing or future features of the node. Outline:
556564
>
557-
> - On-disk storage of ledger state (UTxO-/Ledger-HD)
558-
> - Interactions with Genesis (catching up node)
565+
> - On-disk storage of ledger state
566+
> - ongoing work on transitioning the ledger state from being fully in memory to being stored mostly on disk
567+
> - 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)
568+
> - is a prerequisite for being able to handle the increased throughput Leios enables
569+
> - will shift resource requirements from RAM to disk I/O and storage capacity
570+
> - access latency will necessarily increase and needs to be accounted for in transaction validation timing constraints
571+
> - requires early validation through benchmarking, to identify any required optimizations in how the ledger state is accessed during block and transaction validation
572+
>
559573
> - Synergies with Peras:
560-
> - immediate: sharing key material, same key generation, registration, rotation
561-
> - to research: protocol-level interactions between certified EBs and boosting blocks
562-
> - Impact onto Mithril
574+
> - no dependency between, but orthogonal (in agreement with characterisation in https://tweag.github.io/cardano-peras/peras-design.pdf#section.3.2)
575+
> - 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)
576+
> - on the other hand, vote diffusion protocol definition and implementation _may_ be re-usable
577+
> - leios prototypes will evaluate the proposed protocols from CIP-164 first and whether they are sufficient to withstand protocol burst attacks
578+
> - once the peras mini-protocols are available, they should be evaluated for use in leios the same way
579+
> - while structurally this seems promising, we should be prepared that performance requirements and timing constraints demand two distinct implementations
580+
> - immediate synergy on cryptography
581+
> - both protocols are posed to be based on the BLS signature scheme with BLS12-381 key material
582+
> - peras might require an additional mechanism for forward secrecy, but that can be independent
583+
> - if we can share the key material, SPOs will only need to generate and register one new key
584+
> - this will avoid bootstrapping on the second-to-deploy protocol (likely leios)
585+
> - requires further research: protocol-level interactions between certified EBs and boosting blocks, i.e. re-using leios votes for peras boosting
586+
> - likely not feasible in the near-term, or would introduce unnecessary dependencies
587+
> - mid- to long-term, this could be an interesting avenue to explore and further improve throughput and finality jointly
588+
>
563589
> - Which era to target and hard-fork schedule
564-
565-
> [!CAUTION]
566-
> FIXME: The remainder of this chapter is AI generated based on rough notes
567-
568-
## Synergies with Peras
569-
570-
Peras and Leios share several design elements that enable synergistic development:
571-
572-
### Common Infrastructure
573-
574-
**Shared Components:**
575-
1. **BLS Signature Scheme:**
576-
- Both protocols use BLS12-381 for voting
577-
- Shared cryptographic infrastructure
578-
- Common key management tooling
579-
- Unified audit and testing
580-
581-
2. **Voting Mechanisms:**
582-
- Similar sortition-based committee selection
583-
- Overlapping vote diffusion requirements
584-
- Potential for unified vote aggregation logic
585-
586-
3. **Priority Scheduling:**
587-
- Peras votes also need prioritization over Leios
588-
- Shared multiplexer design: Peras > Praos > Leios
589-
- Common freshest-first delivery mechanisms
590-
591-
### Development Coordination
592-
593-
**Parallel Development Strategy:**
594-
```
595-
Peras Leios
596-
│ │
597-
├─── BLS Crypto ───────────┤ (Shared)
598-
│ │
599-
├─── Voting Logic ─────────┤ (Coordinate)
600-
│ │
601-
├─── Network Priority ─────┤ (Coordinate)
602-
│ │
603-
(Checkpoint (Throughput
604-
Voting) Scaling)
605-
```
606-
607-
**Integration Considerations:**
608-
- Leios vote production thread can be generalized for Peras votes
609-
- Network multiplexer handles three priority levels: Peras > Praos > Leios
610-
- Shared telemetry and monitoring infrastructure
611-
612-
### Combined Benefits
613-
614-
With both Peras and Leios deployed:
615-
- **Faster finality** via Peras checkpointing
616-
- **Higher throughput** via Leios EBs
617-
- **Better security** through voting committee diversity
618-
- **Unified cryptographic framework** reduces complexity
619-
620-
**Deployment Sequencing:**
621-
- Option A: Deploy Leios first, add Peras later (prioritizes throughput)
622-
- Option B: Deploy Peras first, add Leios later (prioritizes finality)
623-
- Option C: Joint deployment (maximum benefit, higher complexity)
624-
625-
**Recommendation:** Deploy Leios first to address economic sustainability concerns, then add Peras for faster finality. This sequencing:
626-
- Addresses immediate throughput bottleneck
627-
- Validates BLS infrastructure before Peras relies on it
628-
- Enables incremental complexity management
590+
> - 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
591+
> - the currently deployed era is Conway, with Dijkstra being prepared as the follow-up
592+
> - before the hard-fork introducing Dijkstra, at least one intra-era hard fork is planned for early 2026
593+
> - current plans for Dijkstra include nested transactions and maybe already Peras
594+
> - 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
595+
> - should avoid targeting Dijkstra now, but shifting Leios functionality later into an even later era (Euler) once the hard-fork schedule is better understood
596+
> - instead, conservatively targeting Euler with the option to merge functionality forward into Dijkstra if the schedule allows is preferrable
597+
>
598+
> - Impact onto Mithril
599+
> - no protocol level interactions
600+
> - but: mithril relies on a consistent view of the chain acroos signers
601+
> - the client APIs (link/see above) will slightly change, hence `mithril-signer` might be impacted depending on what N2C interfaces are in use
602+
> - 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
603+
> - in any case, the cardano db snapshots served through mithril will need to include new persisted data: EBStore and potentially even the VoteStore
629604
630605
## Interactions with Genesis
631606

632-
Genesis (Ouroboros Genesis) enables nodes to bootstrap from the genesis block without trusted checkpoints. Leios requires the following considerations for Genesis compatibility:
633-
634-
**Key Considerations:**
635-
- Syncing nodes must fetch both RBs and their certified EBs
636-
- LeiosFetch `MsgLeiosBlockRangeRequest` enables efficient batch fetching during sync
637-
- EB closures needed to validate chain density
638-
- Chain density calculations must include transactions from certified EBs (RB-only view underestimates chain quality)
639-
- Certified EBs must be stored permanently alongside RBs
640-
- Immutable storage grows at ~13TB/year at sustained 200 TxkB/s throughput
641-
- Uncertified EBs can be pruned after settlement window
642-
- Parallel fetching from multiple peers critical for sync performance
643-
- Genesis nodes must understand Euler era blocks and track EB certification status
644-
- Initial Leios deployment can use trusted snapshots; full Genesis integration follows after Leios stabilization
645-
607+
> [!WARNING]
608+
> TODO: write section based on outline:
609+
> - recap catching up nodes (if not done already in architecture/changes chapter)
610+
> - syncing nodes must fetch both RBs and their certified EBs, ideally efficiently
611+
> - LeiosFetch mini-protocol already considers this via `MsgLeiosBlockRangeRequest` for efficient batch fetching during sync
612+
> - Parallel fetching from multiple peers critical for sync performance
613+
> - chain density changes
614+
> - EB closures needed to validate chain density
615+
> - density calculations must include transactions from certified EBs (RB-only view underestimates chain quality)
616+
> - not needed for initial testnet deployments
617+
> - 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)
618+
> - only needed for a mainnet release-candidate, but must validate genesis changes long enough on public testnets (and obviously integration testing beforehand)
619+
646620
# Implementation plan
647621

648622
> [!WARNING]

0 commit comments

Comments
 (0)