|
| 1 | +# yaml-language-server: $schema=./config.schema.json |
| 2 | + |
| 3 | +################################################################################ |
| 4 | +# Simulation Configuration File |
| 5 | +################################################################################ |
| 6 | +# |
| 7 | +# This file contains the default configuration for running Leios simulations in |
| 8 | +# the Haskell simulation (`simulation/`) and the Rust simulation (`sim-rs/`). |
| 9 | +# |
| 10 | +################################################################################ |
| 11 | +# Simulation Configuration |
| 12 | +################################################################################ |
| 13 | + |
| 14 | +relay-strategy: "request-from-first" |
| 15 | +tcp-congestion-control: true |
| 16 | +multiplex-mini-protocols: true |
| 17 | +simulate-transactions: true |
| 18 | +treat-blocks-as-full: false |
| 19 | +cleanup-policies: ["cleanup-expired-vote"] |
| 20 | +timestamp-resolution-ms: 0.1 |
| 21 | + |
| 22 | +################################################################################ |
| 23 | +# Leios Protocol Configuration |
| 24 | +################################################################################ |
| 25 | + |
| 26 | +leios-variant: linear |
| 27 | +linear-vote-stage-length-slots: 5 |
| 28 | +linear-diffuse-stage-length-slots: 5 |
| 29 | +leios-stage-length-slots: 5 |
| 30 | +leios-stage-active-voting-slots: 1 |
| 31 | +leios-vote-send-recv-stages: false |
| 32 | +leios-late-ib-inclusion: true |
| 33 | +leios-header-diffusion-time-ms: 1000.0 |
| 34 | +leios-mempool-sampling-strategy: ordered-by-id |
| 35 | +leios-mempool-aggressive-pruning: true |
| 36 | +# TODO: revise default |
| 37 | +praos-chain-quality: 100 |
| 38 | +praos-fallback-enabled: true |
| 39 | + |
| 40 | +################################################################################ |
| 41 | +# Transaction Configuration |
| 42 | +################################################################################ |
| 43 | + |
| 44 | +tx-generation-distribution: |
| 45 | + distribution: exp |
| 46 | + lambda: 0.85 |
| 47 | + scale: 9.13 |
| 48 | +tx-size-bytes-distribution: |
| 49 | + distribution: constant |
| 50 | + value: 1400 |
| 51 | +tx-conflict-fraction: 0 |
| 52 | +tx-overcollateralization-factor-distribution: |
| 53 | + distribution: constant |
| 54 | + value: 0 |
| 55 | +tx-validation-cpu-time-ms: 0.065 |
| 56 | +tx-max-size-bytes: 16384 |
| 57 | +tx-start-time: 0 |
| 58 | +tx-stop-time: 450 |
| 59 | + |
| 60 | +################################################################################ |
| 61 | +# Ranking Block Configuration |
| 62 | +################################################################################ |
| 63 | + |
| 64 | +# 1/leios-stage-length-slots, targeting one RB per pipeline. |
| 65 | +# Also 20s is current rate of praos blocks. |
| 66 | +rb-generation-probability: 5.0e-2 |
| 67 | +# Eng. team targets 1kB as worst case upper bound. |
| 68 | +# Actual size fairly close. |
| 69 | +rb-head-size-bytes: 1024 |
| 70 | +rb-body-max-size-bytes: 90112 |
| 71 | +# Note: certificate generation/validation is not included in the |
| 72 | +# timings here, see cert-* fields. |
| 73 | +rb-generation-cpu-time-ms: 1.0 |
| 74 | +rb-head-validation-cpu-time-ms: 1.0 |
| 75 | + |
| 76 | +# On average, no Txs directly embedded in blocks. |
| 77 | +rb-body-legacy-praos-payload-avg-size-bytes: 0 |
| 78 | +rb-body-legacy-praos-payload-validation-cpu-time-ms-constant: 50.0 |
| 79 | +# the -per-byte component is meant to be using size as a (bad) |
| 80 | +# proxy for the complexity of the Txs included. |
| 81 | +rb-body-legacy-praos-payload-validation-cpu-time-ms-per-byte: 0.0005 |
| 82 | + |
| 83 | +################################################################################ |
| 84 | +# Input Block Configuration |
| 85 | +################################################################################ |
| 86 | + |
| 87 | +ib-generation-probability: 2.0 |
| 88 | +ib-shards: 1 |
| 89 | +ib-shard-period-length-slots: 1 |
| 90 | +ib-shard-group-count: 1 |
| 91 | + |
| 92 | +# ProducerId 32 |
| 93 | +# SlotNo 64 |
| 94 | +# VRF proof 80 |
| 95 | +# Body hash 32 |
| 96 | +# RB Ref 32 |
| 97 | +# Signature 64 |
| 98 | +# Total 304 |
| 99 | +# |
| 100 | +# NOTE: using a KES Signature (like for Praos headers) |
| 101 | +# would instead more than double the total to 668. |
| 102 | +# And even 828 including Op Cert. |
| 103 | +ib-head-size-bytes: 304 |
| 104 | +# 98KB to optimize for 3 TCP round trips |
| 105 | +ib-body-avg-size-bytes: 98304 |
| 106 | +ib-body-max-size-bytes: 262144 |
| 107 | +# Here we also use praos blocks as ballpark estimate. |
| 108 | +# Sec 2.3 Forging, of the benchmark cluster report, lists |
| 109 | +# * Slot start to announced: 0.12975s |
| 110 | +ib-generation-cpu-time-ms: 130.0 |
| 111 | +ib-head-validation-cpu-time-ms: 1.0 |
| 112 | +ib-body-validation-cpu-time-ms-constant: 50.0 |
| 113 | +ib-body-validation-cpu-time-ms-per-byte: 0.0005 |
| 114 | +ib-diffusion-strategy: "freshest-first" |
| 115 | + |
| 116 | +# Haskell prototype relay mini-protocol parameters. |
| 117 | +ib-diffusion-max-bodies-to-request: 1 |
| 118 | +ib-diffusion-max-headers-to-request: 100 |
| 119 | +ib-diffusion-max-window-size: 100 |
| 120 | + |
| 121 | +################################################################################ |
| 122 | +# Endorsement Block Configuration |
| 123 | +################################################################################ |
| 124 | + |
| 125 | +# We want one per pipeline, but not too many. |
| 126 | +eb-generation-probability: 1.0 |
| 127 | +# ProducerId 32 |
| 128 | +# SlotNo 64 |
| 129 | +# VRF proof 80 |
| 130 | +# Signature 64 |
| 131 | +# Total 240 |
| 132 | +# |
| 133 | +# See Note about signatures on ib-head-size-bytes. |
| 134 | +eb-size-bytes-constant: 240 |
| 135 | +# IB hash |
| 136 | +eb-size-bytes-per-ib: 32 |
| 137 | +# Collecting the IBs to reference and cryptography are the main tasks. |
| 138 | +# A comparable task is maybe mempool snapshotting. |
| 139 | +# Sec 2.3 Forging, of the benchmark cluster report, lists |
| 140 | +# * Mempool snapshotting: 0.07252s |
| 141 | +# 75ms then seems a generous estimate for eb generation. |
| 142 | +eb-generation-cpu-time-ms: 75.0 |
| 143 | +# Validating signature and vrf proof, as in other headers. |
| 144 | +eb-validation-cpu-time-ms: 1.0 |
| 145 | + |
| 146 | +eb-diffusion-strategy: "peer-order" |
| 147 | + |
| 148 | +# Haskell prototype relay mini-protocol parameters. |
| 149 | +eb-diffusion-max-bodies-to-request: 1 |
| 150 | +eb-diffusion-max-headers-to-request: 100 |
| 151 | +eb-diffusion-max-window-size: 100 |
| 152 | + |
| 153 | +# The maximum age of EBs included in RBs. |
| 154 | +# A an EB from slot `s` can only be included in RBs |
| 155 | +# up to slot `s+eb-max-age-slots`. |
| 156 | +# In short leios we expect votes to diffuse within 3 stages lengths of |
| 157 | +# EB generation, we allow for 2 more stage lengths to account for |
| 158 | +# variance in the interval within RBs. |
| 159 | +eb-max-age-slots: 240 |
| 160 | + |
| 161 | +# The maximum age of EBs to be relayed. |
| 162 | +# An EB from slot `s` will only be relayed |
| 163 | +# up to slot `s+eb-max-age-for-relay-slots`. |
| 164 | +eb-max-age-for-relay-slots: 40 |
| 165 | + |
| 166 | +# The maximum size of transactions (in bytes) which an EB can reference. |
| 167 | +# Only relevant when running with the "full-without-ibs" variant. |
| 168 | +eb-referenced-txs-max-size-bytes: 10000000 |
| 169 | +eb-body-avg-size-bytes: 10000000 |
| 170 | + |
| 171 | +################################################################################ |
| 172 | +# Vote Configuration |
| 173 | +################################################################################ |
| 174 | + |
| 175 | +# Cryptography related values taken from [vote-spec](crypto-benchmarks.rs/Specification.md) |
| 176 | +# using weighted averages of 80% persistent and 20% non-persistent. |
| 177 | + |
| 178 | +# vote-spec#Committe and quorum size |
| 179 | +# |
| 180 | +# Note: this is used as the expected amount of total weight of |
| 181 | +# generated votes in the sims. |
| 182 | +vote-generation-probability: 500.0 |
| 183 | +# vote-spec#"Committe and quorum size" |
| 184 | +# 60% of `vote-generation-probability` |
| 185 | +vote-threshold: 300 |
| 186 | +# vote-spec#"Generate vote" 0.8*135e-3 + 0.2*280e-3 |
| 187 | +vote-generation-cpu-time-ms-constant: 164.0e-3 |
| 188 | +# No benchmark yet. |
| 189 | +vote-generation-cpu-time-ms-per-ib: 0 |
| 190 | +# vote-spec#"Verify vote" 0.8*670e-3 + 0.2*1.4 |
| 191 | +vote-validation-cpu-time-ms: 816.0e-3 |
| 192 | +# The `Vote` structure counted in the -per-eb already identifies slot |
| 193 | +# (in Eid) and voter. We can assume a vote bundle is all for the same |
| 194 | +# voter and slot, so for non-persistent voters we could factor their |
| 195 | +# PoolKeyHash (28bytes) here, but that is for 20% of cases. |
| 196 | +# More relevant if EB generation is very high. |
| 197 | +vote-bundle-size-bytes-constant: 0 |
| 198 | +# vote-spec#Votes 0.8*90 + 0.2*164 |
| 199 | +vote-bundle-size-bytes-per-eb: 105 |
| 200 | + |
| 201 | +vote-diffusion-strategy: "peer-order" |
| 202 | + |
| 203 | +# Haskell prototype relay mini-protocol parameters. |
| 204 | +vote-diffusion-max-bodies-to-request: 1 |
| 205 | +vote-diffusion-max-headers-to-request: 100 |
| 206 | +vote-diffusion-max-window-size: 100 |
| 207 | + |
| 208 | +################################################################################ |
| 209 | +# Certificate Configuration |
| 210 | +################################################################################ |
| 211 | + |
| 212 | +# vote-spec - certificate size plot. |
| 213 | +# Realistic stake distributions need about 7 kilobytes for the certificate. |
| 214 | +cert-size-bytes-constant: 7168 |
| 215 | +cert-size-bytes-per-node: 0 |
| 216 | + |
| 217 | +# For certificate timings we have bulk figures for realistic scenarios, |
| 218 | +# so we do not attempt to give -per-node (i.e. per-voter) timings. |
| 219 | +# |
| 220 | +# vote-spec#"Generate certificate" |
| 221 | +cert-generation-cpu-time-ms-constant: 90.0 |
| 222 | +cert-generation-cpu-time-ms-per-node: 0 |
| 223 | +# vote-spec#"Verify certificate" |
| 224 | +cert-validation-cpu-time-ms-constant: 130.0 |
| 225 | +cert-validation-cpu-time-ms-per-node: 0 |
0 commit comments