Building a test network

Hi everyone,

I’m working on a thesis project involving the NYM network, and as part of it, I’m trying to set up a local network environment.

To do this, I used the localnet_start.sh script located in the scripts folder. I made a few modifications to the script — specifically, I added the --local and --public-ips flags (with my own IP address) at the lines where nym-node binary is called.

In the build-topology.py script, which is called by localnet_start.sh, I also had to comment out a couple of lines that referenced sphinx_key and the version field in the config, as those keys didn’t exist in my setup.

After running the script, I encountered the following error:

waiting for nym-gateway to launch on port 9000…
nym-gateway launched
initialising network requester…
Blocking waiting for file lock on build directory
Finished release profile [optimized] target(s) in 27.54s
Running /nym/nym/target/release/nym-network-requester init --id network-requester-LIIkRZwBMgg6ew --open-proxy=true --custom-mixnet /root/.nym/localnets/localnet.LIIkRZwBMgg6ew/network.json --output=json
Initialising client…
2025-05-20T11:05:30.568Z INFO nym_client_core::cli_helpers::client_init > initialising network requester client
2025-05-20T11:05:30.629Z INFO nym_client_core::cli_helpers::client_init > Using nym-api: https://validator.nymtech.net/api/
Error: client-core error: failed to load custom topology using path ‘/root/.nym/localnets/localnet.LIIkRZwBMgg6ew/network.json’. detailed message: missing field rewarded_set at line 175 column 1
It seems like the generated network.json file is missing the rewarded_set field, and that’s causing the network requester to fail during initialization.

Has anyone run into a similar issue when building a local NYM network? Any advice on how to correctly generate or modify the topology so that it includes the required fields?

Thanks in advance!

1 Like

That script has not been maintained properly, and looking at the git commit not modified since April last year, so it will be out of date since there has been a lot of modifications to the node setup since then.

I’m not now sure whether running a Gateway is possible on a local device since the requirements for Wireguard mean that Gateway now does a bunch of stuff to do with IP tables, which is also maybe something you dont want happening on your local device.

Although we have sorted this out in a DM via Matrix (and in the end you didn’t need a local network) I will write a bit here in case others run into this in the future and find this post

When you need a local network

The only times you need a local network would be when you are making modifications to:

  • the node software itself
  • inter-node communication
  • the topology provider (NymAPI)

If you are working on an app, you do not need to modify any of these pieces of software as outlined in the docs here: Required Application Architecture - Nym docs , since the majority of the heavy lifting for applications and services is done by the client software, rather than the nodes. Since Mainnet is currently free to use, then developing against Mainnet is the best solution currently for most apps, although there is the Sandbox testnet which can be used as such: Configurable Network - Nym docs.

Current lack of local network setup support

We don’t currently have a solution in place for local network development, since very few people have requested it / have a need for it. There is currently a testnet as well as Mainnet as outlined above. If you do instead require a local network setup get in touch.