diff --git a/src/proto_alpha/lib_protocol/init_storage.ml b/src/proto_alpha/lib_protocol/init_storage.ml index b88044bf93e30c1eb2f334f36f017450f06bac3d..08a2672a4a94a9744683dff4e54419a233e94908 100644 --- a/src/proto_alpha/lib_protocol/init_storage.ml +++ b/src/proto_alpha/lib_protocol/init_storage.ml @@ -219,7 +219,6 @@ let prepare_first_block chain_id ctxt ~typecheck_smart_contract let* ctxt, commitments_balance_updates = List.fold_left_es init_commitment (ctxt, []) param.commitments in - let* ctxt = Storage.Stake.Last_snapshot.init ctxt 0 in let* ctxt = Seed_storage.init ?initial_seed:param.constants.initial_seed ctxt in @@ -280,6 +279,7 @@ let prepare_first_block chain_id ctxt ~typecheck_smart_contract let*! ctxt = migrate_already_denounced_from_Oxford ctxt in let* ctxt = migrate_staking_balance_and_active_delegates_for_p ctxt in let* ctxt = clean_frozen_deposits_for_p ctxt in + let*! ctxt = Raw_context.remove ctxt ["last_snapshot"] in return (ctxt, []) in let* ctxt = diff --git a/src/proto_alpha/lib_protocol/storage.ml b/src/proto_alpha/lib_protocol/storage.ml index c57acf3949e68b5b2781b6869db1fbfd6855fd93..e0e2fb3d32795ace8ceab539214fa9eaa3687085 100644 --- a/src/proto_alpha/lib_protocol/storage.ml +++ b/src/proto_alpha/lib_protocol/storage.ml @@ -1305,31 +1305,6 @@ module Stake = struct module Selected_distribution_for_cycle = Cycle.Selected_stake_distribution module Total_active_stake = Cycle.Total_active_stake - - (* 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.snapshot} is called in relation with constant - [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 (= 24576/1536 -- 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 - let name = ["last_snapshot"] - end) - (Encoding.UInt16) end module Delegate_sampler_state = Cycle.Delegate_sampler_state diff --git a/src/proto_alpha/lib_protocol/storage.mli b/src/proto_alpha/lib_protocol/storage.mli index d75ce4ffaae1e28b82f8466bfc93db6ebe6e1848..d9a463767bfe4748d42364c8c284653a58600f26 100644 --- a/src/proto_alpha/lib_protocol/storage.mli +++ b/src/proto_alpha/lib_protocol/storage.mli @@ -518,10 +518,6 @@ module Stake : sig with type elt = Signature.Public_key_hash.t and type t := Raw_context.t - (** Counter of stake storage snapshots taken since last cycle *) - module Last_snapshot : - Single_data_storage with type value = int and type t := Raw_context.t - (** List of active stake *) module Selected_distribution_for_cycle : Indexed_data_storage diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out index 99e39b4293a259015013ca548fd1a08746f1eb62..74ef597a6ef7d87af7dccdf7979454f7332d5864 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out @@ -137,7 +137,7 @@ Contract memorized as send_tickets_in_big_map. ./octez-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 30 --storage-limit 1000000 --arg '"[CONTRACT_HASH]"' Node is bootstrapped. -Estimated gas: 98835.841 units (will add 100 for safety) +Estimated gas: 98835.369 units (will add 100 for safety) Estimated storage: 10767 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -266,7 +266,7 @@ This sequence of operations was run: Set temp(1)[40] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) Storage size: 320 bytes Paid storage size diff: 67 bytes - Consumed gas: 49910.055 + Consumed gas: 49909.937 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.01675 storage fees ........................... +ꜩ0.01675 @@ -283,7 +283,7 @@ This sequence of operations was run: Copy temp(1) to map(5) Storage size: 10783 bytes Paid storage size diff: 10700 bytes - Consumed gas: 48926.775 + Consumed gas: 48926.421 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ2.675 storage fees ........................... +ꜩ2.675