diff --git a/.github/workflows/test-localnet.yml b/.github/workflows/test-localnet.yml index 1faa2689..61cdae4c 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 565b2be5..f40235d5 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 00000000..27b77791 --- /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"