Generating network-parameters for testing dockerized network


Miko Nieminen
 

Hi,

I've been trying to find a way to generate network-parameters file for my test network, but I cannot find documentation for it or tool that would allow me to generate only that file without complete network bootstrapping.

Basically I'm trying to create local deployment of docker containers where I have predefined docker-compose file and I just want to generate nodeInfo files for each Corda node and use shared network-parameters file without running the full network mapper and friends. When I was looking at the documentation, there seems to be a hint that this would be possible, but I wasn't able to find how. In https://docs.corda.net/docs/corda-os/4.4/docker-image.html#running-a-node-connected-to-a-bootstrapped-network, it says: "In this example, we have previously generated a network-parameters file using the bootstrapper tool, which is stored at /home/user/sharedFolder/network-parameters". I just haven't been able to find where it refers to.

Optimal case for me would be if I could simply generate the file and then bind mount it to each container. The network bootstrapper tool does this, but it also does many other things that don't want it to do. Also Cordaform and Dockerform Gradle tasks don't work in my case.

Thanks,

Miko Nieminen | Software Engineer

miko.nieminen@... | www.hqla-x.com

 

 

  Rigistrasse 3
  6300 Zug
  Switzerland

 


James Brown
 

Hi Miko,

There is a utility I made a while back called 'netparams' that can be used for this purpose. It's in the corda repo under the 'experimental' folder:

https://github.com/corda/corda/tree/release/os/4.5/experimental/netparams

It's not supported in any way but might hopefully be useful for you. It will let you create network-parameter files and sign them with either the default bootstrapper network map key, or you can specify your own JKS file & key that you want to sign it with. There is a bit of explanatory text and example usage in NetParams.kt

(see also the expermental/nodeinfo utility for creating & signing nodeinfo files)

HTH