Unverified Commit d7ed36f5 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

chore: upgrade wasmd to v0.28.0 (backport #2714) (#2744)

* chore: upgrade wasmd to v0.28.0 (#2714)

* chore: upgrade wasmd to v0.28.0

* changelog

* fix simulator

* update dependency

* simulator time hack

* update simulator

* remove curTime

* update tag

* update comments

* updates

* update wasmd dep

(cherry picked from commit b1c92ae4

)

* updates

Co-authored-by: default avatarRoman <roman@osmosis.team>
Co-authored-by: default avatarRoman <ackhtariev@gmail.com>
parent 55d55818
Showing with 12 additions and 8 deletions
+12 -8
......@@ -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
......
......@@ -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
......@@ -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
......
......@@ -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)
......
......@@ -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)
}
......
......@@ -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
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment