Skip to content

Add scripts to start 4-node docker testing env#446

Merged
yzang2019 merged 9 commits intomasterfrom
yzang/SEI-1810
Dec 6, 2022
Merged

Add scripts to start 4-node docker testing env#446
yzang2019 merged 9 commits intomasterfrom
yzang/SEI-1810

Conversation

@yzang2019
Copy link
Contributor

@yzang2019 yzang2019 commented Dec 5, 2022

Describe your changes and provide context

Purpose:
To better integration test sei chain environment, we would want to launch a 4 node dockerized environment and run with 4 different accounts.

Change
This change set up the initial scripts and templates to build, start and stop a 4-node docker basec testing environment.

Testing performed to validate your change

Run the following command on a unbuntu machine:
make clean && make build-linux && make localnet-start

Expecting output:
You should expect some version number for the current seid

Testing Result:

root@ip-172-31-14-118:/home/ubuntu/sei-chain# make clean && make build-linux && make localnet-start
rm -rf ./build
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 make build
make[1]: Entering directory '/home/ubuntu/sei-chain'
go build -tags "netgo ledger" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=sei -X github.com/cosmos/cosmos-sdk/version.ServerName=seid -X github.com/cosmos/cosmos-sdk/version.Version=1.2.4beta-115-g9b58e12 -X github.com/cosmos/cosmos-sdk/version.Commit=9b58e12afc19e94d9d2d662e814f2126fbf0db89 -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger"' -o ./build/seid ./cmd/seid
make[1]: Leaving directory '/home/ubuntu/sei-chain'
Removing sei-node1 ... done
Removing sei-node2 ... done
Removing sei-node0 ... done
Removing sei-node3 ... done
Removing network docker_localnet
Sending build context to Docker daemon 3.072kB
Step 1/8 : FROM ubuntu:latest
---> a8780b506fa4
Step 2/8 : RUN apt-get update && apt-get install -y make
---> Using cache
---> 5c9fd08d451c
Step 3/8 : VOLUME [ /sei-protocol ]
---> Using cache
---> 951ece2878c1
Step 4/8 : WORKDIR /sei-protocol/sei-chain
---> Using cache
---> c004071a49ae
Step 5/8 : EXPOSE 26656 26657
---> Using cache
---> 26fdc2096a33
Step 6/8 : CMD ["/usr/bin/init.sh"]
---> Using cache
---> 2934f617f650
Step 7/8 : STOPSIGNAL SIGTERM
---> Using cache
---> c763e91b7f9c
Step 8/8 : COPY init.sh /usr/bin/init.sh
---> Using cache
---> 22c026b03312
Successfully built 22c026b03312
Successfully tagged sei-chain/localnode:latest
Creating network "docker_localnet" with driver "bridge"
Creating sei-node1 ... done
Creating sei-node3 ... done
Creating sei-node2 ... done
Creating sei-node0 ... done
Attaching to sei-node3, sei-node0, sei-node1, sei-node2
sei-node1 | hello-sei
sei-node0 | hello-sei
sei-node2 | hello-sei
sei-node3 | hello-sei
sei-node3 | 1.2.4beta-115-g9b58e12
sei-node1 | 1.2.4beta-115-g9b58e12
sei-node0 | 1.2.4beta-115-g9b58e12
sei-node2 | 1.2.4beta-115-g9b58e12
sei-node1 exited with code 0
sei-node3 exited with code 0
sei-node2 exited with code 0
sei-node0 exited with code 0

@yzang2019
Copy link
Contributor Author

Reduced docker images size from 1.2GB to 120MB, by only attached the necessary dependencies

@yzang2019 yzang2019 requested a review from philipsu522 December 5, 2022 01:45
@github-actions
Copy link

github-actions bot commented Dec 5, 2022

Code Coverage

