Manage Your Oasis Networks
The network
command is used to manage the Mainnet, Testnet or Localnet
endpoints Oasis CLI will be connecting to.
The network
command is commonly used:
- on network upgrades, because the chain domain separation context is changed due to a new genesis document,
- when setting up a local
oasis-node
instance instead of relying on public gRPC endpoints, - when running a private Localnet with
oasis-net-runner
, - when examining network properties such as the native token, the network registry, the validator set and others.
Oasis CLI supports both remote endpoints via the secure gRPC protocol and local Unix socket endpoints.
When running the Oasis CLI for the first time, it will automatically configure the current Mainnet and Testnet endpoints.
Add a Network
Invoke network add <name> <chain-context> <rpc-endpoint>
to add a new
endpoint with a specific chain domain separation context and a gRPC address.
This command is useful, if you want to connect to your own instance of the Oasis
node instead of relying on the public gRPC endpoints.
For TCP/IP endpoints, run:
oasis network add testnet_alt 0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76 testnet2.grpc.oasis.io:443
? Description: Testnet alternative
? Denomination symbol: TEST
? Denomination decimal places: (9)
For Unix sockets, use:
oasis network add testnet_local 0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76 unix:/node_testnet/data/internal.sock
? Description: Testnet network, local node
? Denomination symbol: TEST
? Denomination decimal places: (9)
Add a Local Network
network add-local <name> <rpc-endpoint>
command can be used if you are
running oasis-node
on your local machine. In this case, Oasis CLI will
autodetect the native token symbol and decimal places, the chain domain
separation context and registered ParaTimes.
oasis network add-local testnet_local unix:/node_testnet/data/internal.sock
List Networks
Invoke network list
to list all configured networks.
oasis network list
NAME CHAIN CONTEXT RPC
mainnet (*) bb3d748def55bdfb797a2ac53ee6ee141e54cd2ab2dc2375f4a0703a178e6e55 grpc.oasis.io:443
mainnet_local b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/node/data/internal.sock
testnet 0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76 testnet.grpc.oasis.io:443
testnet_alt 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet2.grpc.oasis.io:443
The default network is marked with the (*)
sign.
Remove a Network
Use network remove <name>
to remove the given network configuration including
all dependant ParaTimes.
oasis network remove testnet_alt
Set Network Chain Context
To change the chain context of a network, use
network set-chain-context <name> <chain-context>
.
oasis network list
NAME CHAIN CONTEXT RPC
mainnet bb3d748def55bdfb797a2ac53ee6ee141e54cd2ab2dc2375f4a0703a178e6e55 grpc.oasis.io:443
mainnet_local (*) b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/node/data/internal.sock
testnet 0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76 testnet.grpc.oasis.io:443
oasis network set-chain-context mainnet_local 01234513331133a715c7a150313877dF1d33e77a715c7a150313877dF1d33e77
oasis network list
NAME CHAIN CONTEXT RPC
mainnet bb3d748def55bdfb797a2ac53ee6ee141e54cd2ab2dc2375f4a0703a178e6e55 grpc.oasis.io:443
mainnet_local (*) 01234513331133a715c7a150313877dF1d33e77a715c7a150313877dF1d33e77 unix:/node/data/internal.sock
testnet 0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76 testnet.grpc.oasis.io:443
Set Default Network
To change the default network for future Oasis CLI operations, use
network set-default <name>
.
oasis network list
NAME CHAIN CONTEXT RPC
mainnet (*) bb3d748def55bdfb797a2ac53ee6ee141e54cd2ab2dc2375f4a0703a178e6e55 grpc.oasis.io:443
mainnet_local b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/node/data/internal.sock
testnet 0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76 testnet.grpc.oasis.io:443
oasis network set-default mainnet_local
oasis network list
NAME CHAIN CONTEXT RPC
mainnet bb3d748def55bdfb797a2ac53ee6ee141e54cd2ab2dc2375f4a0703a178e6e55 grpc.oasis.io:443
mainnet_local (*) b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/node/data/internal.sock
testnet 0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76 testnet.grpc.oasis.io:443
Change a Network's RPC Endpoint
To change the RPC address of the already configured network, run
network set-rpc <name> <new_endpoint>
:
oasis network list
NAME CHAIN CONTEXT RPC
mainnet (*) bb3d748def55bdfb797a2ac53ee6ee141e54cd2ab2dc2375f4a0703a178e6e55 grpc.oasis.io:443
mainnet_local b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/node/data/internal.sock
testnet 0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76 testnet.grpc.oasis.io:443
testnet_alt 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet2.grpc.oasis.io:443
oasis network set-rpc testnet_alt testnet3.grpc.oasis.io:443
oasis network list
NAME CHAIN CONTEXT RPC
mainnet (*) bb3d748def55bdfb797a2ac53ee6ee141e54cd2ab2dc2375f4a0703a178e6e55 grpc.oasis.io:443
mainnet_local b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/node/data/internal.sock
testnet 0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76 testnet.grpc.oasis.io:443
testnet_alt 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet3.grpc.oasis.io:443
Advanced
Governance Operations
network governance
command is aimed towards validators for proposing
or voting on-chain for network upgrades or changes to other crucial network
parameters.
list
Use network list
to view all past and still active governance proposals.
Each proposal has its unique subsequent ID, a submitter, an epoch when the
proposal was created and when it closes and a state.
oasis network governance list --network testnet
ID KIND SUBMITTER CREATED AT CLOSES AT STATE
1 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 5633 5645 passed
2 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 7525 7537 passed
3 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 8817 8829 passed
4 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 14183 14195 passed
5 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 14869 14881 passed
6 cancel upgrade 5 oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 14895 14907 passed
7 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 14982 14994 passed
8 upgrade oasis1qpwaggvmhwq5uk40clase3knt655nn2tdy39nz2f 29493 29505 passed
9 change parameters (governance) oasis1qrx85mv85k708ylww597rd42enlzhdmeu56wqj72 30693 30705 passed
10 change parameters (staking) oasis1qqxxut9x74dutu587f9nj8787qz4dm0ueu05l88c 33059 33071 passed
Network selector is available for the
governance list
command.