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

[Do-not-merge] Upgrade to Cosmos-SDK v0.50. #1448

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
609ac96
Start sdk upgrade
alpe Jun 13, 2023
6669272
Apply dependency updates
alpe Jun 16, 2023
e1ea7e3
Update app.go and more
alpe Jun 16, 2023
5d5cd07
SDK version back to alpha.0; updates
alpe Jun 16, 2023
1a4d3bc
More upgrade work
alpe Jun 19, 2023
4f89afe
Bypass comet-bft signing due to issues
alpe Jun 19, 2023
d941b45
Plumbing ibc-go tests to work but failed
alpe Jun 20, 2023
472ff8d
Formatting and minor updates
alpe Jun 20, 2023
917752b
Better comet setup
alpe Jun 20, 2023
1be59fa
Fix app setup; improve ibctesting: still failing
alpe Jun 21, 2023
c2e78d5
Add circuit breaker to ante handler
alpe Jun 21, 2023
a3feddf
Make tests pass or skip
alpe Jun 21, 2023
5cca661
Refactor to StoreService
alpe Jun 21, 2023
959b95c
Better helper method names
alpe Jun 21, 2023
a284619
Add proto annotations
alpe Jun 21, 2023
abf3ff9
Fix proposal test
alpe Jun 22, 2023
52d4260
Use collections lib for params
alpe Jun 22, 2023
6c2ae45
Bunp ibc-go to latest in notial branch; failing on proofs error persists
alpe Jun 26, 2023
5dca2ed
Drop simulate call in ibc-testing
alpe Jun 26, 2023
e0023c8
Bump seq in ibctests for failed messages as well
alpe Jun 28, 2023
51bc121
Add sdk 50 feature branch to mergify config
alpe Jun 28, 2023
ac452ff
Fix sequence bump for tests
alpe Jun 28, 2023
921a256
Upgrade to sdk v0.50.alpha1 and custom ibc-go
alpe Jul 3, 2023
060980c
Add regression test
alpe Jul 3, 2023
4e0ad6b
use a more stable ibc-go
faddat Jul 16, 2023
2a54734
Merge pull request #1504 from notional-labs/faddat/ibc-bumps
alpe Jul 17, 2023
810f3f4
faddat/lint sdk 50 (#1506)
faddat Jul 17, 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: 8 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ pull_request_rules:
backport:
branches:
- releases/v0.3x
- name: backport patches to sdk50 development branch
conditions:
- base=main
- label=backport/dev-sdk50
actions:
backport:
branches:
- develop_sdk50
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ format: format-tools
###############################################################################
### Protobuf ###
###############################################################################
protoVer=0.13.1
protoVer=0.13.2
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

Expand Down
35 changes: 22 additions & 13 deletions app/ante.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package app

import (
errorsmod "cosmossdk.io/errors"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
"errors"

corestoretypes "cosmossdk.io/core/store"

circuitante "cosmossdk.io/x/circuit/ante"
circuitkeeper "cosmossdk.io/x/circuit/keeper"

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"
Expand All @@ -18,32 +22,37 @@ import (
type HandlerOptions struct {
ante.HandlerOptions

IBCKeeper *keeper.Keeper
WasmConfig *wasmTypes.WasmConfig
TXCounterStoreKey storetypes.StoreKey
IBCKeeper *keeper.Keeper
WasmConfig *wasmTypes.WasmConfig
TXCounterStoreService corestoretypes.KVStoreService
CircuitKeeper *circuitkeeper.Keeper
}

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
if options.AccountKeeper == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "account keeper is required for AnteHandler")
return nil, errors.New("account keeper is required for ante builder")
}
if options.BankKeeper == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "bank keeper is required for AnteHandler")
return nil, errors.New("bank keeper is required for ante builder")
}
if options.SignModeHandler == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
return nil, errors.New("sign mode handler is required for ante builder")
}
if options.WasmConfig == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "wasm config is required for ante builder")
return nil, errors.New("wasm config is required for ante builder")
}
if options.TXCounterStoreService == nil {
return nil, errors.New("wasm store service is required for ante builder")
}
if options.TXCounterStoreKey == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "tx counter key is required for ante builder")
if options.CircuitKeeper == nil {
return nil, errors.New("circuit keeper is required for ante builder")
}

anteDecorators := []sdk.AnteDecorator{
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit), // after setup context to enforce limits early
wasmkeeper.NewCountTXDecorator(options.TXCounterStoreKey),
wasmkeeper.NewCountTXDecorator(options.TXCounterStoreService),
circuitante.NewCircuitBreakerDecorator(options.CircuitKeeper),
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
Expand Down
Loading