Package Line Rate Complexity Health
github.com/sei-protocol/sei-chain/aclmapping/bank 100% 0
github.com/sei-protocol/sei-chain/aclmapping/dex 97% 0
github.com/sei-protocol/sei-chain/aclmapping/oracle 100% 0
github.com/sei-protocol/sei-chain/aclmapping/staking 82% 0
github.com/sei-protocol/sei-chain/aclmapping/tokenfactory 96% 0
github.com/sei-protocol/sei-chain/aclmapping/utils 0% 0
github.com/sei-protocol/sei-chain/aclmapping/wasm 83% 0
github.com/sei-protocol/sei-chain/app 52% 0
github.com/sei-protocol/sei-chain/app/antedecorators 89% 0
github.com/sei-protocol/sei-chain/oracle/price-feeder/config 85% 0
github.com/sei-protocol/sei-chain/oracle/price-feeder/oracle 73% 0
github.com/sei-protocol/sei-chain/oracle/price-feeder/oracle/provider 49% 0
github.com/sei-protocol/sei-chain/oracle/price-feeder/router/v1 45% 0
github.com/sei-protocol/sei-chain/store/whitelist/cachemulti 100% 0
github.com/sei-protocol/sei-chain/store/whitelist/kv 100% 0
github.com/sei-protocol/sei-chain/store/whitelist/multi 100% 0
github.com/sei-protocol/sei-chain/utils 46% 0
github.com/sei-protocol/sei-chain/utils/datastructures 90% 0
github.com/sei-protocol/sei-chain/x/dex 59% 0
github.com/sei-protocol/sei-chain/x/dex/cache 86% 0
github.com/sei-protocol/sei-chain/x/dex/client/cli/query 23% 0
github.com/sei-protocol/sei-chain/x/dex/contract 52% 0
github.com/sei-protocol/sei-chain/x/dex/exchange 89% 0
github.com/sei-protocol/sei-chain/x/dex/keeper 61% 0
github.com/sei-protocol/sei-chain/x/dex/keeper/abci 30% 0
github.com/sei-protocol/sei-chain/x/dex/keeper/msgserver 78% 0
github.com/sei-protocol/sei-chain/x/dex/keeper/query 82% 0
github.com/sei-protocol/sei-chain/x/dex/migrations 85% 0
github.com/sei-protocol/sei-chain/x/dex/types 1% 0
github.com/sei-protocol/sei-chain/x/dex/types/utils 100% 0
github.com/sei-protocol/sei-chain/x/dex/types/wasm 83% 0
github.com/sei-protocol/sei-chain/x/epoch 11% 0
github.com/sei-protocol/sei-chain/x/epoch/keeper 66% 0
github.com/sei-protocol/sei-chain/x/epoch/types 2% 0
github.com/sei-protocol/sei-chain/x/mint 0% 0
github.com/sei-protocol/sei-chain/x/mint/keeper 75% 0
github.com/sei-protocol/sei-chain/x/mint/simulation 95% 0
github.com/sei-protocol/sei-chain/x/mint/types 2% 0
github.com/sei-protocol/sei-chain/x/nitro/client/cli 45% 0
github.com/sei-protocol/sei-chain/x/nitro/keeper 80% 0
github.com/sei-protocol/sei-chain/x/nitro/replay 63% 0
github.com/sei-protocol/sei-chain/x/oracle 63% 0
github.com/sei-protocol/sei-chain/x/oracle/keeper 82% 0
github.com/sei-protocol/sei-chain/x/oracle/simulation 18% 0
github.com/sei-protocol/sei-chain/x/oracle/types 3% 0
github.com/sei-protocol/sei-chain/x/tokenfactory/keeper 85% 0
github.com/sei-protocol/sei-chain/x/tokenfactory/types 2% 0
Summary 15% (4928 / 33806) 0

Copy link
Contributor

@philipsu522 philipsu522 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 niceeee!

@yzang2019 yzang2019 merged commit 8f445af into master Dec 6, 2022
@yzang2019 yzang2019 deleted the yzang/SEI-1810 branch December 6, 2022 05:00
masih pushed a commit that referenced this pull request Sep 29, 2025
## Describe your changes and provide context
See description in
sei-protocol/sei-tendermint#206

## Testing performed to validate your change

---------

Co-authored-by: Steven Landers <steven@seinetwork.io>
Co-authored-by: Philip Su <philip.su.522@gmail.com>
Co-authored-by: Yiming Zang <50607998+yzang2019@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Uday Patil <udpatil@gmail.com>
masih pushed a commit that referenced this pull request Sep 30, 2025
## Describe your changes and provide context
See description in
sei-protocol/sei-tendermint#206

## Testing performed to validate your change

---------

Co-authored-by: Steven Landers <steven@seinetwork.io>
Co-authored-by: Philip Su <philip.su.522@gmail.com>
Co-authored-by: Yiming Zang <50607998+yzang2019@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Uday Patil <udpatil@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants