Skip to content

Commit eeeafd0

Browse files
authored
Updates to online cost calculation dashboard (#123)
Updated cost parameters for online calculator * Bumped version number of cost calculation dashboard * Made the EB rate editable * Lengthened default phase length * Aligned IOPS with empirical data for cardano nodes * Aligned agda code with latest default inputs * Updated log book
1 parent 3e2b167 commit eeeafd0

File tree

5 files changed

+50
-32
lines changed

5 files changed

+50
-32
lines changed

Logbook.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Leios logbook
22

3+
## 2025-01-3
4+
5+
### Updates to cost dashboard
6+
7+
The cost dashboard was updated with improved input parameters and computations:
8+
9+
- Lengthen phases and reduced EB rate, per analysis in technical report.
10+
- Updated CPU costs for votes and certificates, per analysis in technical report.
11+
- Revised IOPS values, based upon empirical data from Cardano nodes operating in production.
12+
- Updated Agda code to align with web interface, and cross-checked.
13+
14+
Further updates will require calibration data from the Haskell and Rust simulations for Leios.
15+
316
## 2025-01-02
417

518
### Benchmarking BLS signatures and aggregate verifications
@@ -17,7 +30,7 @@ The construction and verification BLS votes were benchmarked using the Rust [bls
1730

1831
Generic benchmarks for cryptographic operations have provided guidance on the pros and cons of the prospective voting and certificate schemes, but further work on estimating CPU resources needed will require detailed implementation of the prospective voting and certificate schemes. For the time being, the following values can be used in simulation studies.
1932

20-
- Number of votes: 600
33+
- Number of votes: 500
2134
- Quorum: 60%
2235
- Vote size: 250 B / vote
2336
- Certificate size: 75 kB / vote

cost-dashboard/Main.agda

+13-13
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,38 @@ baseScenario =
1818

1919
slots_per_s = 1.0
2020
; phase_per_pipeline = 5.0
21-
; slot_per_pipeline = 20.0
21+
; slot_per_pipeline = 60.0
2222

2323
; praos_tx_per_s = 1.0
2424
; leios_tx_per_s = 100.0
2525
; kb_per_tx = 1.940
2626
; verify_vcpu_ms_per_tx = 1.50
2727

2828
; ib_per_slot = 0.25
29-
; io_per_ib = 200.0
29+
; io_per_ib = 1000.0
3030
; build_vcpu_ms_per_ib = 300.0
3131
; verify_vcpu_ms_per_ib = 100.0
3232

33-
; eb_per_pipeline = 1.0
34-
; io_per_eb = 10.0
33+
; eb_per_pipeline = 0.8
34+
; io_per_eb = 200.0
3535
; build_vcpu_ms_per_eb = 300.0
3636
; verify_vcpu_ms_per_eb = 100.0
3737

3838
; vote_per_pipeline = 500.0
39-
; kb_per_vote = 0.725
40-
; io_per_vote = 2.0
41-
; build_vcpu_ms_per_vote = 0.01
42-
; verify_vcpu_ms_per_vote = 0.005
39+
; kb_per_vote = 0.250
40+
; io_per_vote = 25.0
41+
; build_vcpu_ms_per_vote = 2.0
42+
; verify_vcpu_ms_per_vote = 3.0
4343

4444
; cert_per_pipeline = 1.0
45-
; kb_per_cert = 30.0
46-
; io_per_cert = 100.0
47-
; build_vcpu_ms_per_cert = 100.0
48-
; verify_vcpu_ms_per_cert = 50.0
45+
; kb_per_cert = 75.0
46+
; io_per_cert = 1000.0
47+
; build_vcpu_ms_per_cert = 200.0
48+
; verify_vcpu_ms_per_cert = 200.0
4949

5050
; rb_per_slot = 0.05
5151
; kb_per_ibref = 1.2
52-
; io_per_rb = 100.0 -- NB: Copied from `io_per_cert`
52+
; io_per_rb = 1000.0
5353
; build_vcpu_ms_per_rb = 300.0
5454
; verify_vcpu_ms_per_rb = 100.0
5555
; ledger_gb = 200.0

cost-dashboard/index.html

+21-16
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<div id="uiHeader">
1111
<div>
1212
<h1>Ouroborous Leios cost estimator</h1>
13-
<h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYIvRqFtcv3yFd/view?usp=sharing">video tutorial</a></small></h2>
13+
<h2>v0.3, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYIvRqFtcv3yFd/view?usp=sharing">video tutorial</a></small></h2>
1414
</div>
1515
<p><em>Explore the costs and benefits of Ouroborous Leios</em></p>
16-
<p>WARNING: This is a <em>very preliminary</em> tool for estimating the costs of running Leios nodes. At this point, it is really just useful for structuring thinking about Leios costs and making some very rough calculations for guiding further study. The Leios R&amp;D task aims to refine both the inputs to models like this and the cost model itself. Also note that the design of the Leios protocol itself is under revision. Ask questions <a href="https://discord.com/channels/826816523368005654/1247688618621927505">on Discord</a> or report problems on <a href="https://github.com/input-output-hk/ouroboros-leios/issues">GitHub</a>.</p>
16+
<p><span style="color:red">WARNING:</span> This is a <em>very preliminary</em> tool for estimating the costs of running Leios nodes. At this point, it is really just useful for structuring thinking about Leios costs and making some very rough calculations for guiding further study. The Leios R&amp;D task aims to refine both the inputs to models like this and the cost model itself. Also note that the design of the Leios protocol itself is under revision. Ask questions <a href="https://discord.com/channels/826816523368005654/1247688618621927505">on Discord</a> or report problems on <a href="https://github.com/input-output-hk/ouroboros-leios/issues">GitHub</a>.</p>
1717
</div>
1818
<div id="uiDisplays">
1919
<table>
@@ -43,7 +43,7 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
4343
</tr>
4444
<tr>
4545
<th colspan="2">Phase length <span title="Duration of each Leios phase."></span></th>
46-
<td><input id="uiPhase" type="number" min="5" max="300" value="20" step="1"/></td>
46+
<td><input id="uiPhase" type="number" min="5" max="300" value="60" step="1"/></td>
4747
<td>slot/phase</td>
4848
</tr>
4949
<tr>
@@ -53,7 +53,7 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
5353
</tr>
5454
<tr>
5555
<th colspan="2">EB rate <span title="Number of Endorser Blocks produced by each pipeline. Fixed at one for Short Leios."></span></th>
56-
<td><input id="uiEbRate" type="number" min="0" max="10" value="1" step="1" disabled="true"/></td>
56+
<td><input id="uiEbRate" type="number" min="0" max="1" value="0.80" step="0.01"/></td>
5757
<td>EB/pipeline</td>
5858
</tr>
5959
<tr>
@@ -80,7 +80,7 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
8080
</tr>
8181
<tr>
8282
<th>IO <span title="Input/output operations per Input Block"></span></th>
83-
<td><input id="uiIbIo" type="number" min="0" max="1000" value="200" step="1"/></td>
83+
<td><input id="uiIbIo" type="number" min="0" max="10000" value="1000" step="1"/></td>
8484
<td>IO/IB</td>
8585
</tr>
8686
<tr>
@@ -106,7 +106,7 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
106106
</tr>
107107
<tr>
108108
<th>IO <span title="Input/output operations per Endorser Block"></span></th>
109-
<td><input id="uiEbIo" type="number" min="0" max="1000" value="10" step="1"/></td>
109+
<td><input id="uiEbIo" type="number" min="0" max="10000" value="200" step="1"/></td>
110110
<td>IO/EB</td>
111111
</tr>
112112
<tr>
@@ -122,43 +122,43 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
122122
<tr>
123123
<th rowspan="4">Vote <span title="A committee of SPOs votes on whether each Endorser Block was correctly constructed."></span></th>
124124
<th>Size <span title="Size of a vote."></span></th>
125-
<td><input id="uiVoteSize" type="number" min="0" max="2" value="0.725" step="0.001"/></td>
125+
<td><input id="uiVoteSize" type="number" min="0" max="2" value="0.250" step="0.001"/></td>
126126
<td>kB/vote</td>
127127
</tr>
128128
<tr>
129129
<th>IO <span title="Input/output operations per vote."></span></th>
130-
<td><input id="uiVoteIo" type="number" min="0" max="1000" value="2" step="1"/></td>
130+
<td><input id="uiVoteIo" type="number" min="0" max="10000" value="25" step="1"/></td>
131131
<td>IO/vote</td>
132132
</tr>
133133
<tr>
134134
<th>Build <span title="CPU time required to build a vote."></span></th>
135-
<td><input id="uiVoteBuild" type="number" min="0" max="20" value="0.01" step="0.0001"/></td>
135+
<td><input id="uiVoteBuild" type="number" min="0" max="20" value="2.0" step="0.0001"/></td>
136136
<td>vCPU*ms/vote</td>
137137
</tr>
138138
<tr>
139139
<th>Verify <span title="CPU time required to verify a vote."></span></th>
140-
<td><input id="uiVoteVerify" type="number" min="0" max="20" value="0.005" step="0.001"/></td>
140+
<td><input id="uiVoteVerify" type="number" min="0" max="20" value="3.0" step="0.001"/></td>
141141
<td>vCPU*ms/vote</td>
142142
</tr>
143143
<tr>
144144
<th rowspan="4">Certificate <span title="A Leios certificate records a successful vote for an Endorser Block."></span></th>
145145
<th>Size <span title="Size of a certificate."></span></th>
146-
<td><input id="uiCertSize" type="number" min="0" max="200" value="30" step="1"/></td>
146+
<td><input id="uiCertSize" type="number" min="0" max="200" value="75" step="1"/></td>
147147
<td>kB/cert</td>
148148
</tr>
149149
<tr>
150150
<th>IO <span title="Input/output operations per certificate."></span></th>
151-
<td><input id="uiCertIo" type="number" min="0" max="1000" value="100" step="1"/></td>
151+
<td><input id="uiCertIo" type="number" min="0" max="10000" value="1000" step="1"/></td>
152152
<td>IO/cert</td>
153153
</tr>
154154
<tr>
155155
<th>Build <span title="CPU time required to build a certificate."></span></th>
156-
<td><input id="uiCertBuild" type="number" min="0" max="1000" value="100" step="0.1"/></td>
156+
<td><input id="uiCertBuild" type="number" min="0" max="1000" value="200" step="0.1"/></td>
157157
<td>vCPU*ms/cert</td>
158158
</tr>
159159
<tr>
160160
<th>Verify <span title="CPU time required to verify a certificate."></span></th>
161-
<td><input id="uiCertVerify" type="number" min="0" max="1000" value="50" step="0.1"/></td>
161+
<td><input id="uiCertVerify" type="number" min="0" max="1000" value="200" step="0.1"/></td>
162162
<td>vCPU*ms/cert</td>
163163
</tr>
164164
</tbody>
@@ -182,17 +182,22 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
182182
<td>RB/slot</td>
183183
</tr>
184184
<tr>
185-
<th rowspan="5">Praos assumptions</th>
185+
<th rowspan="6">Praos assumptions</th>
186186
<th colspan="2">Transaction rate <span title="Throughput of transactions submitted to the Praos layer and included in Ranking Blocks."></span></th>
187187
<td><input id="uiPraosTx" type="number" min="0" max="200" value="1" step="1"/></td>
188188
<td>tx/s</td>
189189
</tr>
190190
<tr>
191-
<th rowspan="3">RB <span title="A Praos block, also called a Ranking Block in Leios."></span></th>
191+
<th rowspan="4">RB <span title="A Praos block, also called a Ranking Block in Leios."></span></th>
192192
<th>Size <span title="Size of each Ranking Block."></span></th>
193193
<td><input id="uiRbSize" type="number" disabled="true"/></td>
194194
<td>kB/RB</td>
195195
</tr>
196+
<tr>
197+
<th>IO <span title="Input/output operations per block"></span></th>
198+
<td><input id="uiRbIo" type="number" min="0" max="10000" value="1000" step="1"/></td>
199+
<td>IO/RB</td>
200+
</tr>
196201
<tr>
197202
<th>Build <span title="CPU time required to build a Ranking Block."></span></th>
198203
<td><input id="uiRbBuild" type="number" min="0" max="1000" value="300" step="0.1"/></td>

cost-dashboard/src/controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ function certResources() {
7474

7575
function rbResources() {
7676
const rate = getFloat(uiRbRate) // RB/slot
77-
const uiRbIo = uiCertIo
7877
return calculateResources(rate, uiRbSize, uiRbIo, uiRbBuild, uiRbVerify, true)
7978
}
8079

@@ -220,6 +219,7 @@ export async function initialize() {
220219
, uiRbLedger
221220
, uiRbRate
222221
//, uiRbSize
222+
, uiRbIo
223223
, uiRbVerify
224224
, uiRelays
225225
, uiRetained

nix/project.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let
1717
"https://chap.intersectmbo.org/" = inputs.iogx.inputs.CHaP;
1818
};
1919

20-
name = "my-project";
20+
name = "ouroboros-leios";
2121

2222
compiler-nix-name = lib.mkDefault "ghc96";
2323

0 commit comments

Comments
 (0)