package tezos-protocol-alpha

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file constants_storage.ml

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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
(*****************************************************************************)
(*                                                                           *)
(* Open Source License                                                       *)
(* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. <contact@tezos.com>     *)
(* Copyright (c) 2021-2022 Trili Tech, <contact@trili.tech>                  *)
(*                                                                           *)
(* Permission is hereby granted, free of charge, to any person obtaining a   *)
(* copy of this software and associated documentation files (the "Software"),*)
(* to deal in the Software without restriction, including without limitation *)
(* the rights to use, copy, modify, merge, publish, distribute, sublicense,  *)
(* and/or sell copies of the Software, and to permit persons to whom the     *)
(* Software is furnished to do so, subject to the following conditions:      *)
(*                                                                           *)
(* The above copyright notice and this permission notice shall be included   *)
(* in all copies or substantial portions of the Software.                    *)
(*                                                                           *)
(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*)
(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  *)
(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL   *)
(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*)
(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING   *)
(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER       *)
(* DEALINGS IN THE SOFTWARE.                                                 *)
(*                                                                           *)
(*****************************************************************************)

let consensus_rights_delay c =
  let constants = Raw_context.constants c in
  constants.consensus_rights_delay

let blocks_preservation_cycles c =
  let constants = Raw_context.constants c in
  constants.blocks_preservation_cycles

let delegate_parameters_activation_delay c =
  let constants = Raw_context.constants c in
  constants.delegate_parameters_activation_delay

(** Issuance modification delay:
    number of cycles after which the issuance rate -- computed from current stake
    over total supply -- will be used.

    We use consensus_rights_delay so that the issuance rate in one cycle
    corresponds to the "active" staking rights.
*)
let issuance_modification_delay c =
  let constants = Raw_context.constants c in
  constants.consensus_rights_delay

(** Adaptive Issuance activation delay:
    After the e.m.a. of AI votes reaches the threshold, we wait for this delay
    before effectively activating AI.
*)
let adaptive_issuance_activation_delay c =
  let constants = Raw_context.constants c in
  1 + constants.consensus_rights_delay + Constants_repr.max_slashing_period

(** Tolerated inactivity period for delegates before being deactivated. *)
let tolerated_inactivity_period c =
  let constants = Raw_context.constants c in
  1 + constants.consensus_rights_delay

(** Delay between consensus key declaration by the delegate and the cycle where
    it has to be used to sign on behalf of the delegate.  *)
let consensus_key_activation_delay c =
  let constants = Raw_context.constants c in
  constants.consensus_rights_delay

(** Number of cycles during which a misbehavior of the delegate will induce a
    slashing of the funds that are currently in its frozen deposits. *)
let slashable_deposits_period c =
  let constants = Raw_context.constants c in
  constants.consensus_rights_delay

let blocks_per_cycle c =
  let constants = Raw_context.constants c in
  constants.blocks_per_cycle

let blocks_per_commitment c =
  let constants = Raw_context.constants c in
  constants.blocks_per_commitment

let nonce_revelation_threshold c =
  let constants = Raw_context.constants c in
  constants.nonce_revelation_threshold

let cycles_per_voting_period c =
  let constants = Raw_context.constants c in
  constants.cycles_per_voting_period

let hard_gas_limit_per_operation c =
  let constants = Raw_context.constants c in
  constants.hard_gas_limit_per_operation

let hard_gas_limit_per_block c =
  let constants = Raw_context.constants c in
  constants.hard_gas_limit_per_block

let cost_per_byte c =
  let constants = Raw_context.constants c in
  constants.cost_per_byte

let hard_storage_limit_per_operation c =
  let constants = Raw_context.constants c in
  constants.hard_storage_limit_per_operation

let proof_of_work_threshold c =
  let constants = Raw_context.constants c in
  constants.proof_of_work_threshold

let minimal_stake c =
  let constants = Raw_context.constants c in
  constants.minimal_stake

let minimal_frozen_stake c =
  let constants = Raw_context.constants c in
  constants.minimal_frozen_stake

let vdf_difficulty c =
  let constants = Raw_context.constants c in
  constants.vdf_difficulty

let origination_size c =
  let constants = Raw_context.constants c in
  constants.origination_size

let issuance_weights c =
  let constants = Raw_context.constants c in
  constants.issuance_weights

let quorum_min c =
  let constants = Raw_context.constants c in
  constants.quorum_min

let quorum_max c =
  let constants = Raw_context.constants c in
  constants.quorum_max

let min_proposal_quorum c =
  let constants = Raw_context.constants c in
  constants.min_proposal_quorum

