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

chore: upgrade wasmd to v0.27.0.rc3-osmo and ibc-go to v3 #1527

Merged
merged 12 commits into from
May 18, 2022

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented May 17, 2022

Closes: #1502

What is the purpose of the change

The ultimate goal of this PR is to upgrade wasmd to v0.27.0.rc3. This change is done against v8.x branch to unblock the RC as soon as possible. A separate PR to main will be made, once this is merged

To do so, the following updates were done:

Brief Changelog

  • upgraded all the dependencies listed above
  • updated and tested the following Docker images to work with the dependencies:
    • main Osmosis image
    • release builder image
    • chain_init e2e test image

Testing and Verifying

  • Covered by existing tests
  • Tested that all Docker images remain working

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? yes
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? (yes / no)
  • How is the feature or change documented? (not applicable / specification (x/<module>/spec/) / Osmosis docs repo / not documented)

@p0mvn p0mvn changed the base branch from main to v8.x May 17, 2022 23:00
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2022

Codecov Report

Merging #1527 (003b28c) into v8.x (f3e2f2e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             v8.x    #1527   +/-   ##
=======================================
  Coverage   20.66%   20.66%           
=======================================
  Files         204      204           
  Lines       25991    25991           
=======================================
  Hits         5372     5372           
  Misses      19637    19637           
  Partials      982      982           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3e2f2e...003b28c. Read the comment docs.

@czarcas7ic
Copy link
Member

error on e2e test is as follows:

3:32AM INF running initialization for module module=wasm
panic: unknown field "max_wasm_code_size" in types.Params

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/codec.(*ProtoCodec).MustUnmarshalJSON(0x7?, {0xc000d98640?, 0x6d?, 0x3?}, {0x2da4e30?, 0xc000237200?})
        github.com/cosmos/cosmos-sdk@v0.45.4/codec/proto_codec.go:176 +0x45
github.com/CosmWasm/wasmd/x/wasm.AppModule.InitGenesis({{}, {_, _}, _, {_, _}, {_, _}, {_, _}}, ...)
        github.com/CosmWasm/wasmd@v0.23.0/x/wasm/module.go:161 +0xc2
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(_, {{0x2db90f8, 0xc000128000}, {0x2dc7920, 0xc00011bd40}, {{0x0, 0x0}, {0xc001145a30, 0xb}, 0x0, ...}, ...}, ...)
        github.com/cosmos/cosmos-sdk@v0.45.4/types/module/module.go:322 +0x47d
github.com/osmosis-labs/osmosis/v8/app.(*OsmosisApp).InitChainer(_, {{0x2db90f8, 0xc000128000}, {0x2dc7920, 0xc00011bd40}, {{0x0, 0x0}, {0xc001145a30, 0xb}, 0x0, ...}, ...}, ...)
        github.com/osmosis-labs/osmosis/v8/app/app.go:362 +0x1ee
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc00132f6c0, {{0x2f469286, 0xeda165fb4, 0x0}, {0xc001145a30, 0xb}, 0xc000208480, {0x405b3c0, 0x0, 0x0}, ...})
        github.com/cosmos/cosmos-sdk@v0.45.4/baseapp/abci.go:62 +0x455
github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc00023ef60, {{0x2f469286, 0xeda165fb4, 0x0}, {0xc001145a30, 0xb}, 0xc000208480, {0x405b3c0, 0x0, 0x0}, ...})
        github.com/tendermint/tendermint@v0.34.19/abci/client/local_client.go:272 +0x118
github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0x3?, {{0x2f469286, 0xeda165fb4, 0x0}, {0xc001145a30, 0xb}, 0xc000208480, {0x405b3c0, 0x0, 0x0}, ...})
        github.com/tendermint/tendermint@v0.34.19/proxy/app_conn.go:77 +0x55
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(_, {{{0xb, 0x0}, {0x2401084, 0x7}}, {0xc001145a30, 0xb}, 0x1, 0x0, {{0x0, ...}, ...}, ...}, ...)
        github.com/tendermint/tendermint@v0.34.19/consensus/replay.go:319 +0xd78
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc000fbdb88, {0x2dc8078, 0xc00023de10})
        github.com/tendermint/tendermint@v0.34.19/consensus/replay.go:268 +0x3c8
github.com/tendermint/tendermint/node.doHandshake({_, _}, {{{0xb, 0x0}, {0x2401084, 0x7}}, {0xc001145a30, 0xb}, 0x1, 0x0, ...}, ...)
        github.com/tendermint/tendermint@v0.34.19/node/node.go:325 +0x1b8
github.com/tendermint/tendermint/node.NewNode(0xc00109adc0, {0x2db5f90, 0xc00024c3c0}, 0xc001386060, {0x2d9d600, 0xc00012eca8}, 0x1?, 0x0?, 0xc0013861d0, {0x2dba358, ...}, ...)
        github.com/tendermint/tendermint@v0.34.19/node/node.go:733 +0x577
