-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1931 from Sifchain/testnet
[ChainOps] Latest merge to master
- Loading branch information
Showing
425 changed files
with
102,234 additions
and
584,497 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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 was deleted.
Oops, something went wrong.
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
Empty file.
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,4 @@ | ||
IMAGE_TAG?=latest | ||
|
||
build-image: | ||
docker build -t sifchain/$(SERVICE):$(IMAGE_TAG) -f $(SERVICE)/Dockerfile ../../ |
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,66 @@ | ||
# IBC LocalNet | ||
|
||
This will launch the following: | ||
|
||
* Two sifnode instances running independent chains. | ||
* An [IBC relayer](https://github.com/confio/ts-relayer) to connect both chains. | ||
|
||
## Setup/Build | ||
|
||
1. Switch to the `deploy/docker/localnet/ibc` directory. | ||
|
||
2. Build a new `sifnode` image: | ||
|
||
```bash | ||
SERVICE=sifnode make build-image | ||
``` | ||
|
||
3. Build a new `ts-relayer` image: | ||
|
||
```bash | ||
SERVICE=ts-relayer make build-image | ||
``` | ||
|
||
## Run | ||
|
||
1. Switch to the `deploy/docker/localnet/ibc` directory. | ||
|
||
2. Launch `docker-compose` as follows: | ||
|
||
```bash | ||
CHAINNET0=${CHAINNET0} \ | ||
CHAINNET1=${CHAINNET1} \ | ||
IPADDR0=${IPADDR0} \ | ||
IPADDR1=${IPADDR1} \ | ||
IPADDR2=${IPADDR2} \ | ||
SUBNET=${SUBNET} \ | ||
MNEMONIC='${MNEMONIC}' docker-compose up | ||
``` | ||
|
||
Where: | ||
|
||
|Var|Description| | ||
|---|-----------| | ||
|`${CHAINNET0}`|The Chain ID of the first sifnode (e.g.: `sifchain-ibc-0`)| | ||
|`${CHAINNET1}`|The Chain ID of the second sifnode (e.g.: `sifchain-ibc-1`)| | ||
|`${IPADDR0}`|The IP Address of the first sifnode (e.g.: `192.168.65.2`)| | ||
|`${IPADDR1}`|The IP Address of the second sifnode (e.g.: `192.168.65.3`)| | ||
|`${IPADDR2}`|The IP Address of the relayer (e.g.: `192.168.65.3`)| | ||
|`${SUBNET}`|The subnet of the bridged network that Docker needs to create (e.g.: `192.168.65.1/24`)| | ||
|`${MNEMONIC}`|The mnemonic both sifnode's will use for their genesis accounts.| | ||
|
||
e.g.: | ||
|
||
```bash | ||
CHAINNET0=sifchain-ibc-0 \ | ||
CHAINNET1=sifchain-ibc-1 \ | ||
IPADDR0=192.168.65.2 \ | ||
IPADDR1=192.168.65.3 \ | ||
IPADDR2=192.168.65.4 \ | ||
SUBNET=192.168.65.1/24 \ | ||
MNEMONIC='toddler spike waste purpose neutral beach science dawn joke stock help beyond' docker-compose up | ||
``` | ||
|
||
## Notes | ||
|
||
Currently, the relayer generates its own mnemonic, and the resulting address needs to be funded on both chains. The script `ts-relayer.sh` will perform this automatically when the container boots. This TypeScript implementation was used simply as a proof of concept, given the [issues experienced](https://discord.com/channels/669268347736686612/773388941947568148/839049449551691797) when attempting to use Cosmos' own IBC relayer. |
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,16 @@ | ||
#!/bin/sh | ||
|
||
CHAINNET0=sifchain-ibc-0 | ||
CHAINNET1=sifchain-ibc-1 | ||
IPADDR0=192.168.65.2 | ||
IPADDR1=192.168.65.3 | ||
IPADDR2=192.168.65.4 | ||
SUBNET=192.168.65.1/24 | ||
|
||
CHAINNET0=${CHAINNET0} \ | ||
CHAINNET1=${CHAINNET1} \ | ||
IPADDR0=${IPADDR0} \ | ||
IPADDR1=${IPADDR1} \ | ||
IPADDR2=${IPADDR2} \ | ||
SUBNET=${SUBNET} \ | ||
MNEMONIC="${MNEMONIC}" docker compose $1 |
Oops, something went wrong.