diff --git a/src/proto_alpha/lib_client/mockup.ml b/src/proto_alpha/lib_client/mockup.ml
index 1b3cd4ff94558e77b7fa8a14cc6e11bf6f1e963f..fd5c9b53cf4cbdf78fec37eba3cc62a27f8a969e 100644
--- a/src/proto_alpha/lib_client/mockup.ml
+++ b/src/proto_alpha/lib_client/mockup.ml
@@ -86,6 +86,7 @@ module Protocol_constants_overrides = struct
tx_rollup_cost_per_byte_ema_factor : int option;
tx_rollup_max_ticket_payload_size : int option;
tx_rollup_rejection_max_proof_size : int option;
+ tx_rollup_sunset_level : int32 option;
sc_rollup_enable : bool option;
sc_rollup_origination_size : int option;
sc_rollup_challenge_window_in_blocks : int option;
@@ -152,7 +153,8 @@ module Protocol_constants_overrides = struct
( c.tx_rollup_max_commitments_count,
c.tx_rollup_cost_per_byte_ema_factor,
c.tx_rollup_max_ticket_payload_size,
- c.tx_rollup_rejection_max_proof_size ) ),
+ c.tx_rollup_rejection_max_proof_size,
+ c.tx_rollup_sunset_level ) ),
( c.sc_rollup_enable,
c.sc_rollup_origination_size,
c.sc_rollup_challenge_window_in_blocks,
@@ -208,7 +210,8 @@ module Protocol_constants_overrides = struct
( tx_rollup_max_commitments_count,
tx_rollup_cost_per_byte_ema_factor,
tx_rollup_max_ticket_payload_size,
- tx_rollup_rejection_max_proof_size ) ),
+ tx_rollup_rejection_max_proof_size,
+ tx_rollup_sunset_level ) ),
( sc_rollup_enable,
sc_rollup_origination_size,
sc_rollup_challenge_window_in_blocks,
@@ -263,6 +266,7 @@ module Protocol_constants_overrides = struct
tx_rollup_cost_per_byte_ema_factor;
tx_rollup_max_ticket_payload_size;
tx_rollup_rejection_max_proof_size;
+ tx_rollup_sunset_level;
sc_rollup_enable;
sc_rollup_origination_size;
sc_rollup_challenge_window_in_blocks;
@@ -338,11 +342,12 @@ module Protocol_constants_overrides = struct
(opt "tx_rollup_max_inboxes_count" int31)
(opt "tx_rollup_withdraw_period" int31)
(opt "tx_rollup_max_messages_per_inbox" int31))
- (obj4
+ (obj5
(opt "tx_rollup_max_commitments_count" int31)
(opt "tx_rollup_cost_per_byte_ema_factor" int31)
(opt "tx_rollup_max_ticket_payload_size" int31)
- (opt "tx_rollup_rejection_max_proof_size" int31)))
+ (opt "tx_rollup_rejection_max_proof_size" int31)
+ (opt "tx_rollup_sunset_level" int32)))
(obj4
(opt "sc_rollup_enable" bool)
(opt "sc_rollup_origination_size" int31)
@@ -433,6 +438,7 @@ module Protocol_constants_overrides = struct
Some parametric.tx_rollup_max_ticket_payload_size;
tx_rollup_rejection_max_proof_size =
Some parametric.tx_rollup_rejection_max_proof_size;
+ tx_rollup_sunset_level = Some parametric.tx_rollup_sunset_level;
sc_rollup_enable = Some parametric.sc_rollup_enable;
sc_rollup_origination_size = Some parametric.sc_rollup_origination_size;
sc_rollup_challenge_window_in_blocks =
@@ -498,6 +504,7 @@ module Protocol_constants_overrides = struct
tx_rollup_cost_per_byte_ema_factor = None;
tx_rollup_max_ticket_payload_size = None;
tx_rollup_rejection_max_proof_size = None;
+ tx_rollup_sunset_level = None;
sc_rollup_enable = None;
sc_rollup_origination_size = None;
sc_rollup_challenge_window_in_blocks = None;
@@ -782,6 +789,12 @@ module Protocol_constants_overrides = struct
override_value = o.tx_rollup_rejection_max_proof_size;
pp = pp_print_int;
};
+ O
+ {
+ name = "tx_rollup_sunset_level";
+ override_value = o.tx_rollup_sunset_level;
+ pp = pp_print_int32;
+ };
]
in
let fields_with_override =
@@ -966,6 +979,10 @@ module Protocol_constants_overrides = struct
Option.value
~default:c.tx_rollup_rejection_max_proof_size
o.tx_rollup_rejection_max_proof_size;
+ tx_rollup_sunset_level =
+ Option.value
+ ~default:c.tx_rollup_sunset_level
+ o.tx_rollup_sunset_level;
sc_rollup_enable =
Option.value ~default:c.sc_rollup_enable o.sc_rollup_enable;
sc_rollup_origination_size =
diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml
index e9d4d38d1ce8d1a5296dc47d93cadc49a15b5ad7..3a36fba3b03f0b7d6fc7a6937d29e21895ab33c3 100644
--- a/src/proto_alpha/lib_parameters/default_parameters.ml
+++ b/src/proto_alpha/lib_parameters/default_parameters.ml
@@ -138,6 +138,10 @@ let constants_mainnet =
(minus overhead), since we need to limit our proofs to those
that can fit in an operation. *)
tx_rollup_rejection_max_proof_size = 30000;
+ (* This is the first block of cycle 618, which is expected to be
+ about one year after the activation of protocol J.
+ See https://tzstats.com/cycle/618 *)
+ tx_rollup_sunset_level = 3_473_409l;
sc_rollup_enable = false;
(* The following value is chosen to prevent spam. *)
sc_rollup_origination_size = 6_314;
diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli
index b20038c59801cd6cb39297b31f12f6de068118ab..6e8cacf9dcddf04062be4c1a3c4efc06fc608287 100644
--- a/src/proto_alpha/lib_protocol/alpha_context.mli
+++ b/src/proto_alpha/lib_protocol/alpha_context.mli
@@ -805,6 +805,7 @@ module Constants : sig
tx_rollup_max_ticket_payload_size : int;
tx_rollup_max_withdrawals_per_batch : int;
tx_rollup_rejection_max_proof_size : int;
+ tx_rollup_sunset_level : int32;
sc_rollup_enable : bool;
sc_rollup_origination_size : int;
sc_rollup_challenge_window_in_blocks : int;
@@ -914,6 +915,8 @@ module Constants : sig
val tx_rollup_rejection_max_proof_size : context -> int
+ val tx_rollup_sunset_level : context -> int32
+
val sc_rollup_enable : context -> bool
val sc_rollup_origination_size : context -> int
diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml
index 9f828cd7c48bac59471da078c3191db7378680f3..1566097d74a81c4059a9c188221886392f47bce8 100644
--- a/src/proto_alpha/lib_protocol/apply.ml
+++ b/src/proto_alpha/lib_protocol/apply.ml
@@ -783,6 +783,10 @@ let () =
open Apply_results
let assert_tx_rollup_feature_enabled ctxt =
+ let level = (Level.current ctxt).level in
+ Raw_level.of_int32 @@ Constants.tx_rollup_sunset_level ctxt >>?= fun sunset ->
+ fail_when Raw_level.(sunset <= level) Tx_rollup_feature_disabled
+ >>=? fun () ->
fail_unless (Constants.tx_rollup_enable ctxt) Tx_rollup_feature_disabled
let assert_sc_rollup_feature_enabled ctxt =
diff --git a/src/proto_alpha/lib_protocol/constants_repr.ml b/src/proto_alpha/lib_protocol/constants_repr.ml
index 5d80f9dfbe189c17f4d6f305524a512b651c4378..17dca8a2f1f5d709e57b5c05251b035249f9e8a2 100644
--- a/src/proto_alpha/lib_protocol/constants_repr.ml
+++ b/src/proto_alpha/lib_protocol/constants_repr.ml
@@ -173,6 +173,7 @@ type parametric = {
tx_rollup_max_ticket_payload_size : int;
tx_rollup_max_withdrawals_per_batch : int;
tx_rollup_rejection_max_proof_size : int;
+ tx_rollup_sunset_level : int32;
sc_rollup_enable : bool;
sc_rollup_origination_size : int;
sc_rollup_challenge_window_in_blocks : int;
@@ -232,7 +233,8 @@ let parametric_encoding =
( c.tx_rollup_max_commitments_count,
c.tx_rollup_cost_per_byte_ema_factor,
c.tx_rollup_max_ticket_payload_size,
- c.tx_rollup_rejection_max_proof_size ) ),
+ c.tx_rollup_rejection_max_proof_size,
+ c.tx_rollup_sunset_level ) ),
( c.sc_rollup_enable,
c.sc_rollup_origination_size,
c.sc_rollup_challenge_window_in_blocks,
@@ -286,7 +288,8 @@ let parametric_encoding =
( tx_rollup_max_commitments_count,
tx_rollup_cost_per_byte_ema_factor,
tx_rollup_max_ticket_payload_size,
- tx_rollup_rejection_max_proof_size ) ),
+ tx_rollup_rejection_max_proof_size,
+ tx_rollup_sunset_level ) ),
( sc_rollup_enable,
sc_rollup_origination_size,
sc_rollup_challenge_window_in_blocks,
@@ -342,6 +345,7 @@ let parametric_encoding =
tx_rollup_cost_per_byte_ema_factor;
tx_rollup_max_ticket_payload_size;
tx_rollup_rejection_max_proof_size;
+ tx_rollup_sunset_level;
sc_rollup_enable;
sc_rollup_origination_size;
sc_rollup_challenge_window_in_blocks;
@@ -412,11 +416,12 @@ let parametric_encoding =
(req "tx_rollup_withdraw_period" int31)
(req "tx_rollup_max_inboxes_count" int31)
(req "tx_rollup_max_messages_per_inbox" int31))
- (obj4
+ (obj5
(req "tx_rollup_max_commitments_count" int31)
(req "tx_rollup_cost_per_byte_ema_factor" int31)
(req "tx_rollup_max_ticket_payload_size" int31)
- (req "tx_rollup_rejection_max_proof_size" int31)))
+ (req "tx_rollup_rejection_max_proof_size" int31)
+ (req "tx_rollup_sunset_level" int32)))
(obj4
(req "sc_rollup_enable" bool)
(req "sc_rollup_origination_size" int31)
diff --git a/src/proto_alpha/lib_protocol/constants_repr.mli b/src/proto_alpha/lib_protocol/constants_repr.mli
index 88dddacbe7fba3a9ec2053335cea11299294df43..a56c9f1ae1df26e6ccf2460f5d1f824e1c2d003c 100644
--- a/src/proto_alpha/lib_protocol/constants_repr.mli
+++ b/src/proto_alpha/lib_protocol/constants_repr.mli
@@ -172,6 +172,7 @@ type parametric = {
(* The maximum size, in bytes, of a Merkle proof. Operations which would
require proofs larger than this should be no-ops. *)
tx_rollup_rejection_max_proof_size : int;
+ tx_rollup_sunset_level : int32;
sc_rollup_enable : bool;
sc_rollup_origination_size : int;
sc_rollup_challenge_window_in_blocks : int;
diff --git a/src/proto_alpha/lib_protocol/constants_storage.ml b/src/proto_alpha/lib_protocol/constants_storage.ml
index 31ac5c0817b0e17a9ff81384e50ed3c9937b4378..a89ddf693e92d21cedd4141ba909f2bf5ccb0fd1 100644
--- a/src/proto_alpha/lib_protocol/constants_storage.ml
+++ b/src/proto_alpha/lib_protocol/constants_storage.ml
@@ -150,6 +150,10 @@ let tx_rollup_enable c =
let constants = Raw_context.constants c in
constants.tx_rollup_enable
+let tx_rollup_sunset_level c =
+ let constants = Raw_context.constants c in
+ constants.tx_rollup_sunset_level
+
let tx_rollup_origination_size c =
let constants = Raw_context.constants c in
constants.tx_rollup_origination_size
diff --git a/src/proto_alpha/lib_protocol/constants_storage.mli b/src/proto_alpha/lib_protocol/constants_storage.mli
index 5e98bdbdea931369d8ffb75ade59791046d2a99a..115968b98d5b0b7f6bcf56a540e227dfbc881bbd 100644
--- a/src/proto_alpha/lib_protocol/constants_storage.mli
+++ b/src/proto_alpha/lib_protocol/constants_storage.mli
@@ -112,6 +112,8 @@ val tx_rollup_max_ticket_payload_size : Raw_context.t -> int
val tx_rollup_rejection_max_proof_size : Raw_context.t -> int
+val tx_rollup_sunset_level : Raw_context.t -> int32
+
val ratio_of_frozen_deposits_slashed_per_double_endorsement :
Raw_context.t -> Constants_repr.ratio
diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml
index 337bd79f532e33e4127fb1deb479c7a1ec291492..39b5024d6e7bb48104a66429d3445866a7ef74a5 100644
--- a/src/proto_alpha/lib_protocol/raw_context.ml
+++ b/src/proto_alpha/lib_protocol/raw_context.ml
@@ -940,6 +940,10 @@ let prepare_first_block ~level ~timestamp ctxt =
(* The default ema factor is [120] blocks, so about one hour. *)
tx_rollup_cost_per_byte_ema_factor = 120;
tx_rollup_rejection_max_proof_size = 30_000;
+ (* This is the first block of cycle 618, which is expected to be
+ about one year after the activation of protocol J.
+ See https://tzstats.com/cycle/618 *)
+ tx_rollup_sunset_level = 3_473_409l;
sc_rollup_enable = false;
(* The following value is chosen to prevent spam. *)
sc_rollup_origination_size = 6_314;
diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.ml b/src/proto_alpha/lib_protocol/test/helpers/block.ml
index 08d3961a3b2a39d0da87269d4b35a8ab5c6e5c28..bfef99e48c7f10c9564b48661ca43c862da6e2ed 100644
--- a/src/proto_alpha/lib_protocol/test/helpers/block.ml
+++ b/src/proto_alpha/lib_protocol/test/helpers/block.ml
@@ -414,7 +414,8 @@ let prepare_initial_context_params ?consensus_threshold ?min_proposal_quorum
?level ?cost_per_byte ?liquidity_baking_subsidy ?endorsing_reward_per_slot
?baking_reward_bonus_per_slot ?baking_reward_fixed_portion ?origination_size
?blocks_per_cycle ?cycles_per_voting_period ?tx_rollup_enable
- ?tx_rollup_origination_size ?sc_rollup_enable initial_accounts =
+ ?tx_rollup_sunset_level ?tx_rollup_origination_size ?sc_rollup_enable
+ initial_accounts =
let open Tezos_protocol_alpha_parameters in
let constants = Default_parameters.constants_test in
let min_proposal_quorum =
@@ -460,6 +461,11 @@ let prepare_initial_context_params ?consensus_threshold ?min_proposal_quorum
let tx_rollup_enable =
Option.value ~default:constants.tx_rollup_enable tx_rollup_enable
in
+ let tx_rollup_sunset_level =
+ Option.value
+ ~default:constants.tx_rollup_sunset_level
+ tx_rollup_sunset_level
+ in
let tx_rollup_origination_size =
Option.value
~default:constants.tx_rollup_origination_size
@@ -482,6 +488,7 @@ let prepare_initial_context_params ?consensus_threshold ?min_proposal_quorum
liquidity_baking_subsidy;
consensus_threshold;
tx_rollup_enable;
+ tx_rollup_sunset_level;
tx_rollup_origination_size;
sc_rollup_enable;
}
@@ -530,8 +537,9 @@ let genesis ?commitments ?consensus_threshold ?min_proposal_quorum
?bootstrap_contracts ?level ?cost_per_byte ?liquidity_baking_subsidy
?endorsing_reward_per_slot ?baking_reward_bonus_per_slot
?baking_reward_fixed_portion ?origination_size ?blocks_per_cycle
- ?cycles_per_voting_period ?tx_rollup_enable ?tx_rollup_origination_size
- ?sc_rollup_enable (initial_accounts : (Account.t * Tez.t) list) =
+ ?cycles_per_voting_period ?tx_rollup_enable ?tx_rollup_sunset_level
+ ?tx_rollup_origination_size ?sc_rollup_enable
+ (initial_accounts : (Account.t * Tez.t) list) =
prepare_initial_context_params
?consensus_threshold
?min_proposal_quorum
@@ -545,6 +553,7 @@ let genesis ?commitments ?consensus_threshold ?min_proposal_quorum
?blocks_per_cycle
?cycles_per_voting_period
?tx_rollup_enable
+ ?tx_rollup_sunset_level
?tx_rollup_origination_size
?sc_rollup_enable
initial_accounts
diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.mli b/src/proto_alpha/lib_protocol/test/helpers/block.mli
index a999104a18864a13ce729b98bd4a1c12f80043fd..265609ad96d8365b9c87a5c99023e852f1636b5e 100644
--- a/src/proto_alpha/lib_protocol/test/helpers/block.mli
+++ b/src/proto_alpha/lib_protocol/test/helpers/block.mli
@@ -122,6 +122,7 @@ val genesis :
?blocks_per_cycle:int32 ->
?cycles_per_voting_period:int32 ->
?tx_rollup_enable:bool ->
+ ?tx_rollup_sunset_level:int32 ->
?tx_rollup_origination_size:int ->
?sc_rollup_enable:bool ->
(Account.t * Tez.tez) list ->
@@ -258,6 +259,7 @@ val prepare_initial_context_params :
?blocks_per_cycle:int32 ->
?cycles_per_voting_period:int32 ->
?tx_rollup_enable:bool ->
+ ?tx_rollup_sunset_level:int32 ->
?tx_rollup_origination_size:int ->
?sc_rollup_enable:bool ->
(Account.t * Tez.t) list ->
diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.ml b/src/proto_alpha/lib_protocol/test/helpers/context.ml
index 7c2e541a2d5fba06c43d7056ac207a54b19d3a2f..036c516715373b47586507b49c5ff185909a1db3 100644
--- a/src/proto_alpha/lib_protocol/test/helpers/context.ml
+++ b/src/proto_alpha/lib_protocol/test/helpers/context.ml
@@ -359,7 +359,7 @@ let init ?rng_state ?commitments ?(initial_balances = []) ?consensus_threshold
?liquidity_baking_subsidy ?endorsing_reward_per_slot
?baking_reward_bonus_per_slot ?baking_reward_fixed_portion ?origination_size
?blocks_per_cycle ?cycles_per_voting_period ?tx_rollup_enable
- ?tx_rollup_origination_size ?sc_rollup_enable n =
+ ?tx_rollup_sunset_level ?tx_rollup_origination_size ?sc_rollup_enable n =
let accounts = Account.generate_accounts ?rng_state ~initial_balances n in
let contracts =
List.map
@@ -381,6 +381,7 @@ let init ?rng_state ?commitments ?(initial_balances = []) ?consensus_threshold
?blocks_per_cycle
?cycles_per_voting_period
?tx_rollup_enable
+ ?tx_rollup_sunset_level
?tx_rollup_origination_size
?sc_rollup_enable
accounts
@@ -390,7 +391,8 @@ let init1 ?rng_state ?commitments ?(initial_balances = []) ?consensus_threshold
?min_proposal_quorum ?level ?cost_per_byte ?liquidity_baking_subsidy
?endorsing_reward_per_slot ?baking_reward_bonus_per_slot
?baking_reward_fixed_portion ?origination_size ?blocks_per_cycle
- ?cycles_per_voting_period ?tx_rollup_enable ?sc_rollup_enable () =
+ ?cycles_per_voting_period ?tx_rollup_enable ?tx_rollup_sunset_level
+ ?sc_rollup_enable () =
init
?rng_state
?commitments
@@ -407,6 +409,7 @@ let init1 ?rng_state ?commitments ?(initial_balances = []) ?consensus_threshold
?blocks_per_cycle
?cycles_per_voting_period
?tx_rollup_enable
+ ?tx_rollup_sunset_level
?sc_rollup_enable
1
>|=? function
@@ -417,7 +420,8 @@ let init2 ?rng_state ?commitments ?(initial_balances = []) ?consensus_threshold
?min_proposal_quorum ?level ?cost_per_byte ?liquidity_baking_subsidy
?endorsing_reward_per_slot ?baking_reward_bonus_per_slot
?baking_reward_fixed_portion ?origination_size ?blocks_per_cycle
- ?cycles_per_voting_period ?tx_rollup_enable ?sc_rollup_enable () =
+ ?cycles_per_voting_period ?tx_rollup_enable ?tx_rollup_sunset_level
+ ?sc_rollup_enable () =
init
?rng_state
?commitments
@@ -434,6 +438,7 @@ let init2 ?rng_state ?commitments ?(initial_balances = []) ?consensus_threshold
?blocks_per_cycle
?cycles_per_voting_period
?tx_rollup_enable
+ ?tx_rollup_sunset_level
?sc_rollup_enable
2
>|=? function
diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.mli b/src/proto_alpha/lib_protocol/test/helpers/context.mli
index 06496419bad3f9e665a320584d4736a93bfcd721..3a811002d3a62ddff2fa5321e38f8541f78fa4f6 100644
--- a/src/proto_alpha/lib_protocol/test/helpers/context.mli
+++ b/src/proto_alpha/lib_protocol/test/helpers/context.mli
@@ -221,6 +221,7 @@ val init :
?blocks_per_cycle:int32 ->
?cycles_per_voting_period:int32 ->
?tx_rollup_enable:bool ->
+ ?tx_rollup_sunset_level:int32 ->
?tx_rollup_origination_size:int ->
?sc_rollup_enable:bool ->
int ->
@@ -244,6 +245,7 @@ val init1 :
?blocks_per_cycle:int32 ->
?cycles_per_voting_period:int32 ->
?tx_rollup_enable:bool ->
+ ?tx_rollup_sunset_level:int32 ->
?sc_rollup_enable:bool ->
unit ->
(Block.t * Alpha_context.Contract.t) tzresult Lwt.t
@@ -266,6 +268,7 @@ val init2 :
?blocks_per_cycle:int32 ->
?cycles_per_voting_period:int32 ->
?tx_rollup_enable:bool ->
+ ?tx_rollup_sunset_level:int32 ->
?sc_rollup_enable:bool ->
unit ->
(Block.t * Alpha_context.Contract.t * Alpha_context.Contract.t) tzresult Lwt.t
diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml
index 5a2c22a2fec1c3e5bccf0917dbac2a3b4ad2654c..b7493e029f2c3eb972b04ed91abfa5e2861037f2 100644
--- a/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml
+++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml
@@ -78,13 +78,36 @@ let test_disable_feature_flag () =
op
>>=? fun _i -> return_unit
+(** [test_sunset] try to originate a tx rollup after the sunset and check
+ that it fails *)
+let test_sunset () =
+ Context.init_with_constants
+ {
+ Context.default_test_constants with
+ tx_rollup_enable = true;
+ tx_rollup_sunset_level = 0l;
+ }
+ 1
+ >>=? fun (b, contracts) ->
+ let contract =
+ WithExceptions.Option.get ~loc:__LOC__ @@ List.nth contracts 0
+ in
+ Incremental.begin_construction b >>=? fun i ->
+ Op.tx_rollup_origination (I i) contract >>=? fun (op, _tx_rollup) ->
+ Incremental.add_operation
+ ~expect_apply_failure:(check_proto_error Apply.Tx_rollup_feature_disabled)
+ i
+ op
+ >>=? fun _i -> return_unit
+
(** [parsing_tests] try originating contracts using the
type [tx_rollup_l2_address], test that it only works
when rollups are enabled.
*)
let parsing_tests =
let test_origination ~tx_rollup_enable script_path initial_storage =
- Context.init1 ~tx_rollup_enable () >>=? fun (b, contract) ->
+ Context.init1 ~tx_rollup_enable ~tx_rollup_sunset_level:Int32.max_int ()
+ >>=? fun (b, contract) ->
Contract_helpers.originate_contract
script_path
initial_storage
@@ -187,6 +210,7 @@ let context_init ?(tx_rollup_max_inboxes_count = 2100)
Context.default_test_constants with
consensus_threshold = 0;
tx_rollup_enable = true;
+ tx_rollup_sunset_level = Int32.max_int;
tx_rollup_finality_period;
tx_rollup_withdraw_period = 1;
tx_rollup_max_commitments_count = 3;
@@ -521,7 +545,8 @@ end
(** [test_origination] originates a transaction rollup and checks that
it burns the expected quantity of xtz. *)
let test_origination () =
- Context.init ~tx_rollup_enable:true 1 >>=? fun (b, contracts) ->
+ Context.init ~tx_rollup_enable:true ~tx_rollup_sunset_level:Int32.max_int 1
+ >>=? fun (b, contracts) ->
let contract =
WithExceptions.Option.get ~loc:__LOC__ @@ List.nth contracts 0
in
@@ -544,7 +569,8 @@ let test_origination () =
(** [test_two_originations] originates two transaction rollups in the
same operation and checks that they have a different address. *)
let test_two_originations () =
- Context.init ~tx_rollup_enable:true 1 >>=? fun (b, contracts) ->
+ Context.init ~tx_rollup_enable:true ~tx_rollup_sunset_level:Int32.max_int 1
+ >>=? fun (b, contracts) ->
let contract =
WithExceptions.Option.get ~loc:__LOC__ @@ List.nth contracts 0
in
@@ -1873,6 +1899,7 @@ let test_full_inbox () =
baking_reward_bonus_per_slot = Tez.zero;
baking_reward_fixed_portion = Tez.zero;
tx_rollup_enable = true;
+ tx_rollup_sunset_level = Int32.max_int;
tx_rollup_max_inboxes_count = 15;
}
in
@@ -4912,6 +4939,7 @@ let tests =
"check feature flag is disabled"
`Quick
test_disable_feature_flag;
+ Tztest.tztest "check sunset" `Quick test_sunset;
Tztest.tztest "check tx rollup origination and burn" `Quick test_origination;
Tztest.tztest
"check two originated tx rollup in one operation have different address"
diff --git a/tests_python/test-results.xml b/tests_python/test-results.xml
index 04227658d49592aa426178cd5c0ccf8ff7632844..9330528ce0976d8f26fc8591348e7df220e10c58 100644
--- a/tests_python/test-results.xml
+++ b/tests_python/test-results.xml
@@ -3298,7 +3298,7 @@
-
+
diff --git a/tests_python/tests_alpha/test_mockup.py b/tests_python/tests_alpha/test_mockup.py
index 9a472940b584a843e2a8dd7f2ae54c271b8f1f10..db7ae705972cf2ece4988619ebec59737bba2508 100644
--- a/tests_python/tests_alpha/test_mockup.py
+++ b/tests_python/tests_alpha/test_mockup.py
@@ -669,6 +669,7 @@ def _test_create_mockup_init_show_roundtrip(
"tx_rollup_cost_per_byte_ema_factor": 321,
"tx_rollup_max_ticket_payload_size": 10_240,
"tx_rollup_rejection_max_proof_size": 30_000,
+ "tx_rollup_sunset_level": 3_473_409,
"sc_rollup_enable": False,
"sc_rollup_origination_size": 6_314,
"sc_rollup_challenge_window_in_blocks": 20_160,
diff --git a/tezt/_regressions/rpc/alpha.client.others.out b/tezt/_regressions/rpc/alpha.client.others.out
index 1c9153bdf19f536dd56e0f764b97e082c3631323..b934dc9d2df927341244a0639c988f148b084275 100644
--- a/tezt/_regressions/rpc/alpha.client.others.out
+++ b/tezt/_regressions/rpc/alpha.client.others.out
@@ -40,7 +40,8 @@ rpc/alpha.client.others.out
"tx_rollup_max_commitments_count": 120100,
"tx_rollup_cost_per_byte_ema_factor": 120,
"tx_rollup_max_ticket_payload_size": 2048,
- "tx_rollup_rejection_max_proof_size": 30000, "sc_rollup_enable": false,
+ "tx_rollup_rejection_max_proof_size": 30000,
+ "tx_rollup_sunset_level": 3473409, "sc_rollup_enable": false,
"sc_rollup_origination_size": 6314,
"sc_rollup_challenge_window_in_blocks": 20160,
"sc_rollup_max_available_messages": 1000000 }
diff --git a/tezt/_regressions/rpc/alpha.light.others.out b/tezt/_regressions/rpc/alpha.light.others.out
index 9f39848adc83420bf8fef44d431dc1af32faa2f8..127f19d010882330812e652ac620d6b3ca626d6d 100644
--- a/tezt/_regressions/rpc/alpha.light.others.out
+++ b/tezt/_regressions/rpc/alpha.light.others.out
@@ -40,7 +40,8 @@ rpc/alpha.light.others.out
"tx_rollup_max_commitments_count": 120100,
"tx_rollup_cost_per_byte_ema_factor": 120,
"tx_rollup_max_ticket_payload_size": 2048,
- "tx_rollup_rejection_max_proof_size": 30000, "sc_rollup_enable": false,
+ "tx_rollup_rejection_max_proof_size": 30000,
+ "tx_rollup_sunset_level": 3473409, "sc_rollup_enable": false,
"sc_rollup_origination_size": 6314,
"sc_rollup_challenge_window_in_blocks": 20160,
"sc_rollup_max_available_messages": 1000000 }
diff --git a/tezt/_regressions/rpc/alpha.proxy.others.out b/tezt/_regressions/rpc/alpha.proxy.others.out
index 0914a69096a4e92dc53460a67b86675f82231d73..297649432cc92fbd2d52312a2bbd3b458b759cea 100644
--- a/tezt/_regressions/rpc/alpha.proxy.others.out
+++ b/tezt/_regressions/rpc/alpha.proxy.others.out
@@ -40,7 +40,8 @@ rpc/alpha.proxy.others.out
"tx_rollup_max_commitments_count": 120100,
"tx_rollup_cost_per_byte_ema_factor": 120,
"tx_rollup_max_ticket_payload_size": 2048,
- "tx_rollup_rejection_max_proof_size": 30000, "sc_rollup_enable": false,
+ "tx_rollup_rejection_max_proof_size": 30000,
+ "tx_rollup_sunset_level": 3473409, "sc_rollup_enable": false,
"sc_rollup_origination_size": 6314,
"sc_rollup_challenge_window_in_blocks": 20160,
"sc_rollup_max_available_messages": 1000000 }
diff --git a/tezt/_regressions/rpc/alpha.proxy_server_data_dir.others.out b/tezt/_regressions/rpc/alpha.proxy_server_data_dir.others.out
index fd4b717dcf426cd83e91540bc1a7f5a616ec0536..19be5a62ae9f6782cbf28430ca34e6f99cec85ec 100644
--- a/tezt/_regressions/rpc/alpha.proxy_server_data_dir.others.out
+++ b/tezt/_regressions/rpc/alpha.proxy_server_data_dir.others.out
@@ -40,7 +40,8 @@ rpc/alpha.proxy_server_data_dir.others.out
"tx_rollup_max_commitments_count": 120100,
"tx_rollup_cost_per_byte_ema_factor": 120,
"tx_rollup_max_ticket_payload_size": 2048,
- "tx_rollup_rejection_max_proof_size": 30000, "sc_rollup_enable": false,
+ "tx_rollup_rejection_max_proof_size": 30000,
+ "tx_rollup_sunset_level": 3473409, "sc_rollup_enable": false,
"sc_rollup_origination_size": 6314,
"sc_rollup_challenge_window_in_blocks": 20160,
"sc_rollup_max_available_messages": 1000000 }
diff --git a/tezt/_regressions/rpc/alpha.proxy_server_rpc.others.out b/tezt/_regressions/rpc/alpha.proxy_server_rpc.others.out
index b396ce9cfabecd4a76565442036b44e8ef593099..d13994fa7a0596f1857d638645b8df2c9aa4065f 100644
--- a/tezt/_regressions/rpc/alpha.proxy_server_rpc.others.out
+++ b/tezt/_regressions/rpc/alpha.proxy_server_rpc.others.out
@@ -40,7 +40,8 @@ rpc/alpha.proxy_server_rpc.others.out
"tx_rollup_max_commitments_count": 120100,
"tx_rollup_cost_per_byte_ema_factor": 120,
"tx_rollup_max_ticket_payload_size": 2048,
- "tx_rollup_rejection_max_proof_size": 30000, "sc_rollup_enable": false,
+ "tx_rollup_rejection_max_proof_size": 30000,
+ "tx_rollup_sunset_level": 3473409, "sc_rollup_enable": false,
"sc_rollup_origination_size": 6314,
"sc_rollup_challenge_window_in_blocks": 20160,
"sc_rollup_max_available_messages": 1000000 }