Skip to content

Commit

Permalink
feat: upgrade sdk to v0.47.x (osmosis-labs#6413)
Browse files Browse the repository at this point in the history
* chore: update all deps to v0.47.5

* chore: remove most references to outdated simapp functions

* chore: remove rest endpoints

* chore: swap simapp.FundAccount to bank.testutil.FundAccount for modules

* chore: remove wasm client and go.mod replace for grpc

* chore: fix osmoutils imports

* chore: fix ibc-hooks imports

* chore: final fixes to compile

* chore: skd.StoreKey changed storetypes.StoreKey in tokenfactory

* update gomods

* large push unfork work (mainly modules)

* more changes

* add SimAppChainID

* more fixes

* push before flight

* get it to compile

* temp local replace

* update go mods

* changelog

* update all gomods

* Revert "update all gomods"

This reverts commit 32f7f99.

* dont use simapp

* remove simapp

* more go mod fixes

* more go mod changes, disable go work

* change unforktodo to unforkingtodo

* fix ibc unforking todos

* set sequence from -1 to 0

* further get through unforking comments, add secondary label

* address more comments

* fix further lints

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* attempt to fix go mod

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* cometbft to 37.2 instead of 38

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* go mod tidy

* address comments

* unforkingtodo to unforkingnote

* remove invalid FastSync config

* unforking notes for simulator

* change upgrade code to unforkingnote

* simulation section of upgrading

* import runtime.AppI interface

* remove reference to beta3

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* beta2

* v20

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* math bump

* require it, idk why it keeps switching

* replace gogo with cosmos gogoproto imports

* update osmov20

* remove old proto

* Revert "remove old proto"

This reverts commit c8857bd.

* Revert "update osmov20"

This reverts commit c212bea.

* Revert "remove old proto"

This reverts commit c8857bd.

* Revert "replace gogo with cosmos gogoproto imports"

This reverts commit 8b7fe47.

* initial attempt at changing to cosmos proto

* local replaces for v20

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* manual removal of gogo so we can remove from go mod

* fix wiring

* test fixes

* more test fixes

* more test fixes

* tests

* fix e2e init

* fixes

* script

* wasmbindings fixes

* fix mint

* comment out test

* Fix superfluid & tokenfactory

* chore: fix x/epochs tests

* chore: fix x/ibc-rate-limit tests

* Fix ibc-hooks (and its tests) (osmosis-labs#6752)

* initial unfork test changes

* fix bad marshalling

* remove wasmd override

* change gas test

* fix upgrade test

* disable simulator

* network

* cli

* remove local replaces

* add proto replace

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* add genesis block antehandle logic

* protobuf

* go mods

* go mod

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* wave of fixes highlighted from e2e

* proto changes

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* remove gogo/protobuf manually

* manual remove gogo from everything

* mod

* regen replace

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* proto gen

* script debug ci

* test

* test

* test

* update buf

* update script

* create dir

* specify output

* test

* test

* downgrade proto builder

* test

* test

* chmod

* buf version

* debug

* test

* Generated protofile changes

* FINALLY

* revert

* revert 14 to 13.1

* oops

* upgrade version

* lints

* lints

* add nolints

* more lints

* more lints

* more lints

* add temp fix

* possibly revert, remove exclude for beta3

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* Revert "Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally"

This reverts commit 9c671b1.

* Revert "possibly revert, remove exclude for beta3"

This reverts commit f7c4377.

* add fee grant

* remove install buf step

* fixes

* default message validator for genutil

* add chain-id to test

* reset chain id

* ibcfeekeeper, upgrade store remove, chainid

* init ibc fee keeper

* use rate limit instead of fee keeper

* crisis to store upgrade

* move to v21 upgrade handler

* implement POB

* finish upgrade handler

* small changes from review

* passby review

* e2e

* attempt block time over heights

* change x exp go mod version

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* exp ver

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* replace line for exp

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* use v1.4.10 instead of v1.4.11

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* use newest osmosis version of cosmos sdk v47

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* reduce flakiness for e2e with new sdk logic

* more e2e tweaking

* change fork branch to neater branch

* downgrade cosmossdk math

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* drop down osmomath versions

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* sdk math down

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* makefile change

* math bump down

* add exclude

* set gov to v2

* Generated protofile changes

* e2e flakiness

* slight extension to vote period e2e

* debugging

* add more e2e err logs

* logs

* potentially revert go mod changes

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* Revert "Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally"

This reverts commit c942be4.

* Revert "potentially revert go mod changes"

This reverts commit d3f3eaf.

* run tidy

* enable everything in go work

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* switch v20

* exclusions

* fix make build

* block sdk in place of pob

* modify pob

* remove group, fee, and nft

* comment out

* upgrade math package

* go mod

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* go mod updates

* implement expedited props

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* remove redundant flags

* Auto: update go.mod after push to chore/update-to-v0.47.x that modified dependencies locally

* expedited prop

* lint

---------

Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: Nicolas Lara <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: mattverse <[email protected]>
  • Loading branch information
5 people authored Nov 9, 2023
1 parent 30b8e82 commit 5494ad8
Show file tree
Hide file tree
Showing 521 changed files with 10,715 additions and 8,008 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ updates:
labels:
- "A:no-changelog"
ignore:
- dependency-name: "github.com/tendermint/tendermint"
- dependency-name: "github.com/cometbft/cometbft"
update-types: ["version-update:semver-major", "version-update:semver-minor"]
ignore:
- dependency-name: "github.com/cosmos/ibc-go"
Expand Down
30 changes: 14 additions & 16 deletions .github/workflows/check-generated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:
workflow_dispatch:
pull_request:
paths:
- 'proto/**'
- '**/**.proto'
- '**/**.pb.go'
- '**/**.sum'
- '**/client/**.go'
- 'scripts/ci/**'
- 'Makefile'
- 'Dockerfile'
- '.github/workflows/check-generated.yml'
- "proto/**"
- "**/**.proto"
- "**/**.pb.go"
- "**/**.sum"
- "**/client/**.go"
- "scripts/ci/**"
- "Makefile"
- "Dockerfile"
- ".github/workflows/check-generated.yml"

permissions:
contents: write
Expand All @@ -26,21 +26,19 @@ jobs:
check-proto:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
-
name: "Check protobuf generated code"
- name: "Check protobuf generated code"
run: |
chmod +x ./scripts/protocgen.sh
make proto-all
make run-querygen
-
name: Commit changes
- name: Commit changes
run: |
git config user.name github-actions
git config user.email [email protected]
git add *.go
git add *.proto
git commit -m "Generated protofile changes" || echo "No changes to commit"
git push
git push
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### State Breaking

* [#6413](https://github.com/osmosis-labs/osmosis/pull/6413) feat: update sdk to v0.47x
* [#6344](https://github.com/osmosis-labs/osmosis/pull/6344) fix: set name, display and symbol of denom metadata in tokenfactory's CreateDenom
* [#6279](https://github.com/osmosis-labs/osmosis/pull/6279) fix prop-597 introduced issue
* [#6282](https://github.com/osmosis-labs/osmosis/pull/6282) Fix CreateCanonicalConcentratedLiquidityPoolAndMigrationLink overriding migration records
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,8 @@ We communicate with various integrators if they'd like release-blocking QA testi
* Chainapsis has communicated wanting a series of osmosis-frontend functionalities to be checked for correctness on a testnet as a release blocking item
[1]:https://github.com/cosmos/cosmos-sdk/blob/d11196aad04e57812dbc5ac6248d35375e6603af/baseapp/abci.go#L293-L303
[2]:https://github.com/tendermint/tendermint/blob/9f76e8da150414ce73eed2c4f248947b657c7587/proto/tendermint/types/types.proto#L70-L77
[3]:https://github.com/tendermint/tendermint/blob/main/types/results.go#L47-L54
[2]:https://github.com/cometbft/cometbft/blob/9f76e8da150414ce73eed2c4f248947b657c7587/proto/tendermint/types/types.proto#L70-L77
[3]:https://github.com/cometbft/cometbft/blob/main/types/results.go#L47-L54
[4]:https://github.com/osmosis-labs/cosmos-sdk/blob/5c9a51c277d067e0ec5cf48df30a85fae95bcd14/store/rootmulti/store.go#L430
[5]:https://github.com/osmosis-labs/cosmos-sdk/blob/5c9a51c277d067e0ec5cf48df30a85fae95bcd14/store/types/commit_info.go#L40
Expand Down
20 changes: 15 additions & 5 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package app
import (
wasm "github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/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"

servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -14,23 +14,32 @@ import (
osmoante "github.com/osmosis-labs/osmosis/v20/ante"
v9 "github.com/osmosis-labs/osmosis/v20/app/upgrades/v9"

storetypes "github.com/cosmos/cosmos-sdk/store/types"

txfeeskeeper "github.com/osmosis-labs/osmosis/v20/x/txfees/keeper"
txfeestypes "github.com/osmosis-labs/osmosis/v20/x/txfees/types"

auctionante "github.com/skip-mev/block-sdk/x/auction/ante"
auctionkeeper "github.com/skip-mev/block-sdk/x/auction/keeper"
)

// Link to default ante handler used by cosmos sdk:
// https://github.com/cosmos/cosmos-sdk/blob/v0.43.0/x/auth/ante/ante.go#L41
func NewAnteHandler(
appOpts servertypes.AppOptions,
wasmConfig wasm.Config,
txCounterStoreKey sdk.StoreKey,
txCounterStoreKey storetypes.StoreKey,
ak ante.AccountKeeper,
bankKeeper txfeestypes.BankKeeper,
txFeesKeeper *txfeeskeeper.Keeper,
spotPriceCalculator txfeestypes.SpotPriceCalculator,
sigGasConsumer ante.SignatureVerificationGasConsumer,
signModeHandler signing.SignModeHandler,
channelKeeper *ibckeeper.Keeper,
auctionKeeper *auctionkeeper.Keeper,
txEncoder sdk.TxEncoder,
mevLane auctionante.MEVLane,
mempool auctionante.Mempool,
) sdk.AnteHandler {
mempoolFeeOptions := txfeestypes.NewMempoolFeeOptions(appOpts)
mempoolFeeDecorator := txfeeskeeper.NewMempoolFeeDecorator(*txFeesKeeper, mempoolFeeOptions)
Expand All @@ -41,7 +50,7 @@ func NewAnteHandler(
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
wasmkeeper.NewLimitSimulationGasDecorator(wasmConfig.SimulationGasLimit),
wasmkeeper.NewCountTXDecorator(txCounterStoreKey),
ante.NewRejectExtensionOptionsDecorator(),
ante.NewExtensionOptionsDecorator(nil),
v9.MsgFilterDecorator{},
// Use Mempool Fee Decorator from our txfees module instead of default one from auth
// https://github.com/cosmos/cosmos-sdk/blob/master/x/auth/middleware/fee.go#L34
Expand All @@ -57,6 +66,7 @@ func NewAnteHandler(
ante.NewSigGasConsumeDecorator(ak, sigGasConsumer),
ante.NewSigVerificationDecorator(ak, signModeHandler),
ante.NewIncrementSequenceDecorator(ak),
ibcante.NewAnteDecorator(channelKeeper),
ibcante.NewRedundantRelayDecorator(channelKeeper),
auctionante.NewAuctionDecorator(*auctionKeeper, txEncoder, mevLane, mempool),
)
}
Loading

0 comments on commit 5494ad8

Please sign in to comment.