Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file default_parameters.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168(*****************************************************************************)(* *)(* Open Source License *)(* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)(* *)(* 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. *)(* *)(*****************************************************************************)openProtocol.Alpha_contextletconstants_mainnet=Constants.{preserved_cycles=5;blocks_per_cycle=8192l;blocks_per_commitment=64l;blocks_per_roll_snapshot=512l;blocks_per_voting_period=40960l;time_between_blocks=List.mapPeriod.of_seconds_exn[60L;40L];minimal_block_delay=Period.of_seconds_exn30L;endorsers_per_block=256;hard_gas_limit_per_operation=Gas.Arith.(integral_of_int_exn1_040_000);hard_gas_limit_per_block=Gas.Arith.(integral_of_int_exn5_200_000);proof_of_work_threshold=Int64.(sub(shift_left1L46)1L);tokens_per_roll=Tez.(mul_exnone8_000);seed_nonce_revelation_tip=(matchTez.(one/?8L)withOkc->c|Error_->assertfalse);origination_size=257;block_security_deposit=Tez.(mul_exnone640);endorsement_security_deposit=Tez.(mul_exnone_cent250);baking_reward_per_endorsement=Tez.[of_mutez_exn78_125L;of_mutez_exn11_719L];endorsement_reward=Tez.[of_mutez_exn78_125L;of_mutez_exn52_083L];hard_storage_limit_per_operation=Z.of_int60_000;cost_per_byte=Tez.of_mutez_exn250L;quorum_min=20_00l;(* quorum is in centile of a percentage *)quorum_max=70_00l;min_proposal_quorum=5_00l;initial_endorsers=192;delay_per_missing_endorsement=Period.of_seconds_exn4L;(* liquidity_baking_subsidy is 1/16th of total rewards for a block of priority 0 with all endorsements *)liquidity_baking_subsidy=Tez.of_mutez_exn2_500_000L;(* level after protocol activation when liquidity baking shuts off:
about 6 months after first activation on mainnet *)liquidity_baking_sunset_level=2_244_609l;(* 1/2 window size of 2000 blocks with precision of 1000 for integer computation *)liquidity_baking_escape_ema_threshold=1_000_000l;}letconstants_sandbox=Constants.{constants_mainnetwithpreserved_cycles=2;blocks_per_cycle=8l;blocks_per_commitment=4l;blocks_per_roll_snapshot=4l;blocks_per_voting_period=64l;time_between_blocks=List.mapPeriod.of_seconds_exn[1L;0L];minimal_block_delay=Period.of_seconds_exn1L;proof_of_work_threshold=Int64.of_int(-1);initial_endorsers=1;delay_per_missing_endorsement=Period.of_seconds_exn1L;liquidity_baking_sunset_level=4096l;}letconstants_test=Constants.{constants_mainnetwithblocks_per_cycle=128l;blocks_per_commitment=4l;blocks_per_roll_snapshot=32l;blocks_per_voting_period=256l;time_between_blocks=List.mapPeriod.of_seconds_exn[1L;0L];minimal_block_delay=Period.of_seconds_exn1L;proof_of_work_threshold=Int64.of_int(-1);initial_endorsers=1;delay_per_missing_endorsement=Period.of_seconds_exn1L;liquidity_baking_sunset_level=4096l;}letbootstrap_accounts_strings=["edpkuBknW28nW72KG6RoHtYW7p12T6GKc7nAbwYX5m8Wd9sDVC9yav";"edpktzNbDAUjUk697W7gYg2CRuBQjyPxbEg8dLccYYwKSKvkPvjtV9";"edpkuTXkJDGcFd5nh6VvMz8phXxU3Bi7h6hqgywNFi1vZTfQNnS1RV";"edpkuFrRoDSEbJYgxRtLx2ps82UdaYc1WwfS9sE11yhauZt5DgCHbU";"edpkv8EUUH68jmo3f7Um5PezmfGrRF24gnfLpH3sVNwJnV5bVCxL2n";]letbootstrap_balance=Tez.of_mutez_exn4_000_000_000_000Lletbootstrap_accounts=List.map(funs->letpublic_key=Tezos_crypto.Signature.V0.Public_key.of_b58check_exnsinletpublic_key_hash=Tezos_crypto.Signature.V0.Public_key.hashpublic_keyinParameters.{public_key_hash;public_key=Somepublic_key;amount=bootstrap_balance;})bootstrap_accounts_strings(* TODO this could be generated from OCaml together with the faucet
for now these are hardcoded values in the tests *)letcommitments=letjson_result=Data_encoding.Json.from_string{json|
[
[ "btz1bRL4X5BWo2Fj4EsBdUwexXqgTf75uf1qa", "23932454669343" ],
[ "btz1SxjV1syBgftgKy721czKi3arVkVwYUFSv", "72954577464032" ],
[ "btz1LtoNCjiW23txBTenALaf5H6NKF1L3c1gw", "217487035428348" ],
[ "btz1SUd3mMhEBcWudrn8u361MVAec4WYCcFoy", "4092742372031" ],
[ "btz1MvBXf4orko1tsGmzkjLbpYSgnwUjEe81r", "17590039016550" ],
[ "btz1LoDZ3zsjgG3k3cqTpUMc9bsXbchu9qMXT", "26322312350555" ],
[ "btz1RMfq456hFV5AeDiZcQuZhoMv2dMpb9hpP", "244951387881443" ],
[ "btz1Y9roTh4A7PsMBkp8AgdVFrqUDNaBE59y1", "80065050465525" ],
[ "btz1Q1N2ePwhVw5ED3aaRVek6EBzYs1GDkSVD", "3569618927693" ],
[ "btz1VFFVsVMYHd5WfaDTAt92BeQYGK8Ri4eLy", "9034781424478" ]
]|json}inmatchjson_resultwith|Errorerr->raise(Failureerr)|Okjson->Data_encoding.Json.destruct(Data_encoding.listCommitment.encoding)jsonletmake_bootstrap_account(pkh,pk,amount)=Parameters.{public_key_hash=pkh;public_key=Somepk;amount}letparameters_of_constants?(bootstrap_accounts=bootstrap_accounts)?(bootstrap_contracts=[])?(with_commitments=false)constants=letcommitments=ifwith_commitmentsthencommitmentselse[]inParameters.{bootstrap_accounts;bootstrap_contracts;commitments;constants;security_deposit_ramp_up_cycles=None;no_reward_cycles=None;}letjson_of_parametersparameters=Data_encoding.Json.constructParameters.encodingparameters