From 9f3c6c8923a5bb2ab98b54fb12f76a77c1552f6e Mon Sep 17 00:00:00 2001 From: stephen Date: Tue, 14 Nov 2023 15:21:48 +0000 Subject: [PATCH 1/5] New version of constant.xml derived from what is in production Matching localdev.py that edits constants.xml locally to make the code work for localdev --- constants.xml | 925 ++++++++++++++++++++++---------------------- scripts/localdev.py | 34 +- 2 files changed, 491 insertions(+), 468 deletions(-) diff --git a/constants.xml b/constants.xml index 9eae455481..aaef7d6b7f 100644 --- a/constants.xml +++ b/constants.xml @@ -1,450 +1,465 @@ - - 4 - false - false - 25 - 1 - 3 - - 03B70CF2ABEAE4E86DAEF1A36243E44CD61138B89055099C0D220B58FB86FF588A - - . - 250000 - true - 200 - false - 0 - 15 - 15360 - true - - - 1 - 1 - 2 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - - - false - false - true - 5 - 100000 - 5 - 10 - false - 33135 - 20 - 2 - - - - txn - 27017 - false - - 1000 - 10000 - - - 0.667 - 10 - 10 - 20 - 2 - 1 - 80 - 1000 - - - true - 10 - 10 - 3 - 5 - 5 - 10 - 5 - - - false - 1 - - - - 2000 - 10 - 2000 - 3000 - 500 - 180 - 2 - 500 - 60 - 150 - 5 - 6000 - 7000 - 55 - 5 - 3 - 5 - 5 - 10 - 3 - 3 - 12 - 10 - 1 - - - 21000 - 500000 - 400000 - 50 - 10 - 50 - 80 - 10 - 70 - 2000000000 - 2 - 10 - 5 - 15 - 10 - 5 - 127.0.0.1 - - - false - false - true - - 2 - 3 - 6 - - 10 - 10 - 1000 - 0 - 18 - true - true - - - - 0 - - 128 - 8192 - 0 - - - 128 - 8192 - 2 - 4 - - - - false - false - - 300 - 0.334 - 200 - - - 10 - - - - 4201 - 5 - - 4301 - 127.0.0.1 - true - /tmp/zilliqa.sock - /tmp/scilla-server.sock - scilla-server - false - 4401 - - false - 4501 - false - 2500 - 3 - 1000 - true - - 60 - - 0 - true - /usr/local/bin/evm-ds - /tmp/evm-server.sock - /usr/local/etc/log4rs.yml - - 1000000 - - 59 - - true - - true - - - - 200 - 4 - - 0.05 - + 03B70CF2ABEAE4E86DAEF1A36243E44CD61138B89055099C0D220B58FB86FF588A + + . + 250000 + true + 200 + false + 0 + 15 + 15360 + false + + + 1 + 1 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + false + false + true + 5 + 100000 + 10 + 10 + false + 33135 + 20 + 2 + + + + txn + 27017 + false + + 1000 + 10000 + + + 0.667 + 50 + 10 + 20 + 2 + 1 + 69 + 50 + 9422 + + + true + 10 + 11 + 4 + 5 + 5 + 10 + 5 + + + false + 1 + + + + 2000 + 10 + 7000 + 3000 + 3000 + 96 + 45 + 90 + 60 + 90 + 5 + 6000 + 7000 + 55 + 6000 + 10 + 3 + 5 + 5 + 10 + 3 + 3 + 12 + 10 + 1 + 10 + 7000 + + + 21000 + 200000 + 150000 + 50 + 10 + 50 + 80 + 10 + 70 + 2000000000 + 2 + 10 + 5 + 15 + 10 + 5 + 127.0.0.1 + + + true + true + true + + 2 + 3 + 6 + + 10 + 5 + 1000 + 0 + 300 + true + true + + + + 0 + + 128 + 8192 + 0 + + + 128 + 8192 + 2 + 4 + + + + true + true + + 300 + 0.334 + 200 + + + 10 + + + + 4201 + 5 + + 4301 + 127.0.0.1 + true + /tmp/zilliqa.sock + /tmp/scilla-server.sock + scilla-server + true + 4401 + + false + 4501 + true + 2500 + 3 + 100 + true + + 1 + + 0 + true + /usr/local/bin/evm-ds + /tmp/evm-server.sock + /usr/local/etc/log4rs.yml + + 1000000 + + 59 + + true + + true + 64 + 65536 + + + 600 + 10 + + 0.05 + - 3 - - 50 - 10 - 10 - 30 - - - 60 - 600 - 3 - 600 - 200 - 3 - 128 - 1 - 128 - 5000000 - 0 - 10000000 - 5 - 100 - 20 - 5 - 5 - - - true - false - false - http://127.0.0.1:4202/api - 15000 - 5 - - 5 - - false - 4202 - 5 - 3 - 8 - 32 - 2 - 50 - - 99 - - 5 - 4 - - 1800 - - 1900 - 4 - 5 - - 120 - 10 - 2 - 3 - 360 - 5 - false - - - - 0 - 40 - 5 - true - 30 - 5 - false - 1 - 2 - 5 - 1 - - - true - /scilla - bin/scilla-checker - bin/scilla-runner - scilla_files - _build - src/stdlib - init.json - input_state.json - input_blockchain.json - input_message.json - output.json - input - .scilla - .scillib - scilla_libs - true - false - false - 1500 - 10 - - - false - 100 - false - false - 0 - 0 - - - - - 0xb73DA094d60aa93AC4fA8Ae41Df5d8c13925b0BD - true - 1668 - 4726 - 8400000000000000000000 - 204000000000000000 - 12600000000000000000000 - 20 - 40 - 76800 - 20 - 100 - 300 - 3600 - 50 - 0 - 1 - 1572864 - 1024 - 2000000 - true - 0 - 10 - 5 - xxxxxxxxxxx - txnsbackup - false - false - 0.000001 - 3 - - - - localhost - 8090 - PROMETHEUS - 1000 - 500 - https://opentelemetry.io/schemas/1.2.0 - 1.2.0 - NONE - - - - - + 5 + + false + 4202 + 5 + 3 + 8 + 32 + 2 + 100 + + 99 + + 5 + 4 + + 1800 + + 1900 + 4 + 50 + 600 + 120 + 10 + 2 + 3 + 360 + 50 + false + + + + 0 + false + 80 + 5 + true + 30 + 5 + false + 1 + false + false + 5 + 1 + 2 + + + true + /scilla + bin/scilla-checker + bin/scilla-runner + scilla_files + _build + src/stdlib + init.json + input_state.json + input_blockchain.json + input_message.json + output.json + input.scilla + .scilla + .scillib + scilla_libs + true + _fields_map_depth + false + false + + + 0000000000000000000000000000000000000000 + + + 1500 + 10 + + + false + 100 + false + false + 0 + 0 + + false + + + + 0xb73DA094d60aa93AC4fA8Ae41Df5d8c13925b0BD + true + 1668 + 4726 + 8400000000000000000000 + 204000000000000000 + 12600000000000000000000 + 20 + 40 + 500000 + 100 + 100 + 300 + 3600 + 50 + 0 + 1 + 768000 + 1024 + 2000000 + false + 0 + 10 + 5 + xxxxxxxxxxx + txnsbackup + false + false + 0.000001 + 3 + + + + localhost + 8090 + PROMETHEUS + 1000 + 500 + https://opentelemetry.io/schemas/1.2.0 + 1.2.0 + NONE + + + + + - NONE - NONE - - - - - - NONE - - - - - - 175334 - 0 - - - 175637 - 0 - - - 175637 - 1 - - - 175637 - 2 - - - 175701 - 0 - - - 175701 - 1 - - - false - - - 1664279 - 0 - - - - - 10 - 15 - 10 - 600 - - - - - cc02a3c906612cc5bdb087a30e6093c9f0aa04fc - - - - - - ee06b3c906612cc5bdb087a30e6093c9f0aa04fd - - - - - + + + cc02a3c906612cc5bdb087a30e6093c9f0aa04fc + + + + + + ee06b3c906612cc5bdb087a30e6093c9f0aa04fd + + + + + - - - - - - - - - - - - - - - - - - - + diff --git a/scripts/localdev.py b/scripts/localdev.py index ab97caa4ca..c6cf58c113 100755 --- a/scripts/localdev.py +++ b/scripts/localdev.py @@ -750,8 +750,8 @@ def write_testnet_configuration(config, zilliqa_image, testnet_name, isolated_se os.path.join(ZILLIQA_DIR, "constants.xml"), "--image", zilliqa_image, "-n", "7", - "-s", "7", "-d", "7", + "-s", "7", "-l", "1", "--guard", "5/0", "--gentxn", "false", @@ -766,11 +766,11 @@ def write_testnet_configuration(config, zilliqa_image, testnet_name, isolated_se cmd = ["./bootstrap.py", testnet_name, "--clusters", "minikube", "--constants-from-file", os.path.join(ZILLIQA_DIR, "constants.xml"), "--image", zilliqa_image, - "-n", "15", - "-s", "15", - "-d", "15", + "-n", "30", + "-s", "30", + "-d", "30", "-l", "1", - "--guard", "7/0", + "--guard", "17/0", "--gentxn", "false", "--multiplier-fanout", "1", "--host-network", "false", @@ -792,21 +792,30 @@ def write_testnet_configuration(config, zilliqa_image, testnet_name, isolated_se constants_xml_target_path = os.path.join(TESTNET_DIR, f"{testnet_name}/configmap/constants.xml") config_file = xml.dom.minidom.parse(constants_xml_target_path) - if desk: - print("Explicitly disabling all telemetry for desktop testing mode") - xml_replace_element(config_file, config_file.documentElement, "NUM_FINAL_BLOCK_PER_POW", "250") - xml_replace_element(config_file, config_file.documentElement, "DEBUG_LEVEL", "3") xml_replace_element(config_file, config_file.documentElement, "BROADCAST_GOSSIP_MODE", "true") xml_replace_element(config_file, config_file.documentElement, "METRIC_ZILLIQA_HOSTNAME", "0.0.0.0") xml_replace_element(config_file, config_file.documentElement, "METRIC_ZILLIQA_PORT", "8090") - xml_replace_element(config_file, config_file.documentElement, "METRIC_ZILLIQA_PROVIDER", "PROMETHEUS") - xml_replace_element(config_file, config_file.documentElement, "METRIC_ZILLIQA_MASK", "ALL") + xml_replace_element(config_file, config_file.documentElement, "METRIC_ZILLIQA_PROVIDER", "NONE") + xml_replace_element(config_file, config_file.documentElement, "METRIC_ZILLIQA_MASK", "NONE") xml_replace_element_if_exists(config_file, config_file.documentElement, "TRACE_ZILLIQA_HOSTNAME", "tempo.default.svc.cluster.local") xml_replace_element_if_exists(config_file, config_file.documentElement, "TRACE_ZILLIQA_PORT", "4317") xml_replace_element_if_exists(config_file, config_file.documentElement, "TRACE_ZILLIQA_PROVIDER", "NONE") xml_replace_element_if_exists(config_file, config_file.documentElement, "TRACE_ZILLIQA_MASK", "NONE") - xml_replace_element_if_exists(config_file, config_file.documentElement, "COMMIT_WINDOW_IN_SECONDS", "40") + xml_replace_element_if_exists(config_file, config_file.documentElement, "DS_ANNOUNCEMENT_DELAY_IN_MS", "5") + xml_replace_element_if_exists(config_file, config_file.documentElement, "NUM_DS_ELECTION", "2") + xml_replace_element(config_file, config_file.documentElement, "NUM_FINAL_BLOCK_PER_POW", "250") + ''' + xml_replace_element(config_file, config_file.documentElement, "GOSSIP_CUSTOM_ROUNDS_SETTINGS", "false") + xml_replace_element(config_file, config_file.documentElement, "SIGN_VERIFY_EMPTY_MSGTYP", "false") + xml_replace_element(config_file, config_file.documentElement, "SIGN_VERIFY_NONEMPTY_MSGTYP", "false") + xml_replace_element(config_file, config_file.documentElement, "MAX_NEIGHBORS_PER_ROUND", "3") + xml_replace_element(config_file, config_file.documentElement, "NUM_GOSSIP_RECEIVERS", "3") + ''' + xml_replace_element(config_file, config_file.documentElement, "ROUND_TIME_IN_MS", "1000") + + + if chain_id is not None: xml_replace_element(config_file, config_file.documentElement, "CHAIN_ID", chain_id) output_config = config_file.toprettyxml(newl='') @@ -906,7 +915,6 @@ def build_native_to_workspace(config): pass build_env = os.environ.copy() build_env['SCILLA_REPO_ROOT'] = SCILLA_DIR - '''build_env['EXTRA_BUILD_PARAMS'] = "tests debug"''' # Let's start off by building Scilla, in case it breaks. run_or_die(config, ["make"], in_dir = SCILLA_DIR, env = build_env) run_or_die(config, ["./build.sh"], in_dir = ZILLIQA_DIR) From 9e683112ebd12b0a758599f06cf549da9519f806 Mon Sep 17 00:00:00 2001 From: stephen Date: Tue, 14 Nov 2023 15:23:48 +0000 Subject: [PATCH 2/5] New version of constant.xml derived from what is in production Matching localdev.py that edits constants.xml locally to make the code work for localdev --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index ddcb804891..71e529af4e 100755 --- a/build.sh +++ b/build.sh @@ -76,7 +76,7 @@ run_code_coverage=0 build_type="RelWithDebInfo" ./scripts/license_checker.sh -./scripts/ci_xml_checker.sh constants.xml +#./scripts/ci_xml_checker.sh constants.xml ./scripts/ci_xml_checker.sh constants_local.xml if [ "$OS" != "osx" ]; then ./scripts/depends/check_guard.sh; fi From ca7ce31d5fd2b90dc70ca22d9e969519f80793fb Mon Sep 17 00:00:00 2001 From: stephen Date: Tue, 14 Nov 2023 15:53:18 +0000 Subject: [PATCH 3/5] New version of constant.xml derived from what is in production Matching localdev.py that edits constants.xml locally to make the code work for localdev --- build.sh | 2 +- constants.xml | 940 +++++++++++++++++++++++++------------------------- 2 files changed, 471 insertions(+), 471 deletions(-) diff --git a/build.sh b/build.sh index 71e529af4e..ddcb804891 100755 --- a/build.sh +++ b/build.sh @@ -76,7 +76,7 @@ run_code_coverage=0 build_type="RelWithDebInfo" ./scripts/license_checker.sh -#./scripts/ci_xml_checker.sh constants.xml +./scripts/ci_xml_checker.sh constants.xml ./scripts/ci_xml_checker.sh constants_local.xml if [ "$OS" != "osx" ]; then ./scripts/depends/check_guard.sh; fi diff --git a/constants.xml b/constants.xml index aaef7d6b7f..5d7a0f5710 100644 --- a/constants.xml +++ b/constants.xml @@ -1,465 +1,465 @@ - - 3 - false - false - 25 - 1 - 3 - - 03B70CF2ABEAE4E86DAEF1A36243E44CD61138B89055099C0D220B58FB86FF588A - - . - 250000 - true - 200 - false - 0 - 15 - 15360 - false - - - 1 - 1 - 2 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - - - false - false - true - 5 - 100000 - 10 - 10 - false - 33135 - 20 - 2 - - - - txn - 27017 - false - - 1000 - 10000 - - - 0.667 - 50 - 10 - 20 - 2 - 1 - 69 - 50 - 9422 - - - true - 10 - 11 - 4 - 5 - 5 - 10 - 5 - - - false - 1 - - - - 2000 - 10 - 7000 - 3000 - 3000 - 96 - 45 - 90 - 60 - 90 - 5 - 6000 - 7000 - 55 - 6000 - 10 - 3 - 5 - 5 - 10 - 3 - 3 - 12 - 10 - 1 - 10 - 7000 - - - 21000 - 200000 - 150000 - 50 - 10 - 50 - 80 - 10 - 70 - 2000000000 - 2 - 10 - 5 - 15 - 10 - 5 - 127.0.0.1 - - - true - true - true - - 2 - 3 - 6 - - 10 - 5 - 1000 - 0 - 300 - true - true - - - - 0 - - 128 - 8192 - 0 - - - 128 - 8192 - 2 - 4 - - - - true - true - - 300 - 0.334 - 200 - - - 10 - - - - 4201 - 5 - - 4301 - 127.0.0.1 - true - /tmp/zilliqa.sock - /tmp/scilla-server.sock - scilla-server - true - 4401 - - false - 4501 - true - 2500 - 3 - 100 - true - - 1 - - 0 - true - /usr/local/bin/evm-ds - /tmp/evm-server.sock - /usr/local/etc/log4rs.yml - - 1000000 - - 59 - - true - - true - 64 - 65536 - - - 600 - 10 - - 0.05 - + 03B70CF2ABEAE4E86DAEF1A36243E44CD61138B89055099C0D220B58FB86FF588A + + . + 250000 + true + 200 + false + 0 + 15 + 15360 + false + + + 1 + 1 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + false + false + true + 5 + 100000 + 10 + 10 + false + 33135 + 20 + 2 + + + + txn + 27017 + false + + 1000 + 10000 + + + 0.667 + 50 + 10 + 20 + 2 + 1 + 69 + 50 + 9422 + + + true + 10 + 11 + 4 + 5 + 5 + 10 + 5 + + + false + 1 + + + + 2000 + 10 + 7000 + 3000 + 3000 + 96 + 45 + 90 + 60 + 90 + 5 + 6000 + 7000 + 55 + 6000 + 10 + 3 + 5 + 5 + 10 + 3 + 3 + 12 + 10 + 1 + 10 + 7000 + + + 21000 + 200000 + 150000 + 50 + 10 + 50 + 80 + 10 + 70 + 2000000000 + 2 + 10 + 5 + 15 + 10 + 5 + 127.0.0.1 + + + true + true + true + + 2 + 3 + 6 + + 10 + 5 + 1000 + 0 + 300 + true + true + + + + 0 + + 128 + 8192 + 0 + + + 128 + 8192 + 2 + 4 + + + + true + true + + 300 + 0.334 + 200 + + + 10 + + + + 4201 + 5 + + 4301 + 127.0.0.1 + true + /tmp/zilliqa.sock + /tmp/scilla-server.sock + scilla-server + true + 4401 + + false + 4501 + true + 2500 + 3 + 100 + true + + 1 + + 0 + true + /usr/local/bin/evm-ds + /tmp/evm-server.sock + /usr/local/etc/log4rs.yml + + 1000000 + + 59 + + true + + true + 64 + 65536 + + + 600 + 10 + + 0.05 + - 3 - 100 - 0 - 10 - 30 - - - 60 - 300 - 3 - 600 - 200 - 1 - 420 - 5 - 420 - 10000000 - 0 - 120000000 - 5 - 2 - 20 - 5 - 5 - - - true - false - false - http://127.0.0.1:4202/api - 15000 - 5 - - 5 - - false - 4202 - 5 - 3 - 8 - 32 - 2 - 100 - - 99 - - 5 - 4 - - 1800 - - 1900 - 4 - 50 - 600 - 120 - 10 - 2 - 3 - 360 - 50 - false - - - - 0 - false - 80 - 5 - true - 30 - 5 - false - 1 - false - false - 5 - 1 - 2 - - - true - /scilla - bin/scilla-checker - bin/scilla-runner - scilla_files - _build - src/stdlib - init.json - input_state.json - input_blockchain.json - input_message.json - output.json - input.scilla - .scilla - .scillib - scilla_libs - true - _fields_map_depth - false - false - - - 0000000000000000000000000000000000000000 - - - 1500 - 10 - - - false - 100 - false - false - 0 - 0 - - false - - - - 0xb73DA094d60aa93AC4fA8Ae41Df5d8c13925b0BD - true - 1668 - 4726 - 8400000000000000000000 - 204000000000000000 - 12600000000000000000000 - 20 - 40 - 500000 - 100 - 100 - 300 - 3600 - 50 - 0 - 1 - 768000 - 1024 - 2000000 - false - 0 - 10 - 5 - xxxxxxxxxxx - txnsbackup - false - false - 0.000001 - 3 - - - - localhost - 8090 - PROMETHEUS - 1000 - 500 - https://opentelemetry.io/schemas/1.2.0 - 1.2.0 - NONE - - - - - + 5 + + false + 4202 + 5 + 3 + 8 + 32 + 2 + 100 + + 99 + + 5 + 4 + + 1800 + + 1900 + 4 + 50 + 600 + 120 + 10 + 2 + 3 + 360 + 50 + false + + + + 0 + false + 80 + 5 + true + 30 + 5 + false + 1 + false + false + 5 + 1 + 2 + + + true + /scilla + bin/scilla-checker + bin/scilla-runner + scilla_files + _build + src/stdlib + init.json + input_state.json + input_blockchain.json + input_message.json + output.json + input.scilla + .scilla + .scillib + scilla_libs + true + _fields_map_depth + false + false + + + 0000000000000000000000000000000000000000 + + + 1500 + 10 + + + false + 100 + false + false + 0 + 0 + + false + + + + 0xb73DA094d60aa93AC4fA8Ae41Df5d8c13925b0BD + true + 1668 + 4726 + 8400000000000000000000 + 204000000000000000 + 12600000000000000000000 + 20 + 40 + 500000 + 100 + 100 + 300 + 3600 + 50 + 0 + 1 + 768000 + 1024 + 2000000 + false + 0 + 10 + 5 + xxxxxxxxxxx + txnsbackup + false + false + 0.000001 + 3 + + + + localhost + 8090 + PROMETHEUS + 1000 + 500 + https://opentelemetry.io/schemas/1.2.0 + 1.2.0 + NONE + + + + + - NONE - NONE - - - - - - NONE - - - - - - 175334 - 0 - - - 175637 - 0 - - - 175637 - 1 - - - 175637 - 2 - - - 175701 - 0 - - - 175701 - 1 - - - false - - - 1664279 - 0 - - - - - 10 - 15 - 10 - 360 - - - - - cc02a3c906612cc5bdb087a30e6093c9f0aa04fc - - - - - - ee06b3c906612cc5bdb087a30e6093c9f0aa04fd - - - - - + + + cc02a3c906612cc5bdb087a30e6093c9f0aa04fc + + + + + + ee06b3c906612cc5bdb087a30e6093c9f0aa04fd + + + + + - - - - - - - - - - - - - - - - - - - + From 469abb0f811fd520d691eecb29942ccd718b2310 Mon Sep 17 00:00:00 2001 From: stephen Date: Tue, 14 Nov 2023 16:52:27 +0000 Subject: [PATCH 4/5] New version of constant.xml derived from what is in production Matching localdev.py that edits constants.xml locally to make the code work for localdev --- constants.xml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/constants.xml b/constants.xml index 5d7a0f5710..061645e2e9 100644 --- a/constants.xml +++ b/constants.xml @@ -94,8 +94,6 @@ 60 90 5 - 6000 - 7000 55 6000 10 @@ -106,7 +104,6 @@ 3 3 12 - 10 1 10 7000 @@ -243,7 +240,6 @@ 2 20 5 - 5 true @@ -275,7 +271,6 @@ 4 50 600 - 120 10 2 3 @@ -292,7 +287,6 @@ true 30 5 - false 1 false false @@ -386,22 +380,13 @@ - NONE NONE - - NONE + NONE From c49f2108e426ef869e9fe0fbd3c82686e96879c3 Mon Sep 17 00:00:00 2001 From: stephen Date: Tue, 14 Nov 2023 18:40:48 +0000 Subject: [PATCH 5/5] Diff --- constants.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/constants.xml b/constants.xml index 061645e2e9..5a8e6a3fa0 100644 --- a/constants.xml +++ b/constants.xml @@ -212,7 +212,7 @@ 600 - 10 + 2 0.05