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

bump sdk 47, ibc v7, wasmd 40 #805

Merged
merged 77 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
aab999b
bump sdk 47, ibc v7, wasmd 40
cgsingh33 Jul 6, 2023
7753f7a
refactored files
cgsingh33 Jul 6, 2023
fc3ab6a
version upgrade
cgsingh33 Jul 9, 2023
60d0ca1
version upgrade go, remove tendermint
cgsingh33 Jul 9, 2023
c66550e
workflow updated
cgsingh33 Jul 9, 2023
e80964b
yml fix
cgsingh33 Jul 10, 2023
80a6ab0
fixes added for app.go, upgrades, pool
cgsingh33 Jul 11, 2023
15813fa
testutil, ante, tx fixes
cgsingh33 Jul 12, 2023
abf2488
added simapp, fixed test and utils
cgsingh33 Jul 13, 2023
e880f28
ibc-hooks added
cgsingh33 Jul 18, 2023
74b5ab5
wasm keeper fix
cgsingh33 Jul 18, 2023
08f0260
icq keeper fix
cgsingh33 Jul 18, 2023
9f25cbd
keepers fixed
cgsingh33 Jul 18, 2023
3ba9ed0
ibc rate limit included
cgsingh33 Jul 30, 2023
0894ec3
ratelimit fix
cgsingh33 Jul 31, 2023
05ccb5c
liquidity fix
cgsingh33 Jul 31, 2023
f2e3129
sdk upgraded to v0.47.4
cgsingh33 Aug 1, 2023
3bf5a60
sdk replace removed
cgsingh33 Aug 1, 2023
31d8af8
icq updated
cgsingh33 Aug 2, 2023
22a5b7b
feature/dev pull
cgsingh33 Aug 2, 2023
0fbad60
icq keeper fix
cgsingh33 Aug 2, 2023
418b422
import latest changes from feature/dev
cgsingh33 Sep 3, 2023
d65a1f4
sdk upgraded to v47.5
cgsingh33 Sep 3, 2023
2167f60
ibc-go bump, test-suite fix, rate-limit removed
cgsingh33 Sep 3, 2023
8637a45
pb files fixed
cgsingh33 Sep 3, 2023
53aadc4
genutil fix
cgsingh33 Sep 16, 2023
63812e6
root fix
cgsingh33 Sep 16, 2023
253647e
codec, encoding fix
cgsingh33 Sep 20, 2023
fb0351a
consensus module added
cgsingh33 Sep 21, 2023
f4967bf
proto type fix in pb files
cgsingh33 Sep 25, 2023
bbc225b
register services fix
cgsingh33 Sep 25, 2023
e364158
upgrade code added
cgsingh33 Sep 25, 2023
51ce2b1
migration code for testnet
cgsingh33 Sep 26, 2023
e986622
cosmos proto added
cgsingh33 Sep 26, 2023
471f359
cosmos proto added
cgsingh33 Sep 26, 2023
783cda1
adding deposit cmd for collector module
pratikasr Sep 28, 2023
4e7ac44
updating test_helpers & refactoring app.go - fixing testcases
pratikasr Sep 28, 2023
34ced8f
updating helpers_test for wasm - fixing testcases
pratikasr Sep 28, 2023
aa87619
minor refactor
pratikasr Sep 28, 2023
5aa6817
updating testcases- vault & liquidity module
pratikasr Sep 28, 2023
637f151
fix- resolve wrong denom in debt auction
pratikasr Sep 29, 2023
bb7d57b
minor refactor
pratikasr Oct 4, 2023
8c3b156
amm pool mathematics refactored
vishnukumavat Oct 7, 2023
4269ec8
legacy sdk types replacement for liquidity amm
vishnukumavat Oct 9, 2023
b66adcb
proto-gen script modified
cgsingh33 Oct 9, 2023
90b0c10
proto gen script corrected
cgsingh33 Oct 9, 2023
48357ed
newer gRPC services
cgsingh33 Oct 9, 2023
9480f1f
pool test refactored for sdk 47 compatibility
vishnukumavat Oct 10, 2023
21d8d13
amm module refactor for 47 compatibility
vishnukumavat Oct 10, 2023
a84e5ca
buf yaml name fix
cgsingh33 Oct 10, 2023
4020149
paramKeyTable fix for wasm and upgrade
cgsingh33 Oct 10, 2023
5278e23
integration test suite for liquidity refactored
vishnukumavat Oct 10, 2023
2673658
printfs removal in liquidity amm's match_test
vishnukumavat Oct 10, 2023
6b39b7b
register msg services fix in module.go
cgsingh33 Oct 12, 2023
4fe1d48
upgrade code modified
cgsingh33 Oct 12, 2023
b8ec177
third_party not required for proto gen, so removed
cgsingh33 Oct 12, 2023
b5ccfb9
liquidity proto regenration and compatibility refactor
vishnukumavat Oct 13, 2023
e93cb55
Merge pull request #848 from comdex-official/debt-test
cgsingh33 Oct 16, 2023
acdcac9
20 block price feed changed to 40
cgsingh33 Oct 16, 2023
a911ff6
ibc client fix
cgsingh33 Oct 17, 2023
300b56f
refactored app.go
cgsingh33 Oct 19, 2023
8dbf8f8
upgrade refactored
cgsingh33 Oct 19, 2023
811cf6f
ibc changed to v7.2.0
cgsingh33 Oct 19, 2023
61b8b8c
updated logic for removing bad debt from commodo
pratikasr Oct 20, 2023
3831922
upgrade test-case added
cgsingh33 Oct 24, 2023
354db97
bandchain temp fork added
cgsingh33 Oct 24, 2023
3c8663d
bandoracle cdc changed
cgsingh33 Oct 25, 2023
0c11574
proto unmarshall code commented
cgsingh33 Oct 27, 2023
2c139be
fix testcase
pratikasr Oct 27, 2023
3a7b68a
discard height added for bandoracle
cgsingh33 Oct 27, 2023
ae4f500
error handling added
cgsingh33 Oct 29, 2023
83336d1
wasmd to 41
cgsingh33 Oct 30, 2023
9440926
todo removed
cgsingh33 Oct 30, 2023
80d4764
utils updated
vishnukumavat Nov 1, 2023
1726d2e
swap test fixed
vishnukumavat Nov 1, 2023
8addfa1
test cases fixed
vishnukumavat Nov 2, 2023
55abd9d
test yml fix
cgsingh33 Nov 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ jobs:
${{ runner.os }}-go-${{ matrix.go-version }}-
-
name: Run all tests
run: make test-unit
run: make test
31 changes: 22 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,29 @@ RUN apk add --no-cache ca-certificates build-base git
# RUN apk add libusb-dev linux-headers

