The Lite development environment builds a single-node network for testing blockchain operations.
An Akash Provider Daemon may optionally be run, but it will not execute workloads for leases that it acquires.
The instructions below will illustrate how to:
- Initialize blockchain node and client
- Run a single-node network
- Query objects on the network
- Create a provider
- Run provider services (optional)
- Create a deployment
- Bid on an order
- Create a lease
- Terminate a lease
See commands for a full list of utilities meant for interacting with the network.
Four keys and accounts are created. The key names are:
| Key Name | Use |
|---|---|
main |
Primary account (creating deployments, etc...) |
provider |
The provider account (bidding on orders, etc...) |
validator |
The sole validator for the created network |
other |
Misc. account to (receives tokens, etc...) |
Most make commands are configurable and have defaults to make it
such that you don't need to override them for a simple pass-through of
this example.
| Name | Default | Description |
|---|---|---|
KEY_NAME |
main |
standard key name |
PROVIDER_KEY_NAME |
provider |
name of key to use for provider |
DSEQ |
1 | deployment sequence |
GSEQ |
1 | group sequence |
OSEQ |
1 | order sequence |
PRICE |
10uakt | price to bid |
The following steps will bring up a network and allow for interacting with it.
Running through the entire runbook requires three terminals. Each command is marked t1-t3 to indicate a suggested terminal number.
If at any time you'd like to start over with a fresh chain, simply run:
t1
make clean initThe following command will
- build
akash - create configuration directories
- create a genesis file with accounts and single validator.
t1
make initIn a separate terminal, the following command will run the akash node:
t2
make node-runYou can check the status of the network with:
t1
make node-statusYou should see blocks being produced - the block height should be increasing.
You can now view genesis accounts that were created:
t1
make query-accountsCreate a provider on the network with the following command:
t1
make provider-createView the on-chain representation of the provider with:
t1
make query-providerNOTE: running a provider is optional. If you want to bid on orders yourself, skip this step.
In a separate terminal, run the following command
t3
make provider-runQuery the provider service gateway for its status:
t1
make provider-statusCreate a deployment from the main account with:
t1
make deployment-createThis particular deployment is created from the sdl file in this directory (deployment.yaml).
Check that the deployment was created. Take note of the dseq - deployment sequence:
t1
make query-deploymentsAfter a short time, you should see an order created for this deployment with the following command:
t1
make query-ordersNOTE: if you are running provider services, skip the first step here - it is handled by the provider daemon.
Create a bid for the order from the provider:
t1
make bid-createYou should be able to see the bid with
t1
make query-bidEventually a lease will be generated. You can see it with:
t1
make query-leasesif you are running provider services, query the provider gateway:
t1
make provider-statusCreate a lease for the bid from the provider:
t1
make lease-createYou should be able to see the lease with
t1
make query-leasesWithdraw some funds from the lease
t1
make lease-withdrawYou should be able to see the escrow payment change in
t1
make query-leasesand
t1
make query-accountsThere are a number of ways that a lease can be terminated.
t1
make bid-closet1
make lease-closet1
make deployment-closeQuery commands fetch and display information from the blockchain.
Query all accounts:
make query-accountsQuery individual accounts:
make query-account-main
make query-account-provider
make query-account-validator
make query-account-otherQuery all deployments:
make query-deploymentsQuery a single deployment:
DSEQ=4 make query-deploymentQuery all orders:
make query-ordersQuery a single order:
DSEQ=4 GSEQ=1 OSEQ=1 make query-orderQuery all bids:
make query-bidsQuery a single bid:
DSEQ=4 GSEQ=1 OSEQ=1 make query-bidQuery all leases:
make query-leasesQuery a single lease:
DSEQ=4 GSEQ=1 OSEQ=1 make query-leaseQuery all providers:
make query-providersQuery a single provider:
PROVIDER_KEY_NAME=validator make query-providerTransaction commands modify blockchain state.
Create a deployment with DSEQ set to the current block height
DSEQ=0 make deployment-createFully-customized deployment creation:
SDL_PATH=yolo.yaml DSEQ=20 KEY_NAME=other make deployment-createClose a deployment with a custom DSEQ
DSEQ=10 make deployment-closeClose an order with the default parameters
make order-closeFully-customized order close
KEY_NAME=other DSEQ=20 GSEQ=99 OSEQ=500 make order-closeFully-customized bid creation
KEY_NAME=other PROVIDER_KEY_NAME=validator DSEQ=20 GSEQ=99 OSEQ=500 PRICE=100uakt make bid-createFully-customized bid close
KEY_NAME=other PROVIDER_KEY_NAME=validator DSEQ=20 GSEQ=99 OSEQ=500 make lease-closeFully-customized provider creation
PROVIDER_KEY_NAME=validator PROVIDER_CONFIG_PATH=rogue.yaml make provider-createFully-customized provider update
PROVIDER_KEY_NAME=validator PROVIDER_CONFIG_PATH=rogue.yaml make provider-update