Skip to content

pokt-network/poktroll-alpha

Repository files navigation

POKTRoll

IMPORTANT: DO NOT GO TO PRODUCTION WITH THIS REPOSITORY

This is an alpha version of trying to build Pocket on top of RollKit.

poktroll is a rollup built using Cosmos SDK and Tendermint and created with Ignite CLI.

Kubernetes LocalNet (WIP)

TLDR

  • Install Docker Desktop, kind, ignite, tilt, protobuf
  • kind create cluster
  • make localnet_up
  • press space

More info

Make sure you have a local Kubernetes cluster, such as kind created and k8s context pointed to this cluster.

Start LocalNet:

make localnet_up

To delete resources created by LocalNet:

make localnet_down

LocalNet

Following the tutorial here: https://rollkit.dev/tutorials

Start up a celestia localnet:

    make celestia_localnet

Try retrieving your Celestia token balance:

    make celestia_localnet_balance_check

Start up a poktroll localnet:

    make poktroll_local_start

Testnet

Start up a celestia light node:

    make celestia_light_client_start

Start up a poktroll testnet:

    make poktroll_testnet_start

Try retrieving your Celestia testnet balance:

    make celestia_testnet_balance_check

Poktroll commands

Send tokens on poktroll:

    make poktroll_send

Get token balances after/before transfer:

    make poktroll_balance

Get session data:

    make poktroll_get_session

Cosmology frontend

Simply visit https://localhost:3000 after running

poktroll_cosmology_frontend

Staking & Unstaking

Stake/unstake and query servicers with:

make servicers_get

make servicer1_stake
make servicers_get

make servicer2_stake
make servicers_get

make servicer3_stake
make servicers_get

make servicer1_unstake
make servicers_get

make servicer2_unstake
make servicers_get

make servicer3_unstake
make servicers_get

Stake/unstake and query applications with:

make apps_get

make app1_stake
make apps_get

make app2_stake
make apps_get

make app3_stake
make apps_get

make app1_unstake
make apps_get

make app2_unstake
make apps_get

make app3_unstake
make apps_get

Getting a session

App=app1 <> Servicer=svc1 <> Height=1

    # EXPECTED ERROR: This should error with a missing app
    make session_get_app1_svc1

    # Stake the app
    make app1_stake
    make apps_get

    # EXPECTED ERROR: This should error with a missing servicers
    make session_get_app1_svc1

    # Stake a servicer
    make servicer1_stake
    make servicers_get

    # EXPECTED SUCCESS: This should succeed now
    make session_get_app1_svc1

Other apps & servicers

You can repeat the steps above for servicer 2&3, with apps 2&3 for services 2&3. The commands are customizable but the makefile helpers are there for convenience.

    make app1_stake
    make servicer1_stake
    make session_get_app1_svc1

    make app2_stake
    make servicer2_stake
    make session_get_app2_svc2

    make app3_stake
    make servicer3_stake
    make session_get_app3_svc3

Send a Relay

# Console 1
make localnet_up

# Console 2
make cast_relay

AUTOGENERATED README BELOW

Get started

ignite chain serve

serve command installs dependencies, builds, initializes, and starts your blockchain in development.

Configure

Your blockchain in development can be configured with config.yml. To learn more, see the Ignite CLI docs.

Web Frontend

Ignite CLI has scaffolded a Vue.js-based web app in the vue directory. Run the following commands to install dependencies and start the app:

cd vue
npm install
npm run serve

The frontend app is built using the @starport/vue and @starport/vuex packages. For details, see the monorepo for Ignite front-end development.

Release

To release a new version of your blockchain, create and push a new tag with v prefix. A new draft release with the configured targets will be created.

git tag v0.1
git push origin v0.1

After a draft release is created, make your final changes from the release page and publish it.

Install

To install the latest version of your blockchain node's binary, execute the following command on your machine:

curl https://get.ignite.com/username/poktroll@latest! | sudo bash

username/poktroll should match the username and repo_name of the Github repository to which the source code was pushed. Learn more about the install process.

Learn more