Walkthrough
Walkthrough
The goal of this document is to get you up and running with a LocalNet, some manually deployed local actors, and sending an end-to-end relay. It will not go in depth into any concepts.
Create a new GitHub issue here if you encounter any problems.
- Deployment Walkthrough
- Video Walkthrough
- 0. Install Dependencies
- 1. Launch & Inspect LocalNet
- 2. Fund New Accounts
- 3. Manually Stake a Supplier & Deploy a RelayMiner
- 4. Manually Stake an Application & Deploy a PATH Gateway
- 5. Send A Relay
- 6. Dynamically Scaling LocalNet
- 7. Explore the tools
Deployment Walkthrough
This quickstart guide is intended for setting up your local environment for development purposes.
If you want to deploy your own Gateway and Supplier, please follow the instructions in our poktroll-docker-compose-example example.
If you want to deploy a Supplier & Gateway via a copy-pasta method without understanding anything, see the instructions here.
Video Walkthrough
You can access the video here.
0. Install Dependencies
Install the following dependencies:
- Golang - The programming language we use to implement the protocol
- Docker - Containerization tool
- Ignite - Cosmos SDK CLI for building and deploying blockchains
- Kind - k8s local cluster manager
- Helm - k8s configuration and automation tool
- Tilt - k8s local development tool & environment manager
If you've followed the LocalNet instructions, you may already have them installed.
1. Launch & Inspect LocalNet
This section will help you deploy a POKT LocalNet in a k8s cluster on your machine and inspect it so you have an idea of what's going on!
We'll be manually configuring a few actors to run in your shell for the sake of the tutorial so you have visibility into the types of onchain and offchain actors. In practice, you should be using localnet to dynamically scale your actors.
To learn more about the different actors type, see the docs here.
It should look something like this once you're past the first section:
1.1 Clone the poktroll
repository
git clone https://github.com/pokt-network/poktroll.git
cd poktroll
1.2 See all the available helper commands in Makefile
We leverage the Makefile
to abstract the complexity of some common commands,
but you can view it directly
to see what the underlying command being executed is.
make help
If you run make help
from the root of the repo, you'll see a list of all the
available commands. Looking inside the Makefile is a great way to learn how to use them!
1.3 Prepare your development environment
Run the following command to install golang
dependencies:
make install_ci_deps
Compile protobufs, generate mocks and verify that all tests are passing by running:
make go_develop_and_test
There are some flaky tests, so you can re-run with the following command without needing to regenerate the mocks and types:
make test_all
1.4 Create a k8s
cluster
Create a new k8s
cluster for your LocalNet:
kind create cluster
If you use k8s
for other things, you may need to switch your context as well:
kubectl config use-context kind-kind