Skip to content

Commit f7a3288

Browse files
committed
docs: add sim configs to README
1 parent 3b6013e commit f7a3288

File tree

1 file changed

+122
-9
lines changed

1 file changed

+122
-9
lines changed

README.md

Lines changed: 122 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Ouroboros Leios
2+
13
This repository is home of the _Leios R&D project_ whose purpose is to define a specification of the Ouroboros Leios protocol.
24

35
This project aims to address the challenges outlined in [CPS-0018](https://github.com/cardano-foundation/CIPs/blob/master/CPS-0018/README.md), which focuses on improving transaction throughput in the Cardano network.
@@ -8,24 +10,139 @@ This project aims to address the challenges outlined in [CPS-0018](https://githu
810
> welcome. No warranties of any kind about the current or future
911
> features of Cardano are to be expected, implicitly and explicitly.
1012
11-
# Getting started
13+
## Getting started
1214

1315
Checkout [CONTRIBUTING.md](CONTRIBUTING.md) document for possible contributions and communication channels
1416

1517
More documentation about Leios can be found in the [web site](https://leios.cardano-scaling.org).
1618

17-
# Content
18-
19-
## Current
19+
## Repository Structure
2020

2121
- [Logbook](Logbook.md) contains a detailed account of
2222
problems,successes, failures, ideas, references and is intended as a
2323
tool to help the team members stay in sync. It's updated frequently
2424
with notes about the day-to-day work, meetings, ideas, etc.
25-
- [simulation](simulation) contains experimental Haskell code to simulate the Leios protocol
25+
- [data](data) contains common input files, schemas, and default configurations used by both simulations
26+
- [deltaQ](deltaQ) contains network quality analysis tools and measurements
27+
- [simulation](simulation) contains experimental Haskell code to simulate the Leios protocol, including built-in visualization capabilities
2628
- [sim-rs](sim-rs) contains experimental Rust code to simulate the Leios protocol
29+
- [ui](ui) contains the web-based visualization tool for the Rust simulation traces
2730
- [site](site) contains the sources of the aforementioned web site
2831

32+
33+
## Simulations
34+
35+
Both the Haskell and Rust simulations read in a network topology file that defines the nodes and their connections, along with a configuration file that controls various protocol parameters. The simulations then produce trace outputs that can be visualized to analyze the protocol's behavior. The Haskell simulation includes built-in visualization capabilities, while the Rust simulation generates JSONL traces that can be visualized using the web UI in the `ui` directory.
36+
37+
### Configuration Parameters
38+
39+
The Leios simulations (both Rust and Haskell) can be configured using YAML configuration files. The configuration schema is defined in [data/simulation/config.d.ts](data/simulation/config.d.ts) and the default configuration is available in [data/simulation/config.default.yaml](data/simulation/config.default.yaml).
40+
41+
Each parameter controls a specific aspect of the simulation, and some parameters are only supported by either the Rust or Haskell implementation:
42+
43+
### Simulation Configuration
44+
45+
| Parameter | Description | Haskell | Rust |
46+
|-----------|-------------|:-------:|:----:|
47+
| `relay-strategy` | Strategy for relaying blocks |||
48+
| `tcp-congestion-control` | Enable TCP congestion control |||
49+
| `multiplex-mini-protocols` | Enable multiplexing of mini-protocols |||
50+
51+
### Leios Protocol Configuration
52+
53+
| Parameter | Description | Haskell | Rust |
54+
|-----------|-------------|:-------:|:----:|
55+
| `leios-stage-length-slots` | Number of slots in a Leios stage |||
56+
| `leios-stage-active-voting-slots` | Number of slots for active voting |||
57+
| `leios-vote-send-recv-stages` | Whether to separate Vote Send and Vote Receive stages |||
58+
59+
### Transaction Configuration
60+
61+
| Parameter | Description | Haskell | Rust |
62+
|-----------|-------------|:-------:|:----:|
63+
| `tx-generation-distribution` | Distribution for transaction generation |||
64+
| `tx-size-bytes-distribution` | Distribution for transaction sizes |||
65+
| `tx-validation-cpu-time-ms` | CPU time for transaction validation |||
66+
| `tx-max-size-bytes` | Maximum transaction size |||
67+
68+
### Ranking Block Configuration
69+
70+
| Parameter | Description | Haskell | Rust |
71+
|-----------|-------------|:-------:|:----:|
72+
| `rb-generation-probability` | Probability of generating a ranking block |||
73+
| `rb-generation-cpu-time-ms` | CPU time for generating a ranking block |||
74+
| `rb-head-validation-cpu-time-ms` | CPU time for validating a ranking block header |||
75+
| `rb-head-size-bytes` | Size of a ranking block header |||
76+
| `rb-body-max-size-bytes` | Maximum size of a ranking block body |||
77+
| `rb-body-legacy-praos-payload-validation-cpu-time-ms-constant` | Constant CPU time for validating legacy Praos payload |||
78+
| `rb-body-legacy-praos-payload-validation-cpu-time-ms-per-byte` | Per-byte CPU time for validating legacy Praos payload |||
79+
| `rb-body-legacy-praos-payload-avg-size-bytes` | Average size of legacy Praos payload |||
80+
81+
### Input Block Configuration
82+
83+
| Parameter | Description | Haskell | Rust |
84+
|-----------|-------------|:-------:|:----:|
85+
| `ib-generation-probability` | Probability of generating an input block |||
86+
| `ib-generation-cpu-time-ms` | CPU time for generating an input block |||
87+
| `ib-shards` | Number of shards for input blocks |||
88+
| `ib-head-size-bytes` | Size of an input block header |||
89+
| `ib-head-validation-cpu-time-ms` | CPU time for validating an input block header |||
90+
| `ib-body-validation-cpu-time-ms-constant` | Constant CPU time for validating an input block body |||
91+
| `ib-body-validation-cpu-time-ms-per-byte` | Per-byte CPU time for validating an input block body |||
92+
| `ib-body-avg-size-bytes` | Average size of an input block body |||
93+
| `ib-body-max-size-bytes` | Maximum size of an input block body |||
94+
| `ib-diffusion-strategy` | Strategy for diffusing input blocks |||
95+
| `ib-diffusion-max-window-size` | Maximum window size for input block diffusion |||
96+
| `ib-diffusion-max-headers-to-request` | Maximum number of headers to request for input blocks |||
97+
| `ib-diffusion-max-bodies-to-request` | Maximum number of bodies to request for input blocks |||
98+
99+
### Endorsement Block Configuration
100+
101+
| Parameter | Description | Haskell | Rust |
102+
|-----------|-------------|:-------:|:----:|
103+
| `eb-generation-probability` | Probability of generating an endorsement block |||
104+
| `eb-generation-cpu-time-ms` | CPU time for generating an endorsement block |||
105+
| `eb-validation-cpu-time-ms` | CPU time for validating an endorsement block |||
106+
| `eb-size-bytes-constant` | Constant size of an endorsement block |||
107+
| `eb-size-bytes-per-ib` | Per-input-block size of an endorsement block |||
108+
| `eb-diffusion-strategy` | Strategy for diffusing endorsement blocks |||
109+
| `eb-diffusion-max-window-size` | Maximum window size for endorsement block diffusion |||
110+
| `eb-diffusion-max-headers-to-request` | Maximum number of headers to request for endorsement blocks |||
111+
| `eb-diffusion-max-bodies-to-request` | Maximum number of bodies to request for endorsement blocks |||
112+
113+
### Vote Configuration
114+
115+
| Parameter | Description | Haskell | Rust |
116+
|-----------|-------------|:-------:|:----:|
117+
| `vote-generation-probability` | Probability of generating a vote |||
118+
| `vote-generation-cpu-time-ms-constant` | Constant CPU time for generating a vote |||
119+
| `vote-generation-cpu-time-ms-per-ib` | Per-input-block CPU time for generating a vote |||
120+
| `vote-validation-cpu-time-ms` | CPU time for validating a vote |||
121+
| `vote-threshold` | Threshold for vote acceptance |||
122+
| `vote-bundle-size-bytes-constant` | Constant size of a vote bundle |||
123+
| `vote-bundle-size-bytes-per-eb` | Per-endorsement-block size of a vote bundle |||
124+
| `vote-diffusion-strategy` | Strategy for diffusing votes |||
125+
| `vote-diffusion-max-window-size` | Maximum window size for vote diffusion |||
126+
| `vote-diffusion-max-headers-to-request` | Maximum number of headers to request for votes |||
127+
| `vote-diffusion-max-bodies-to-request` | Maximum number of bodies to request for votes |||
128+
129+
### Certificate Configuration
130+
131+
| Parameter | Description | Haskell | Rust |
132+
|-----------|-------------|:-------:|:----:|
133+
| `cert-generation-cpu-time-ms-constant` | Constant CPU time for generating a certificate |||
134+
| `cert-generation-cpu-time-ms-per-node` | Per-node CPU time for generating a certificate |||
135+
| `cert-validation-cpu-time-ms-constant` | Constant CPU time for validating a certificate |||
136+
| `cert-validation-cpu-time-ms-per-node` | Per-node CPU time for validating a certificate |||
137+
| `cert-size-bytes-constant` | Constant size of a certificate |||
138+
| `cert-size-bytes-per-node` | Per-node size of a certificate |||
139+
140+
For more details on each parameter, refer to the comments in the [config.d.ts](data/simulation/config.d.ts) file and the default values in [config.default.yaml](data/simulation/config.default.yaml).
141+
142+
## Specification
143+
144+
The formal specification of the Leios protocol in Agda is refrenced from the repository: https://github.com/input-output-hk/ouroboros-leios-formal-spec
145+
29146
## Docker Simulation
30147

31148
You can run both the Rust and Haskell simulations using Docker to generate simulation trace logs.
@@ -119,10 +236,6 @@ Common arguments for Haskell simulation:
119236
>
120237
> For Haskell simulation visualization, use the `viz` command option directly in the Haskell simulation binary (not available in Docker).
121238
122-
## Specification
123-
124-
The formal specification of the Leios protocol in Agda is refrenced from the repository: https://github.com/input-output-hk/ouroboros-leios-formal-spec
125-
126239
## Archive
127240

128241
The [Leios CIP](https://github.com/cardano-foundation/CIPs/pull/379)

0 commit comments

Comments
 (0)