Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to online cost calculation dashboard #123

Merged
merged 7 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Logbook.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Leios logbook

## 2025-01-3

### Updates to cost dashboard

The cost dashboard was updated with improved input parameters and computations:

- Lengthen phases and reduced EB rate, per analysis in technical report.
- Updated CPU costs for votes and certificates, per analysis in technical report.
- Revised IOPS values, based upon empirical data from Cardano nodes operating in production.
- Updated Agda code to align with web interface, and cross-checked.

Further updates will require calibration data from the Haskell and Rust simulations for Leios.

## 2025-01-02

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

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.

- Number of votes: 600
- Number of votes: 500
- Quorum: 60%
- Vote size: 250 B / vote
- Certificate size: 75 kB / vote
Expand Down
26 changes: 13 additions & 13 deletions cost-dashboard/Main.agda
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,38 @@ baseScenario =

slots_per_s = 1.0
; phase_per_pipeline = 5.0
; slot_per_pipeline = 20.0
; slot_per_pipeline = 60.0

; praos_tx_per_s = 1.0
; leios_tx_per_s = 100.0
; kb_per_tx = 1.940
; verify_vcpu_ms_per_tx = 1.50

; ib_per_slot = 0.25
; io_per_ib = 200.0
; io_per_ib = 1000.0
; build_vcpu_ms_per_ib = 300.0
; verify_vcpu_ms_per_ib = 100.0

; eb_per_pipeline = 1.0
; io_per_eb = 10.0
; eb_per_pipeline = 0.8
; io_per_eb = 200.0
; build_vcpu_ms_per_eb = 300.0
; verify_vcpu_ms_per_eb = 100.0

; vote_per_pipeline = 500.0
; kb_per_vote = 0.725
; io_per_vote = 2.0
; build_vcpu_ms_per_vote = 0.01
; verify_vcpu_ms_per_vote = 0.005
; kb_per_vote = 0.250
; io_per_vote = 25.0
; build_vcpu_ms_per_vote = 2.0
; verify_vcpu_ms_per_vote = 3.0

; cert_per_pipeline = 1.0
; kb_per_cert = 30.0
; io_per_cert = 100.0
; build_vcpu_ms_per_cert = 100.0
; verify_vcpu_ms_per_cert = 50.0
; kb_per_cert = 75.0
; io_per_cert = 1000.0
; build_vcpu_ms_per_cert = 200.0
; verify_vcpu_ms_per_cert = 200.0

