diff --git a/app/test_helpers.go b/app/test_helpers.go index e37db12789..ceff625168 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -5,7 +5,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "math/rand" "path/filepath" "strconv" "testing" @@ -318,7 +317,6 @@ func SignCheckDeliver( chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, ) (sdk.GasInfo, *sdk.Result, error) { tx, err := helpers.GenTx( - rand.New(rand.NewSource(time.Now().UnixNano())), txCfg, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, @@ -368,7 +366,6 @@ func SignAndDeliver( chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, ) (sdk.GasInfo, *sdk.Result, error) { tx, err := helpers.GenTx( - rand.New(rand.NewSource(time.Now().UnixNano())), txCfg, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, @@ -406,7 +403,6 @@ func GenSequenceOfTxs(txGen client.TxConfig, msgs []sdk.Msg, accNums []uint64, i var err error for i := 0; i < numToGenerate; i++ { txs[i], err = helpers.GenTx( - rand.New(rand.NewSource(time.Now().UnixNano())), txGen, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, diff --git a/benchmarks/app_test.go b/benchmarks/app_test.go index e1e8954f5c..88773e6b42 100644 --- a/benchmarks/app_test.go +++ b/benchmarks/app_test.go @@ -2,7 +2,6 @@ package benchmarks import ( "encoding/json" - "math/rand" "os" "testing" "time" @@ -126,8 +125,7 @@ func InitializeWasmApp(b testing.TB, db dbm.DB, numAccounts int) AppInfo { Sender: addr.String(), WASMByteCode: cw20Code, } - storeTx, err := helpers.GenTx(rand.New(rand.NewSource(time.Now().UnixNano())), - txGen, []sdk.Msg{&storeMsg}, nil, 55123123, "", []uint64{0}, []uint64{0}, minter) + storeTx, err := helpers.GenTx(txGen, []sdk.Msg{&storeMsg}, nil, 55123123, "", []uint64{0}, []uint64{0}, minter) require.NoError(b, err) _, res, err := wasmApp.Deliver(txGen.TxEncoder(), storeTx) require.NoError(b, err) @@ -161,8 +159,7 @@ func InitializeWasmApp(b testing.TB, db dbm.DB, numAccounts int) AppInfo { Msg: initBz, } gasWanted := 500000 + 10000*uint64(numAccounts) - initTx, err := helpers.GenTx(rand.New(rand.NewSource(time.Now().UnixNano())), - txGen, []sdk.Msg{&initMsg}, nil, gasWanted, "", []uint64{0}, []uint64{1}, minter) + initTx, err := helpers.GenTx(txGen, []sdk.Msg{&initMsg}, nil, gasWanted, "", []uint64{0}, []uint64{1}, minter) require.NoError(b, err) _, res, err = wasmApp.Deliver(txGen.TxEncoder(), initTx) require.NoError(b, err) @@ -195,7 +192,6 @@ func GenSequenceOfTxs(b testing.TB, info *AppInfo, msgGen func(*AppInfo) ([]sdk. msgs, err := msgGen(info) require.NoError(b, err) txs[i], err = helpers.GenTx( - rand.New(rand.NewSource(time.Now().UnixNano())), info.TxConfig, msgs, fees, diff --git a/go.mod b/go.mod index 2ada37be67..216c2e57e7 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ go 1.18 require ( github.com/CosmWasm/wasmvm v1.1.1 github.com/cosmos/cosmos-proto v1.0.0-alpha7 - github.com/cosmos/cosmos-sdk v0.45.8 + github.com/cosmos/cosmos-sdk v0.45.9 github.com/cosmos/gogoproto v1.4.2 - github.com/cosmos/iavl v0.19.1 + github.com/cosmos/iavl v0.19.3 github.com/cosmos/ibc-go/v3 v3.3.0 github.com/cosmos/interchain-accounts v0.1.0 github.com/dvsekhvalnov/jose2go v1.5.0 @@ -128,6 +128,7 @@ require ( ) replace ( + github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 // Fix upstream GHSA-h395-qcrw-5vmq vulnerability. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 @@ -135,5 +136,4 @@ replace ( // the following version across all dependencies. github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 google.golang.org/grpc => google.golang.org/grpc v1.33.2 - ) diff --git a/go.sum b/go.sum index 7d6e085333..235a94278b 100644 --- a/go.sum +++ b/go.sum @@ -151,8 +151,6 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go v0.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= -github.com/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= -github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= @@ -164,8 +162,10 @@ github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hkrwIV6vkUbO0= github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= -github.com/cosmos/cosmos-sdk v0.45.8 h1:UHO5LTkOYLK1pvu9WELCxnp8zw/YcjoNGqqcYiLQ4pE= -github.com/cosmos/cosmos-sdk v0.45.8/go.mod h1:+OKZMhLj+Y6LCzCDsyIvpul/xk7n9lVUn8sikLWD0Jo= +github.com/cosmos/cosmos-sdk v0.45.9 h1:Z4s1EZL/mfM8uSSZr8WmyEbWp4hqbWVI5sAIFR432KY= +github.com/cosmos/cosmos-sdk v0.45.9/go.mod h1:Z5M4TX7PsHNHlF/1XanI2DIpORQ+Q/st7oaeufEjnvU= +github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 h1:iKclrn3YEOwk4jQHT2ulgzuXyxmzmPczUalMwW4XH9k= +github.com/cosmos/cosmos-sdk/ics23/go v0.8.0/go.mod h1:2a4dBq88TUoqoWAU5eu0lGvpFP3wWDPgdHPargtyw30= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -173,8 +173,8 @@ github.com/cosmos/gogoproto v1.4.2 h1:UeGRcmFW41l0G0MiefWhkPEVEwvu78SZsHBvI78dAY github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.19.1 h1:3gaq9b6SjiB0KBTygRnAvEGml2pQlu1TH8uma5g63Ys= -github.com/cosmos/iavl v0.19.1/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= +github.com/cosmos/iavl v0.19.3 h1:cESO0OwTTxQm5rmyESKW+zESheDUYI7CcZDWWDwnuxg= +github.com/cosmos/iavl v0.19.3/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= github.com/cosmos/ibc-go/v3 v3.3.0 h1:r8gYUvQreMQrf4R5RgedK9gcbjLk4uE2q6fuZGjf4n0= github.com/cosmos/ibc-go/v3 v3.3.0/go.mod h1:VUWLHw0C3USmTQZnTdkuXXdUdLbW8zsK3lV1Ieposog= github.com/cosmos/interchain-accounts v0.1.0 h1:QmuwNsf1Hxl3P5GSGt7Z+JeuHPiZw4Z34R/038P5T6s= diff --git a/x/wasm/simulation/sim_utils.go b/x/wasm/simulation/sim_utils.go index b29c18cf28..4f9a00b0bf 100644 --- a/x/wasm/simulation/sim_utils.go +++ b/x/wasm/simulation/sim_utils.go @@ -31,7 +31,6 @@ func GenAndDeliverTxWithRandFees(txCtx simulation.OperationInput, gas uint64) (s func GenAndDeliverTx(txCtx simulation.OperationInput, fees sdk.Coins, gas uint64) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { account := txCtx.AccountKeeper.GetAccount(txCtx.Context, txCtx.SimAccount.Address) tx, err := helpers.GenTx( - txCtx.R, txCtx.TxGen, []sdk.Msg{txCtx.Msg}, fees, diff --git a/x/wasm/types/iavl_range_test.go b/x/wasm/types/iavl_range_test.go index 1e5bdc92ab..85a4a18c95 100644 --- a/x/wasm/types/iavl_range_test.go +++ b/x/wasm/types/iavl_range_test.go @@ -15,7 +15,7 @@ import ( // and designed to ensure the IAVL store handles bounds the same way as the mock storage we use in Rust contract tests func TestIavlRangeBounds(t *testing.T) { memdb := dbm.NewMemDB() - tree, err := iavl2.NewMutableTree(memdb, 50) + tree, err := iavl2.NewMutableTree(memdb, 50, false) require.NoError(t, err) kvstore := iavl.UnsafeNewStore(tree)