let liquidity_baking_toggle_ema_threshold c =
  let constants = Raw_context.constants c in
  constants.liquidity_baking_toggle_ema_threshold

let parametric c = Raw_context.constants c

let sc_rollup c = (Raw_context.constants c).sc_rollup

let minimal_block_delay c =
  let constants = Raw_context.constants c in
  constants.minimal_block_delay

let delay_increment_per_round c =
  let constants = Raw_context.constants c in
  constants.delay_increment_per_round

let consensus_committee_size c =
  let constants = Raw_context.constants c in
  constants.consensus_committee_size

let consensus_threshold c =
  let constants = Raw_context.constants c in
  constants.consensus_threshold

let minimal_participation_ratio c =
  let constants = Raw_context.constants c in
  constants.minimal_participation_ratio

let limit_of_delegation_over_baking c =
  let constants = Raw_context.constants c in
  constants.limit_of_delegation_over_baking

let percentage_of_frozen_deposits_slashed_per_double_baking c =
  let constants = Raw_context.constants c in
  constants.percentage_of_frozen_deposits_slashed_per_double_baking

let percentage_of_frozen_deposits_slashed_per_double_attestation c =
  let constants = Raw_context.constants c in
  constants.percentage_of_frozen_deposits_slashed_per_double_attestation

let testnet_dictator c =
  let constants = Raw_context.constants c in
  constants.testnet_dictator

let sc_rollup_arith_pvm_enable c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.arith_pvm_enable

let sc_rollup_origination_size c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.origination_size

let sc_rollup_challenge_window_in_blocks c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.challenge_window_in_blocks

let sc_rollup_stake_amount c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.stake_amount

let sc_rollup_commitment_period_in_blocks c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.commitment_period_in_blocks

let sc_rollup_max_lookahead_in_blocks c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.max_lookahead_in_blocks

let sc_rollup_max_active_outbox_levels c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.max_active_outbox_levels

let sc_rollup_max_outbox_messages_per_level c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.max_outbox_messages_per_level

let sc_rollup_number_of_sections_in_dissection c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.number_of_sections_in_dissection

let sc_rollup_timeout_period_in_blocks c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.timeout_period_in_blocks

let sc_rollup_max_number_of_parallel_games c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.max_number_of_parallel_games

let max_number_of_stored_cemented_commitments c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.max_number_of_stored_cemented_commitments

let sc_rollup_reveal_activation_level c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.reveal_activation_level

let sc_rollup_private_enable c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.private_enable

let sc_rollup_riscv_pvm_enable c =
  let sc_rollup = Raw_context.sc_rollup c in
  sc_rollup.riscv_pvm_enable

let dal_number_of_slots c =
  let constants = Raw_context.constants c in
  constants.dal.number_of_slots

let dal_enable c =
  let constants = Raw_context.constants c in
  constants.dal.feature_enable

let zk_rollup_enable c =
  let zk_rollup = Raw_context.zk_rollup c in
  zk_rollup.enable

let zk_rollup_min_pending_to_process c =
  let zk_rollup = Raw_context.zk_rollup c in
  zk_rollup.min_pending_to_process

let zk_rollup_origination_size c =
  let zk_rollup = Raw_context.zk_rollup c in
  zk_rollup.origination_size

let zk_rollup_max_ticket_payload_size c =
  let zk_rollup = Raw_context.zk_rollup c in
  zk_rollup.max_ticket_payload_size

let adaptive_issuance c = (Raw_context.constants c).adaptive_issuance

let adaptive_issuance_enable c = Raw_context.adaptive_issuance_enable c

let adaptive_issuance_global_limit_of_staking_over_baking c =
  (adaptive_issuance c).global_limit_of_staking_over_baking

let adaptive_issuance_edge_of_staking_over_delegation c =
  (adaptive_issuance c).edge_of_staking_over_delegation

let adaptive_issuance_launch_ema_threshold c =
  (adaptive_issuance c).launch_ema_threshold

let adaptive_issuance_rewards_params c =
  (adaptive_issuance c).adaptive_rewards_params

let adaptive_issuance_activation_vote_enable c =
  (adaptive_issuance c).activation_vote_enable

let adaptive_issuance_autostaking_enable c =
  (adaptive_issuance c).autostaking_enable

let adaptive_issuance_force_activation c =
  (adaptive_issuance c).force_activation

let adaptive_issuance_ns_enable c = (adaptive_issuance c).ns_enable

let direct_ticket_spending_enable c =
  (Raw_context.constants c).direct_ticket_spending_enable
OCaml

Innovation. Community. Security.