Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use docker healthcheck for localnet e2e #2353

Merged
merged 7 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions cmd/zetae2e/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,6 @@ func localE2ETest(cmd *cobra.Command, _ []string) {
// set account prefix to zeta
setCosmosConfig()

// wait for Genesis
// if setup is skip, we assume that the genesis is already created
if !skipSetup {
logger.Print("⏳ wait 70s for genesis")
time.Sleep(70 * time.Second)
}

zetaTxServer, err := txserver.NewZetaTxServer(
conf.RPCs.ZetaCoreRPC,
[]string{utils.FungibleAdminName},
Expand Down Expand Up @@ -396,7 +389,7 @@ func waitKeygenHeight(
logger *runner.Logger,
) {
// wait for keygen to be completed
keygenHeight := int64(60)
keygenHeight := int64(35)
logger.Print("⏳ wait height %v for keygen to be completed", keygenHeight)
for {
time.Sleep(2 * time.Second)
Expand Down
14 changes: 12 additions & 2 deletions contrib/localnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ services:
- "26657:26657"
- "6060:6060"
- "9090:9090"
healthcheck:
# use the zevm endpoint for the healthcheck as it is the slowest to come up
test: ["CMD", "curl", "-f", "-X", "POST", "--data", '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}', "-H", "Content-Type: application/json", "http://localhost:8545"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
start_interval: 1s
networks:
mynetwork:
ipv4_address: 172.20.0.11
Expand Down Expand Up @@ -127,8 +135,10 @@ services:
tty: true
container_name: orchestrator
depends_on:
- zetacore0
- eth
zetacore0:
condition: service_healthy
eth:
condition: service_started
hostname: orchestrator
networks:
mynetwork:
Expand Down
2 changes: 1 addition & 1 deletion contrib/localnet/scripts/start-zetacored.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ then

# 2. Add the observers, authorizations, required params and accounts to the genesis.json
zetacored collect-observer-info
zetacored add-observer-list --keygen-block 55
zetacored add-observer-list --keygen-block 25

# Check for the existence of "AddToOutTxTracker" string in the genesis file
# If this message is found in the genesis, it means add-observer-list has been run with the v16 binary for upgrade tests
Expand Down
Loading