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.28.0 (backport #2714) #2744

Merged
merged 3 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ which acts as a fuzz testing tool tailored for the SDK state machine.
* [#2206](https://github.com/osmosis-labs/osmosis/pull/2283) Register all Amino interfaces and concrete types on the authz Amino codec. This will allow the authz module to properly serialize and de-serializes instances using Amino.
* [#2405](https://github.com/osmosis-labs/osmosis/pull/2405) Make SpotPrice have a max value of 2^160, and no longer be able to panic
* [#2473](https://github.com/osmosis-labs/osmosis/pull/2473) x/superfluid `AddNewSuperfluidAsset` now returns error, if any occurs instead of ignoring it.
* [#2714](https://github.com/osmosis-labs/osmosis/pull/2714) Upgrade wasmd to v0.28.0.

#### Golang API breaks

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/osmosis-labs/osmosis/v12
go 1.18

require (
github.com/CosmWasm/wasmd v0.27.0
github.com/CosmWasm/wasmd v0.28.0-osmo-v12
github.com/cosmos/cosmos-proto v1.0.0-alpha7
github.com/cosmos/cosmos-sdk v0.46.1
github.com/cosmos/go-bip39 v1.0.0
Expand Down Expand Up @@ -291,8 +291,8 @@ require (
)

replace (
// branch: v0.27.0.rc3-osmo, current tag: v0.27.0.rc3-osmo
github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.27.0-rc2.0.20220517191021-59051aa18d58
// branch: v0.28.0x-osmo-v12, current tag: v0.28.0-osmo-v12.1
github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.28.0-osmo-v12.1
// Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/v0.45.0x-osmo-v12, Tag: https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.45.0-osmo-v12
github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.0-osmo-v12
// Use Osmosis fast iavl
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -882,8 +882,8 @@ github.com/osmosis-labs/go-mutesting v0.0.0-20220811235203-65a53b4ea8e3 h1:/imbK
github.com/osmosis-labs/go-mutesting v0.0.0-20220811235203-65a53b4ea8e3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI=
github.com/osmosis-labs/iavl v0.17.3-osmo-v7 h1:6KcADC/WhL7yDmNQxUIJt2XmzNt4FfRmq9gRke45w74=
github.com/osmosis-labs/iavl v0.17.3-osmo-v7/go.mod h1:lJEOIlsd3sVO0JDyXWIXa9/Ur5FBscP26zJx0KxHjto=
github.com/osmosis-labs/wasmd v0.27.0-rc2.0.20220517191021-59051aa18d58 h1:15l3Iss2oCGCeJRi2g3CuCnqmEjpAr3Le7cDnoN/LS0=
github.com/osmosis-labs/wasmd v0.27.0-rc2.0.20220517191021-59051aa18d58/go.mod h1:0h8WBsFhyingomsrN+34JVZe/qRySHYHICyTEokCkYU=
github.com/osmosis-labs/wasmd v0.28.0-osmo-v12.1 h1:CZJSa65banZjQNyDhp+nGPr9MRYrIfOU/aO3ww2V1Rg=
github.com/osmosis-labs/wasmd v0.28.0-osmo-v12.1/go.mod h1:7YWBfoD6zPuu6pmqnq/kMNpc+xqOaxEtolJ5/7xHzB8=
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE=
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
Expand Down
2 changes: 1 addition & 1 deletion simulation/executor/simulate_dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (simState *simState) SimulateBlock(simCtx *simtypes.SimCtx, blockSimulator
}

requestBeginBlock := simState.beginBlock(simCtx)
ctx := simCtx.BaseApp().NewContext(false, simState.header)
ctx := simCtx.BaseApp().NewContext(false, simState.header).WithBlockTime(simState.header.Time)

// Run queued operations. Ignores blocksize if blocksize is too small
numQueuedOpsRan, err := simState.runQueuedOperations(simCtx, ctx)
Expand Down
5 changes: 4 additions & 1 deletion tests/simulator/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ func AppStateFn() osmosim.AppStateFn {
return func(simManager *osmosimtypes.Manager, r *rand.Rand, accs []simtypes.Account, config osmosim.InitializationConfig,
) (appState json.RawMessage, simAccs []simtypes.Account, chainID string, genesisTimestamp time.Time) {
if osmosim.FlagGenesisTimeValue == 0 {
genesisTimestamp = simtypes.RandTimestamp(r)
// N.B.: wasmd has the following check in its simulator:
// https://github.com/osmosis-labs/wasmd/blob/c2ec9092d086b5ac6dd367f33ce8b5cce8e4c5f5/x/wasm/types/types.go#L261-L264
// As a result, it is easy to overflow and become negative if seconds are set too large.
genesisTimestamp = time.Unix(0, r.Int63())
} else {
genesisTimestamp = time.Unix(osmosim.FlagGenesisTimeValue, 0)
}
Expand Down
2 changes: 1 addition & 1 deletion x/gamm/simulation/sim_msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ func RandomExitSwapShareAmountIn(k keeper.Keeper, sim *simtypes.SimCtx, ctx sdk.
PoolId: pool_id,
TokenOutDenom: tokenOut.Denom,
ShareInAmount: gammShares.Amount.Quo(sdk.NewInt(2)),
TokenOutMinAmount: tokenOut.Amount,
TokenOutMinAmount: tokenOut.Amount.Quo(sdk.NewInt(2)),
}, nil
}

Expand Down