Skip to content

Commit 4708149

Browse files
authored
Bump wasmvm to v2.2.3 (#2179)
* Bump wasmvm to v2.2.3 * Fix tests
1 parent 5d2f157 commit 4708149

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ RUN apk add git
1515
WORKDIR /code
1616
COPY . /code/
1717
# See https://github.com/CosmWasm/wasmvm/releases
18-
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
19-
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
20-
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep ba6cb5db6b14a265c8556326c045880908db9b1d2ffb5d4aa9f09ac09b24cecc
21-
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep b3bd755efac0ff39c01b59b8110f961c48aa3eb93588071d7a628270cc1f2326
18+
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.2.3/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
19+
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.2.3/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
20+
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 6641730781bb1adc4bdf04a1e0f822b9ad4fb8ed57dcbbf575527e63b791ae41
21+
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 32503fe35a7be202c5f7c3051497d6e4b3cd83079a61f5a0bf72a2a455b6d820
2222

2323
# force it to use static lib (from above) not standard libgo_cosmwasm.so file
2424
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd
33
go 1.23.6
44

55
require (
6-
github.com/CosmWasm/wasmvm/v2 v2.2.1
6+
github.com/CosmWasm/wasmvm/v2 v2.2.3
77
github.com/cosmos/cosmos-proto v1.0.0-beta.5
88
github.com/cosmos/cosmos-sdk v0.50.13
99
github.com/cosmos/gogogateway v1.2.0 // indirect

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25
227227
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
228228
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
229229
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
230-
github.com/CosmWasm/wasmvm/v2 v2.2.1 h1:cmOnM+TDfUl2VRugeo1eJBw4U/Lw0WLviuQHKSo9DVQ=
231-
github.com/CosmWasm/wasmvm/v2 v2.2.1/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg=
230+
github.com/CosmWasm/wasmvm/v2 v2.2.3 h1:LVaAdkCMbgfUTSFOANmp2OOU1rIgz4iylow4SFD/lqs=
231+
github.com/CosmWasm/wasmvm/v2 v2.2.3/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg=
232232
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
233233
github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q=
234234
github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=

x/wasm/keeper/keeper_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ func TestInstantiate(t *testing.T) {
423423

424424
gasAfter := ctx.GasMeter().GasConsumed()
425425
if types.EnableGasVerification {
426-
require.Equal(t, uint64(0x1bca5), gasAfter-gasBefore)
426+
require.Equal(t, uint64(0x1bcb0), gasAfter-gasBefore)
427427
}
428428

429429
// ensure it is stored properly
@@ -960,7 +960,7 @@ func TestExecute(t *testing.T) {
960960
// make sure gas is properly deducted from ctx
961961
gasAfter := ctx.GasMeter().GasConsumed()
962962
if types.EnableGasVerification {
963-
require.Equal(t, uint64(0x1acdb), gasAfter-gasBefore)
963+
require.Equal(t, uint64(0x1ace0), gasAfter-gasBefore)
964964
}
965965
// ensure bob now exists and got both payments released
966966
bobAcct = accKeeper.GetAccount(ctx, bob)

x/wasm/keeper/recurse_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ func initRecurseContract(t *testing.T) (contract sdk.AccAddress, ctx sdk.Context
5656

5757
func TestGasCostOnQuery(t *testing.T) {
5858
const (
59-
GasNoWork uint64 = 63_987
60-
GasNoWorkDiscounted uint64 = 5_968
59+
GasNoWork uint64 = 63_988
60+
GasNoWorkDiscounted uint64 = 5_971
6161
// Note: about 100 SDK gas (10k CosmWasm gas) for each round of sha256
62-
GasWork50 uint64 = 64_234 // this is a little shy of 50k gas - to keep an eye on the limit
63-
GasWork50Discounted uint64 = 6_207
62+
GasWork50 uint64 = 64_236 // this is a little shy of 50k gas - to keep an eye on the limit
63+
GasWork50Discounted uint64 = 6_210
6464

6565
GasReturnUnhashed uint64 = 89
6666
GasReturnHashed uint64 = 86
@@ -214,9 +214,9 @@ func TestLimitRecursiveQueryGas(t *testing.T) {
214214

215215
const (
216216
// Note: about 100 SDK gas (10k CosmWasm gas) for each round of sha256
217-
GasWork2k uint64 = 76_817 // = SetupContractCost + x // we have 6x gas used in cpu than in the instance
217+
GasWork2k uint64 = 76_818 // = SetupContractCost + x // we have 6x gas used in cpu than in the instance
218218

219-
GasWork2kDiscounted uint64 = 18_264 + 432
219+
GasWork2kDiscounted uint64 = 18_264 + 436
220220

221221
// This is overhead for calling into a sub-contract
222222
GasReturnHashed uint64 = 48 + 132
@@ -269,7 +269,7 @@ func TestLimitRecursiveQueryGas(t *testing.T) {
269269
expectQueriesFromContract: 10,
270270
expectOutOfGas: false,
271271
expectError: "query wasm contract failed", // Error we get from the contract instance doing the failing query, not wasmd
272-
expectedGas: GasWork2k + GasReturnHashed + 9*(GasWork2kDiscounted+GasReturnHashed) + 3279, // lots of additional gas for long error message
272+
expectedGas: GasWork2k + GasReturnHashed + 9*(GasWork2kDiscounted+GasReturnHashed) + 3278, // lots of additional gas for long error message
273273
},
274274
}
275275

0 commit comments

Comments
 (0)