Last active
February 3, 2019 05:13
-
-
Save iammelea/d82a8c4303f06a3c20fd95fcd5ec8f4d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#Run Cosmos no need install, only install docker first ;) | |
#For unsafe reset all, if you need. | |
docker run -p 26657:26657 -p 26656:26656 -v $HOME/.gaiacli:/root/.gaiacli -v $HOME/.gaiad:/root/.gaiad meleatrust/cosmos-sdk:0.30.0-0 gaiad unsafe-reset-all | |
#For create the folders | |
docker run -it -p 26657:26657 -p 26656:26656 -v $HOME/.gaiad:/root/.gaiad -v $HOME/.gaiad:/root/.gaiad meleatrust/cosmos-sdk:0.30.0-0 gaiad init --moniker=Write-Validator-Name-HERE | |
#Permision to folders | |
sudo chown user:group .gaiad/config | |
sudo chown user:group .gaiad/data | |
#open folders | |
cd .gaiad/config | |
#remove genesis | |
rm genesis.json | |
#donwload the genesis that you need, one is for GoS-5 and the other for gaia-10k | |
#10k | |
wget -c 'https://raw.githubusercontent.com/cosmos/testnets/master/gaia-10k/genesis.json' | |
#GoS-5 | |
wget -c 'https://raw.githubusercontent.com/cosmos/game-of-stakes/master/genesis.json' | |
#open confi.toml for add seeds | |
vi config.toml | |
[email protected]:26656 as seed for gaiad-10k | |
[email protected]:26656 as seed for GoS 5 | |
#Start gaiad | |
docker run -p 26657:26657 -p 26656:26656 -v $HOME/.gaiacli:/root/.gaiacli -v $HOME/.gaiad:/root/.gaiad meleatrust/cosmos-sdk:0.30.0-0 gaiad start | |
#For stop after you are sure its working well downloading blocks | |
CRTL+c | |
#For run detached mode add ```-d``` | |
docker run -d -p 26657:26657 -p 26656:26656 -v $HOME/.gaiacli:/root/.gaiacli -v $HOME/.gaiad:/root/.gaiad meleatrust/cosmos-sdk:0.30.0-0 gaiad start | |
#for see the container ID for stop now or others | |
docker ps | |
#for status meanwhile is runing in detached mode | |
docker run --network="host" meleatrust/cosmos-sdk:0.30.0-0 gaiacli status | |
#For add a new key AKA create a new account | |
docker run -it -v $HOME/.gaiacli:/root/.gaiacli -v $HOME/.gaiad:/root/.gaiad meleatrust/cosmos-sdk:0.30.0-0 gaiacli keys add imvalidator | |
#For recover a old key account | |
docker run -it -v $HOME/.gaiacli:/root/.gaiacli -v $HOME/.gaiad:/root/.gaiad meleatrust/cosmos-sdk:0.30.0-0 gaiacli keys add imvalidator --recover | |
#AKA imvalidator is the name for your key or account used any you liked | |
docker run -it -v $HOME/.gaiacli:/root/.gaiacli -v $HOME/.gaiad:/root/.gaiad meleatrust/cosmos-sdk:0.30.0-0 gaiacli keys list | |
#how tu run cmds | |
docker run --network="host" meleatrust/cosmos-sdk:0.30.0-0 gaia -h | |
docker run --network="host" meleatrust/cosmos-sdk:0.30.0-0 gaiacli -h | |
docker run --network="host" meleatrust/cosmos-sdk:0.30.0-0 gaia version | |
docker run --network="host" meleatrust/cosmos-sdk:0.30.0-0 gaiacli version | |
#for see the ip from the docker container | |
docker ps | |
12345678 | |
docker inspect --format '{{ .NetworkSettings.IPAddress }}' 12345678 | |
172.17.0.2 | |
#add this ip in config.toml | |
# Address to advertise to peers for them to dial | |
# If empty, will use the same port as the laddr, | |
# and will introspect on the listener or use UPnP | |
# to figure out the address. | |
external_address = "tcp://172.17.0.2:26656" | |
#for create validator | |
#finish after dinner. ;) | |
docker run -it -v $HOME/.gaiacli:/root/.gaiacli -v $HOME/.gaiad:/root/.gaiad meleatrust/cosmos-sdk:0.30.0-0 gaiacli keys show imvalidator --bech=val | |
docker run --network="host" meleatrust/cosmos-sdk:0.30.0-0 gaiacli query account cosmos1wvcnanmdlmmeuq762u5cv5g3k2su6pwwyavy6u --trust-node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment