diff --git a/charts/tezos/values.yaml b/charts/tezos/values.yaml index 771a7753a..0cb34316c 100644 --- a/charts/tezos/values.yaml +++ b/charts/tezos/values.yaml @@ -466,6 +466,9 @@ expected_proof_of_work: 26 # # The name of the account who's public key will be set downstream in # # config.json at `network.genesis_parameters.values.genesis_pubkey`. # activation_account_name: baker0 +# # if activation account is on a remote signer requiring authorization, +# # put authorized key account here +# activation_account_authorized_key: authorizedKey0 # ## To join a public network you may set `chain_name` in one of two ways: ## - Specify the name of the network which must be recognized by the diff --git a/utils/config-generator.py b/utils/config-generator.py index b02a2912c..8706641c7 100755 --- a/utils/config-generator.py +++ b/utils/config-generator.py @@ -210,20 +210,6 @@ def verify_this_bakers_account(accounts): # public key hash as a side-effect. These are used later. -def authorized_key_for(account_name): - """ - If `account_name` has a remote signer and this remote signer - requires an authorized key, returns it. - """ - for signer_val in OCTEZ_SIGNERS.values(): - if account_name in signer_val["accounts"]: - return ( - signer_val["authorized_keys"][0] - if signer_val["authorized_keys"] - else None - ) - return - def expose_secret_key(account_name): """ @@ -235,10 +221,9 @@ def expose_secret_key(account_name): as is the case in Octez client's "secret_keys" file. """ if MY_POD_TYPE == "activating": - activation_account = NETWORK_CONFIG["activation_account_name"] return account_name in [ - activation_account, - authorized_key_for(activation_account), + NETWORK_CONFIG["activation_account_name"], + NETWORK_CONFIG["activation_account_authorized_key"] ] if MY_POD_TYPE == "signing": @@ -251,9 +236,9 @@ def expose_secret_key(account_name): return account_name == os.environ["INJECTOR_ACCOUNT"] if MY_POD_TYPE in ["node", "baker"]: - for baking_account in MY_POD_CONFIG.get("bake_using_accounts", {}): - if account_name in [baking_account, authorized_key_for(baking_account)]: - return True + if account_name in MY_POD_CONFIG.get("authorized_keys", {}): + return True + return account_name in MY_POD_CONFIG.get("bake_using_accounts", {}) def get_accounts_signer(signers, account_name):