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