; rb_per_slot = 0.05
; kb_per_ibref = 1.2
; io_per_rb = 100.0 -- NB: Copied from `io_per_cert`
; io_per_rb = 1000.0
; build_vcpu_ms_per_rb = 300.0
; verify_vcpu_ms_per_rb = 100.0
; ledger_gb = 200.0
Expand Down
37 changes: 21 additions & 16 deletions cost-dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<div id="uiHeader">
<div>
<h1>Ouroborous Leios cost estimator</h1>
<h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYIvRqFtcv3yFd/view?usp=sharing">video tutorial</a></small></h2>
<h2>v0.3, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYIvRqFtcv3yFd/view?usp=sharing">video tutorial</a></small></h2>
</div>
<p><em>Explore the costs and benefits of Ouroborous Leios</em></p>
<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>
<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>
</div>
<div id="uiDisplays">
<table>
Expand Down Expand Up @@ -43,7 +43,7 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
</tr>
<tr>
<th colspan="2">Phase length <span title="Duration of each Leios phase.">ⓘ</span></th>
<td><input id="uiPhase" type="number" min="5" max="300" value="20" step="1"/></td>
<td><input id="uiPhase" type="number" min="5" max="300" value="60" step="1"/></td>
<td>slot/phase</td>
</tr>
<tr>
Expand All @@ -53,7 +53,7 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
</tr>
<tr>
<th colspan="2">EB rate <span title="Number of Endorser Blocks produced by each pipeline. Fixed at one for Short Leios.">ⓘ</span></th>
<td><input id="uiEbRate" type="number" min="0" max="10" value="1" step="1" disabled="true"/></td>
<td><input id="uiEbRate" type="number" min="0" max="1" value="0.80" step="0.01"/></td>
<td>EB/pipeline</td>
</tr>
<tr>
Expand All @@ -80,7 +80,7 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
</tr>
<tr>
<th>IO <span title="Input/output operations per Input Block">ⓘ</span></th>
<td><input id="uiIbIo" type="number" min="0" max="1000" value="200" step="1"/></td>
<td><input id="uiIbIo" type="number" min="0" max="10000" value="1000" step="1"/></td>
<td>IO/IB</td>
</tr>
<tr>
Expand All @@ -106,7 +106,7 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
</tr>
<tr>
<th>IO <span title="Input/output operations per Endorser Block">ⓘ</span></th>
<td><input id="uiEbIo" type="number" min="0" max="1000" value="10" step="1"/></td>
<td><input id="uiEbIo" type="number" min="0" max="10000" value="200" step="1"/></td>
<td>IO/EB</td>
</tr>
<tr>
Expand All @@ -122,43 +122,43 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
<tr>
<th rowspan="4">Vote <span title="A committee of SPOs votes on whether each Endorser Block was correctly constructed.">ⓘ</span></th>
<th>Size <span title="Size of a vote.">ⓘ</span></th>
<td><input id="uiVoteSize" type="number" min="0" max="2" value="0.725" step="0.001"/></td>
<td><input id="uiVoteSize" type="number" min="0" max="2" value="0.250" step="0.001"/></td>
<td>kB/vote</td>
</tr>
<tr>
<th>IO <span title="Input/output operations per vote.">ⓘ</span></th>
<td><input id="uiVoteIo" type="number" min="0" max="1000" value="2" step="1"/></td>
<td><input id="uiVoteIo" type="number" min="0" max="10000" value="25" step="1"/></td>
<td>IO/vote</td>
</tr>
<tr>
<th>Build <span title="CPU time required to build a vote.">ⓘ</span></th>
<td><input id="uiVoteBuild" type="number" min="0" max="20" value="0.01" step="0.0001"/></td>
<td><input id="uiVoteBuild" type="number" min="0" max="20" value="2.0" step="0.0001"/></td>
<td>vCPU*ms/vote</td>
</tr>
<tr>
<th>Verify <span title="CPU time required to verify a vote.">ⓘ</span></th>
<td><input id="uiVoteVerify" type="number" min="0" max="20" value="0.005" step="0.001"/></td>
<td><input id="uiVoteVerify" type="number" min="0" max="20" value="3.0" step="0.001"/></td>
<td>vCPU*ms/vote</td>
</tr>
<tr>
<th rowspan="4">Certificate <span title="A Leios certificate records a successful vote for an Endorser Block.">ⓘ</span></th>
<th>Size <span title="Size of a certificate.">ⓘ</span></th>
<td><input id="uiCertSize" type="number" min="0" max="200" value="30" step="1"/></td>
<td><input id="uiCertSize" type="number" min="0" max="200" value="75" step="1"/></td>
<td>kB/cert</td>
</tr>
<tr>
<th>IO <span title="Input/output operations per certificate.">ⓘ</span></th>
<td><input id="uiCertIo" type="number" min="0" max="1000" value="100" step="1"/></td>
<td><input id="uiCertIo" type="number" min="0" max="10000" value="1000" step="1"/></td>
<td>IO/cert</td>
</tr>
<tr>
<th>Build <span title="CPU time required to build a certificate.">ⓘ</span></th>
<td><input id="uiCertBuild" type="number" min="0" max="1000" value="100" step="0.1"/></td>
<td><input id="uiCertBuild" type="number" min="0" max="1000" value="200" step="0.1"/></td>
<td>vCPU*ms/cert</td>
</tr>
<tr>
<th>Verify <span title="CPU time required to verify a certificate.">ⓘ</span></th>
<td><input id="uiCertVerify" type="number" min="0" max="1000" value="50" step="0.1"/></td>
<td><input id="uiCertVerify" type="number" min="0" max="1000" value="200" step="0.1"/></td>
<td>vCPU*ms/cert</td>
</tr>
</tbody>
Expand All @@ -182,17 +182,22 @@ <h2>v0.2, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
<td>RB/slot</td>
</tr>
<tr>
<th rowspan="5">Praos assumptions</th>
<th rowspan="6">Praos assumptions</th>
<th colspan="2">Transaction rate <span title="Throughput of transactions submitted to the Praos layer and included in Ranking Blocks.">ⓘ</span></th>
<td><input id="uiPraosTx" type="number" min="0" max="200" value="1" step="1"/></td>
<td>tx/s</td>
</tr>
<tr>
<th rowspan="3">RB <span title="A Praos block, also called a Ranking Block in Leios.">ⓘ</span></th>
<th rowspan="4">RB <span title="A Praos block, also called a Ranking Block in Leios.">ⓘ</span></th>
<th>Size <span title="Size of each Ranking Block.">ⓘ</span></th>
<td><input id="uiRbSize" type="number" disabled="true"/></td>
<td>kB/RB</td>
</tr>
<tr>
<th>IO <span title="Input/output operations per block">ⓘ</span></th>
<td><input id="uiRbIo" type="number" min="0" max="10000" value="1000" step="1"/></td>
<td>IO/RB</td>
</tr>
<tr>
<th>Build <span title="CPU time required to build a Ranking Block.">ⓘ</span></th>
<td><input id="uiRbBuild" type="number" min="0" max="1000" value="300" step="0.1"/></td>
Expand Down
2 changes: 1 addition & 1 deletion cost-dashboard/src/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ function certResources() {

function rbResources() {
const rate = getFloat(uiRbRate) // RB/slot
const uiRbIo = uiCertIo
return calculateResources(rate, uiRbSize, uiRbIo, uiRbBuild, uiRbVerify, true)
}

Expand Down Expand Up @@ -220,6 +219,7 @@ export async function initialize() {
, uiRbLedger
, uiRbRate
//, uiRbSize
, uiRbIo
, uiRbVerify
, uiRelays
, uiRetained
Expand Down
2 changes: 1 addition & 1 deletion nix/project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let
"https://chap.intersectmbo.org/" = inputs.iogx.inputs.CHaP;
};

name = "my-project";
name = "ouroboros-leios";

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

Expand Down
Loading