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

trim starship integration #65

Merged
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: E2E tests
name: Starship E2E tests

on:
push:
branches:
- main
- anmol/trim-starship-integration
pull_request:
branches:
- main
Expand All @@ -23,6 +24,11 @@ jobs:
go-version: ^1.20
id: go

- name: Deps
run: |
cd tests/starship/
go mod tidy

# Starship Infra setup
# - Connects to k8s cluster with kubeconfig (digital ocean)
# - Creates a new namespace based on the name (deleted in next step)
Expand All @@ -31,20 +37,18 @@ jobs:
# - Port forward all ports to localhost for next steps to connect
- name: Setup Test infra
id: starship-action
uses: cosmology-tech/[email protected].12
uses: cosmology-tech/[email protected].15
with:
values: tests/starship/configs/ci.yaml
port-forward: true
version: 0.1.39-rc5
version: 0.1.46-rc1

- name: Run Tests
run: |
cd tests/starship/
go mod tidy
make test

# Starship resource cleanup on cluster
# todo(@anmol1696): change this to be post step of the action
- name: Cleanup cluster
if: always()
run: |
Expand Down
9 changes: 2 additions & 7 deletions demo/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ import (
ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee"
ibcfeekeeper "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper"
ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"
transfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer"
"github.com/cosmos/ibc-go/v7/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v7/modules/core"
Expand Down Expand Up @@ -871,12 +871,6 @@ func NewMeshApp(
if err := app.WasmKeeper.InitializePinnedCodes(ctx); err != nil {
tmos.Exit(fmt.Sprintf("failed initialize pinned codes %s", err))
}

// todo: remove set-params and initialize via genesis
if err := app.MeshSecKeeper.SetParams(ctx, meshsectypes.DefaultParams(sdk.DefaultBondDenom)); err != nil {
tmos.Exit(fmt.Sprintf("failed to set mesh params: %s", err))
}

}

return app
Expand Down Expand Up @@ -1094,6 +1088,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(icahosttypes.SubModuleName)
paramsKeeper.Subspace(icacontrollertypes.SubModuleName)
paramsKeeper.Subspace(wasm.ModuleName)
paramsKeeper.Subspace(meshsectypes.ModuleName)

return paramsKeeper
}
34 changes: 34 additions & 0 deletions docs/proto/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
- [Params](#osmosis.meshsecurity.v1beta1.Params)
- [VirtualStakingMaxCapInfo](#osmosis.meshsecurity.v1beta1.VirtualStakingMaxCapInfo)

- [osmosis/meshsecurity/v1beta1/genesis.proto](#osmosis/meshsecurity/v1beta1/genesis.proto)
- [GenesisState](#osmosis.meshsecurity.v1beta1.GenesisState)

- [osmosis/meshsecurity/v1beta1/query.proto](#osmosis/meshsecurity/v1beta1/query.proto)
- [QueryParamsRequest](#osmosis.meshsecurity.v1beta1.QueryParamsRequest)
- [QueryParamsResponse](#osmosis.meshsecurity.v1beta1.QueryParamsResponse)
Expand Down Expand Up @@ -69,6 +72,37 @@ virtual staking max cap



<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->

<!-- end services -->



<a name="osmosis/meshsecurity/v1beta1/genesis.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## osmosis/meshsecurity/v1beta1/genesis.proto



<a name="osmosis.meshsecurity.v1beta1.GenesisState"></a>

### GenesisState
GenesisState defines meshsecurity module's genesis state.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `params` | [Params](#osmosis.meshsecurity.v1beta1.Params) | | |





<!-- end messages -->

<!-- end enums -->
Expand Down
18 changes: 18 additions & 0 deletions proto/osmosis/meshsecurity/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";
package osmosis.meshsecurity.v1beta1;

import "osmosis/meshsecurity/v1beta1/meshsecurity.proto";
import "gogoproto/gogo.proto";
import "amino/amino.proto";

option go_package = "github.com/osmosis-labs/mesh-security-sdk/x/meshsecurity/types";
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = false;

// GenesisState defines meshsecurity module's genesis state.
message GenesisState {
option (gogoproto.equal) = true;

Params params = 1
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ];
}
13 changes: 4 additions & 9 deletions tests/starship/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,21 @@ build-linux:
### Starship Helm Charts ###
###############################################################################
NAME = mesh-security
FILE = configs/starship.yaml
FILE = configs/local.yaml

HELM_REPO = starship
HELM_CHART = devnet
HELM_VERSION = v0.1.39-rc5
HELM_VERSION = v0.1.46-rc1

.PHONY: check
setup-deps:
bash $(CURDIR)/scripts/dev-setup.sh

setup-helm:
helm repo add $(HELM_REPO) https://cosmology-tech.github.io/starship/
helm repo update
helm search repo $(HELM_REPO)/$(HELM_CHART) --version $(HELM_VERSION)

install:
helm install -f $(FILE) $(NAME) $(HELM_REPO)/$(HELM_CHART) --version $(HELM_VERSION)
bash $(CURDIR)/scripts/install.sh --config $(FILE) --version $(HELM_VERSION) --name $(NAME)

debug:
helm install -f $(FILE) $(NAME) $(HELM_REPO)/$(HELM_CHART) --version $(HELM_VERSION) --dry-run --debug
bash $(CURDIR)/scripts/install.sh --config $(FILE) --version $(HELM_VERSION) --name $(NAME) --dry-run

delete:
-helm delete $(NAME)
Expand Down
49 changes: 35 additions & 14 deletions tests/starship/configs/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
chains:
- name: mesh-osmosis-1
- name: mesh-1
type: custom
numValidators: 1
image: anmol1696/meshd:osmo
image: anmol1696/meshd:latest
home: /root/.meshd
binary: meshd
prefix: osmo
denom: uosmo
coins: 100000000000000uosmo
prefix: mesh
denom: stake
coins: 100000000000000stake
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/osmosis/mesh-security-sdk
genesis:
app_state:
meshsecurity:
params:
epoch_length: 10
staking:
params:
unbonding_time: 200s
ports:
rest: 1313
rpc: 26653
Expand All @@ -19,21 +27,30 @@ chains:
cpu: "0.2"
memory: "200M"
faucet:
concurreny: 2
resources:
cpu: "0.1"
memory: "100M"
- name: mesh-juno-1
- name: mesh-2
type: custom
numValidators: 1
image: anmol1696/meshd:juno
image: anmol1696/meshd:latest
home: /root/.meshd
binary: meshd
prefix: juno
denom: ujuno
coins: 100000000000000ujuno
prefix: mesh
denom: stake
coins: 100000000000000stake
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/osmosis/mesh-security-sdk
genesis:
app_state:
meshsecurity:
params:
epoch_length: 10
staking:
params:
unbonding_time: 200s
ports:
rest: 1317
rpc: 26657
Expand All @@ -42,18 +59,22 @@ chains:
cpu: "0.2"
memory: "200M"
faucet:
concurreny: 2
resources:
cpu: "0.1"
memory: "100M"

relayers:
- name: juno-osmo
- name: mesh-1-mesh-2
type: hermes
replicas: 1
image: ghcr.io/cosmology-tech/starship/hermes:39033cdee9e7aaa2274aeca3ab152542bf93d8bd
image: ghcr.io/cosmology-tech/starship/hermes:1.6.0
chains:
- mesh-juno-1
- mesh-osmosis-1
- mesh-1
- mesh-2
config:
event_source:
mode: pull
resources:
cpu: "0.1"
memory: "100M"
Expand Down
47 changes: 33 additions & 14 deletions tests/starship/configs/devnet.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
chains:
- name: mesh-osmosis-1
- name: mesh-1
type: custom
numValidators: 4
image: anmol1696/meshd:osmo
image: ghcr.io/osmosis-labs/meshd:latest
home: /root/.meshd
binary: meshd
prefix: osmo
denom: uosmo
coins: 100000000000000uosmo
prefix: mesh
denom: stake
coins: 100000000000000stake
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/osmosis/mesh-security-sdk
genesis:
app_state:
meshsecurity:
params:
epoch_lenght: 10
staking:
params:
unbonding_time: 200s
ports:
rest: 1313
rpc: 26653
Expand All @@ -22,18 +30,26 @@ chains:
resources:
cpu: 0.5
memory: 1Gi
- name: mesh-juno-1
- name: mesh-2
type: custom
numValidators: 4
image: anmol1696/meshd:juno
image: ghcr.io/osmosis-labs/meshd:latest
home: /root/.meshd
binary: meshd
prefix: juno
denom: ujuno
coins: 100000000000000ujuno
prefix: mesh
denom: stake
coins: 100000000000000stake
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/osmosis/mesh-security-sdk
genesis:
app_state:
meshsecurity:
params:
epoch_lenght: 10
staking:
params:
unbonding_time: 200s
ports:
rest: 1317
rpc: 26657
Expand All @@ -47,13 +63,16 @@ chains:
memory: 1Gi

relayers:
- name: juno-osmo
- name: mesh-1-mesh-2
type: hermes
replicas: 1
image: ghcr.io/cosmology-tech/starship/hermes:39033cdee9e7aaa2274aeca3ab152542bf93d8bd
image: ghcr.io/cosmology-tech/starship/hermes:1.6.0
chains:
- mesh-juno-1
- mesh-osmosis-1
- mesh-1
- mesh-2
config:
event_source:
mode: pull
resources:
cpu: 1
memory: 2Gi
Expand Down
Loading
Loading