Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/olympia end state api changes #51

Merged
merged 4 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ jobs:
echo "PATH=$PWD"
./babylonnode systemd config -m CORE \
-n 13 \
-t radix://node_tdx_d_1qwq2nfe6vxqwe3mqmfm9l2xl97as7lkwndval63cymvc3qszn8nqx6g2s3m@3.109.161.178 \
-t radix://node_tdx_e_1q0gm3fwqh8ggl09g7l8ru96krzlxdyrc694mqw8cf227v62vjyrmccv8md5@13.126.65.118 \
-i 35.178.142.54 \
-v "not_a_real_validator_address" \
-k $KEYSTORE_PASSWORD -nk -a \
Expand Down
2 changes: 1 addition & 1 deletion node-runner-cli/commands/dockercommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def dockercommand(dockercommand_args=[], parent=docker_parser):
default=""),
argument("-t", "--trustednode",
help="Trusted node on radix network."
"Example format: 'radix://node_tdx_d_1qwq2nfe6vxqwe3mqmfm9l2xl97as7lkwndval63cymvc3qszn8nqx6g2s3m@3.109.161.178'."
"Example format: 'radix://node_tdx_e_1q0gm3fwqh8ggl09g7l8ru96krzlxdyrc694mqw8cf227v62vjyrmccv8md5@13.126.65.118'."
"This is required only if you are creating config to run a CORE node and "
"if not provided you will be prompted to enter a value",
default="",
Expand Down
4 changes: 2 additions & 2 deletions node-runner-cli/release_ymls/radix-fullnode-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
RADIXDLT_TRANSACTIONS_API_ENABLE: 'false'
RADIXDLT_VALIDATOR_KEY_LOCATION: /home/radixdlt/node-keystore.ks
RADIX_NODE_KEYSTORE_PASSWORD: "${RADIXDLT_NODE_KEY_PASSWORD}"
image: radixdlt/babylon-node:rcnet-v2-phase2-r4
image: radixdlt/babylon-node:rcnet-v3-r2
init: true
mem_limit: 12000m
restart: unless-stopped
Expand All @@ -30,7 +30,7 @@ services:
volumes:
- babylon_ledger:/home/radixdlt/RADIXDB
- /home/radixdlt/babylon-node-config/node-keystore.ks:/home/radixdlt/node-keystore.ks
- /home/radixdlt/ansharnet_genesis_data_file.bin:/home/radixdlt/genesis_data_file.bin
- /home/radixdlt/zabanet_genesis_data_file.bin:/home/radixdlt/genesis_data_file.bin
nginx:
environment:
RADIXDLT_GATEWAY_API_ENABLE: 'true'
Expand Down
6 changes: 3 additions & 3 deletions node-runner-cli/templates/radix-fullnode-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ services:
{% if migration.use_olympia is defined %}
{% if migration.use_olympia %}
RADIXDLT_GENESIS_USE_OLYMPIA: '{{migration.use_olympia}}'
RADIXDLT_GENESIS_OLYMPIA_NODE_CORE_API_URL: '{{migration.olympia_node_url}}'
RADIXDLT_GENESIS_OLYMPIA_NODE_CORE_API_AUTH_USER: '{{migration.olympia_node_auth_user}}'
RADIXDLT_GENESIS_OLYMPIA_NODE_CORE_API_AUTH_PASSWORD: '{{migration.olympia_node_auth_password}}'
RADIXDLT_GENESIS_OLYMPIA_NODE_END_STATE_API_URL: '{{migration.olympia_node_url}}'
RADIXDLT_GENESIS_OLYMPIA_NODE_END_STATE_API_AUTH_USER: '{{migration.olympia_node_auth_user}}'
RADIXDLT_GENESIS_OLYMPIA_NODE_END_STATE_API_AUTH_PASSWORD: '{{migration.olympia_node_auth_password}}'
RADIXDLT_GENESIS_OLYMPIA_NODE_BECH32_ADDRESS: '{{migration.olympia_node_bech32_address}}'
{% endif %}
{% endif %}
Expand Down
6 changes: 3 additions & 3 deletions node-runner-cli/templates/systemd-default.config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ consensus.validator_address={{core_node.validator_address}}
{% if migration.use_olympia is defined %}
{% if migration.use_olympia %}
genesis.use_olympia={{migration.use_olympia}}
genesis.olympia.node_core_api_url={{migration.olympia_node_url}}
genesis.olympia.node_core_api_auth_user={{migration.olympia_node_auth_user}}
genesis.olympia.node_core_api_auth_password={{migration.olympia_node_auth_password}}
genesis.olympia.node_end_state_api_url={{migration.olympia_node_url}}
genesis.olympia.node_end_state_api_auth_user={{migration.olympia_node_auth_user}}
genesis.olympia.node_end_state_api_auth_password={{migration.olympia_node_auth_password}}
genesis.olympia.node_bech32_address={{migration.olympia_node_bech32_address}}
{% endif %}
{% endif %}
2 changes: 1 addition & 1 deletion node-runner-cli/test-prompts/core-gateway-all-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- select_network: "13"
- first_time_config: Y
- setup_fullnode: Y
- input_seednode: "radix://node_tdx_d_1qwq2nfe6vxqwe3mqmfm9l2xl97as7lkwndval63cymvc3qszn8nqx6g2s3m@3.109.161.178"
- input_seednode: "radix://node_tdx_e_1q0gm3fwqh8ggl09g7l8ru96krzlxdyrc694mqw8cf227v62vjyrmccv8md5@13.126.65.118"
- have_validator_address: "N"
- have_keystore_file: Y
- input_path_keystore: "/home/runner/babylon-node"
Expand Down
2 changes: 1 addition & 1 deletion node-runner-cli/test-prompts/corenode-01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- select_network: "13"
- first_time_config: Y
- setup_fullnode: Y
- input_seednode: "radix://node_tdx_d_1qwq2nfe6vxqwe3mqmfm9l2xl97as7lkwndval63cymvc3qszn8nqx6g2s3m@3.109.161.178"
- input_seednode: "radix://node_tdx_e_1q0gm3fwqh8ggl09g7l8ru96krzlxdyrc694mqw8cf227v62vjyrmccv8md5@13.126.65.118"
- have_validator_address: "N"
- have_keystore_file: Y
- input_path_keystore: "/home/runner/babylon-node"
Expand Down
2 changes: 1 addition & 1 deletion node-runner-cli/test-prompts/corenode-02.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- first_time_config: N
- have_existing_compose: "/home/runner/docker-compose.yml"
- setup_fullnode: Y
- input_seednode: "radix://node_tdx_d_1qwq2nfe6vxqwe3mqmfm9l2xl97as7lkwndval63cymvc3qszn8nqx6g2s3m@3.109.161.178"
- input_seednode: "radix://node_tdx_e_1q0gm3fwqh8ggl09g7l8ru96krzlxdyrc694mqw8cf227v62vjyrmccv8md5@13.126.65.118"
- have_validator_address: "N"
- have_keystore_file: N
- input_path_keystore: "/home/runner/babylon-node"
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions node-runner-cli/tests/fixtures/config-gateway-docker.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
common_config:
docker_compose: /home/radixdlt/docker-compose.yml
genesis_bin_data_file: /home/radixdlt/ansharnet_genesis_data_file.bin
genesis_bin_data_file: /home/radixdlt/zabanet_genesis_data_file.bin
network_id: 13
network_name: ansharnet
network_name: zabanet
nginx_settings:
enable_transaction_api: 'true'
gateway_behind_auth: 'true'
Expand All @@ -26,7 +26,7 @@ core_node:
keystore_password: radix
nodetype: fullnode
repo: radixdlt/babylon-node
trusted_node: radix://node_tdx_d_1qwq2nfe6vxqwe3mqmfm9l2xl97as7lkwndval63cymvc3qszn8nqx6g2s3m@3.109.161.178
trusted_node: radix://node_tdx_e_1q0gm3fwqh8ggl09g7l8ru96krzlxdyrc694mqw8cf227v62vjyrmccv8md5@13.126.65.118
validator_address: ''
gateway:
data_aggregator:
Expand Down
4 changes: 2 additions & 2 deletions node-runner-cli/tests/fixtures/gateway-docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
GatewayApi__Endpoint__GatewayApiVersion: rcnet-v2-phase2-r4
# GatewayApi__MaxWaitForDbOnStartupMs: "90" # Wait for PostGres to boot up
GatewayApi__Network__DisableCoreApiHttpsCertificateChecks: "true"
GatewayApi__Network__NetworkName: "ansharnet"
GatewayApi__Network__NetworkName: "zabanet"
GatewayApi__Network__CoreApiNodes__0__Name: "CoreNode"
GatewayApi__Network__CoreApiNodes__0__CoreApiAddress: "https://host.docker.internal:443/core"
GatewayApi__Network__CoreApiNodes__0__CoreApiAuthorizationHeader: "Basic YWRtaW46cmFkaXg="
Expand All @@ -42,7 +42,7 @@ services:
PrometheusMetricsPort: "1234"
DataAggregator__Network__MaxWaitForDbOnStartupMs: "1000"
DataAggregator__Network__DisableCoreApiHttpsCertificateChecks: "true"
DataAggregator__Network__NetworkName: "ansharnet"
DataAggregator__Network__NetworkName: "zabanet"
DataAggregator__Network__CoreApiNodes__0__Name: "CoreNode"
DataAggregator__Network__CoreApiNodes__0__CoreApiAddress: "https://host.docker.internal:443/core"
DataAggregator__Network__CoreApiNodes__0__CoreApiAuthorizationHeader: "Basic YWRtaW46cmFkaXg="
Expand Down
4 changes: 2 additions & 2 deletions node-runner-cli/tests/test_gateway_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def setUpClass(cls):
cls.fixture.gateway.data_aggregator.coreApiNode = cls.fixture.gateway.gateway_api.coreApiNode
# cls.fixture.gateway.data_aggregator.release = "testrelease"
# cls.fixture.gateway.data_aggregator.repo = "radixdlt/gateway-test-dummy"
cls.fixture.gateway.data_aggregator.NetworkName = "ansharnet"
cls.fixture.gateway.data_aggregator.NetworkName = "zabanet"

# cls.fixture.gateway.database_migration.release = "testrelease"
# cls.fixture.gateway.database_migration.repo = "radixdlt/gateway-test-dummy"
Expand Down Expand Up @@ -173,7 +173,7 @@ def test_setup_gateway_compose_file_fixture_test(self, mockout):
self.assertEqual("postgres", config.gateway.postgres_db.password)

# Have to manually set this because we skipped systemd setup
config.common_config.network_name = "ansharnet"
config.common_config.network_name = "zabanet"
config.gateway.enabled = True

self.expect_ask_gateway_inputs_get_inserted_into_object(config, questionary_keyboard_input)
Expand Down
11 changes: 6 additions & 5 deletions node-runner-cli/utils/Network.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_network_id() -> int:
Helpers.section_headline(f"Network connection")
# TODO change this for rcnet launch
network_prompt = Helpers.input_guestion(
"Enter the network_id. The network id for the most recent network (ansharnet / rcnet-v2 phase 2) is 13:",
"Enter the network_id. The network id for the most recent network (Zabanet / rcnet-v3 ) is 14:",
QuestionKeys.select_network)
network_id = Network.validate_network_id(network_prompt)
return network_id
Expand All @@ -34,11 +34,11 @@ def validate_network_id(network_prompt: str) -> int:

@staticmethod
def path_to_genesis_binary(network_id: int) -> str:
if network_id not in [1, 2] and network_id == 13:
if os.path.exists("ansharnet_genesis_data_file.bin"):
run_shell_command('sudo rm ansharnet_genesis_data_file.bin', shell=True)
if network_id not in [1, 2] and network_id == 14:
if os.path.exists("zabanet_genesis_data_file.bin"):
run_shell_command('sudo rm zabanet_genesis_data_file.bin', shell=True)
genesis_bin_file = GenesisConfig.copy_genesis_file(
"ansharnet_genesis_data_file.bin")
"zabanet_genesis_data_file.bin")
else:
genesis_bin_file = None

