-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(docker/neutrond): Setup a single node neutron testnet in dock…
…er (#131) - Closes #112 Co-authored-by: Dave Kaj <[email protected]> Co-authored-by: Thane Thomson <[email protected]>
- Loading branch information
1 parent
63aa30d
commit 2ac5726
Showing
12 changed files
with
182 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Docker Images | ||
|
||
| Image | Description | Link | | ||
|-------|-------------|------| | ||
| Single node wasmd testnet | A single node network with a basic wasmd chain setup. Useful for basic, quick testing of your contracts. | [wasmd instructions](./wasmd/README.md) | | ||
| Single node neutron testnet | A single node neutron network. Useful for testing your contracts on a more advanced cosmwasm chain, with more up to date dependencies. | [neutron instructions](./neutrond/README.md) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Setup local accounts. This is only for local development and should not be used in production. | ||
import-local-accounts: | ||
neutrond keys add val1 --keyring-backend test > ./accounts/val1.txt 2>&1 | ||
neutrond keys add val2 --keyring-backend test > ./accounts/val2.txt 2>&1 | ||
neutrond keys add demowallet1 --keyring-backend test > ./accounts/demowallet1.txt 2>&1 | ||
neutrond keys add demowallet2 --keyring-backend test > ./accounts/demowallet2.txt 2>&1 | ||
neutrond keys add demowallet3 --keyring-backend test > ./accounts/demowallet3.txt 2>&1 | ||
neutrond keys add rly1 --keyring-backend test > ./accounts/rly1.txt 2>&1 | ||
neutrond keys add rly2 --keyring-backend test > ./accounts/rly2.txt 2>&1 | ||
.PHONY: create-local-accounts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Setting up a Single Node Neutron Testnet | ||
|
||
This guide provides instructions for setting up a single node Neutron testnet using Docker and local installation. | ||
|
||
> Note - For more detailed instructions, refer to the [official Neutron documentation](https://docs.neutron.org/neutron/build-and-run/neutron-docker). | ||
## Setup Steps | ||
|
||
Clone the Neutron repository in your `$HOME` or your preferred repository: | ||
``` | ||
git clone -b v4.0.1 https://github.com/neutron-org/neutron.git | ||
cd neutron | ||
``` | ||
|
||
Build the Docker image: | ||
``` | ||
make build-docker-image | ||
``` | ||
|
||
Start the Docker container: | ||
``` | ||
make start-docker-container | ||
``` | ||
|
||
Monitor the logs: | ||
``` | ||
docker ps # Get the container ID | ||
docker logs -f <neutron-node-container-id> | ||
``` | ||
|
||
Verify the Docker keyring setup: | ||
``` | ||
docker exec -it neutron neutrond query bank balances neutron1qnk2n4nlkpw9xfqntladh74w6ujtulwn6dwq8z --chain-id test-1 | ||
``` | ||
This should return: | ||
``` | ||
balances: | ||
- amount: "100000000000000" | ||
denom: untrn | ||
pagination: | ||
total: "1" | ||
``` | ||
|
||
Install neutrond locally: | ||
``` | ||
make install | ||
``` | ||
|
||
To setup the local keyring: | ||
``` | ||
cd docker/neutrond | ||
make create-local-accounts | ||
``` | ||
|
||
Verify local keyring setup: | ||
``` | ||
neutrond query bank balances neutron1qnk2n4nlkpw9xfqntladh74w6ujtulwn6dwq8z --chain-id test-1 | ||
``` | ||
|
||
This should return: | ||
``` | ||
balances: | ||
- amount: "100000000000000" | ||
denom: untrn | ||
pagination: | ||
total: "1" | ||
``` | ||
|
||
To stop and reset the chain, go back into the neutron source folder from github and run: | ||
``` | ||
make stop-docker-container | ||
``` | ||
|
||
## How accounts are setup on neutron | ||
We use the standard 7 accounts that come from the neutron base docker setup. We have imported those to `docker/neutrond/accounts`. These accounts already exist in the container running the node, and we get them locally by running `make import-local-accounts`. We don't have functions to create or delete accounts, since we want to strictly follow their base docker setup, and thus keep the accounts the exact same. The 7 accounts are: | ||
- `demowallet1`, `demowallet2` and `demowallet3` - These are the accounts you should use for testing. They are seeded with the test token `untrn`, and 2 IBC tokens, `uibcatom` and `uibcusdc`. | ||
- `val1` and `val2` - accounts used to setup the validators for the test network. Seeded only with the test token `untrn`. Use if you need extra accounts beyond the demo wallets. | ||
- `rly1` and `rly2` - accounts used to setup IBC relayers for the test network. Only seeded with `untrn`. Use if you need extra accounts beyond the demo wallets. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
- address: neutron1a57m0naqaf56hcvldfvagde7rajse68hnynpe4 | ||
name: demowallet1 | ||
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A6iUKYrdZW53fFEXZpjfVqcaOcXOAucfHBhdzpx/u660"}' | ||
type: local | ||
|
||
|
||
**Important** write this mnemonic phrase in a safe place. | ||
It is the only way to recover your account if you ever forget your password. | ||
|
||
cave middle fade cube battle parrot live picture item before mention cheap veteran nose sting recipe talk vapor judge bracket flee flavor lazy blue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
- address: neutron105slt5cpynvzv5cy6xadxl548em5wsjfh2shat | ||
name: demowallet2 | ||
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Akj8ZdWICka5rn2/M5csbMpt0tU0N9TMkC9981KqG3ks"}' | ||
type: local | ||
|
||
|
||
**Important** write this mnemonic phrase in a safe place. | ||
It is the only way to recover your account if you ever forget your password. | ||
|
||
thunder blanket sort image frequent village adult fish caution explain legend canyon canal property since razor whale zero idle parrot large tank such smart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
- address: neutron1zf0a8ueetawfqwzzx5njmq88jpmqa827t5v38a | ||
name: demowallet3 | ||
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Av2LbNFHvcNR0D4BHk51lmiVvCRLOmoh4YMlJLnNbvg5"}' | ||
type: local | ||
|
||
|
||
**Important** write this mnemonic phrase in a safe place. | ||
It is the only way to recover your account if you ever forget your password. | ||
|
||
polar twice glass ostrich crush tank charge caution planet answer ripple culture staff relief have tragic occur helmet between slight proof direct output shoot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
- address: neutron1zmr7dfc325907tvj8jl2p2p4cx84clk5aflstl | ||
name: rly1 | ||
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ak3alwik1L65ujlKbgQP//JL3LUlJmvA0zn8rt4eeoHG"}' | ||
type: local | ||
|
||
|
||
**Important** write this mnemonic phrase in a safe place. | ||
It is the only way to recover your account if you ever forget your password. | ||
|
||
garage advice weekend this dose mango sign horse tool torch mosquito repeat sentence valid scheme pull punch need prosper build actor say cancel allow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
- address: neutron152zj7nyksf7dgrt4tpcf64t92k4ar9c2c97wxz | ||
name: rly2 | ||
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A9jd2NZ40ZkD0TqBMmco6ejP1EzR1AnYIqSNm5m/Y997"}' | ||
type: local | ||
|
||
|
||
**Important** write this mnemonic phrase in a safe place. | ||
It is the only way to recover your account if you ever forget your password. | ||
|
||
run snack expand version flag foil used session name lift mouse repeat bunker pencil orchard lens kitchen prevent emerge alien outdoor else cat brass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
override the existing name val1 [y/N]: | ||
- address: neutron1t4jlep6w6qxzwf58x49uya74x4tfjx4vd7v9a7 | ||
name: val1 | ||
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Are6QBWqMGG3srEdzWj6ulFzX2J9mU5V5BUGDWpPZvzn"}' | ||
type: local | ||
|
||
|
||
**Important** write this mnemonic phrase in a safe place. | ||
It is the only way to recover your account if you ever forget your password. | ||
|
||
rare tobacco crisp auction shrug turkey transfer little giggle giraffe live stereo soft arctic raw page october river armor home champion check virus trap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
- address: neutron1efkh8rpul8v6km98cuaejz0a5zczvvvz4ps82r | ||
name: val2 | ||
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A0owhBMbRQ2jwJ7dKqwRA2fFyqSMpRmI2aefEdBIT/td"}' | ||
type: local | ||
|
||
|
||
**Important** write this mnemonic phrase in a safe place. | ||
It is the only way to recover your account if you ever forget your password. | ||
|
||
photo mobile lady place outdoor camp fruit mouse spell feel service oval draw essay expect tuition fade drip riot manage aunt idle weather clap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters