diff --git a/client-libs/kaitai-struct-files/files/alpha__constants.ksy b/client-libs/kaitai-struct-files/files/alpha__constants.ksy index 51950c14d577821c4d2ba57cfec808a96b18ee40..e91dff4cc6c1ac3dd19aec2c0d4d03bcff2321d1 100644 --- a/client-libs/kaitai-struct-files/files/alpha__constants.ksy +++ b/client-libs/kaitai-struct-files/files/alpha__constants.ksy @@ -387,3 +387,6 @@ seq: - id: allow_tz4_delegate_enable type: u1 enum: bool +- id: all_bakers_attest_enable + type: u1 + enum: bool diff --git a/client-libs/kaitai-struct-files/files/alpha__constants__parametric.ksy b/client-libs/kaitai-struct-files/files/alpha__constants__parametric.ksy index 16dc5cf7c15f0a8b2aca29f1795cc4a0888dea4b..1b4e8371f95011b7692b9f222f2775043ca8ad18 100644 --- a/client-libs/kaitai-struct-files/files/alpha__constants__parametric.ksy +++ b/client-libs/kaitai-struct-files/files/alpha__constants__parametric.ksy @@ -359,3 +359,6 @@ seq: - id: allow_tz4_delegate_enable type: u1 enum: bool +- id: all_bakers_attest_enable + type: u1 + enum: bool diff --git a/client-libs/kaitai-struct-files/files/alpha__parameters.ksy b/client-libs/kaitai-struct-files/files/alpha__parameters.ksy index 6e3a8cd76b028b561bf389b05cb06f1aa0c7b087..469be38cb185745ec3eb845eb6d977cea80bb5b5 100644 --- a/client-libs/kaitai-struct-files/files/alpha__parameters.ksy +++ b/client-libs/kaitai-struct-files/files/alpha__parameters.ksy @@ -637,3 +637,6 @@ seq: - id: allow_tz4_delegate_enable type: u1 enum: bool +- id: all_bakers_attest_enable + type: u1 + enum: bool diff --git a/docs/protocols/alpha.rst b/docs/protocols/alpha.rst index d7374e42e86188e028d9d80668e39a206d1fa318..f32c44340e525b8b06c51b81678fc1b13a4135bb 100644 --- a/docs/protocols/alpha.rst +++ b/docs/protocols/alpha.rst @@ -79,6 +79,8 @@ Minor Changes - Added a feature flag which would allow tz4 (BLS) addresses as delegate and or as consensus keys. (MR :gl:`!15311`) +- Added a feature flag for allowing all bakers to attest. (MR :gl:`!15584`) + Internal -------- diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index 9c0858f4a4623e8572f6c33e353351a6cd6ea652..a5591f44824e04be357673a4d7e35754485fb0e9 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -337,6 +337,7 @@ let constants_mainnet : Constants.Parametric.t = (* TODO: https://gitlab.com/tezos/tezos/-/issues/7553 Enable once we built performance confidance *) allow_tz4_delegate_enable = false; + all_bakers_attest_enable = false; } let constants_sandbox = diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 8a91be654fac902df6f6f0a7523c5afc7dd485f9..c376cddfe128399ec10695ef825c74d403964608 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -953,6 +953,7 @@ module Constants : sig direct_ticket_spending_enable : bool; aggregate_attestation : bool; allow_tz4_delegate_enable : bool; + all_bakers_attest_enable : bool; } val encoding : t Data_encoding.t @@ -1091,6 +1092,8 @@ module Constants : sig val allow_tz4_delegate_enable : context -> bool + val all_bakers_attest_enable : context -> bool + (** All constants: fixed and parametric *) type t = private {fixed : fixed; parametric : Parametric.t} diff --git a/src/proto_alpha/lib_protocol/constants_parametric_repr.ml b/src/proto_alpha/lib_protocol/constants_parametric_repr.ml index 32dad28bbc270eaae0d8aed6a85a83600188909a..ad3bbd5d59ea53740ed32aee1b8687ca1a085eb4 100644 --- a/src/proto_alpha/lib_protocol/constants_parametric_repr.ml +++ b/src/proto_alpha/lib_protocol/constants_parametric_repr.ml @@ -295,6 +295,7 @@ type t = { direct_ticket_spending_enable : bool; aggregate_attestation : bool; allow_tz4_delegate_enable : bool; + all_bakers_attest_enable : bool; } let sc_rollup_encoding = @@ -610,7 +611,8 @@ let encoding = ( c.adaptive_issuance, ( c.direct_ticket_spending_enable, c.aggregate_attestation, - c.allow_tz4_delegate_enable ) ) ) ) ) ) ) ) )) + c.allow_tz4_delegate_enable, + c.all_bakers_attest_enable ) ) ) ) ) ) ) ) )) (fun ( ( ( consensus_rights_delay, blocks_preservation_cycles, delegate_parameters_activation_delay, @@ -655,7 +657,8 @@ let encoding = ( adaptive_issuance, ( direct_ticket_spending_enable, aggregate_attestation, - allow_tz4_delegate_enable ) ) ) ) ) ) ) ) ) -> + allow_tz4_delegate_enable, + all_bakers_attest_enable ) ) ) ) ) ) ) ) ) -> { consensus_rights_delay; blocks_preservation_cycles; @@ -703,6 +706,7 @@ let encoding = direct_ticket_spending_enable; aggregate_attestation; allow_tz4_delegate_enable; + all_bakers_attest_enable; }) (merge_objs (merge_objs @@ -769,10 +773,11 @@ let encoding = (merge_objs sc_rollup_encoding zk_rollup_encoding) (merge_objs adaptive_issuance_encoding - (obj3 + (obj4 (req "direct_ticket_spending_enable" bool) (req "aggregate_attestation" bool) - (req "allow_tz4_delegate_enable" bool)))))))))) + (req "allow_tz4_delegate_enable" bool) + (req "all_bakers_attest_enable" bool)))))))))) let update_sc_rollup_parameter ratio_i32 c = (* Constants remain small enough to fit in [int32] after update (as a diff --git a/src/proto_alpha/lib_protocol/constants_parametric_repr.mli b/src/proto_alpha/lib_protocol/constants_parametric_repr.mli index 956f07659ca7acd837480685c0786b6f98b86057..8bb3998f95314995675fdf7794f5a5cad2b508c5 100644 --- a/src/proto_alpha/lib_protocol/constants_parametric_repr.mli +++ b/src/proto_alpha/lib_protocol/constants_parametric_repr.mli @@ -233,6 +233,7 @@ type t = { (* attestation aggregation feature flag *) aggregate_attestation : bool; allow_tz4_delegate_enable : bool; + all_bakers_attest_enable : bool; } val encoding : t Data_encoding.encoding diff --git a/src/proto_alpha/lib_protocol/constants_storage.ml b/src/proto_alpha/lib_protocol/constants_storage.ml index 46b63e8266f6a12d671fd2e305411cb0477b91c2..8e0c26e1c7362bba4dcb9ba8db4d181d849bac1e 100644 --- a/src/proto_alpha/lib_protocol/constants_storage.ml +++ b/src/proto_alpha/lib_protocol/constants_storage.ml @@ -300,3 +300,6 @@ let aggregate_attestation c = (Raw_context.constants c).aggregate_attestation let allow_tz4_delegate_enable c = (Raw_context.constants c).allow_tz4_delegate_enable + +let all_bakers_attest_enable c = + (Raw_context.constants c).all_bakers_attest_enable diff --git a/src/proto_alpha/lib_protocol/constants_storage.mli b/src/proto_alpha/lib_protocol/constants_storage.mli index 02d0a21ad23d10e6ac722a0b67a0c61c35f9dd0a..87b73ea0d85b1c41081e2c24760bf68968069506 100644 --- a/src/proto_alpha/lib_protocol/constants_storage.mli +++ b/src/proto_alpha/lib_protocol/constants_storage.mli @@ -187,3 +187,5 @@ val slashable_deposits_period : Raw_context.t -> int (* attestation aggregation feature flag *) val aggregate_attestation : Raw_context.t -> bool + +val all_bakers_attest_enable : Raw_context.t -> bool diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index 3230d55952c909cb90ee40b79ca2565103f62e87..1a9aa1a193f554a95094d420b14c2307d9a3ae25 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -1226,6 +1226,7 @@ let prepare_first_block ~level ~timestamp chain_id ctxt = direct_ticket_spending_enable; aggregate_attestation; allow_tz4_delegate_enable; + all_bakers_attest_enable; } : Previous.t) = c @@ -1278,6 +1279,7 @@ let prepare_first_block ~level ~timestamp chain_id ctxt = direct_ticket_spending_enable; aggregate_attestation; allow_tz4_delegate_enable; + all_bakers_attest_enable; } in let*! ctxt = add_constants ctxt constants in @@ -1570,6 +1572,7 @@ let prepare_first_block ~level ~timestamp chain_id ctxt = direct_ticket_spending_enable; aggregate_attestation = false; allow_tz4_delegate_enable = false; + all_bakers_attest_enable = false; } in let new_constants : Constants_parametric_repr.t option = 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 bbe52aaca40cc3b006db58d2a119f65897fca343..8a22eae11331b509cd59e3c73678e8e1867e4958 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 @@ -82,7 +82,7 @@ "adaptive_issuance_activation_vote_enable": true, "adaptive_issuance_force_activation": false, "ns_enable": true, "direct_ticket_spending_enable": false, "aggregate_attestation": false, - "allow_tz4_delegate_enable": true } + "allow_tz4_delegate_enable": true, "all_bakers_attest_enable": false } ./octez-client rpc get /chains/main/blocks/head/helpers/baking_rights [ { "level": 2, "delegate": "[PUBLIC_KEY_HASH]", 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 39bfa6aa99bef5f5386f6c13f3679d106bae0502..e56cd5fbbe64d2df6e469414b10ffc40084dfde4 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 @@ -82,7 +82,7 @@ "adaptive_issuance_activation_vote_enable": true, "adaptive_issuance_force_activation": false, "ns_enable": true, "direct_ticket_spending_enable": false, "aggregate_attestation": false, - "allow_tz4_delegate_enable": true } + "allow_tz4_delegate_enable": true, "all_bakers_attest_enable": false } ./octez-client --mode light rpc get /chains/main/blocks/head/helpers/baking_rights [ { "level": 2, "delegate": "[PUBLIC_KEY_HASH]", 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 9bcabe7056311b9a02db5da61fa241e4a54ef429..3070b3387917be5d30f004490a4fe0c44bd53161 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 @@ -82,7 +82,7 @@ "adaptive_issuance_activation_vote_enable": true, "adaptive_issuance_force_activation": false, "ns_enable": true, "direct_ticket_spending_enable": false, "aggregate_attestation": false, - "allow_tz4_delegate_enable": true } + "allow_tz4_delegate_enable": true, "all_bakers_attest_enable": false } ./octez-client --mode proxy rpc get /chains/main/blocks/head/helpers/baking_rights [ { "level": 2, "delegate": "[PUBLIC_KEY_HASH]", diff --git a/tezt/tests/expected/protocol_migration.ml/Alpha- weeklynet regression test.out b/tezt/tests/expected/protocol_migration.ml/Alpha- weeklynet regression test.out index acd11f96902b77a9273a3adb3cb7729711fd153e..a85d0a2787730776412650a44e4c1be0cc354937 100644 --- a/tezt/tests/expected/protocol_migration.ml/Alpha- weeklynet regression test.out +++ b/tezt/tests/expected/protocol_migration.ml/Alpha- weeklynet regression test.out @@ -72,4 +72,4 @@ "adaptive_issuance_activation_vote_enable": true, "adaptive_issuance_force_activation": false, "ns_enable": true, "direct_ticket_spending_enable": false, "aggregate_attestation": false, - "allow_tz4_delegate_enable": false } + "allow_tz4_delegate_enable": false, "all_bakers_attest_enable": false }