Tooling to run a localnet of Pocket Network
This is a overnight tooling to help the community to test this. If you face any issue please let us know.
- Docker
- Docker Compose
- 20gb or more (maybe a bit less is ok too)
- Build Pocket client and place on your $PATH
- Nodejs & Yarn (if u wish to use relayer tool)
- Edit your /etc/hosts to handle all the nodes local domains
127.0.0.1 node1.dev
127.0.0.1 node2.dev
127.0.0.1 local1.dev
127.0.0.1 local2.dev
127.0.0.1 local3.dev
127.0.0.1 local4.dev
127.0.0.1 local5.dev
127.0.0.1 local6.dev
127.0.0.1 local7.dev
127.0.0.1 local8.dev
127.0.0.1 local9.dev
127.0.0.1 local10.dev
127.0.0.1 local11.dev
127.0.0.1 local12.dev
127.0.0.1 local13.dev
127.0.0.1 local14.dev
127.0.0.1 local15.dev
127.0.0.1 local16.dev
127.0.0.1 local17.dev
127.0.0.1 local18.dev
127.0.0.1 local19.dev
127.0.0.1 local20.dev
Clone pocket core at same level of pocket-localnet as pocket-core
git clone https://github.com/pokt-scan/pocket-localnet.git
git clone https://github.com/pokt-network/pocket-core.git
cd pocket-code
git checkout mesh-node
- Create at your $HOME a pocket folder like
mkdir -p ~/.pocket
- Copy
config
folder files to$HOME/.pocket
folder - Create at your $HOME a pocket mesh folder like
mkdir -p ~/.pocket-mesh
- Copy
mesh_node
folder files to$HOME/.pocket-mesh
folder - Start docker-compose nodes with:
docker-compose up -d
- Start local node
pocket start --datadir $HOME/.pocket --keybase=false --forceSetValidators --simulateRelays
- Start Mesh node
pocket start-mesh --datadir $HOME/.pocket-mesh --simulateRelays
- Navigate or use curl to know the localnet status: http://localhost:26657/status and check block says 1
Optional:
- Install relayer dependencies:
yarn
- Modify .env if u want
- Run it:
yarn start
Under generator
folder you can find a simple nodejs script that will generate wallet files that you can use to add more apps/wallets/nodes to this localnet