github.com/cosmos/cosmos-sdk/server.startInProcess(_, {{0x0, 0x0, 0x0}, {0x2dcee28, 0xc0011e13e0}, {0x0, 0x0}, {0x2dbdff8, 0xc001063f20}, ...}, ...)
        github.com/cosmos/cosmos-sdk@v0.45.4/server/start.go:262 +0x79b
github.com/cosmos/cosmos-sdk/server.StartCmd.func2(0xc0010ca000?, {0x405b3c0?, 0x0?, 0x0?})
        github.com/cosmos/cosmos-sdk@v0.45.4/server/start.go:129 +0x168
github.com/spf13/cobra.(*Command).execute(0xc0010ca000, {0x405b3c0, 0x0, 0x0})
        github.com/spf13/cobra@v1.4.0/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xc001070f00)
        github.com/spf13/cobra@v1.4.0/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.4.0/command.go:902
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        github.com/spf13/cobra@v1.4.0/command.go:895
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x0?, {0xc00028fcb0, 0x12})
        github.com/cosmos/cosmos-sdk@v0.45.4/server/cmd/execute.go:36 +0x1eb
main.main()
        github.com/osmosis-labs/osmosis/v8/cmd/osmosisd/main.go:16 +0x31

@czarcas7ic
Copy link
Member

My guess is I'm going to have to re-release the v8 docker image since we are changing the wasm version. Will check it out in depth tomorrow

@p0mvn
Copy link
Member Author

p0mvn commented May 18, 2022

@czarcas7ic I think you are right. The error is referring to the parameter to wasmd that was removed

@p0mvn p0mvn marked this pull request as ready for review May 18, 2022 14:40
@p0mvn p0mvn marked this pull request as draft May 18, 2022 14:45
@p0mvn p0mvn marked this pull request as ready for review May 18, 2022 14:50
@p0mvn p0mvn requested a review from a team May 18, 2022 14:51
@p0mvn p0mvn linked an issue May 18, 2022 that may be closed by this pull request
Copy link
Member

@czarcas7ic czarcas7ic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on fighting through all the dependency / fork issues! We should note these difficulties so we can make more realistic release timelines in the future.

FROM golang:1.18.2-alpine3.15 as build

RUN set -eux; apk add --no-cache ca-certificates build-base;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my learning, why was
RUN set -eux; apk add --no-cache ca-certificates build-base;
and
LINK_STATICALLY=true
added?

Copy link
Member Author

@p0mvn p0mvn May 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LINK_STATICALLY=true is needed to pick up certain build flags needed for statically linking cosm wasm dependencies

RUN set -eux; apk add --no-cache ca-certificates build-base; is needed because we changes the base image and need to install some build tools for building cosm wasm dependencies.

This was adapted from the latest Dockerfile in wasmd repository: https://github.com/CosmWasm/wasmd/blob/2b0b1677df42daffa9817cf2f4e266f4e40d69b8/Dockerfile#L9

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK (I can't speak to the infra changes, but everything else looks good to me).

Comment on lines -29 to -31
// DefaultMaxWasmCodeSize limit max bytes read to prevent gzip bombs
// It is 1200 KB in x/wasm, update it later via governance if really needed
MaxWasmCodeSize: wasmtypes.DefaultMaxWasmCodeSize,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cref CosmWasm/wasmd#809 if anyones curious

@@ -274,15 +274,16 @@ func (app *OsmosisApp) InitNormalKeepers(
// Create Transfer Keepers
transferKeeper := ibctransferkeeper.NewKeeper(
appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app.AccountKeeper, app.BankKeeper, app.ScopedTransferKeeper,
)
app.TransferKeeper = &transferKeeper
app.transferModule = transfer.NewAppModule(*app.TransferKeeper)
transferIBCModule := transfer.NewIBCModule(*app.TransferKeeper)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odd design from IBC module to make them different types that don't inherit...

Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I didn't follow the docker file updates tho. (I'm just not familiar with whats going on)

@ValarDragon
Copy link
Member

Wait this was targetted at the wrong release, we need to undo it on v8.x 😬

p0mvn added a commit that referenced this pull request May 18, 2022
p0mvn added a commit that referenced this pull request May 18, 2022
mergify bot pushed a commit that referenced this pull request May 18, 2022
)

Closes: #XXX

## What is the purpose of the change

Context: #1527 

This change is a trivial rework / code cleanup without any test coverage.

## Documentation and Release Note

  - Does this pull request introduce a new feature or user-facing behavior changes? no
  - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? yes
  - How is the feature or change documented? not applicable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[v9 RC Blocker] Upgrade Main to Cosmwasm v0.27.0.rc3
5 participants