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

Nguyen/ibc hooks #197

Merged
merged 84 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
772e97d
init interchain test
anhductn2001 May 20, 2023
6c2909b
init interchain test
anhductn2001 May 20, 2023
58e97dc
remove starport config and try to fix default bond denom
faddat May 24, 2023
1521060
Merge branch 'release/v3.0.x' into ducnt/ictest
anhductn2001 May 25, 2023
fefe0a7
use alliance with go mod tidy
anhductn2001 May 25, 2023
8ec395e
use migaloo:debug in local test
anhductn2001 May 25, 2023
382ee53
tidy & downgrade gogoproto
faddat May 27, 2023
475327d
use final release of wasmd v0.40.0
faddat May 27, 2023
2a6c7fe
cleanup go.mod replaces
faddat May 27, 2023
10a03dc
Merge pull request #173 from White-Whale-Defi-Platform/faddat/wasm-tf-40
faddat May 29, 2023
1520c61
build(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4
dependabot[bot] May 30, 2023
bfccf25
Merge pull request #174 from White-Whale-Defi-Platform/dependabot/go_…
faddat May 30, 2023
6c59c40
Fix warning about proto files fully-qualified names
anhductn2001 May 31, 2023
d5f36cf
build(deps): bump github.com/spf13/viper from 1.15.0 to 1.16.0
dependabot[bot] May 31, 2023
ee93eab
Merge pull request #175 from White-Whale-Defi-Platform/dependabot/go_…
pysel May 31, 2023
8a288c1
Merge branch 'release/v3.0.x' into ducnt/ictest
anhductn2001 Jun 1, 2023
84c5992
add pfm to transfer stack
sontrinh16 Jun 5, 2023
ef6156e
fix collect-gentx
anhductn2001 Jun 7, 2023
0a7fca8
remove depguard
faddat Jun 7, 2023
82f1a90
login ghcr
anhductn2001 Jun 7, 2023
d93de3c
Merge pull request #178 from White-Whale-Defi-Platform/ducnt/fix-cg
vuong177 Jun 7, 2023
0fe9d8a
Merge pull request #177 from notional-labs/hot-fix
faddat Jun 9, 2023
167831d
Merge remote-tracking branch 'origin/release/v3.0.x' into ducnt/ictest
faddat Jun 9, 2023
1ee6065
update .gitignore
faddat Jun 9, 2023
abeabfb
remove intertx
faddat Jun 9, 2023
6f22fac
remove intertx
faddat Jun 9, 2023
2656c3f
tidy
faddat Jun 9, 2023
ffcbfcd
save place
faddat Jun 9, 2023
5834d4f
remove intertx
faddat Jun 9, 2023
1873137
Merge remote-tracking branch 'origin/release/v3.0.x' into ducnt/ictest
faddat Jun 9, 2023
eac7739
add ictest image build make sure it builds on release/v3.0.x
faddat Jun 9, 2023
6ea2846
Merge remote-tracking branch 'origin/release/v3.0.x' into faddat/try-…
faddat Jun 9, 2023
479c085
remove starport configuration
faddat Jun 9, 2023
7469deb
remove dependency review, it does not work reliabliy
faddat Jun 9, 2023
526def2
go 1.20
anhductn2001 Jun 9, 2023
663c7c9
fix duplicate denom in cmd
hieuvubk Jun 9, 2023
6c057a0
restore dependency reveiw
faddat Jun 9, 2023
383063b
restore the rosetta patch
faddat Jun 9, 2023
7061a3e
squash commmits
faddat Jun 9, 2023
f5044b5
Merge branch 'faddat/try-fix-bond-denom' of https://github.com/white-…
faddat Jun 9, 2023
20ffb08
Merge pull request #167 from White-Whale-Defi-Platform/faddat/try-fix…
faddat Jun 9, 2023
6a12cb5
Merge pull request #181 from White-Whale-Defi-Platform/ict-image
faddat Jun 9, 2023
a3c2cf8
Merge pull request #182 from White-Whale-Defi-Platform/remove-starpor…
faddat Jun 9, 2023
53bcfe4
Merge branch 'release/v3.0.x' into ducnt/ictest
faddat Jun 9, 2023
7db650b
build(deps): bump github.com/cosmos/ibc-go/v7 from 7.0.1 to 7.1.0
dependabot[bot] Jun 9, 2023
8b86e63
Merge pull request #183 from White-Whale-Defi-Platform/dependabot/go_…
faddat Jun 9, 2023
7e67106
rm go.work
anhductn2001 Jun 12, 2023
5da5665
update interchaintest lib
anhductn2001 Jun 12, 2023
a5dae62
build(deps): bump github.com/terra-money/alliance
dependabot[bot] Jun 12, 2023
36dbffc
setupwithchainid
anhductn2001 Jun 13, 2023
8e2cfca
Merge pull request #189 from White-Whale-Defi-Platform/dependabot/go_…
faddat Jun 15, 2023
a261a2a
Merge remote-tracking branch 'origin/release/v3.0.x' into ducnt/ictest
faddat Jun 15, 2023
d544316
fix InitChain
anhductn2001 Jun 18, 2023
d3c3349
confuse go1.20
anhductn2001 Jun 18, 2023
ee9c877
ibc_transfer_test
anhductn2001 Jun 18, 2023
2ba3afd
determinsitic module imports
faddat Jun 18, 2023
51d301d
use updated relayer
anhductn2001 Jun 19, 2023
f905b6b
build(deps): bump docker/build-push-action from 3 to 4
dependabot[bot] Jun 19, 2023
66acdc9
build(deps): bump actions/setup-go from 3 to 4
dependabot[bot] Jun 19, 2023
3d24a31
remove go.work
anhductn2001 Jun 22, 2023
33f0c76
build(deps): bump github.com/cosmos/ibc-go/v7 from 7.1.0 to 7.2.0
dependabot[bot] Jun 23, 2023
303614b
Merge pull request #194 from White-Whale-Defi-Platform/dependabot/git…
faddat Jun 25, 2023
b7c3db2
Merge pull request #195 from White-Whale-Defi-Platform/dependabot/go_…
faddat Jun 25, 2023
6c00dda
Merge pull request #193 from White-Whale-Defi-Platform/dependabot/git…
faddat Jun 25, 2023
b6e4533
Merge pull request #192 from White-Whale-Defi-Platform/faddat/gci
faddat Jun 25, 2023
f817285
build(deps): bump github.com/prometheus/client_golang
dependabot[bot] Jun 25, 2023
9c7cbed
Merge pull request #191 from White-Whale-Defi-Platform/dependabot/go_…
faddat Jun 25, 2023
96c8639
Merge remote-tracking branch 'origin/release/v3.0.x' into ducnt/ictest
faddat Jun 25, 2023
4a1cbbf
Merge pull request #163 from White-Whale-Defi-Platform/ducnt/ictest
faddat Jun 25, 2023
cc000a0
update imports
expertdicer Jun 27, 2023
f51fa12
remove go.mod and upgrade to sdk47
expertdicer Jun 28, 2023
e0ab67c
go mod tidy
expertdicer Jun 28, 2023
1976cb7
add wasmhook into app
expertdicer Jun 28, 2023
1edb94c
Merge branch 'release/v3.0.x' into nguyen/ibc-hooks
expertdicer Jun 29, 2023
b11d913
minor fix
expertdicer Jun 29, 2023
4f43cce
lint
expertdicer Jun 29, 2023
1cf54d4
init interchaintest ibchook
anhductn2001 Jun 29, 2023
77da270
Merge branch 'nguyen/ibc-hooks' of https://github.com/White-Whale-Def…
anhductn2001 Jun 29, 2023
539d6d6
makefile
anhductn2001 Jul 3, 2023
c0f7136
migalooEncoding
anhductn2001 Jul 11, 2023
7d0bfee
rename ibchooks and lint
expertdicer Jul 11, 2023
ba49048
add IBC-Hooks workflow test
anhductn2001 Jul 11, 2023
f4d99f4
add IBC-Hooks workflow test
anhductn2001 Jul 11, 2023
8bd3a0c
wrap transfer stack with HooksICS4Wrapper
expertdicer Jul 12, 2023
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
79 changes: 79 additions & 0 deletions .github/workflows/interchaintest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Interchain Tests

on:
pull_request:
push:
branches:
- main

jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: build_push_image
uses: docker/build-push-action@v4
with:
file: Dockerfile
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/white-whale-defi-platform/migaloo-chain-ictest:latest
test-start-cosmos-chain:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: checkout code
uses: actions/checkout@v3

- run: make ictest-start-cosmos
env:
BRANCH_CI: 'latest'
test-ibc-transfer:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: '1.20'

- name: checkout code
uses: actions/checkout@v3

- run: make ictest-ibc
env:
BRANCH_CI: 'latest'
test-ibc-hooks:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: '1.20'

- name: checkout code
uses: actions/checkout@v3

- run: make ictest-ibc-hooks
env:
BRANCH_CI: 'latest'
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
bin
.vscode
.ash_history



go.work.sum
13 changes: 12 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ run:
linters:
disable-all: true
enable:
- depguard
- dogsled
- errcheck
- exportloopref
- gci
- goconst
- gocritic
- gofumpt
Expand Down Expand Up @@ -71,6 +71,17 @@ issues:
max-same-issues: 10000

linters-settings:
gci:
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- blank # blank imports
- dot # dot imports
- prefix(cosmossdk.io)
- prefix(github.com/cosmos/cosmos-sdk)
- prefix(github.com/cometbft/cometbft)
- prefix(github.com/White-Whale-Defi-Platform/migaloo-chain)
custom-order: true
dogsled:
max-blank-identifiers: 3
maligned:
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ install: go.sum
build:
go build $(BUILD_FLAGS) -o bin/migalood ./cmd/migalood

docker-build-debug:
@DOCKER_BUILDKIT=1 docker build -t migaloo:debug -f Dockerfile .

runsim: $(RUNSIM)
$(RUNSIM):
@echo "Installing runsim..."
Expand Down Expand Up @@ -125,4 +128,21 @@ test-sim-custom-genesis-fast:
@go test $(TEST_FLAGS) -mod=readonly $(SIMAPP) -run TestFullAppSimulation \
-Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Seed=99 -Period=5 -v -timeout 24h

###############################################################################
### Interchain test ###
###############################################################################

# Executes start chain tests via interchaintest
ictest-start-cosmos:
cd tests/interchaintest && go test -race -v -run TestStartMigaloo .

ictest-ibc:
cd tests/interchaintest && go test -race -v -run TestMigalooGaiaIBCTransfer .

ictest-ibc-hooks:
cd tests/interchaintest && go test -race -v -run TestIBCHooks .

# Executes all tests via interchaintest after compling a local image as migaloo:local
ictest-all: ictest-start-cosmos ictest-ibc

.PHONY: ictest-start-cosmos ictest-all ictest-ibc-hooks ictest-ibc
10 changes: 5 additions & 5 deletions app/ante.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package app

import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
"github.com/cosmos/ibc-go/v7/modules/core/keeper"

storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
"github.com/cosmos/ibc-go/v7/modules/core/keeper"

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down
Loading