You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+122-9Lines changed: 122 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
# Ouroboros Leios
2
+
1
3
This repository is home of the _Leios R&D project_ whose purpose is to define a specification of the Ouroboros Leios protocol.
2
4
3
5
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
8
10
> welcome. No warranties of any kind about the current or future
9
11
> features of Cardano are to be expected, implicitly and explicitly.
10
12
11
-
# Getting started
13
+
##Getting started
12
14
13
15
Checkout [CONTRIBUTING.md](CONTRIBUTING.md) document for possible contributions and communication channels
14
16
15
17
More documentation about Leios can be found in the [web site](https://leios.cardano-scaling.org).
16
18
17
-
# Content
18
-
19
-
## Current
19
+
## Repository Structure
20
20
21
21
-[Logbook](Logbook.md) contains a detailed account of
22
22
problems,successes, failures, ideas, references and is intended as a
23
23
tool to help the team members stay in sync. It's updated frequently
24
24
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
26
28
-[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
27
30
-[site](site) contains the sources of the aforementioned web site
28
31
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 | ❌ | ✅ |
|`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
+
29
146
## Docker Simulation
30
147
31
148
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:
119
236
>
120
237
> For Haskell simulation visualization, use the `viz` command option directly in the Haskell simulation binary (not available in Docker).
121
238
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
-
126
239
## Archive
127
240
128
241
The [Leios CIP](https://github.com/cardano-foundation/CIPs/pull/379)
0 commit comments