Run your own local network
To test out integration or workflows, it’s generally easier to run your own network rather than using the testnet or mainnet and waiting for funds. Iron Fish has a devnet with low difficulty which enables easy block mining and transfers.
You can read more about our included networks in the networks documentation.
Start a Local Node
Run the following command to start a node on the development network:
ironfish start --networkId=2 --port=9001 --bootstrap='' --forceMining --datadir=~/.dev0
networkId
: Network ID 2 is the development networkport
: Optionally set the running port for the nodebootstrap
: Set this to an empty string to avoid connecting to the default networkforceMining
: Enables mining of blocks without being fully synced or connecting to other nodesdatadir
: Defines the file directory on where to store the node’s data
Start a Second Node
Run the following command to connect to the first local node:
ironfish start --networkId=2 --port 9002 --bootstrap=localhost:9001 --datadir=~/.dev1
port
: This value must be different from theport
of the first local nodedatadir
: This value must be different from thedatadir
of the first local node
Run a Miner
Run the following command to connect a miner to your node:
ironfish miners:start --threads=1 --datadir=~/.dev0
threads
: Sets the number of CPU threads for the miner to usedatadir
: Configures which data directory of the node to connect to via IPC