diff --git a/docs/alpha/glossary.rst b/docs/alpha/glossary.rst index 48a9419c6ff294a477e2296b25cf15776faaf73e..cd01d9add71547e03b6d2fa1165aa01aa1b72009 100644 --- a/docs/alpha/glossary.rst +++ b/docs/alpha/glossary.rst @@ -128,6 +128,12 @@ _`Implicit account` Michelson The built-in language used by a `smart contract`_. +.. _glossary_minimal_stake: + +_`Minimal stake` + An amount of tez (e.g., 6000ꜩ) serving as a minimal amount for a + delegate to have baking_ and voting rights in a cycle_. + _`Operations` The main operations in the protocol are transactions (to transfer funds or to execute smart contracts), accusations, activations, delegations, @@ -147,13 +153,8 @@ _`Round` the round's corresponding time span. Baking_ outside of one's designated round results in an invalid block_. -.. _glossary_roll_alpha: - _`Roll` - An amount of tez (e.g., 6000ꜩ) serving as a minimal amount for a - delegate to have baking_ and voting rights in a cycle_. However, - rolls are not used as a unit for baking_ or voting rights, these are based - on the actual, non-approximated stake. + deprecated; see `Minimal stake`_. _`Smart contract` Account_ which is associated to a :ref:`Michelson ` script. They are diff --git a/docs/introduction/howtorun.rst b/docs/introduction/howtorun.rst index 433d73da868b30153a9aaa5fa3c586ba740dbe74..e58c3788a56478882195d883a8cb8064dbbf87a9 100644 --- a/docs/introduction/howtorun.rst +++ b/docs/introduction/howtorun.rst @@ -85,13 +85,8 @@ to delegates proportionally to their :ref:`active stake`, which usually is the same as their staking balance, that is, their own balance plus their delegated balance. -A minimum active stake of one roll +A :ref:`minimal active stake` of 6kꜩ is required for participating in consensus and in governance. -A :ref:`roll` is just an amount of 6kꜩ and all -computations with rolls are rounded to the nearest lower integer -e.g. if you have 15kꜩ it amounts to 2 rolls. Rolls are used as a unit -to determine delegates' voting rights in governance, while rights in -consensus are not roll-based, they are based on the actual, non-approximated stake. Delegates are required to freeze around 10% of their active stake into a security deposit (more precisely, it's 10% of the maximum active @@ -109,11 +104,11 @@ frozen deposits with the following command: tezos-client set deposits limit for to -On testnets, when you obtain coins from :ref:`the faucet`, if you -are lucky to obtain more than one roll, you can register a delegate -using this identity. -Otherwise, you need to ask the faucet for more accounts and -delegate them to the first. +On testnets, when you obtain coins from :ref:`a faucet`, if +you are lucky to obtain more than the minimum required to be a +delegate, you can register the obtained account as a delegate. +Otherwise, you need to ask the faucet for more accounts and delegate +them to the first. .. _DelegateRegistration: diff --git a/docs/introduction/howtouse.rst b/docs/introduction/howtouse.rst index a228576d5edd9421f1bbed6cabd77bfa9796698e..d16970e4d479a8aa3b684031c5be022cd21aac19 100644 --- a/docs/introduction/howtouse.rst +++ b/docs/introduction/howtouse.rst @@ -612,56 +612,7 @@ For example to check the value of important { "proof_of_work_nonce_size": 8, "nonce_length": 32, - "max_anon_ops_per_block": 132, - "max_operation_data_length": 32768, - "max_proposals_per_delegate": 20, - "max_micheline_node_count": 50000, - "max_micheline_bytes_limit": 50000, - "max_allowed_global_constants_depth": 10000, - "cache_layout": [ - "100000000", - "240000", - "2560" - ], - "michelson_maximum_type_size": 2001, - "preserved_cycles": 5, - "blocks_per_cycle": 8192, - "blocks_per_commitment": 64, - "blocks_per_stake_snapshot": 512, - "blocks_per_voting_period": 40960, - "hard_gas_limit_per_operation": "1040000", - "hard_gas_limit_per_block": "5200000", - "proof_of_work_threshold": "70368744177663", - "tokens_per_roll": "6000000000", - "seed_nonce_revelation_tip": "125000", - "origination_size": 257, - "baking_reward_fixed_portion": "10000000", - "baking_reward_bonus_per_slot": "4286", - "endorsing_reward_per_slot": "2857", - "cost_per_byte": "250", - "hard_storage_limit_per_operation": "60000", - "quorum_min": 2000, - "quorum_max": 7000, - "min_proposal_quorum": 500, - "liquidity_baking_subsidy": "2500000", - "liquidity_baking_sunset_level": 3063809, - "liquidity_baking_escape_ema_threshold": 666667, - "max_operations_time_to_live": 120, - "minimal_block_delay": "30", - "delay_increment_per_round": "15", - "consensus_committee_size": 7000, - "consensus_threshold": 4667, - "minimal_participation_ratio": { - "numerator": 2, - "denominator": 3 - }, - "max_slashing_period": 2, - "frozen_deposits_percentage": 10, - "double_baking_punishment": "640000000", - "ratio_of_frozen_deposits_slashed_per_double_endorsement": { - "numerator": 1, - "denominator": 2 - } + ... } Another interesting use of RPCs is to inspect the receipts of the diff --git a/docs/jakarta/glossary.rst b/docs/jakarta/glossary.rst index d1d4137f890ec8367522262ff1c403100328f3a3..f4e2c1158a8151ea13a2a74309d8fb67712aecb7 100644 --- a/docs/jakarta/glossary.rst +++ b/docs/jakarta/glossary.rst @@ -148,9 +148,6 @@ _`Round` the round's corresponding time span. Baking_ outside of one's designated round results in an invalid block_. -.. _glossary_roll: -.. _glossary_roll_jakarta: - _`Roll` An amount of tez (e.g., 6000ꜩ) serving as a minimal amount for a delegate to have baking_ and voting rights in a cycle_. However, diff --git a/docs/kathmandu/glossary.rst b/docs/kathmandu/glossary.rst index fb9f089d1b2a1c28588549575d055b0992cb21f7..930645d2558ef1e6ab3bc5679b319fcfea6f1d36 100644 --- a/docs/kathmandu/glossary.rst +++ b/docs/kathmandu/glossary.rst @@ -147,8 +147,6 @@ _`Round` the round's corresponding time span. Baking_ outside of one's designated round results in an invalid block_. -.. _glossary_roll_kathmandu: - _`Roll` An amount of tez (e.g., 6000ꜩ) serving as a minimal amount for a delegate to have baking_ and voting rights in a cycle_. However, diff --git a/docs/protocols/alpha.rst b/docs/protocols/alpha.rst index c54a78b20647acea090fcabeb14fc87bb4474fe2..4bd5f526b7528748e0e1c5e88a3e20e7d980899e 100644 --- a/docs/protocols/alpha.rst +++ b/docs/protocols/alpha.rst @@ -35,6 +35,8 @@ Distribution of rollup operations data off-chain. (MRs :gl:`!5711`) Breaking Changes ---------------- +- Rename the parameter ``tokens_per_roll`` to ``minimal_stake``. (MR :gl:`!5897`) + RPC Changes ----------- @@ -53,7 +55,7 @@ Bug Fixes Minor Changes ------------- -- Split internal transactions. (MR :gl:`!5585`) +- Split internal transactions. (MR :gl:`!5585`) Internal -------- diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index b33e89d3b4c064f67b52638cb57552fce9ae713c..b4a9ae0e3442b3df614effad6ee67d9e8756643c 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -96,7 +96,7 @@ let constants_mainnet = hard_gas_limit_per_operation = Gas.Arith.(integral_of_int_exn 1_040_000); hard_gas_limit_per_block = Gas.Arith.(integral_of_int_exn 5_200_000); proof_of_work_threshold = Int64.(sub (shift_left 1L 46) 1L); - tokens_per_roll = Tez.(mul_exn one 6_000); + minimal_stake = Tez.(mul_exn one 6_000); (* VDF's difficulty must be a multiple of `nonce_revelation_threshold` times the block time. At the moment it is equal to 8B = 8000 * 5 * .2M with - 8000 ~= 256 * 30 that is nonce_revelation_threshold * block time diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 61df5307ac2c350d05b3ac599edc6b19247c0e28..07824d669da6da1d0d6012cbf4ae6e8c1dadb991 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -824,7 +824,7 @@ module Constants : sig hard_gas_limit_per_operation : Gas.Arith.integral; hard_gas_limit_per_block : Gas.Arith.integral; proof_of_work_threshold : int64; - tokens_per_roll : Tez.t; + minimal_stake : Tez.t; vdf_difficulty : int64; seed_nonce_revelation_tip : Tez.t; origination_size : int; @@ -903,7 +903,7 @@ module Constants : sig val proof_of_work_threshold : context -> int64 - val tokens_per_roll : context -> Tez.t + val minimal_stake : context -> Tez.t val vdf_difficulty : context -> int64 @@ -1230,7 +1230,7 @@ module Level : sig val dawn_of_a_new_cycle : context -> Cycle.t option - val may_snapshot_rolls : context -> bool + val may_snapshot_stake_distribution : context -> bool val may_compute_randao : context -> bool end diff --git a/src/proto_alpha/lib_protocol/amendment.mli b/src/proto_alpha/lib_protocol/amendment.mli index 999de49ac79c313bc1374d7ea43cd9e02d9a8631..38a6c5efb96c97741545ac217172cebefc76b551 100644 --- a/src/proto_alpha/lib_protocol/amendment.mli +++ b/src/proto_alpha/lib_protocol/amendment.mli @@ -26,7 +26,7 @@ (** Amendments and proposals. - Only delegates with at least one roll take part in the amendment + Only delegates having the minimal required stake take part in the amendment procedure. It works as follows: - Proposal period: delegates can submit protocol amendment diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 02f02c46665adb7c7acd5a998effd4f82923a2e6..632217f41e97e31b4e693a1f5daf2bf5c7224d43 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -3489,8 +3489,8 @@ let finalize_application ctxt (mode : finalize_application_mode) protocol_data (if Level.may_compute_randao ctxt then Seed.compute_randao ctxt else return ctxt) >>=? fun ctxt -> - (* end of cycle *) - (if Level.may_snapshot_rolls ctxt then Stake_distribution.snapshot ctxt + (if Level.may_snapshot_stake_distribution ctxt then + Stake_distribution.snapshot ctxt else return ctxt) >>=? fun ctxt -> may_start_new_cycle ctxt diff --git a/src/proto_alpha/lib_protocol/constants_parametric_repr.ml b/src/proto_alpha/lib_protocol/constants_parametric_repr.ml index e955a60bfcc85cccbf1f69a287f35efc1f1377f2..da776f8de3b7322d1fe8893da47c3f153525b457 100644 --- a/src/proto_alpha/lib_protocol/constants_parametric_repr.ml +++ b/src/proto_alpha/lib_protocol/constants_parametric_repr.ml @@ -136,7 +136,7 @@ type t = { hard_gas_limit_per_operation : Gas_limit_repr.Arith.integral; hard_gas_limit_per_block : Gas_limit_repr.Arith.integral; proof_of_work_threshold : int64; - tokens_per_roll : Tez_repr.t; + minimal_stake : Tez_repr.t; vdf_difficulty : int64; seed_nonce_revelation_tip : Tez_repr.t; origination_size : int; @@ -311,7 +311,7 @@ let encoding = c.hard_gas_limit_per_operation, c.hard_gas_limit_per_block, c.proof_of_work_threshold, - c.tokens_per_roll ), + c.minimal_stake ), ( ( c.vdf_difficulty, c.seed_nonce_revelation_tip, c.origination_size, @@ -351,7 +351,7 @@ let encoding = hard_gas_limit_per_operation, hard_gas_limit_per_block, proof_of_work_threshold, - tokens_per_roll ), + minimal_stake ), ( ( vdf_difficulty, seed_nonce_revelation_tip, origination_size, @@ -392,7 +392,7 @@ let encoding = hard_gas_limit_per_operation; hard_gas_limit_per_block; proof_of_work_threshold; - tokens_per_roll; + minimal_stake; vdf_difficulty; seed_nonce_revelation_tip; origination_size; @@ -441,7 +441,7 @@ let encoding = "hard_gas_limit_per_block" Gas_limit_repr.Arith.z_integral_encoding) (req "proof_of_work_threshold" int64) - (req "tokens_per_roll" Tez_repr.encoding)) + (req "minimal_stake" Tez_repr.encoding)) (merge_objs (obj9 (req "vdf_difficulty" int64) diff --git a/src/proto_alpha/lib_protocol/constants_parametric_repr.mli b/src/proto_alpha/lib_protocol/constants_parametric_repr.mli index e83485d4a1c316e4d6680febcac796fa50c5d3a5..565e61662c8cc71a65d4b4aec57349564a07e8d0 100644 --- a/src/proto_alpha/lib_protocol/constants_parametric_repr.mli +++ b/src/proto_alpha/lib_protocol/constants_parametric_repr.mli @@ -134,7 +134,7 @@ type t = { hard_gas_limit_per_operation : Gas_limit_repr.Arith.integral; hard_gas_limit_per_block : Gas_limit_repr.Arith.integral; proof_of_work_threshold : int64; - tokens_per_roll : Tez_repr.t; + minimal_stake : Tez_repr.t; vdf_difficulty : int64; seed_nonce_revelation_tip : Tez_repr.t; origination_size : int; diff --git a/src/proto_alpha/lib_protocol/constants_storage.ml b/src/proto_alpha/lib_protocol/constants_storage.ml index a96be08e0fdfb653043af25ecd6ad120571c3998..7d8db97777c939e7d6af30634155e8d951ac5aa5 100644 --- a/src/proto_alpha/lib_protocol/constants_storage.ml +++ b/src/proto_alpha/lib_protocol/constants_storage.ml @@ -68,9 +68,9 @@ let proof_of_work_threshold c = let constants = Raw_context.constants c in constants.proof_of_work_threshold -let tokens_per_roll c = +let minimal_stake c = let constants = Raw_context.constants c in - constants.tokens_per_roll + constants.minimal_stake let vdf_difficulty c = let constants = Raw_context.constants c in diff --git a/src/proto_alpha/lib_protocol/constants_storage.mli b/src/proto_alpha/lib_protocol/constants_storage.mli index c3a61e17b42b671f67a335498e806feb6ca595e6..aaa7341a8d462802c7f5f2ef44aea109551d04e8 100644 --- a/src/proto_alpha/lib_protocol/constants_storage.mli +++ b/src/proto_alpha/lib_protocol/constants_storage.mli @@ -52,7 +52,7 @@ val hard_storage_limit_per_operation : Raw_context.t -> Z.t val proof_of_work_threshold : Raw_context.t -> int64 -val tokens_per_roll : Raw_context.t -> Tez_repr.t +val minimal_stake : Raw_context.t -> Tez_repr.t val vdf_difficulty : Raw_context.t -> int64 diff --git a/src/proto_alpha/lib_protocol/delegate_services.ml b/src/proto_alpha/lib_protocol/delegate_services.ml index 61c6656f3fefdd7ca8309a5c06d47c362e5f04f2..ea9b8f633256a6959f997133e946fabc895e135c 100644 --- a/src/proto_alpha/lib_protocol/delegate_services.ml +++ b/src/proto_alpha/lib_protocol/delegate_services.ml @@ -348,19 +348,19 @@ let register () = | {active = true; inactive = true; _} -> return delegates) >>=? fun delegates -> - let tokens_per_roll = Constants.tokens_per_roll ctxt in + let minimal_stake = Constants.minimal_stake ctxt in match q with | {with_minimal_stake = true; without_minimal_stake = false; _} -> List.filter_es (fun pkh -> Delegate.staking_balance ctxt pkh >|=? fun staking_balance -> - Tez.(staking_balance >= tokens_per_roll)) + Tez.(staking_balance >= minimal_stake)) delegates | {with_minimal_stake = false; without_minimal_stake = true; _} -> List.filter_es (fun pkh -> Delegate.staking_balance ctxt pkh >|=? fun staking_balance -> - Tez.(staking_balance < tokens_per_roll)) + Tez.(staking_balance < minimal_stake)) delegates | {with_minimal_stake = true; without_minimal_stake = true; _} | {with_minimal_stake = false; without_minimal_stake = false; _} -> diff --git a/src/proto_alpha/lib_protocol/delegate_storage.ml b/src/proto_alpha/lib_protocol/delegate_storage.ml index cd9095e5fe58ba4f43bfb2da8e2e336b868ad6ac..f479bf7bf124180cd97d5c76a5f1b325722de50c 100644 --- a/src/proto_alpha/lib_protocol/delegate_storage.ml +++ b/src/proto_alpha/lib_protocol/delegate_storage.ml @@ -286,7 +286,7 @@ let update_activity ctxt last_cycle = match Cycle_repr.sub last_cycle preserved with | None -> return (ctxt, []) | Some _unfrozen_cycle -> - Stake_storage.fold_on_active_delegates_with_rolls + Stake_storage.fold_on_active_delegates_with_minimal_stake ctxt ~order:`Sorted ~init:(Ok (ctxt, [])) diff --git a/src/proto_alpha/lib_protocol/level_storage.ml b/src/proto_alpha/lib_protocol/level_storage.ml index e1838c9d9912535dae40e184a7915261aca64572..331839bf787bb636d9f95a5dcbce87861469d5ca 100644 --- a/src/proto_alpha/lib_protocol/level_storage.ml +++ b/src/proto_alpha/lib_protocol/level_storage.ml @@ -112,7 +112,7 @@ let dawn_of_a_new_cycle ctxt = let level = current ctxt in if last_of_a_cycle ctxt level then Some level.cycle else None -let may_snapshot_rolls ctxt = +let may_snapshot_stake_distribution ctxt = let level = current ctxt in let blocks_per_stake_snapshot = Constants_storage.blocks_per_stake_snapshot ctxt diff --git a/src/proto_alpha/lib_protocol/level_storage.mli b/src/proto_alpha/lib_protocol/level_storage.mli index 4329f93f7c43b2054f587cd35fb96c2d92e8cb7f..0049a81854518efaa61755b95edc5417ea6bcf2d 100644 --- a/src/proto_alpha/lib_protocol/level_storage.mli +++ b/src/proto_alpha/lib_protocol/level_storage.mli @@ -66,9 +66,9 @@ val last_allowed_fork_level : Raw_context.t -> Raw_level_repr.t cycle. *) val dawn_of_a_new_cycle : Raw_context.t -> Cycle_repr.t option -(** Returns [true] if the rolls should be snapshot at the current +(** Returns [true] if the stake distribution should be snapshot at the current level. *) -val may_snapshot_rolls : Raw_context.t -> bool +val may_snapshot_stake_distribution : Raw_context.t -> bool (** Returns [true] if RANDAO should be computed at the current level, that is if the current level, relative to the cycle's start, equals the nonce diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index 93d9820d163de289775f851bd83de8b78427906c..c517078f25cbc588963efd1125f6d6636afc2a5d 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -971,7 +971,7 @@ let prepare_first_block ~level ~timestamp ctxt = hard_gas_limit_per_operation = c.hard_gas_limit_per_operation; hard_gas_limit_per_block = c.hard_gas_limit_per_block; proof_of_work_threshold = c.proof_of_work_threshold; - tokens_per_roll = c.tokens_per_roll; + minimal_stake = c.tokens_per_roll; vdf_difficulty = c.vdf_difficulty; seed_nonce_revelation_tip = c.seed_nonce_revelation_tip; origination_size = c.origination_size; diff --git a/src/proto_alpha/lib_protocol/stake_storage.ml b/src/proto_alpha/lib_protocol/stake_storage.ml index 9c34808d628ec435f0c40ad8eaf8bb75c06c449f..97bc11cec0ebefa9942a996d1c3bf6c626a4b1f5 100644 --- a/src/proto_alpha/lib_protocol/stake_storage.ml +++ b/src/proto_alpha/lib_protocol/stake_storage.ml @@ -75,17 +75,17 @@ let remove_stake ctxt delegate amount = Tez_repr.(staking_balance_before -? amount) >>?= fun staking_balance -> Storage.Stake.Staking_balance.update ctxt delegate staking_balance >>=? fun ctxt -> - let tokens_per_roll = Constants_storage.tokens_per_roll ctxt in - if Tez_repr.(staking_balance_before >= tokens_per_roll) then + let minimal_stake = Constants_storage.minimal_stake ctxt in + if Tez_repr.(staking_balance_before >= minimal_stake) then Delegate_activation_storage.is_inactive ctxt delegate >>=? fun inactive -> - if (not inactive) && Tez_repr.(staking_balance < tokens_per_roll) then - Storage.Stake.Active_delegate_with_one_roll.remove ctxt delegate + if (not inactive) && Tez_repr.(staking_balance < minimal_stake) then + Storage.Stake.Active_delegates_with_minimal_stake.remove ctxt delegate >>= fun ctxt -> return ctxt else return ctxt else - (* The delegate was not in Stake.Active_delegate_with_one_roll, + (* The delegate was not in Stake.Active_delegates_with_minimal_stake, either because it was inactive, or because it did not have a - roll, in which case it still does not have a roll. *) + the minimal required stake, in which case it still does not have it. *) return ctxt let add_stake ctxt delegate amount = @@ -93,28 +93,28 @@ let add_stake ctxt delegate amount = Tez_repr.(amount +? staking_balance_before) >>?= fun staking_balance -> Storage.Stake.Staking_balance.update ctxt delegate staking_balance >>=? fun ctxt -> - let tokens_per_roll = Constants_storage.tokens_per_roll ctxt in - if Tez_repr.(staking_balance >= tokens_per_roll) then + let minimal_stake = Constants_storage.minimal_stake ctxt in + if Tez_repr.(staking_balance >= minimal_stake) then Delegate_activation_storage.is_inactive ctxt delegate >>=? fun inactive -> - if inactive || Tez_repr.(staking_balance_before >= tokens_per_roll) then + if inactive || Tez_repr.(staking_balance_before >= minimal_stake) then return ctxt else - Storage.Stake.Active_delegate_with_one_roll.add ctxt delegate () + Storage.Stake.Active_delegates_with_minimal_stake.add ctxt delegate () >>= fun ctxt -> return ctxt else - (* The delegate was not in Stake.Active_delegate_with_one_roll, - because it did not have a roll (as otherwise it would have a - roll now). *) + (* The delegate was not in Stake.Active_delegates_with_minimal_stake, + because it did not have the minimal required stake (as otherwise it + would also have it now). *) return ctxt let deactivate_only_call_from_delegate_storage ctxt delegate = - Storage.Stake.Active_delegate_with_one_roll.remove ctxt delegate + Storage.Stake.Active_delegates_with_minimal_stake.remove ctxt delegate let activate_only_call_from_delegate_storage ctxt delegate = get_initialized_stake ctxt delegate >>=? fun (staking_balance, ctxt) -> - let tokens_per_roll = Constants_storage.tokens_per_roll ctxt in - if Tez_repr.(staking_balance >= tokens_per_roll) then - Storage.Stake.Active_delegate_with_one_roll.add ctxt delegate () + let minimal_stake = Constants_storage.minimal_stake ctxt in + if Tez_repr.(staking_balance >= minimal_stake) then + Storage.Stake.Active_delegates_with_minimal_stake.add ctxt delegate () >>= fun ctxt -> return ctxt else return ctxt @@ -122,7 +122,7 @@ let snapshot ctxt = Storage.Stake.Last_snapshot.get ctxt >>=? fun index -> Storage.Stake.Last_snapshot.update ctxt (index + 1) >>=? fun ctxt -> Storage.Stake.Staking_balance.snapshot ctxt index >>=? fun ctxt -> - Storage.Stake.Active_delegate_with_one_roll.snapshot ctxt index + Storage.Stake.Active_delegates_with_minimal_stake.snapshot ctxt index let max_snapshot_index = Storage.Stake.Last_snapshot.get @@ -132,7 +132,7 @@ let set_selected_distribution_for_cycle ctxt cycle stakes total_stake = Storage.Total_active_stake.add ctxt cycle total_stake >>= fun ctxt -> (* cleanup snapshots *) Storage.Stake.Staking_balance.Snapshot.clear ctxt >>= fun ctxt -> - Storage.Stake.Active_delegate_with_one_roll.Snapshot.clear ctxt + Storage.Stake.Active_delegates_with_minimal_stake.Snapshot.clear ctxt >>= fun ctxt -> Storage.Stake.Last_snapshot.update ctxt 0 let clear_cycle ctxt cycle = @@ -140,7 +140,7 @@ let clear_cycle ctxt cycle = Selected_distribution_for_cycle.remove_existing ctxt cycle let fold ctxt ~f ~order init = - Storage.Stake.Active_delegate_with_one_roll.fold + Storage.Stake.Active_delegates_with_minimal_stake.fold ctxt ~order ~init:(Ok init) @@ -150,7 +150,7 @@ let fold ctxt ~f ~order init = f (delegate, stake) acc) let fold_snapshot ctxt ~index ~f ~init = - Storage.Stake.Active_delegate_with_one_roll.fold_snapshot + Storage.Stake.Active_delegates_with_minimal_stake.fold_snapshot ctxt index ~order:`Sorted @@ -166,12 +166,13 @@ let clear_at_cycle_end ctxt ~new_cycle = | Some cycle_to_clear -> clear_cycle ctxt cycle_to_clear let get ctxt delegate = - Storage.Stake.Active_delegate_with_one_roll.mem ctxt delegate >>= function + Storage.Stake.Active_delegates_with_minimal_stake.mem ctxt delegate + >>= function | true -> get_staking_balance ctxt delegate | false -> return Tez_repr.zero -let fold_on_active_delegates_with_rolls = - Storage.Stake.Active_delegate_with_one_roll.fold +let fold_on_active_delegates_with_minimal_stake = + Storage.Stake.Active_delegates_with_minimal_stake.fold let get_selected_distribution = Selected_distribution_for_cycle.get diff --git a/src/proto_alpha/lib_protocol/stake_storage.mli b/src/proto_alpha/lib_protocol/stake_storage.mli index 894f683cd5798953fad5533810ac5bd07be79677..61269ae311b147c2157e5fbd4c2a461d590e5a16 100644 --- a/src/proto_alpha/lib_protocol/stake_storage.mli +++ b/src/proto_alpha/lib_protocol/stake_storage.mli @@ -49,8 +49,8 @@ val get_staking_balance : val snapshot : Raw_context.t -> Raw_context.t tzresult Lwt.t -(** [fold ctxt ~f ~order init] folds [f] on the list of active delegates with at - least one roll. The folding process starts with [init]. Each element of the +(** [fold ctxt ~f ~order init] folds [f] on the list of active delegates having the + minimal required stake. The folding process starts with [init]. Each element of the list is a pair [pkh, stake], where [pkh] is the public key hash of the delegate and [stake] is the staking balance of the delegate. *) val fold : @@ -61,7 +61,7 @@ val fold : 'a tzresult Lwt.t (** [fold_snapshot ctxt ~index ~f ~init] folds [f] on the list of active - delegates with at least one roll for the given snapshot [index]. The folding + delegates having the minimal required stake for the given snapshot [index]. The folding process starts with [init]. Each element of the list is a pair [pkh, stake], where [pkh] is the public key hash of the delegate and [stake] is the staking balance of the delegate for the given snapshot [index]. *) @@ -92,7 +92,7 @@ val clear_at_cycle_end : val get : Raw_context.t -> Signature.Public_key_hash.t -> Tez_repr.t tzresult Lwt.t -val fold_on_active_delegates_with_rolls : +val fold_on_active_delegates_with_minimal_stake : Raw_context.t -> order:[`Sorted | `Undefined] -> init:'a -> diff --git a/src/proto_alpha/lib_protocol/storage.ml b/src/proto_alpha/lib_protocol/storage.ml index e6209b925feb1bb83c0ed39869a5b7982f6ddea2..cc3787c1f20fc7492fe01687086ce08c98617aa9 100644 --- a/src/proto_alpha/lib_protocol/storage.ml +++ b/src/proto_alpha/lib_protocol/storage.ml @@ -1048,10 +1048,12 @@ module Stake = struct (Public_key_hash_index) (Tez_repr) - module Active_delegate_with_one_roll = + module Active_delegates_with_minimal_stake = Make_indexed_data_snapshotable_storage (Make_subcontext (Registered) (Raw_context) (struct + (* This name is for historical reasons, when the stake was + expressed in rolls (that is, pre-Ithaca). *) let name = ["active_delegate_with_one_roll"] end)) (Int31_index) @@ -1065,21 +1067,23 @@ module Stake = struct module Selected_distribution_for_cycle = Cycle.Selected_stake_distribution (* This is an index that is set to 0 by calls to - {!val:Stake_storage.selected_new_distribution_at_cycle_end} and incremented - (by 1) by calls to {!val:Stake_storage.snapshot}. + {!val:Stake_storage.selected_new_distribution_at_cycle_end} and + incremented (by 1) by calls to {!val:Stake_storage.snapshot}. {!val:Stake_storage.snapshot} is called in relation with constant - [blocks_per_stake_snapshot] in {!val:Level_storage.may_snapshot_rolls}. - - That is, the increment is done every [blocks_per_stake_snaphot] blocks and - reset at the end of cycles. So, it goes up to [blocks_per_cycle / - blocks_per_stake_snaphot], which is currently 16 (= 8192/512 -- the - concrete values can be found in - {!val:Default_parameters.constants_mainnet}), then comes back to 0, so that - a UInt16 is big enough. - - The ratio [blocks_per_cycle / blocks_per_stake_snapshot] above is checked - in {!val:Constants_repr.check_constants} to fit in a UInt16. *) + [blocks_per_stake_snapshot] in + {!val:Level_storage.may_snapshot_stake_distribution}. + + That is, the increment is done every [blocks_per_stake_snaphot] + blocks and reset at the end of cycles. So, it goes up to + [blocks_per_cycle / blocks_per_stake_snaphot], which is currently + 16 (= 8192/512 -- the concrete values can be found in + {!val:Default_parameters.constants_mainnet}), then comes back to + 0, so that a UInt16 is big enough. + + The ratio [blocks_per_cycle / blocks_per_stake_snapshot] above is + checked in {!val:Constants_repr.check_constants} to fit in a + UInt16. *) module Last_snapshot = Make_single_data_storage (Registered) (Raw_context) (struct diff --git a/src/proto_alpha/lib_protocol/storage.mli b/src/proto_alpha/lib_protocol/storage.mli index 2af5281a4f46fbb55d9b6fa85c5aae3a3ea8bbff..8eaeecaee429fb23c68f397080ab1d0f06a82e4d 100644 --- a/src/proto_alpha/lib_protocol/storage.mli +++ b/src/proto_alpha/lib_protocol/storage.mli @@ -356,7 +356,8 @@ module Slashed_deposits : module Stake : sig (** The map of all the staking balances of all delegates, including - those with less than one roll. It might be large *) + those with less than + {!Constants_parametric_repr.minimal_stake}. It might be large *) module Staking_balance : Indexed_data_snapshotable_storage with type key = Signature.Public_key_hash.t @@ -366,7 +367,7 @@ module Stake : sig (** This is a set, encoded in a map with value unit. This should be fairly small compared to staking balance *) - module Active_delegate_with_one_roll : + module Active_delegates_with_minimal_stake : Indexed_data_snapshotable_storage with type key = Signature.Public_key_hash.t and type value = unit @@ -385,7 +386,8 @@ module Stake : sig and type t := Raw_context.t end -(** Sum of the active stakes of all the delegates with rolls *) +(** Sum of the active stakes of all the delegates with + {!Constants_parametric_repr.minimal_stake} *) module Total_active_stake : Indexed_data_storage with type key = Cycle_repr.t diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.ml b/src/proto_alpha/lib_protocol/test/helpers/block.ml index 5b46d254a565b6de5b942df7f7014d0eb8a2df5c..e802f98e9156f143d014c704687ca55980efcdf1 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/block.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/block.ml @@ -268,18 +268,18 @@ let check_constants_consistency constants = in Error_monad.unless (blocks_per_commitment <= blocks_per_cycle) (fun () -> failwith - "Inconsistent constants : blocks per commitment must be less than \ - blocks per cycle") + "Inconsistent constants : blocks_per_commitment must be less than \ + blocks_per_cycle") >>=? fun () -> Error_monad.unless (nonce_revelation_threshold <= blocks_per_cycle) (fun () -> failwith - "Inconsistent constants : blocks per reveal period must be less than \ - blocks per cycle") + "Inconsistent constants : nonce_revelation_threshold must be less than \ + blocks_per_cycle") >>=? fun () -> Error_monad.unless (blocks_per_cycle >= blocks_per_stake_snapshot) (fun () -> failwith - "Inconsistent constants : blocks per cycle must be superior than \ - blocks per roll snapshot") + "Inconsistent constants : blocks_per_cycle must be superior than \ + blocks_per_stake_snapshot") let prepare_main_init_params ?bootstrap_contracts commitments constants initial_accounts = @@ -413,20 +413,22 @@ let genesis_with_parameters parameters = let validate_initial_accounts (initial_accounts : (Account.t * Tez.t * Signature.Public_key_hash.t option) list) - tokens_per_roll = + minimal_stake = if initial_accounts = [] then - Stdlib.failwith "Must have one account with a roll to bake" ; - (* Check there is at least one roll *) + Stdlib.failwith "Must have one account with minimal_stake to bake" ; + (* Check there are at least minimal_stake tokens *) Lwt.catch (fun () -> List.fold_left_es (fun acc (_, amount, _) -> Environment.wrap_tzresult @@ Tez.( +? ) acc amount >>?= fun acc -> - if acc >= tokens_per_roll then raise Exit else return acc) + if acc >= minimal_stake then raise Exit else return acc) Tez.zero initial_accounts >>=? fun _ -> - failwith "Insufficient tokens in initial accounts to create one roll") + failwith + "Insufficient tokens in initial accounts: the amount should be at \ + least minimal_stake") (function Exit -> return_unit | exc -> raise exc) let prepare_initial_context_params ?consensus_threshold ?min_proposal_quorum @@ -533,17 +535,19 @@ let prepare_initial_context_params ?consensus_threshold ?min_proposal_quorum nonce_revelation_threshold; } in - (* Check there is at least one roll *) + (* Check there are at least minimal_stake tokens *) Lwt.catch (fun () -> List.fold_left_es (fun acc (_, amount, _) -> Environment.wrap_tzresult @@ Tez.( +? ) acc amount >>?= fun acc -> - if acc >= constants.tokens_per_roll then raise Exit else return acc) + if acc >= constants.minimal_stake then raise Exit else return acc) Tez.zero initial_accounts >>=? fun _ -> - failwith "Insufficient tokens in initial accounts to create one roll") + failwith + "Insufficient tokens in initial accounts: the amount should be at \ + least minimal_stake") (function Exit -> return_unit | exc -> raise exc) >>=? fun () -> check_constants_consistency constants >>=? fun () -> @@ -567,7 +571,7 @@ let prepare_initial_context_params ?consensus_threshold ?min_proposal_quorum ~fitness ~operations_hash:Operation_list_list_hash.zero in - validate_initial_accounts initial_accounts constants.tokens_per_roll + validate_initial_accounts initial_accounts constants.minimal_stake (* Perhaps this could return a new type signifying its name *) >|=? fun _initial_accounts -> (constants, shell, hash) diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_baking.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_baking.ml index 6a6bd357fc3c4463046660fb5fc64796f71d421d..f30d9e652065ddb8bfca0ad97b36d6c918b87d49 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_baking.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_baking.ml @@ -304,8 +304,8 @@ let test_rewards_block_and_payload_producer () = let test_enough_active_stake_to_bake ~has_active_stake () = Context.init1 () >>=? fun (b_for_constants, _contract) -> Context.get_constants (B b_for_constants) - >>=? fun Constants.{parametric = {tokens_per_roll; _}; _} -> - let tpr = Tez.to_mutez tokens_per_roll in + >>=? fun Constants.{parametric = {minimal_stake; _}; _} -> + let tpr = Tez.to_mutez minimal_stake in (* N.B. setting the balance has an impact on the active stake; without delegation, the full balance is the same as the staking balance and the active balance is less or equal the staking balance (see @@ -329,7 +329,7 @@ let test_enough_active_stake_to_bake ~has_active_stake () = in Assert.equal_tez ~loc:__LOC__ bal expected_bal else - (* pkh1 has less than tokens_per_roll so it will have no slots, thus it + (* pkh1 has less than minimal_stake so it will have no slots, thus it cannot be a proposer, thus it cannot bake. Precisely, bake fails because get_next_baker_by_account fails with "No slots found for pkh1" *) Assert.error ~loc:__LOC__ b1 (fun _ -> true) diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml index 037c5a408f348f0cd21a8907befebf5c858560e5..393330708fea05b8c7d259d47413258dfdc852f1 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml @@ -25,7 +25,7 @@ (** Testing ------- - Component: Protocol (rolls) + Component: Protocol Invocation: dune exec \ src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ -- test "^deactivation$" @@ -44,8 +44,8 @@ let wrap e = Lwt.return (Environment.wrap_tzresult e) (** Check that [Delegate.staking_balance] is the same as [Delegate.full_balance] (this is not true in general, but in these tests it is because they only deal with self-delegation. Also, check that [Delegate.staking_balance] coincides - with [Stake_storage.get] when the account is active and it has at least one - roll. *) + with [Stake_storage.get] when the account is active and it has the minimal + required stake. *) let check_stake ~loc (b : Block.t) (account : Account.t) = Context.Delegate.staking_balance (B b) account.pkh >>=? fun staking_balance -> Context.Delegate.full_balance (B b) account.pkh >>=? fun full_balance -> @@ -67,7 +67,7 @@ let check_stake ~loc (b : Block.t) (account : Account.t) = that in case of deactivation [Delegate.staking_balance] does not necessarily coincide with [Stake_storage.get] in that [Delegate.staking_balance] may be positive (while [Stake_storage.get] returns 0 because the account is no - longer in [Active_delegate_with_one_roll] because of deactivation, see + longer in [Active_delegate_with_minimal_stake] because of deactivation, see [Stake_storage].) *) let check_no_stake ~loc (b : Block.t) (account : Account.t) = Raw_context.prepare @@ -296,8 +296,8 @@ let test_deactivation_then_empty_then_self_delegation_then_recredit () = (** Initialize a block with two contracts/accounts. A third new account is also created. The first account is self-delegated. First account sends to third - one tokens_per_roll tez (so that, once it is active, it can appear in - [Active_delegate_with_one_roll]. The third account has no delegate and is + one minimal_stake tez (so that, once it is active, it can appear in + [Active_delegate_with_minimal_stake]. The third account has no delegate and is consistent for baking rights. Then, it is self-delegated and is supposed to be activated. Again, consistency for baking rights are preserved for the first and third accounts. *) @@ -313,8 +313,9 @@ let test_delegation () = | None -> assert false | Some pkh -> assert (Signature.Public_key_hash.equal pkh m1.pkh)) ; let constants = Default_parameters.constants_test in - let one_roll = constants.tokens_per_roll in - Op.transaction ~force_reveal:true (B b) a1 a3 one_roll >>=? fun transact -> + let minimal_stake = constants.minimal_stake in + Op.transaction ~force_reveal:true (B b) a1 a3 minimal_stake + >>=? fun transact -> Block.bake ~policy:(By_account m2.pkh) b ~operation:transact >>=? fun b -> Context.Contract.delegate_opt (B b) a3 >>=? fun delegate -> (match delegate with None -> () | Some _ -> assert false) ; diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml index 59775d21cbca60ea8ecf694a7357ed612dd52757..6b942ff2265c36e0f79d3cab2f7fb33e3c2dba2f 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml @@ -55,7 +55,7 @@ let get_first_2_accounts_contracts (a1, a2) = Delegate.staking_balance - active stake = the amount of tez with which a delegate participates in - consensus; it must be greater than 1 roll and less or equal the staking + consensus; it must be greater than [minimal_stake] and less or equal the staking balance; it is computed in [Delegate_storage.select_distribution_for_cycle] - frozen deposits = represents frozen_deposits_percentage of the maximum stake during diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_patched_contracts.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_patched_contracts.ml index c068ba167a65de3c4f83d6bbb9249f84a58a6931..bd04aea88a84b13c503de84c1942a818a3b07eb5 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_patched_contracts.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_patched_contracts.ml @@ -161,7 +161,7 @@ module Legacy_patch_test (Patches : LEGACY_SCRIPT_PATCHES) : let typecheck_patched_script code () = (* Number 3 below controls how many accounts should be created. This number shouldn't be too small or the context - won't have enough tokens to form a roll. *) + won't have enough at least [minimal_stake] tokens. *) let* block, _contracts = Context.init3 () in let* inc = Incremental.begin_construction block in let ctxt = Incremental.alpha_ctxt inc in diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_voting.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_voting.ml index c02237ef02ead409e9662bdb208ac11611494fa5..02f77a71a4c1c7b498cb837e9edac29bbbd44744 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_voting.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_voting.ml @@ -697,7 +697,7 @@ let test_multiple_identical_proposals_count_as_one () = | None -> failwith "%s - Missing proposal" __LOC__ (** Assume the initial balance of accounts allocated by Context.init_n is at - least 4 times the value of the tokens_per_roll constant. *) + least 4 times the value of the minimal_stake constant. *) let test_supermajority_in_proposal there_is_a_winner () = let min_proposal_quorum = 0l in let initial_balance = 1L in @@ -707,7 +707,7 @@ let test_supermajority_in_proposal there_is_a_winner () = 10 () >>=? fun (b, delegates) -> - Context.get_constants (B b) >>=? fun {parametric = {tokens_per_roll; _}; _} -> + Context.get_constants (B b) >>=? fun {parametric = {minimal_stake; _}; _} -> let del1 = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth delegates 0 in let del2 = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth delegates 1 in let del3 = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth delegates 2 in @@ -719,17 +719,17 @@ let test_supermajority_in_proposal there_is_a_winner () = (B b) (WithExceptions.Option.get ~loc:__LOC__ @@ List.nth delegates 3) del1 - tokens_per_roll + minimal_stake >>=? fun op1 -> Op.transaction (B b) (WithExceptions.Option.get ~loc:__LOC__ @@ List.nth delegates 4) del2 - tokens_per_roll + minimal_stake >>=? fun op2 -> - (if there_is_a_winner then Test_tez.( *? ) tokens_per_roll 3L + (if there_is_a_winner then Test_tez.( *? ) minimal_stake 3L else - Test_tez.( *? ) tokens_per_roll 2L + Test_tez.( *? ) minimal_stake 2L >>? Test_tez.( +? ) (Test_tez.of_mutez_exn initial_balance)) >>?= fun bal3 -> Op.transaction diff --git a/src/proto_alpha/lib_protocol/vote_storage.mli b/src/proto_alpha/lib_protocol/vote_storage.mli index 7e901d7d44c4fd2823244904b6cb3d6b499ef517..c719beb8c32f0e45d9da400991e8e2fea8736bed 100644 --- a/src/proto_alpha/lib_protocol/vote_storage.mli +++ b/src/proto_alpha/lib_protocol/vote_storage.mli @@ -69,9 +69,9 @@ val listings_encoding : (Signature.Public_key_hash.t * int64) list Data_encoding.t (** Populates [!Storage.Vote.Listings] using the currently existing - staking power and sets `Voting_power_in_listings`. Inactive - delegates or delegates without rolls are not included in the - listings. *) + staking power and sets `Voting_power_in_listings`. Inactive + delegates or delegates without the minimal required stake are not + included in the listings. *) val update_listings : Raw_context.t -> Raw_context.t tzresult Lwt.t (** Verifies the presence of a delegate in the listing. *) diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out index 499600fef375261673b94125744e44cc1e919049..db728451b1aa52035bb5981640353891033de2e1 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out @@ -12,7 +12,7 @@ "nonce_revelation_threshold": 4, "blocks_per_stake_snapshot": 4, "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", "hard_gas_limit_per_block": "5200000", "proof_of_work_threshold": "-1", - "tokens_per_roll": "6000000000", "vdf_difficulty": "50000", + "minimal_stake": "6000000000", "vdf_difficulty": "50000", "seed_nonce_revelation_tip": "125000", "origination_size": 257, "baking_reward_fixed_portion": "333333", "baking_reward_bonus_per_slot": "3921", diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out index e662fd0afde5adfc897931d7f8fa81c14d50f3c6..336bf7c4485aaf96c0e5e95862a43c331583cec9 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out @@ -12,7 +12,7 @@ "nonce_revelation_threshold": 4, "blocks_per_stake_snapshot": 4, "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", "hard_gas_limit_per_block": "5200000", "proof_of_work_threshold": "-1", - "tokens_per_roll": "6000000000", "vdf_difficulty": "50000", + "minimal_stake": "6000000000", "vdf_difficulty": "50000", "seed_nonce_revelation_tip": "125000", "origination_size": 257, "baking_reward_fixed_portion": "333333", "baking_reward_bonus_per_slot": "3921", diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out index 4dda12289635c2c2589dd4dceec15b198ee46e6b..74760a09996a0b6304213f6dcc0b4168e534f772 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out @@ -12,7 +12,7 @@ "nonce_revelation_threshold": 4, "blocks_per_stake_snapshot": 4, "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", "hard_gas_limit_per_block": "5200000", "proof_of_work_threshold": "-1", - "tokens_per_roll": "6000000000", "vdf_difficulty": "50000", + "minimal_stake": "6000000000", "vdf_difficulty": "50000", "seed_nonce_revelation_tip": "125000", "origination_size": 257, "baking_reward_fixed_portion": "333333", "baking_reward_bonus_per_slot": "3921", diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out index 20dee1b887f0f80771cfbee663b6ee994503f70d..6379f2f380fb0f2506b669a196b6643931bd7781 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out @@ -12,7 +12,7 @@ "nonce_revelation_threshold": 4, "blocks_per_stake_snapshot": 4, "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", "hard_gas_limit_per_block": "5200000", "proof_of_work_threshold": "-1", - "tokens_per_roll": "6000000000", "vdf_difficulty": "50000", + "minimal_stake": "6000000000", "vdf_difficulty": "50000", "seed_nonce_revelation_tip": "125000", "origination_size": 257, "baking_reward_fixed_portion": "333333", "baking_reward_bonus_per_slot": "3921", diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out index 20dee1b887f0f80771cfbee663b6ee994503f70d..6379f2f380fb0f2506b669a196b6643931bd7781 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out @@ -12,7 +12,7 @@ "nonce_revelation_threshold": 4, "blocks_per_stake_snapshot": 4, "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", "hard_gas_limit_per_block": "5200000", "proof_of_work_threshold": "-1", - "tokens_per_roll": "6000000000", "vdf_difficulty": "50000", + "minimal_stake": "6000000000", "vdf_difficulty": "50000", "seed_nonce_revelation_tip": "125000", "origination_size": 257, "baking_reward_fixed_portion": "333333", "baking_reward_bonus_per_slot": "3921", diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out index 2ac23582fba922482cd8f21af94078296114b2b3..363c631282d279b0b0d06582cbd16a777355191f 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out @@ -68,7 +68,7 @@ This sequence of operations was run: "nonce_revelation_threshold": 4, "blocks_per_stake_snapshot": 4, "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", "hard_gas_limit_per_block": "5200000", "proof_of_work_threshold": "-1", - "tokens_per_roll": "6000000000", "vdf_difficulty": "50000", + "minimal_stake": "6000000000", "vdf_difficulty": "50000", "seed_nonce_revelation_tip": "125000", "origination_size": 257, "baking_reward_fixed_portion": "333333", "baking_reward_bonus_per_slot": "3921", @@ -176,7 +176,7 @@ This sequence of operations was run: "nonce_revelation_threshold": 4, "blocks_per_stake_snapshot": 4, "cycles_per_voting_period": 8, "hard_gas_limit_per_operation": "1040000", "hard_gas_limit_per_block": "5200000", "proof_of_work_threshold": "-1", - "tokens_per_roll": "6000000000", "vdf_difficulty": "50000", + "minimal_stake": "6000000000", "vdf_difficulty": "50000", "seed_nonce_revelation_tip": "125000", "origination_size": 257, "baking_reward_fixed_portion": "333333", "baking_reward_bonus_per_slot": "3921", diff --git a/tezt/vesting_contract_test/alpha_parameters.json b/tezt/vesting_contract_test/alpha_parameters.json index 760a61862cade440f85a4959d42a05baf6919de1..945ea11e507a591d9d845f1113d5f80a89db685b 100644 --- a/tezt/vesting_contract_test/alpha_parameters.json +++ b/tezt/vesting_contract_test/alpha_parameters.json @@ -13,7 +13,7 @@ "blocks_per_voting_period": 64, "time_between_blocks": [ "0" ], "endorsers_per_block": 256, "hard_gas_limit_per_operation": "1040000", "hard_gas_limit_per_block": "5200000", "proof_of_work_threshold": "-1", - "tokens_per_roll": "8000000000", "seed_nonce_revelation_tip": "125000", + "minimal_stake": "8000000000", "seed_nonce_revelation_tip": "125000", "origination_size": 257, "block_security_deposit": "640000000", "endorsement_security_deposit": "2500000", "baking_reward_per_endorsement": [ "78125", "11719" ],