Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 0 additions & 4 deletions simapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@

- `go test ./... -v` *Unit test*
- `make ictest-*` *E2E testing*

## Launch Block Explorer Locally

[Reference Guide](./nginx/README.md)
25 changes: 4 additions & 21 deletions simapp/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
version: '3'

# Runs the explorer & reverse proxy
# Runs the explorer
#
# NOTE: Must add the following to your /etc/hosts file:
#
# 127.0.0.1 api.localhost
# 127.0.0.1 rpc.localhost
# 127.0.0.1:5173 pingpub.localhost
#
# Then:
# make testnet OR make sh-testnet
# then:
# docker compose up

services:
nginx:
image: nginx
network_mode: "host"
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf
- ./nginx/nginx-selfsigned.crt:/etc/nginx/nginx-selfsigned.crt
- ./nginx/nginx-selfsigned.key:/etc/nginx/nginx-selfsigned.key
pingpub:
depends_on:
- nginx
image: pingpub:latest
network_mode: "host"
build:
Expand All @@ -35,4 +18,4 @@ services:
- ./explorer/chains:/app/chains/
ports:
- "80:80"
- "443:443"
- "443:443"
2 changes: 1 addition & 1 deletion simapp/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

// !IMPORTANT: interchaintest/ has its own `InterchainTest` embed.FS that will need to be iterated on.

//go:embed .github/* app/* chains/* cmd/* contrib/* scripts/* Makefile Dockerfile nginx/* proto/*.* *.*
//go:embed .github/* app/* chains/* cmd/* contrib/* scripts/* Makefile Dockerfile proto/*.* *.*
var SimAppFS embed.FS

// To embed the interchaintest/ directory, rename the go.mod file to `go.mod_`
Expand Down
22 changes: 0 additions & 22 deletions simapp/nginx/README.md

This file was deleted.

21 changes: 0 additions & 21 deletions simapp/nginx/nginx-selfsigned.crt

This file was deleted.

28 changes: 0 additions & 28 deletions simapp/nginx/nginx-selfsigned.key

This file was deleted.

53 changes: 0 additions & 53 deletions simapp/nginx/nginx.conf

This file was deleted.

3 changes: 2 additions & 1 deletion simapp/scripts/test_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ sed -i -e 's/cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' $HOM
# REST endpoint
sed -i -e 's/address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:'$REST'"/g' $HOME_DIR/config/app.toml
sed -i -e 's/enable = false/enable = true/g' $HOME_DIR/config/app.toml
sed -i -e 's/enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' $HOME_DIR/config/app.toml

# peer exchange
sed -i -e 's/pprof_laddr = "localhost:6060"/pprof_laddr = "localhost:'$PROFF'"/g' $HOME_DIR/config/config.toml
Expand All @@ -156,4 +157,4 @@ sed -i -e 's/address = ":8080"/address = "0.0.0.0:'$ROSETTA'"/g' $HOME_DIR/confi
sed -i -e 's/timeout_commit = "5s"/timeout_commit = "'$BLOCK_TIME'"/g' $HOME_DIR/config/config.toml

# Start the node with 0 gas fees
BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC"
BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC"
16 changes: 16 additions & 0 deletions spawn/cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
localictypes "github.com/strangelove-ventures/interchaintest/local-interchain/interchain/types"
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
"github.com/strangelove-ventures/interchaintest/v8/ibc"
"github.com/strangelove-ventures/interchaintest/v8/testutil"
)

var (
Expand Down Expand Up @@ -312,6 +313,21 @@ func (cfg *NewChainConfig) SetupLocalInterchainJSON() {
cosmos.NewGenesisKV("app_state.gov.params.min_deposit.0.amount", "1"),
}

c.ConfigFileOverrides = []localictypes.ConfigFileOverrides{
{
File: "config/app.toml",
Paths: testutil.Toml{
"api.enabled-unsafe-cors": true,
},
},
{
File: "config/config.toml",
Paths: testutil.Toml{
"rpc.cors_allowed_origins": []string{"*"},
},
},
}

if cfg.IsFeatureEnabled(InterchainSecurity) {
c.SetICSConsumerLink("localcosmos-1")
} else {
Expand Down
4 changes: 2 additions & 2 deletions spawn/explorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ func (cfg NewChainConfig) NewChainExplorerConfig() ChainExplorer {
logo := "https://img.freepik.com/free-vector/letter-s-box-logo-design-template_474888-3345.jpg?size=338&ext=jpg&ga=GA1.1.2008272138.1721260800&semt=ais_user"
return ChainExplorer{
ChainName: cfg.ProjectName,
Api: []Endpoint{NewEndpoint("api.localhost", "https://api.localhost")},
Rpc: []Endpoint{NewEndpoint("rpc.localhost", "https://rpc.localhost")},
Api: []Endpoint{NewEndpoint("api.localhost", "http://127.0.0.1:1317")},
Rpc: []Endpoint{NewEndpoint("rpc.localhost", "http://127.0.0.1:26657")},
SdkVersion: "0.50",
CoinType: "118",
MinTxFee: "800",
Expand Down
2 changes: 1 addition & 1 deletion spawn/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const (
DefaultLogo = "https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"
DefaultLogoSVG = "https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.svg"
DefaultDescription = "A short description of your project"
DefaultChainID = "newchain-1"
DefaultChainID = "localchain-1"
DefaultNetworkType = "testnet" // or mainnet
DefaultSlip44CoinType = 118
DefaultChainRegistrySchema = "https://raw.githubusercontent.com/cosmos/chain-registry/master/chain.schema.json"
Expand Down
2 changes: 1 addition & 1 deletion spawn/remove_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func (fc *FileContent) RemoveOptimisticExecution() {
}

func (fc *FileContent) RemoveExplorer() {
fc.DeleteDirectoryContents("nginx")
// fc.DeleteDirectoryContents("nginx")
}

func (fc *FileContent) RemoveInterchainSecurity() {
Expand Down