WORKDIR /code

# Download dependencies and CosmWasm libwasmvm if found.
ADD go.mod go.sum ./
RUN set -eux; \
export ARCH=$(uname -m); \
WASM_VERSION=$(go list -m all | grep github.com/CosmWasm/wasmvm | awk '{print $2}'); \
if [ ! -z "${WASM_VERSION}" ]; then \
wget -O /lib/libwasmvm_muslc.a https://github.com/CosmWasm/wasmvm/releases/download/${WASM_VERSION}/libwasmvm_muslc.${ARCH}.a; \
fi; \
go mod download;

# Copy over code

COPY . /code/

# See https://github.com/CosmWasm/wasmvm/releases
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 9ecb037336bd56076573dc18c26631a9d2099a7f2b40dc04b6cae31ffb4c8f9a
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 6e4de7ba9bad4ae9679c7f9ecf7e283dd0160e71567c6a7be6ae47c81ebe7f32
# ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
# ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
# RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 9ecb037336bd56076573dc18c26631a9d2099a7f2b40dc04b6cae31ffb4c8f9a
# RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 6e4de7ba9bad4ae9679c7f9ecf7e283dd0160e71567c6a7be6ae47c81ebe7f32

# Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
RUN cp "/lib/libwasmvm_muslc.$(uname -m).a" /lib/libwasmvm_muslc.a
# # Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
# RUN cp "/lib/libwasmvm_muslc.$(uname -m).a" /lib/libwasmvm_muslc.a

# force it to use static lib (from above) not standard libgo_cosmwasm.so file
# then log output of file /code/bin/comdex
Expand All @@ -34,11 +47,11 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \
&& (file /code/bin/comdex | grep "statically linked")

# --------------------------------------------------------
#FROM alpine:3.16
FROM golang
FROM alpine:3.16
# FROM golang

COPY --from=go-builder /code/bin/comdex /usr/bin/comdex
RUN apt update && apt install -y python3 protobuf-compiler
# RUN apt update && apt install -y python3 protobuf-compiler

COPY docker/* /opt/
RUN chmod +x /opt/*.sh
Expand Down
20 changes: 15 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ endif
PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation')
LEDGER_ENABLED ?= true
SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g')
TM_VERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::') # grab everything after the space in "github.com/tendermint/tendermint v0.34.7"
TM_VERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::') # grab everything after the space in "github.com/cometbft/cometbft v0.37.2"
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8
BUILDDIR ?= $(CURDIR)/build
Expand Down Expand Up @@ -71,7 +71,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=comdex \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TM_VERSION)
-X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TM_VERSION)

ifeq (cleveldb,$(findstring cleveldb,$(COMDEX_BUILD_OPTIONS)))
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb
Expand Down Expand Up @@ -186,8 +186,19 @@ endif

.PHONY: run-tests test test-all $(TEST_TARGETS)

protoVer=v0.1
containerProtoGenSwagger=comdex-proto-gen-swagger-$(protoVer)
###############################################################################
### Protobuf ###
###############################################################################

protoVer=0.13.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

proto-gen:
@echo "============ Generating Protobuf files ============"
@$(protoImage) sh ./scripts/proto-gen.sh
@echo "============ Generating Protobuf files complete ============"
.PHONY: proto-gen

proto-swagger-gen:
@echo
Expand All @@ -204,7 +215,6 @@ proto-swagger-gen:
@echo
@echo "=========== Docs Generation Complete ============"
@echo
.PHONY: docs

test-sim-nondeterminism:
@echo "Running non-determinism test..."
Expand Down
14 changes: 7 additions & 7 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
// channel keeper.
type HandlerOptions struct {
ante.HandlerOptions
wasmConfig wasm.Config
txCounterStoreKey sdk.StoreKey
txCounterStoreKey storetypes.StoreKey
IBCChannelKeeper *ibckeeper.Keeper
GovKeeper govkeeper.Keeper
Cdc codec.BinaryCodec
Expand All @@ -44,21 +45,20 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
ante.NewSetUpContextDecorator(),
wasmkeeper.NewLimitSimulationGasDecorator(options.wasmConfig.SimulationGasLimit),
wasmkeeper.NewCountTXDecorator(options.txCounterStoreKey),
ante.NewRejectExtensionOptionsDecorator(),
decorators.NewGovPreventSpamDecorator(options.Cdc, options.GovKeeper),
ante.NewMempoolFeeDecorator(),
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
// SetPubKeyDecorator must be called before all signature verification decorators
ante.NewSetPubKeyDecorator(options.AccountKeeper),
ante.NewValidateSigCountDecorator(options.AccountKeeper),
ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewAnteDecorator(options.IBCChannelKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCChannelKeeper),
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
Expand Down
Loading
Loading