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

fead: update to sdk50 #510

Merged
merged 118 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from 114 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
3b1e787
allow devnet with custom key gov
dzmitry-lahoda Feb 28, 2024
b328ea7
bump: to sdk 50
kienn6034 Mar 24, 2024
6b2d34d
bump icq, comentbft to mainline
kienn6034 Mar 24, 2024
692b9b9
feat: removing alliance
kienn6034 Mar 27, 2024
83aea43
refactor: use sdkstore
kienn6034 Mar 27, 2024
973bcff
remove alliance
kienn6034 Mar 27, 2024
0dffff5
refactor: x/feegrant x/upgrade
kienn6034 Mar 27, 2024
0767d5c
refactor: ibc to v8
kienn6034 Mar 27, 2024
62705d9
refactor: store types
kienn6034 Mar 27, 2024
60fba5c
remove upgradeclient
kienn6034 Mar 27, 2024
e142b4b
refactor: snapshot
kienn6034 Mar 27, 2024
e3d2d86
refactor: capability
kienn6034 Mar 27, 2024
25a7745
remove ibcclientclient
kienn6034 Mar 27, 2024
acf87ab
remove upgradeclietn and ibcclient simapp
kienn6034 Mar 27, 2024
2d910c9
feat: wasmclient
kienn6034 Mar 27, 2024
4d8680b
remove statik
kienn6034 Mar 27, 2024
39116c1
remove cli command
kienn6034 Mar 27, 2024
63d9bcc
chore: fix typo
kienn6034 Mar 27, 2024
d91f450
feat: custom bank
kienn6034 Mar 27, 2024
24e4ad7
update tx boundary
kienn6034 Mar 27, 2024
6f24396
feat: transfer middleware
kienn6034 Mar 27, 2024
32775f3
feat: staking middleware
kienn6034 Mar 27, 2024
5bb6240
feat: rate limit
kienn6034 Mar 27, 2024
4f923f2
feat: mint module
kienn6034 Mar 27, 2024
93aba50
feat: ibc transfer middleware
kienn6034 Mar 27, 2024
50e8719
feat: ibc hooks
kienn6034 Mar 27, 2024
48743cf
feat: custom module
kienn6034 Mar 27, 2024
595546a
feat(keeper): bump wasm vm
kienn6034 Mar 27, 2024
ac9ba00
feat: use same wasmvm for wasmd and wasmclient
kienn6034 Mar 27, 2024
8d82bb2
feat: init keeper
kienn6034 Mar 27, 2024
d3c0099
feat: app keeper
kienn6034 Mar 27, 2024
b5f1c41
feat: export
kienn6034 Mar 27, 2024
59cb8e8
remove wasm enable proposal
kienn6034 Mar 27, 2024
bca1e0a
feat: begin and endblock
kienn6034 Mar 27, 2024
44e2d71
feat: app.go
kienn6034 Mar 27, 2024
b6e8f6e
feat: remove upgrades
kienn6034 Mar 28, 2024
02c0ba7
feat: cmd centaurid
kienn6034 Mar 28, 2024
50d86ff
feat: request begin and endblock
kienn6034 Mar 28, 2024
983f896
deps: using correct core and telemethy version
kienn6034 Mar 28, 2024
71c9228
feat: fix interface registry
kienn6034 Mar 28, 2024
967f6ec
feat: add test upgrade scripts
kienn6034 Mar 28, 2024
6b62d61
Merge pull request #17 from notional-labs/kienn/sdk50
hoank101 Mar 28, 2024
27391b5
feat: add 08-wasm
hoank101 Mar 28, 2024
d152e7e
add upgrade handler
hoank101 Mar 29, 2024
327db81
fix upgrade
hoank101 Mar 29, 2024
dea3c33
fix duplicate keys
hoank101 Mar 29, 2024
9b4484f
update wasm
hoank101 Mar 29, 2024
f2132e5
feat: add store upgrades upgrade handler
kienn6034 Mar 29, 2024
ad1a374
upgrade handler: remove authz
kienn6034 Mar 29, 2024
40659aa
refactor
hoank101 Mar 29, 2024
fbd6f67
feat: add preblocker
kienn6034 Mar 29, 2024
3648fd8
Merge branch 'feat/sdk50' of https://github.com/notional-labs/composa…
hoank101 Mar 29, 2024
b003379
feat: fix staking instore migration
kienn6034 Mar 29, 2024
f88a649
fix: instore migration for ibctransfer
kienn6034 Mar 29, 2024
b0f07e3
chore: remove debug println
kienn6034 Mar 29, 2024
22dcb93
Merge branch 'feat/sdk50' of https://github.com/notional-labs/composa…
hoank101 Mar 30, 2024
a36ea8d
bump 08-wasm
hoank101 Mar 30, 2024
a326328
Merge pull request #476 from notional-labs/feat/sdk50
hoank101 Mar 30, 2024
8a9ba7f
refactor: change version to v7.0.1
hoank101 Mar 30, 2024
29ee774
refactor 08-wasm (#18)
hoank101 Apr 1, 2024
d58c64c
Merge branch 'feat/sdk50' of https://github.com/notional-labs/composa…
hoank101 Apr 1, 2024
4f741e2
fix authorityAddress
hoank101 Apr 1, 2024
ce9b9cc
use same storage
hoank101 Apr 1, 2024
69bc4b5
refactor: add handler migration
hoank101 Apr 2, 2024
afbc54b
Kien/setup test upgrade 08 wasms (#19)
kienn6034 Apr 2, 2024
4b48df5
update go mod
hoank101 Apr 2, 2024
d631961
Merge pull request #477 from notional-labs/feat/sdk50
hoank101 Apr 2, 2024
ab921d5
bump ibc-go
hoank101 Apr 2, 2024
a9a9dae
bump ibc-go (#478)
hoank101 Apr 2, 2024
6fbcfeb
Merge branch 'develop2' of https://github.com/ComposableFi/composable…
hoank101 Apr 3, 2024
1307015
merge from develop2
hoank101 Apr 3, 2024
9c1f221
refactor pfm
hoank101 Apr 3, 2024
b2cbf98
Merge pull request #21 from notional-labs/hoa/merge
hoank101 Apr 3, 2024
b7c08b4
bump: update cosmos-sdk and cometbft dependency
hoank101 Apr 3, 2024
ad0c4aa
bump: update cosmos-sdk and cometbft dependency (#483)
hoank101 Apr 3, 2024
e566a4b
bump: update pfm
hoank101 Apr 3, 2024
e368076
bump: update pfm
hoank101 Apr 3, 2024
6b0aad6
update testnet code
hoank101 Apr 4, 2024
b20e356
add InitializePinnedCodes
hoank101 Apr 8, 2024
28623d9
Merge branch 'feat/sdk50' of https://github.com/ComposableFi/composab…
hoank101 Apr 18, 2024
2950b9b
refactor: update denom
hoank101 Apr 18, 2024
34343f5
refactor: hardcode checksum
hoank101 Apr 18, 2024
13f953e
refactor: change name convention
hoank101 Apr 18, 2024
ef93f95
Kien/merge picad to sdk 50 (#25)
kienn6034 Apr 25, 2024
e9df7de
Merge branch 'develop2' of https://github.com/ComposableFi/composable…
hoank101 Apr 25, 2024
1d9686b
merge from develop2
hoank101 Apr 25, 2024
3ad4f45
feat: add prescript add rly account
kienn6034 Apr 25, 2024
6c7091d
refactor transferStack
hoank101 Apr 26, 2024
ccdcded
Merge remote-tracking branch 'origin/feat/sdk50' into feat/sdk50
hoank101 Apr 26, 2024
11d8f03
refactor interchain test
hoank101 Apr 26, 2024
7c0f849
Hoa/update custom bank (#26)
hoank101 Apr 28, 2024
17c8082
refactor: update payload
hoank101 Apr 29, 2024
79805ae
feat: add e2e test
hoank101 Apr 30, 2024
362b304
update e2e test
hoank101 May 1, 2024
9c1a5f3
update ibctesting
hoank101 May 1, 2024
034cb02
update ibctesting
hoank101 May 3, 2024
aa7c957
add pfm test
hoank101 May 3, 2024
06d19bb
add ibc_transfer_cosmos_test
hoank101 May 3, 2024
b556e20
add ibc_transfer_cosmos_test
hoank101 May 3, 2024
7ac70f8
add pfm test
hoank101 May 3, 2024
9edc79b
fix test
hoank101 May 3, 2024
5426ae3
update pfm and add ibchook test
hoank101 May 4, 2024
59a3c7e
add default encoding in interchaintest
hoank101 May 7, 2024
6060659
refactor: update pfm deps
hoank101 May 8, 2024
beb1b64
Merge branch 'develop2' of https://github.com/ComposableFi/composable…
hoank101 May 16, 2024
ece78ce
merge from develop
hoank101 May 16, 2024
5c751ce
update wasm client 50 (#27)
hoank101 May 19, 2024
87c6888
feat: add test grandpa (#28)
hoank101 May 20, 2024
1fb1cdc
Feat/migrate wasm 08 (#29)
kienn6034 May 20, 2024
65eb537
feat: scripts to migrate contract
kienn6034 May 22, 2024
e0c9086
deps: bump to version 08-wasm that do not use gov cli
kienn6034 May 22, 2024
eac0ae6
test: fix unittest
hoank101 May 22, 2024
a2062c9
chore: update go version
hoank101 May 22, 2024
a28396d
chore: fix lint
hoank101 May 22, 2024
59e955f
refactor: remove devnet-gov
hoank101 May 24, 2024
5fa26a1
refactor: rollback EndBlock
hoank101 May 24, 2024
0eee652
chore: fix lint
hoank101 May 24, 2024
ff32028
test: enable ibc ante test
hoank101 May 24, 2024
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: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'
- run: go build ./...

tidy:
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'
- run: |
go mod tidy
CHANGES_IN_REPO=$(git status --porcelain)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/interchaintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.20
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'

- name: checkout code
uses: actions/checkout@v4
Expand All @@ -54,10 +54,10 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.20
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'

- name: checkout code
uses: actions/checkout@v4
Expand All @@ -70,10 +70,10 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.20
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'

- name: checkout code
uses: actions/checkout@v4
Expand All @@ -86,10 +86,10 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.20
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'

- name: checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22'
- name: Checkout code
uses: actions/checkout@v4
- name: Test
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,7 @@ _build/
mytestnet/

screenlog.0
.idea
.idea


node_modules
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ issues:
- text: "ST1016:"
linters:
- stylecheck
- path: "migrations"
text: "SA1019:"
- text: "SA1019:"
linters:
- staticcheck
- text: "leading space"
Expand Down
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/composable-cosmos.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

ARG GO_VERSION="1.20"
ARG GO_VERSION="1.22"
ARG RUNNER_IMAGE="gcr.io/distroless/static-debian11"

# --------------------------------------------------------
Expand Down
66 changes: 60 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ lint:
### Proto ###
###############################################################################

protoVer=0.12.1
protoVer=0.14.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
containerProtoGen=proto-gen-$(protoVer)
containerProtoFmt=proto-fmt-$(protoVer)
Expand All @@ -113,8 +113,7 @@ proto-all: proto-format proto-gen

proto-gen:
@echo "Generating Protobuf files"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \
sh ./scripts/protocgen.sh; fi
@$(protoImage) sh ./scripts/protocgen.sh

proto-format:
@echo "Formatting Protobuf files"
Expand Down Expand Up @@ -168,11 +167,66 @@ test-upgrade: clean-testing-data

clean-testing-data:
@echo "Killing binary and removing previous data"
-@pkill centaurid 2>/dev/null
echo "stopping picachain..."
-@pkill picad 2>/dev/null
-@pkill rly 2>/dev/null
-@rm -rf ./mytestnet

echo "stopping parachain..."
-@killall parachain-node
-@killall polkadot

netstat -ltup | grep LISTEN

.PHONY: ictest-start-cosmos ictest-start-polkadot ictest-ibc ictest-push-wasm ictest-all

include contrib/make/release.mk
include contrib/make/release.mk


test-upgrade: clean-testing-data
@echo "Starting upgrade test"
./scripts/tweak-test-upgrade.sh



## Scripts for testing sdk 50
init-deps:
@echo "Installing dependencies"
bash ./scripts/upgrade/init-deps.sh

localnet-pica:
@echo "Starting test"
rm -rf screenlog.0
-@pkill picad 2>/dev/null
bash ./scripts/run-node.sh picad
bash ./scripts/50/store-wasm-code.sh

localnet-parachain:
@echo "Starting localnet"
bash ./scripts/upgrade/setup-polkadot-node.sh

relayer-create-clients:
@echo "Starting relayer"
bash ./scripts/relayer_hyperspace/create-clients.sh

pica-upgrade:
@echo "Starting upgrade"
bash ./scripts/upgrade/upgrade.

relayer-test-cleanup:
@echo "Cleaning up"
./scripts/relayer_hyperspace/cleanup.sh
###############################################################################
### Integration Tests ###
###############################################################################

integration-test-all: init-test-framework \
test-ibc-hooks

init-test-framework: clean-testing-data install
@echo "Initializing both blockchains..."
./scripts/tests/init-test-framework.sh
./scripts/relayer/relayer-init.sh

test-ibc-hooks:
@echo "Testing ibc-hooks..."
./scripts/tests/ibc-hooks/increment.sh
12 changes: 8 additions & 4 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package ante

import (
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
circuitante "cosmossdk.io/x/circuit/ante"
circuitkeeper "cosmossdk.io/x/circuit/keeper"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"

"cosmossdk.io/x/tx/signing"
"github.com/cosmos/cosmos-sdk/codec"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
ante "github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/cosmos-sdk/x/auth/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
tfmwKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper"
txBoundaryAnte "github.com/notional-labs/composable/v6/x/tx-boundary/ante"
Expand All @@ -24,17 +26,19 @@ func NewAnteHandler(
feegrantKeeper ante.FeegrantKeeper,
txFeeChecker ante.TxFeeChecker,
sigGasConsumer ante.SignatureVerificationGasConsumer,
signModeHandler signing.SignModeHandler,
signModeHandler *signing.HandlerMap,
channelKeeper *ibckeeper.Keeper,
tfmwKeeper tfmwKeeper.Keeper,
txBoundaryKeeper txBoundaryKeeper.Keeper,
ck *circuitkeeper.Keeper,
codec codec.BinaryCodec,
) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
ante.NewSetUpContextDecorator(), // // outermost AnteDecorator. SetUpContext must be called first
ante.NewValidateBasicDecorator(),
ante.NewConsumeGasForTxSizeDecorator(ak),
ante.NewDeductFeeDecorator(ak, bk, feegrantKeeper, txFeeChecker),
circuitante.NewCircuitBreakerDecorator(ck),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(ak),
ante.NewConsumeGasForTxSizeDecorator(ak),
Expand Down
2 changes: 1 addition & 1 deletion app/ante/ibc_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/cosmos-sdk/x/authz"
clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"

tfmwKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper"
)
Expand Down
Loading
Loading