From 2d3a57b29f5bd3356ea839c3c9aa6f395990ba5f Mon Sep 17 00:00:00 2001 From: Nicolas Ochem Date: Fri, 17 Nov 2023 20:37:18 -0800 Subject: [PATCH 1/2] when snapshots can't be found for version, pick a random version Right now there are no v18 snapshots on xtz-shots, so it's not possible to kickstart a node. This PR will pick the v17 snapshot instead. --- utils/config-generator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/config-generator.py b/utils/config-generator.py index 46f403c5a..81e6424af 100755 --- a/utils/config-generator.py +++ b/utils/config-generator.py @@ -762,11 +762,14 @@ def create_node_snapshot_config_json(history_mode): and s.get("chain_name") == network_name ] if octez_version: - matching_snapshots = [ + version_matching_snapshots = [ s for s in matching_snapshots if int(octez_version) == s.get("tezos_version").get("version").get("major") ] + if len(version_matching_snapshots): + # If we can't find snapshots of the right octez version, we just pick the most recent available. + matching_snapshots = version_matching_snapshots matching_snapshots = sorted(matching_snapshots, key=lambda s: s.get("block_height")) return matching_snapshots[-1] if len(matching_snapshots) else None From dc6935929d917a02c2fb540dd2073cc0f51a6ab5 Mon Sep 17 00:00:00 2001 From: Nicolas Ochem Date: Fri, 17 Nov 2023 20:46:32 -0800 Subject: [PATCH 2/2] fix black --- mkchain/tqchain/mkchain.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mkchain/tqchain/mkchain.py b/mkchain/tqchain/mkchain.py index f54b19ffe..bceb52efd 100644 --- a/mkchain/tqchain/mkchain.py +++ b/mkchain/tqchain/mkchain.py @@ -250,7 +250,9 @@ def main(): for key_type in keys: accounts[key_type][account] = { "key": keys[key_type], - "is_bootstrap_baker_account": False if account == "authorized-key-0" else True, + "is_bootstrap_baker_account": False + if account == "authorized-key-0" + else True, "bootstrap_balance": "4000000000000", }