From 2ac6d1d9feabc59e49b7b04289cd8c5a879fc068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Tue, 15 Oct 2024 14:33:08 +0300 Subject: [PATCH] Add localnet configuration (for the CI). --- .github/workflows/test-localnet.yml | 4 +-- .npmignore | 1 + localnet.toml | 41 +++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 localnet.toml diff --git a/.github/workflows/test-localnet.yml b/.github/workflows/test-localnet.yml index 1faa26891..61cdae4c0 100644 --- a/.github/workflows/test-localnet.yml +++ b/.github/workflows/test-localnet.yml @@ -40,8 +40,8 @@ jobs: run: | # Start the local testnet with mxpy mkdir -p ~/localnet && cd ~/localnet - mxpy localnet setup - nohup mxpy localnet start > localnet.log 2>&1 & echo $! > localnet.pid + mxpy localnet setup --configfile=${GITHUB_WORKSPACE}/localnet.toml + nohup mxpy localnet start --configfile=${GITHUB_WORKSPACE}/localnet.toml > localnet.log 2>&1 & echo $! > localnet.pid sleep 120 # Allow time for the testnet to fully start # Step 6: Install Node.js and dependencies diff --git a/.npmignore b/.npmignore index 565b2be53..f40235d51 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,3 @@ src/testdata/** src/testutils/** +localnet.toml diff --git a/localnet.toml b/localnet.toml new file mode 100644 index 000000000..27b777910 --- /dev/null +++ b/localnet.toml @@ -0,0 +1,41 @@ +[general] +log_level = "*:DEBUG" +genesis_delay_seconds = 10 +rounds_per_epoch = 50 +round_duration_milliseconds = 6000 + +[metashard] +consensus_size = 1 +num_observers = 0 +num_validators = 1 + +[shards] +num_shards = 3 +consensus_size = 1 +num_observers_per_shard = 0 +num_validators_per_shard = 1 + +[networking] +host = "127.0.0.1" +port_seednode = 9999 +port_seednode_rest_api = 10000 +p2p_id_seednode = "16Uiu2HAkx4QqgXXDdHdUWbLu5kxhd3Uo2hqB2FfCxmxH5Sd7bZFk" +port_proxy = 7950 +port_first_observer = 21100 +port_first_observer_rest_api = 10100 +port_first_validator = 21500 +port_first_validator_rest_api = 10200 + +[software.mx_chain_go] +resolution = "remote" +archive_url = "https://github.com/multiversx/mx-chain-go/archive/refs/heads/master.zip" +archive_download_folder = "~/multiversx-sdk/localnet_software_remote/downloaded/mx-chain-go" +archive_extraction_folder = "~/multiversx-sdk/localnet_software_remote/extracted/mx-chain-go" +local_path = "~/multiversx-sdk/localnet_software_local/mx-chain-go" + +[software.mx_chain_proxy_go] +resolution = "remote" +archive_url = "https://github.com/multiversx/mx-chain-proxy-go/archive/refs/heads/master.zip" +archive_download_folder = "~/multiversx-sdk/localnet_software_remote/downloaded/mx-chain-proxy-go" +archive_extraction_folder = "~/multiversx-sdk/localnet_software_remote/extracted/mx-chain-proxy-go" +local_path = "~/multiversx-sdk/localnet_software_local/mx-chain-proxy-go"