Skip to content
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
14 changes: 13 additions & 1 deletion Logbook.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
# Leios logbook

## 2025-02-06

### Enhancements to online cost calculator

In response to queries and suggestions, the [online Leios cost calculator]() has been enhanced:

- Users can select costs for either hyperscale providers (like AWS, Azure, and GCP) or discount providers (Hetzner, OVH Cloud, etc.).
- Costs default to that of a discount provider.
- Users can optionally amortize ledger storage costs perpetually vs compute a first-month snapshot of storage costs.
- Deployments default to a single relay instead of two.
- The disk compression default was reduced to a conservative 50%.

## 2025-01-31

## Formal Methods
### Formal Methods

- Finalizing executable specifications for Simplified and Short Leios
- Short Leios spec extracted to Haskell for conformance testing
Expand Down
22 changes: 13 additions & 9 deletions cost-dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,29 +214,33 @@ <h2>v0.3, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
<td>GB</td>
</tr>
<tr>
<th rowspan="5">Costs</th>
<th rowspan="5">Costs<br/>
<br/><input type="button" value="hyperscale provider" onclick="Controller.hyperscaleCosts()"/> <span title="Set costs to values typical of the largest cloud providers">ⓘ</span>
<br/><input type="button" value="discount provider" onclick="Controller.discountCosts()"/> <span title="Set costs to values typical of a discount cloud provider">ⓘ</span>
</th>
<th colspan="2">vCPU <span title="Monthly cost of a virtual CPU.">ⓘ</span></th>
<td><input id="uiVcpu" type="number" min="0" max="100" value="20" step="0.01"/></td>
<td>USD/vCPU/month</td>
</tr>
<tr>
<th colspan="2">Storage <span title="Monthly cost of cloud disk attached to a virtual machine.">ⓘ</span></th>
<td><input id="uiStorage" type="number" min="0" max="1" value="0.12" step="0.01"/></td>
<td><input id="uiStorage" type="number" min="0" max="1" value="0.10" step="0.01"/></td>
<td>USD/GB/month</td>
</tr>
<tr>
<th colspan="2">IOPS <span title="Monthly cost of cloud input/output operation capacity.">ⓘ</span></th>
<td><input id="uiIops" type="number" min="0" max="0.5" value="0.05" step="0.001"/></td>
<td><input id="uiIops" type="number" min="0" max="0.5" value="0.00" step="0.001"/></td>
<td>USD/(IO/s)/month</td>
</tr>
<tr>
<th colspan="2">Network egress <span title="Monthly cost of cloud network egress.">ⓘ</span></th>
<td><input id="uiEgress" type="number" min="0" max="1" value="0.10" step="0.01"/></td>
<td><input id="uiEgress" type="number" min="0" max="1" value="0.00" step="0.01"/></td>
<td>USD/GB</td>
</tr>
<tr>
<th colspan="2">Discount rate <span title="Annual rate at which cloud-computing costs decrease.">ⓘ</span></th>
<td><input id="uiDiscount" type="number" min="0" max="50" value="15" step="0.1"/></td>
<th colspan="1">Discount rate <span title="Annual rate at which cloud-computing costs decrease.">ⓘ</span></th>
<th>Amortize? <span title="Whether to compute perpetual storage cost.">ⓘ</span><input id="uiAmortize" type="checkbox"/></th>
<td><input id="uiDiscount" type="number" min="0" max="50" value="15" step="0.1" disabled="true"/></td>
<td>%/year</td>
</tr>
<tr>
Expand All @@ -247,7 +251,7 @@ <h2>v0.3, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
</tr>
<tr>
<th colspan="2">Relays <span title="Number of relay nodes operated by the stake pool.">ⓘ</span></th>
<td><input id="uiRelays" type="number" min="0" max="10" value="2" step="1"/></td>
<td><input id="uiRelays" type="number" min="0" max="10" value="1" step="1"/></td>
<td>nodes</td>
</tr>
<tr>
Expand Down Expand Up @@ -294,7 +298,7 @@ <h2>v0.3, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
</tr>
<tr>
<th colspan="2">Storage compression <span title="Percentage by which each node's disk storage space is reduced by using data compression or a compressed file system.">ⓘ</span></th>
<td><input id="uiCompression" type="number" min="0" max="100" value="75" step="0.1"/></td>
<td><input id="uiCompression" type="number" min="0" max="100" value="50" step="0.1"/></td>
<td>%</td>
</tr>
<tr>
Expand Down Expand Up @@ -344,7 +348,7 @@ <h2>v0.3, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
<td>USD/month</td>
</tr>
<tr>
<th>Disk (amortized) <span title="The stake pool's monthly cost of perpetually storing the month's transactions on disk.">ⓘ</span></th>
<th>Disk <span id="uiAmortized">(amortized)</span> <span title="The stake pool's monthly cost of perpetually storing the month's transactions on disk.">ⓘ</span></th>
<td id="uiCostStorage">?</td>
<td>USD/month</td>
</tr>
Expand Down
20 changes: 19 additions & 1 deletion cost-dashboard/src/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ export async function calculate() {
const costVcpu = vcpu * getFloat(uiVcpu)
uiCostVcpu.innerText = costVcpu.toFixed(2)

uiAmortized.style.textDecoration = uiAmortize.checked ? "none" : "line-through"
const discount = getFloat(uiDiscount) / 100 / 12 // 1/month
const perpetual = (1 + discount) / discount // 1
const perpetual = uiAmortize.checked ? (1 + discount) / discount : 1 // 1
const compression = 1 - getFloat(uiCompression) / 100 // 1
const storage = nodes * compression * (getFloat(uiRbLedger) + resources.disk / gigabyte * month) // GB/month
uiTotalStorage.innerText = storage.toFixed(2)
Expand Down Expand Up @@ -186,9 +187,26 @@ export async function calculate() {

}

export async function hyperscaleCosts() {
uiVcpu.value = "20"
uiStorage.value = "0.12"
uiIops.value = "0.05"
uiEgress.value = "0.09"
calculate()
}

export async function discountCosts() {
uiVcpu.value = "20"
uiStorage.value = "0.10"
uiIops.value = "0.00"
uiEgress.value = "0.00"
calculate()
}

export async function initialize() {
[
uiAda
, uiAmortize
, uiCertBuild
, uiCertIo
, uiCertRate
Expand Down
16 changes: 15 additions & 1 deletion cost-dashboard/view.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,26 @@
text-align: left;
}

input {
#uiAmortized {
text-decoration: line-through;
}

input[type="text"] {
width: 75px;
text-align: right;
font-family: monospace;
}

input[type="number"] {
width: 75px;
text-align: right;
font-family: monospace;
}

input[type="button"] {
width: 75%;
}

table {
width: fit-content;
border-collapse: collapse;
Expand Down
2 changes: 1 addition & 1 deletion site/static/cost-estimator/controller.js

Large diffs are not rendered by default.

22 changes: 13 additions & 9 deletions site/static/cost-estimator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,29 +214,33 @@ <h2>v0.3, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
<td>GB</td>
</tr>
<tr>
<th rowspan="5">Costs</th>
<th rowspan="5">Costs<br/>
<br/><input type="button" value="hyperscale provider" onclick="Controller.hyperscaleCosts()"/> <span title="Set costs to values typical of the largest cloud providers">ⓘ</span>
<br/><input type="button" value="discount provider" onclick="Controller.discountCosts()"/> <span title="Set costs to values typical of a discount cloud provider">ⓘ</span>
</th>
<th colspan="2">vCPU <span title="Monthly cost of a virtual CPU.">ⓘ</span></th>
<td><input id="uiVcpu" type="number" min="0" max="100" value="20" step="0.01"/></td>
<td>USD/vCPU/month</td>
</tr>
<tr>
<th colspan="2">Storage <span title="Monthly cost of cloud disk attached to a virtual machine.">ⓘ</span></th>
<td><input id="uiStorage" type="number" min="0" max="1" value="0.12" step="0.01"/></td>
<td><input id="uiStorage" type="number" min="0" max="1" value="0.10" step="0.01"/></td>
<td>USD/GB/month</td>
</tr>
<tr>
<th colspan="2">IOPS <span title="Monthly cost of cloud input/output operation capacity.">ⓘ</span></th>
<td><input id="uiIops" type="number" min="0" max="0.5" value="0.05" step="0.001"/></td>
<td><input id="uiIops" type="number" min="0" max="0.5" value="0.00" step="0.001"/></td>
<td>USD/(IO/s)/month</td>
</tr>
<tr>
<th colspan="2">Network egress <span title="Monthly cost of cloud network egress.">ⓘ</span></th>
<td><input id="uiEgress" type="number" min="0" max="1" value="0.10" step="0.01"/></td>
<td><input id="uiEgress" type="number" min="0" max="1" value="0.00" step="0.01"/></td>
<td>USD/GB</td>
</tr>
<tr>
<th colspan="2">Discount rate <span title="Annual rate at which cloud-computing costs decrease.">ⓘ</span></th>
<td><input id="uiDiscount" type="number" min="0" max="50" value="15" step="0.1"/></td>
<th colspan="1">Discount rate <span title="Annual rate at which cloud-computing costs decrease.">ⓘ</span></th>
<th>Amortize? <span title="Whether to compute perpetual storage cost.">ⓘ</span><input id="uiAmortize" type="checkbox"/></th>
<td><input id="uiDiscount" type="number" min="0" max="50" value="15" step="0.1" disabled="true"/></td>
<td>%/year</td>
</tr>
<tr>
Expand All @@ -247,7 +251,7 @@ <h2>v0.3, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
</tr>
<tr>
<th colspan="2">Relays <span title="Number of relay nodes operated by the stake pool.">ⓘ</span></th>
<td><input id="uiRelays" type="number" min="0" max="10" value="2" step="1"/></td>
<td><input id="uiRelays" type="number" min="0" max="10" value="1" step="1"/></td>
<td>nodes</td>
</tr>
<tr>
Expand Down Expand Up @@ -294,7 +298,7 @@ <h2>v0.3, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
</tr>
<tr>
<th colspan="2">Storage compression <span title="Percentage by which each node's disk storage space is reduced by using data compression or a compressed file system.">ⓘ</span></th>
<td><input id="uiCompression" type="number" min="0" max="100" value="75" step="0.1"/></td>
<td><input id="uiCompression" type="number" min="0" max="100" value="50" step="0.1"/></td>
<td>%</td>
</tr>
<tr>
Expand Down Expand Up @@ -344,7 +348,7 @@ <h2>v0.3, <small><a href="https://drive.google.com/file/d/1pH1GYRInevlKcrkpFRJYI
<td>USD/month</td>
</tr>
<tr>
<th>Disk (amortized) <span title="The stake pool's monthly cost of perpetually storing the month's transactions on disk.">ⓘ</span></th>
<th>Disk <span id="uiAmortized">(amortized)</span> <span title="The stake pool's monthly cost of perpetually storing the month's transactions on disk.">ⓘ</span></th>
<td id="uiCostStorage">?</td>
<td>USD/month</td>
</tr>
Expand Down
16 changes: 15 additions & 1 deletion site/static/cost-estimator/view.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,26 @@
text-align: left;
}

input {
#uiAmortized {
text-decoration: line-through;
}

input[type="text"] {
width: 75px;
text-align: right;
font-family: monospace;
}

input[type="number"] {
width: 75px;
text-align: right;
font-family: monospace;
}

input[type="button"] {
width: 75%;
}

table {
width: fit-content;
border-collapse: collapse;
Expand Down
Loading