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

[Main] Update Cosmos-SDK to 0.47 #317

Merged
merged 48 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d479851
update to 0.47 - chain be able to start
colmazia Aug 9, 2023
3bcd237
add simulation, remove encodingConfig, add new gRPC services
colmazia Aug 11, 2023
91a0fe6
move homePath & invCheckPeriod to appOptions
colmazia Aug 11, 2023
39e72e8
clear old proto dependency, add modulesToExport to App interface
colmazia Aug 11, 2023
3dad461
import ibc tendermint
colmazia Aug 11, 2023
41ab8bc
fix error
RogerKSI Aug 11, 2023
8912759
implement in-module params for x/oracle
colmazia Aug 15, 2023
98268a6
add test & emit event for param change
colmazia Aug 16, 2023
e09414f
Delete open_proposal.sh
colmazia Aug 16, 2023
86b34b9
Delete vote_proposal.sh
colmazia Aug 16, 2023
6d2fe48
Merge pull request #319 from bandprotocol/x-oracle-params-v0.47
RogerKSI Aug 16, 2023
028f2de
add prune and snapshots cmd
colmazia Aug 16, 2023
acf83d5
delete commented functions
colmazia Aug 16, 2023
1deeed2
clear todo
colmazia Aug 16, 2023
7e612b7
migrate from third party proto & add msg signer
colmazia Aug 16, 2023
163feb0
update proto part in makefile & delete unused import in proto files
colmazia Aug 25, 2023
f97173a
delete unused proto cmd
colmazia Aug 30, 2023
0c782eb
set tx encoder in baseapp
colmazia Sep 6, 2023
675f4ea
update
RogerKSI Sep 13, 2023
1ab3785
fix test
RogerKSI Sep 13, 2023
871ec94
fix test
RogerKSI Sep 13, 2023
bb277c3
adjust import
RogerKSI Sep 13, 2023
3f6520e
remove todo
RogerKSI Sep 13, 2023
e52004b
remove unused
RogerKSI Sep 13, 2023
a1961c4
check error
RogerKSI Sep 13, 2023
4950cf2
remove subspace
RogerKSI Sep 13, 2023
cbe9e47
adjust module
RogerKSI Sep 13, 2023
afb5c2d
remove exported
RogerKSI Sep 13, 2023
e024dbe
remove unused
RogerKSI Sep 13, 2023
9a8b374
fix error
RogerKSI Sep 13, 2023
dd2aa74
fix
RogerKSI Sep 13, 2023
edc577f
Merge pull request #320 from bandprotocol/x-globalfee-params-v0.47
RogerKSI Sep 13, 2023
5ca48c3
fix from comments
colmazia Sep 14, 2023
4888b23
update changelog
colmazia Sep 14, 2023
c07f222
update
RogerKSI Sep 14, 2023
6eda33c
bump cosmos version
RogerKSI Sep 14, 2023
ef868be
Merge branch 'master' of https://github.com/bandprotocol/chain into c…
RogerKSI Sep 19, 2023
c062dd9
add condition for ante
RogerKSI Sep 21, 2023
17a1435
reorder import
RogerKSI Sep 21, 2023
5f0b422
fix alias
RogerKSI Sep 21, 2023
c5d214b
adjust import order
RogerKSI Sep 21, 2023
275bc41
add more test cases for globalfee
RogerKSI Sep 25, 2023
a8df141
add route, type for update params in globalfee
RogerKSI Oct 3, 2023
0904069
add consensus in upgrade
colmazia Oct 4, 2023
a45e6cb
add crisis store in upgrade
colmazia Oct 4, 2023
8fc14e9
add bank migration 3 to 4
colmazia Oct 4, 2023
ceae46d
add param subspace
colmazia Oct 4, 2023
f503e97
fix from comments
colmazia Oct 4, 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
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,15 @@ test:
PROTO_BUILDER_IMAGE=tendermintdev/sdk-proto-gen@sha256:372dce7be2f465123e26459973ca798fc489ff2c75aeecd814c0ca8ced24faca
PROTO_FORMATTER_IMAGE=tendermintdev/docker-build-proto@sha256:aabcfe2fc19c31c0f198d4cd26393f5e5ca9502d7ea3feafbfe972448fee7cae

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

proto-all: proto-format proto-lint proto-gen

proto-gen:
@echo "Generating Protobuf files"
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(PROTO_BUILDER_IMAGE) sh ./scripts/protocgen.sh
@$(protoImage) sh ./scripts/protocgen.sh
colmazia marked this conversation as resolved.
Show resolved Hide resolved

proto-format:
@echo "Formatting Protobuf files"
Expand Down Expand Up @@ -122,7 +126,7 @@ proto-update-deps:
## Importing of tendermint protobuf definitions currently requires the
## use of `sed` in order to build properly with cosmos-sdk's proto file layout
## (which is the standard Buf.build FILE_LAYOUT)
## Issue link: https://github.com/tendermint/tendermint/issues/5021
## Issue link: https://github.com/cometbft/cometbft/issues/5021
colmazia marked this conversation as resolved.
Show resolved Hide resolved
@mkdir -p $(TM_ABCI_TYPES)
@curl -sSL $(TM_URL)/abci/types.proto > $(TM_ABCI_TYPES)/types.proto

Expand Down
12 changes: 5 additions & 7 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
ibcante "github.com/cosmos/ibc-go/v5/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"

"github.com/bandprotocol/chain/v2/x/globalfee/feechecker"
oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand All @@ -19,7 +20,7 @@ type HandlerOptions struct {
OracleKeeper *oraclekeeper.Keeper
IBCKeeper *ibckeeper.Keeper
GlobalFeeSubspace paramtypes.Subspace
StakingSubspace paramtypes.Subspace
StakingKeeper *stakingkeeper.Keeper
}

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
Expand Down Expand Up @@ -48,14 +49,11 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
if options.GlobalFeeSubspace.Name() == "" {
return nil, sdkerrors.Wrap(sdkerrors.ErrNotFound, "globalfee param store is required for AnteHandler")
}
if options.StakingSubspace.Name() == "" {
return nil, sdkerrors.Wrap(sdkerrors.ErrNotFound, "staking param store is required for AnteHandler")
}

feeChecker := feechecker.NewFeeChecker(
options.OracleKeeper,
options.GlobalFeeSubspace,
colmazia marked this conversation as resolved.
Show resolved Hide resolved
options.StakingSubspace,
options.StakingKeeper,
)
options.TxFeeChecker = feeChecker.CheckTxFeeWithMinGasPrices
}
Expand Down
Loading
Loading