Expand All @@ -53,6 +53,7 @@ def get_network_id_names() -> dict:
11: "nebunet",
12: "kisharnet",
13: "ansharnet",
14: "zabanet",
32: "gilganet",
33: "enkinet",
34: "hammunet",
Expand Down
4 changes: 2 additions & 2 deletions node-runner-cli/utils/Prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ def ask_keyfile_name() -> str:
@staticmethod
def ask_trusted_node() -> str:
Helpers.section_headline("Trusted node settings")
default_trusted_nodes = "radix://node_tdx_d_1qwq2nfe6vxqwe3mqmfm9l2xl97as7lkwndval63cymvc3qszn8nqx6g2s3m@3.109.161.178"
default_trusted_nodes = "radix://node_tdx_e_1q0gm3fwqh8ggl09g7l8ru96krzlxdyrc694mqw8cf227v62vjyrmccv8md5@13.126.65.118"
value = Helpers.input_guestion(f"Fullnode requires another node to connect to network. "
# "\nTo connect to MAINNET or STOKENET details on these node can be found here "
# "- https://docs.radixdlt.com/main/node-and-gateway/seed-nodes.html"
"\nType in the node you want to connect to in format radix://<node-peer-2-peer-address>@<ip>"
"\n OR press Enter to accept defaults for ansharnet (rcnet-v2 phase 2):",
"\n OR press Enter to accept defaults for Zabanet (rcnet-v3):",
QuestionKeys.input_seednode)
trustednode = Prompts.check_default(value, default_trusted_nodes)
Helpers.parse_trustednode(trustednode)
Expand Down