Skip to content

Commit

Permalink
Add localnet configuration (for the CI).
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Oct 15, 2024
1 parent 6697b41 commit 2ac6d1d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-localnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
src/testdata/**
src/testutils/**
localnet.toml
41 changes: 41 additions & 0 deletions localnet.toml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 2ac6d1d

Please sign in to comment.