forked from cosmos/gravity-bridge
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working arbitrary node dockerized cosmos chain
This commit generates a working arbitrary node cosmos chain after building the required binaries from scratch. Very nice for testing. It still needs a lot of convience features but it's working well enough to be good for now. Next up is the addition of the Etherum chain and deployment of the peggy contracts.
- Loading branch information
Showing
4 changed files
with
94 additions
and
11 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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
FROM fedora | ||
ENV GOPATH=/go | ||
ENV PATH=$PATH:/go/bin | ||
RUN dnf install -y git golang make gcc gcc-c++ which | ||
RUN dnf install -y git golang make gcc gcc-c++ which iproute iputils procps-ng vim tmux net-tools htop | ||
ARG REPOFOLDER | ||
ARG NODES | ||
ENV NODES=$NODES | ||
ADD $REPOFOLDER /peggy | ||
RUN pushd /peggy/module/ && make && make install | ||
RUN pushd /peggy/ && bash tests/setup-validators.sh | ||
CMD peggyd start | ||
RUN pushd /peggy/ && tests/setup-validators.sh 20 | ||
CMD pushd /peggy/ && tests/run-validators.sh 20 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
set -eux | ||
# your gaiad binary name | ||
BIN=peggyd | ||
CLI=peggycli | ||
|
||
NODES=$1 | ||
|
||
for i in $(seq 1 $NODES); | ||
do | ||
# add this ip for loopback dialing | ||
ip addr add 7.7.7.$i/32 dev eth0 | ||
|
||
GAIA_HOME="--home /validator$i" | ||
# this implicitly caps us at ~6000 nodes for this sim | ||
# note that we start on 26656 the idea here is that the first | ||
# node (node 1) is at the expected contact address from the gentx | ||
# faciliating automated peer exchange | ||
# not sure what this one does but we need to set it or we'll | ||
# see port conflicts | ||
LISTEN_ADDRESS="--address tcp://7.7.7.$i:26655" | ||
RPC_ADDRESS="--rpc.laddr tcp://7.7.7.$i:26657" | ||
P2P_ADDRESS="--p2p.laddr tcp://7.7.7.$i:26656" | ||
ARGS="$GAIA_HOME $LISTEN_ADDRESS $RPC_ADDRESS $P2P_ADDRESS" | ||
if [ $i -le $NODES ]; then | ||
$BIN $ARGS start & | ||
fi | ||
if [ $i -gt $(($NODES - 1)) ]; then | ||
$BIN $ARGS start | ||
fi | ||
done |
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