From f461cb50e534daee611000e4e3cbc16b89f0f4f4 Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Wed, 16 Oct 2024 12:12:24 +0200 Subject: [PATCH 1/5] alpha: allow tz4 for delegates under feature flag --- src/proto_alpha/lib_protocol/contract_delegate_storage.ml | 2 -- src/proto_alpha/lib_protocol/delegate_consensus_key.ml | 2 -- src/proto_alpha/lib_protocol/validate.ml | 8 ++++++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/proto_alpha/lib_protocol/contract_delegate_storage.ml b/src/proto_alpha/lib_protocol/contract_delegate_storage.ml index b04e33e81046..6fda4fde2dc5 100644 --- a/src/proto_alpha/lib_protocol/contract_delegate_storage.ml +++ b/src/proto_alpha/lib_protocol/contract_delegate_storage.ml @@ -69,7 +69,6 @@ let is_delegate ctxt pkh = let init ctxt contract delegate = let open Lwt_result_syntax in - let*? () = check_not_tz4 delegate in let* ctxt = Storage.Contract.Delegate.init ctxt contract delegate in let delegate_contract = Contract_repr.Implicit delegate in let*! ctxt = @@ -97,7 +96,6 @@ let delete ctxt contract = let set ctxt contract delegate = let open Lwt_result_syntax in - let*? () = check_not_tz4 delegate in let* ctxt = unlink ctxt contract in let*! ctxt = Storage.Contract.Delegate.add ctxt contract delegate in let delegate_contract = Contract_repr.Implicit delegate in diff --git a/src/proto_alpha/lib_protocol/delegate_consensus_key.ml b/src/proto_alpha/lib_protocol/delegate_consensus_key.ml index e08d7a6327fb..f0748736b13c 100644 --- a/src/proto_alpha/lib_protocol/delegate_consensus_key.ml +++ b/src/proto_alpha/lib_protocol/delegate_consensus_key.ml @@ -124,7 +124,6 @@ let set_used = Storage.Consensus_keys.add let init ctxt delegate pk = let open Lwt_result_syntax in - let*? () = check_not_tz4 pk in let pkh = Signature.Public_key.hash pk in let* () = check_unused ctxt pkh in let*! ctxt = set_used ctxt pkh in @@ -207,7 +206,6 @@ let register_update ctxt delegate pk = Signature.Public_key.(pk = active_pubkey) (Invalid_consensus_key_update_noop first_active_cycle) in - let*? () = check_not_tz4 pk in let pkh = Signature.Public_key.hash pk in let* () = check_unused ctxt pkh in let*! ctxt = set_used ctxt pkh in diff --git a/src/proto_alpha/lib_protocol/validate.ml b/src/proto_alpha/lib_protocol/validate.ml index 726cc48694a9..45b518ad32bf 100644 --- a/src/proto_alpha/lib_protocol/validate.ml +++ b/src/proto_alpha/lib_protocol/validate.ml @@ -2078,8 +2078,12 @@ module Manager = struct | Register_global_constant {value} -> let* (_ : Gas.Arith.fp) = consume_decoding_gas remaining_gas value in return_unit - | Delegation (Some pkh) -> Delegate.check_not_tz4 pkh - | Update_consensus_key pk -> Delegate.Consensus_key.check_not_tz4 pk + | Delegation (Some pkh) -> + if Constants.allow_tz4_delegate_enable vi.ctxt then return_unit + else Delegate.check_not_tz4 pkh + | Update_consensus_key pk -> + if Constants.allow_tz4_delegate_enable vi.ctxt then return_unit + else Delegate.Consensus_key.check_not_tz4 pk | Delegation None | Set_deposits_limit _ | Increase_paid_storage _ -> return_unit | Transfer_ticket {contents; ty; _} -> -- GitLab From 1117c2b667c4f7e4fdb35c272859d97d45d5336b Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Wed, 16 Oct 2024 11:45:35 +0200 Subject: [PATCH 2/5] alpha: add test helpers for allow_tz4_delegate_enable feature flag --- src/proto_alpha/lib_protocol/test/helpers/block.ml | 13 ++++++++++--- src/proto_alpha/lib_protocol/test/helpers/block.mli | 2 ++ .../lib_protocol/test/helpers/context.ml | 3 ++- .../lib_protocol/test/helpers/context.mli | 1 + 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.ml b/src/proto_alpha/lib_protocol/test/helpers/block.ml index 62b9c9cf5719..c083d175c837 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/block.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/block.ml @@ -571,7 +571,7 @@ let prepare_initial_context_params ?consensus_committee_size ?cycles_per_voting_period ?sc_rollup_arith_pvm_enable ?sc_rollup_private_enable ?sc_rollup_riscv_pvm_enable ?dal_enable ?zk_rollup_enable ?hard_gas_limit_per_block ?nonce_revelation_threshold ?dal - ?adaptive_issuance ?consensus_rights_delay () = + ?adaptive_issuance ?consensus_rights_delay ?allow_tz4_delegate_enable () = let open Lwt_result_syntax in let open Tezos_protocol_alpha_parameters in let constants = Default_parameters.constants_test in @@ -643,6 +643,11 @@ let prepare_initial_context_params ?consensus_committee_size ~default:constants.consensus_rights_delay consensus_rights_delay in + let allow_tz4_delegate_enable = + Option.value + ~default:constants.allow_tz4_delegate_enable + allow_tz4_delegate_enable + in let cache_sampler_state_cycles = consensus_rights_delay + Constants_repr.max_slashing_period + 1 and cache_stake_distribution_cycles = @@ -674,6 +679,7 @@ let prepare_initial_context_params ?consensus_committee_size consensus_rights_delay; cache_sampler_state_cycles; cache_stake_distribution_cycles; + allow_tz4_delegate_enable; } in let* () = check_constants_consistency constants in @@ -707,8 +713,8 @@ let genesis ?commitments ?consensus_committee_size ?consensus_threshold ?cycles_per_voting_period ?sc_rollup_arith_pvm_enable ?sc_rollup_private_enable ?sc_rollup_riscv_pvm_enable ?dal_enable ?zk_rollup_enable ?hard_gas_limit_per_block ?nonce_revelation_threshold ?dal - ?adaptive_issuance (bootstrap_accounts : Parameters.bootstrap_account list) - = + ?adaptive_issuance ?allow_tz4_delegate_enable + (bootstrap_accounts : Parameters.bootstrap_account list) = let open Lwt_result_syntax in let* constants, shell, hash = prepare_initial_context_params @@ -730,6 +736,7 @@ let genesis ?commitments ?consensus_committee_size ?consensus_threshold ?nonce_revelation_threshold ?dal ?adaptive_issuance + ?allow_tz4_delegate_enable () in let* () = diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.mli b/src/proto_alpha/lib_protocol/test/helpers/block.mli index 147a49f93e19..7a5c055f24a2 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/block.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/block.mli @@ -149,6 +149,7 @@ val genesis : ?nonce_revelation_threshold:int32 -> ?dal:Constants.Parametric.dal -> ?adaptive_issuance:Constants.Parametric.adaptive_issuance -> + ?allow_tz4_delegate_enable:bool -> Parameters.bootstrap_account list -> block tzresult Lwt.t @@ -429,6 +430,7 @@ val prepare_initial_context_params : ?dal:Constants.Parametric.dal -> ?adaptive_issuance:Constants.Parametric.adaptive_issuance -> ?consensus_rights_delay:int -> + ?allow_tz4_delegate_enable:bool -> unit -> ( Constants.Parametric.t * Block_header.shell_header * Block_hash.t, tztrace ) diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.ml b/src/proto_alpha/lib_protocol/test/helpers/context.ml index 3d8b29d8b997..c79eeb513f27 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/context.ml @@ -702,7 +702,7 @@ let init_gen tup ?rng_state ?commitments ?bootstrap_balances ?cycles_per_voting_period ?sc_rollup_arith_pvm_enable ?sc_rollup_private_enable ?sc_rollup_riscv_pvm_enable ?dal_enable ?zk_rollup_enable ?hard_gas_limit_per_block ?nonce_revelation_threshold ?dal - ?adaptive_issuance () = + ?adaptive_issuance ?allow_tz4_delegate_enable () = let open Lwt_result_syntax in let n = tup_n tup in let*? accounts = Account.generate_accounts ?rng_state n in @@ -738,6 +738,7 @@ let init_gen tup ?rng_state ?commitments ?bootstrap_balances ?nonce_revelation_threshold ?dal ?adaptive_issuance + ?allow_tz4_delegate_enable bootstrap_accounts in (blk, tup_get tup contracts) diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.mli b/src/proto_alpha/lib_protocol/test/helpers/context.mli index 6fe83b81197a..1f1bafbd92ef 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/context.mli @@ -390,6 +390,7 @@ type 'accounts init := ?nonce_revelation_threshold:int32 -> ?dal:Constants.Parametric.dal -> ?adaptive_issuance:Constants.Parametric.adaptive_issuance -> + ?allow_tz4_delegate_enable:bool -> unit -> (Block.t * 'accounts) tzresult Lwt.t -- GitLab From 832662bef2e5dffccfba218b53ecd15b0ba86808 Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Wed, 16 Oct 2024 16:01:37 +0200 Subject: [PATCH 3/5] alpha: adapt test to allow tz4 delegates under feature flag --- .../consensus/test_consensus_key.ml | 58 ++++++++++++------- .../integration/consensus/test_delegation.ml | 57 +++++++++++------- tezt/tests/baker_test.ml | 42 +++++++++++++- tezt/tests/client_commands.ml | 43 +++++++++++++- tezt/tests/consensus_key.ml | 24 ++++++-- 5 files changed, 171 insertions(+), 53 deletions(-) diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_consensus_key.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_consensus_key.ml index 3ad5669cbaf8..8e96e3575cbd 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_consensus_key.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_consensus_key.ml @@ -208,9 +208,11 @@ let test_drain_empty_delegate ~exclude_ck () = "Drain delegate without enough balance for allocation burn or drain \ fees") -let test_tz4_consensus_key () = +let test_tz4_consensus_key ~allow_tz4_delegate_enable () = let open Lwt_result_syntax in - let* genesis, contracts = Context.init_with_constants1 constants in + let* genesis, contracts = + Context.init_with_constants1 {constants with allow_tz4_delegate_enable} + in let account1_pkh = Context.Contract.pkh contracts in let consensus_account = Account.new_account ~algo:Bls () in let delegate = account1_pkh in @@ -223,26 +225,31 @@ let test_tz4_consensus_key () = Op.update_consensus_key (B blk') (Contract.Implicit delegate) consensus_pk in let tz4_pk = match consensus_pk with Bls pk -> pk | _ -> assert false in - let expect_failure = function - | [ - Environment.Ecoproto_error - (Delegate_consensus_key.Invalid_consensus_key_update_tz4 pk); - ] - when Signature.Bls.Public_key.(pk = tz4_pk) -> - return_unit - | err -> - failwith - "Error trace:@,\ - \ %a does not match the \ - [Delegate_consensus_key.Invalid_consensus_key_update_tz4] error" - Error_monad.pp_print_trace - err - in let* inc = Incremental.begin_construction blk' in - let* (_i : Incremental.t) = - Incremental.validate_operation ~expect_failure inc operation - in - return_unit + if allow_tz4_delegate_enable then + let* (_i : Incremental.t) = Incremental.validate_operation inc operation in + return_unit + else + let expect_failure = function + | [ + Environment.Ecoproto_error + (Delegate_consensus_key.Invalid_consensus_key_update_tz4 pk); + ] + when Signature.Bls.Public_key.(pk = tz4_pk) -> + return_unit + | err -> + failwith + "Error trace:@,\ + \ %a does not match the \ + [Delegate_consensus_key.Invalid_consensus_key_update_tz4] error" + Error_monad.pp_print_trace + err + in + let* inc = Incremental.begin_construction blk' in + let* (_i : Incremental.t) = + Incremental.validate_operation ~expect_failure inc operation + in + return_unit let test_attestation_with_consensus_key () = let open Lwt_result_syntax in @@ -336,7 +343,14 @@ let tests = "empty drain delegate with ck" `Quick (test_drain_empty_delegate ~exclude_ck:false); - tztest "tz4 consensus key" `Quick test_tz4_consensus_key; + tztest + "tz4 consensus key (allow_tz4_delegate_enable:false)" + `Quick + (test_tz4_consensus_key ~allow_tz4_delegate_enable:false); + tztest + "tz4 consensus key (allow_tz4_delegate_enable:true)" + `Quick + (test_tz4_consensus_key ~allow_tz4_delegate_enable:true); tztest "attestation with ck" `Quick test_attestation_with_consensus_key; ] diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml index 08fc71a00728..99ad97cf9684 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml @@ -1549,9 +1549,11 @@ let test_registered_self_delegate_key_init_delegation () = let* () = Assert.equal_pkh ~loc:__LOC__ delegate delegate_pkh in return_unit -let test_bls_account_cannot_self_delegate () = +let test_bls_account_self_delegate ~allow_tz4_delegate_enable () = let open Lwt_result_syntax in - let* b, bootstrap = Context.init1 ~consensus_threshold:0 () in + let* b, bootstrap = + Context.init1 ~consensus_threshold:0 ~allow_tz4_delegate_enable () + in let {Account.pkh = tz4_pkh; pk = tz4_pk; _} = Account.new_account ~algo:Bls () in @@ -1570,29 +1572,32 @@ let test_bls_account_cannot_self_delegate () = let* operation = Op.delegation (B b) tz4_contract (Some tz4_pkh) in let* inc = Incremental.begin_construction b in let tz4_pkh = match tz4_pkh with Bls pkh -> pkh | _ -> assert false in - let expect_failure = function - | [ - Environment.Ecoproto_error - (Contract_delegate_storage.Forbidden_tz4_delegate pkh); - ] - when Signature.Bls.Public_key_hash.(pkh = tz4_pkh) -> - return_unit - | err -> - failwith - "Error trace:@,\ - %a does not match the \ - [Contract_delegate_storage.Forbidden_tz4_delegate] error" - Error_monad.pp_print_trace - err - in - let* (_i : Incremental.t) = - Incremental.validate_operation ~expect_failure inc operation - in - return_unit + if allow_tz4_delegate_enable then + let* (_i : Incremental.t) = Incremental.validate_operation inc operation in + return_unit + else + let expect_failure = function + | [ + Environment.Ecoproto_error + (Contract_delegate_storage.Forbidden_tz4_delegate pkh); + ] + when Signature.Bls.Public_key_hash.(pkh = tz4_pkh) -> + return_unit + | err -> + failwith + "Error trace:@,\ + %a does not match the \ + [Contract_delegate_storage.Forbidden_tz4_delegate] error" + Error_monad.pp_print_trace + err + in + let* (_i : Incremental.t) = + Incremental.validate_operation ~expect_failure inc operation + in + return_unit let tests_delegate_registration = [ - Tztest.tztest "TEST" `Quick test_bls_account_cannot_self_delegate; (*** unregistered delegate key: no self-delegation ***) (* no token transfer, no self-delegation *) Tztest.tztest @@ -1757,6 +1762,10 @@ let tests_delegate_registration = 1μꜩ" `Quick (test_emptying_delegated_implicit_contract_fails Tez.one_mutez); + Tztest.tztest + "failed BLS self delegation (allow_tz4_delegate_enable:false)" + `Quick + (test_bls_account_self_delegate ~allow_tz4_delegate_enable:false); (*** valid registration ***) (* valid registration: credit 1 μꜩ, self delegation *) Tztest.tztest @@ -1792,6 +1801,10 @@ let tests_delegate_registration = "double registration when delegate account is emptied and then recredited" `Quick test_double_registration_when_recredited; + Tztest.tztest + "valid BLS self delegation (allow_tz4_delegate_enable:true)" + `Quick + (test_bls_account_self_delegate ~allow_tz4_delegate_enable:true); ] (******************************************************************************) diff --git a/tezt/tests/baker_test.ml b/tezt/tests/baker_test.ml index 21e55e926261..3afde636c3b3 100644 --- a/tezt/tests/baker_test.ml +++ b/tezt/tests/baker_test.ml @@ -208,11 +208,12 @@ let baker_stresstest_apply = let* () = Client.stresstest ~tps:25 ~transfers:100 client in unit -let baker_bls_test = +let no_bls_baker_test = Protocol.register_test ~__FILE__ ~title:"No BLS baker test" ~tags:[team; "node"; "baker"; "bls"] + ~supports:Protocol.(Until_protocol (number Quebec)) @@ fun protocol -> let* client0 = Client.init_mockup ~protocol () in Log.info "Generate BLS keys for client" ; @@ -246,6 +247,42 @@ let baker_bls_test = in Process.check_error activate_process ~exit_code:1 ~msg +let bls_baker_test = + Protocol.register_test + ~__FILE__ + ~title:"BLS baker test" + ~tags:[team; "node"; "baker"; "bls"] + ~supports:Protocol.(From_protocol (number Quebec + 1)) + @@ fun protocol -> + let* client0 = Client.init_mockup ~protocol () in + Log.info "Generate BLS keys for client" ; + let* keys = + Lwt_list.map_s + (fun i -> + Client.gen_and_show_keys + ~alias:(sf "bootstrap_bls_%d" i) + ~sig_alg:"bls" + client0) + (Base.range 1 5) + in + let* parameter_file = + Protocol.write_parameter_file + ~bootstrap_accounts:(List.map (fun k -> (k, None)) keys) + ~base:(Right (protocol, None)) + [(["allow_tz4_delegate_enable"], `Bool true)] + in + let* _node, client = + Client.init_with_node ~keys:(Constant.activator :: keys) `Client () + in + let activate_process = + Client.spawn_activate_protocol + ~protocol + ~timestamp:Now + ~parameter_file + client + in + Process.check activate_process + let baker_remote_test = Protocol.register_test ~__FILE__ @@ -414,7 +451,8 @@ let register ~protocols = baker_reward_test protocols ; baker_stresstest protocols ; baker_stresstest_apply protocols ; - baker_bls_test protocols ; + bls_baker_test protocols ; + no_bls_baker_test protocols ; baker_remote_test protocols ; baker_check_consensus_branch protocols ; force_apply_from_round protocols diff --git a/tezt/tests/client_commands.ml b/tezt/tests/client_commands.ml index 6a41ca510ae6..b281acfb7c44 100644 --- a/tezt/tests/client_commands.ml +++ b/tezt/tests/client_commands.ml @@ -479,7 +479,19 @@ module Transfer = struct ~title:"Set delegate forbidden on tz4" ~tags:[team; "client"; "set_delegate"; "bls"; "tz4"] @@ fun protocol -> - let* _node, client = Client.init_with_protocol `Client ~protocol () in + let* parameter_file = + if Protocol.(number protocol > number Quebec) then + let* parameter_file = + Protocol.write_parameter_file + ~base:(Right (protocol, None)) + [(["allow_tz4_delegate_enable"], `Bool false)] + in + return (Some parameter_file) + else return None + in + let* _node, client = + Client.init_with_protocol `Client ?parameter_file ~protocol () + in let* () = let Account.{alias; secret_key; _} = Constant.tz4_account in Client.import_secret_key client ~alias secret_key @@ -496,6 +508,34 @@ module Transfer = struct in Process.check_error set_delegate_process ~exit_code:1 ~msg + let allowed_set_delegate_tz4 = + Protocol.register_test + ~__FILE__ + ~title:"Set delegate allowed on tz4" + ~tags:[team; "client"; "set_delegate"; "bls"; "tz4"] + ~supports:Protocol.(From_protocol (number Quebec + 1)) + @@ fun protocol -> + let* parameter_file = + Protocol.write_parameter_file + ~base:(Right (protocol, None)) + [(["allow_tz4_delegate_enable"], `Bool true)] + in + let* _node, client = + Client.init_with_protocol `Client ~parameter_file ~protocol () + in + let* () = + let Account.{alias; secret_key; _} = Constant.tz4_account in + Client.import_secret_key client ~alias secret_key + in + let* () = airdrop_and_reveal client [Constant.tz4_account] in + let*? set_delegate_process = + Client.set_delegate + client + ~src:Constant.tz4_account.public_key_hash + ~delegate:Constant.tz4_account.public_key_hash + in + Process.check set_delegate_process + let balance_too_low = Protocol.register_test ~__FILE__ @@ -652,6 +692,7 @@ module Transfer = struct transfer_tz4 protocols ; batch_transfers_tz4 protocols ; forbidden_set_delegate_tz4 protocols ; + allowed_set_delegate_tz4 protocols ; balance_too_low protocols ; transfers_bootstraps5_bootstrap1 protocols ; safety_guard protocols diff --git a/tezt/tests/consensus_key.ml b/tezt/tests/consensus_key.ml index 74cee2bf2cd0..9822e25f3829 100644 --- a/tezt/tests/consensus_key.ml +++ b/tezt/tests/consensus_key.ml @@ -100,6 +100,10 @@ let test_update_consensus_key = (["cache_stake_distribution_cycles"], `Int (consensus_rights_delay + 3)); (["adaptive_issuance_force_activation"], `Bool true); ] + @ + if Protocol.(number protocol > number Quebec) then + [(["allow_tz4_delegate_enable"], `Bool true)] + else [] in let* parameter_file = Protocol.write_parameter_file ~base:(Right (protocol, None)) parameters @@ -166,13 +170,21 @@ let test_update_consensus_key = ~pk:Constant.bootstrap1.alias client in - Log.info "Invalid update: changing the consensus key to a BLS key." ; let* () = - Client.update_consensus_key - ~expect_failure:true - ~src:Constant.bootstrap1.alias - ~pk:key_bls.alias - client + if Protocol.(number protocol > number Quebec) then ( + Log.info "Valid update: changing the consensus key to a BLS key." ; + Client.update_consensus_key + ~expect_failure:false + ~src:Constant.bootstrap5.alias + ~pk:key_bls.alias + client) + else ( + Log.info "Invalid update: changing the consensus key to a BLS key." ; + Client.update_consensus_key + ~expect_failure:true + ~src:Constant.bootstrap1.alias + ~pk:key_bls.alias + client) in Log.info "Trying a valid consensus key update." ; -- GitLab From 81df7776b08bc2c85d0df00dec37909c9e92d80d Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Mon, 21 Oct 2024 17:58:18 +0200 Subject: [PATCH 4/5] alpha: in sandbox set the allow_tz4_delegate_enable to true --- src/proto_alpha/lib_parameters/default_parameters.ml | 1 + ...Alpha- (mode client) RPC regression tests- misc_protocol.out | 2 +- .../Alpha- (mode light) RPC regression tests- misc_protocol.out | 2 +- .../Alpha- (mode proxy) RPC regression tests- misc_protocol.out | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index 6689c08be0ef..28d6f9df0a0a 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -355,6 +355,7 @@ let constants_sandbox = max_slashing_threshold; limit_of_delegation_over_baking = 19; max_operations_time_to_live = 8; + allow_tz4_delegate_enable = true; } let constants_test = 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 970ed0caadd9..f21211f47378 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 @@ -78,7 +78,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": false } + "allow_tz4_delegate_enable": true } ./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 7f261bd69435..771c36d672d3 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 @@ -78,7 +78,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": false } + "allow_tz4_delegate_enable": true } ./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 9885c93051ce..44bd9223dd0c 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 @@ -78,7 +78,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": false } + "allow_tz4_delegate_enable": true } ./octez-client --mode proxy rpc get /chains/main/blocks/head/helpers/baking_rights [ { "level": 2, "delegate": "[PUBLIC_KEY_HASH]", -- GitLab From 4349fa7b10e4df1500e20cf0fe3dc2f4cf26cb81 Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Tue, 15 Oct 2024 15:24:27 +0200 Subject: [PATCH 5/5] change: introduce entry for Tz4 addresses allowed as delegates --- CHANGES.rst | 3 +++ docs/protocols/alpha.rst | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 945e751b8b6f..46ee6371c833 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -39,6 +39,9 @@ Node Client ------ +- Allow tz4 (BLS) addresses to be registered as delegate and or as consensus + keys. (MR :gl:`!15302`) + Baker ----- diff --git a/docs/protocols/alpha.rst b/docs/protocols/alpha.rst index bd0f296b6097..d7374e42e861 100644 --- a/docs/protocols/alpha.rst +++ b/docs/protocols/alpha.rst @@ -45,6 +45,9 @@ Operation receipts Errors ------ +- tz4 (BLS) addresses are not forbidden to be registered as delegate and or as + consensus keys if the ``allow_tz4_delegate_enable`` feature flag is set. (MR + :gl:`!15302`) Protocol parameters ------------------- -- GitLab