Skip to content

Commit 80760ae

Browse files
authored
Merge pull request #2045 from CosmWasm/co/update-wasmvm-0.53
Update 0.53.x branch to latest wasmvm patch
2 parents de7db0d + 5f7d0c2 commit 80760ae

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ RUN apk add git
1717
WORKDIR /code
1818
COPY . /code/
1919
# See https://github.com/CosmWasm/wasmvm/releases
20-
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.2/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
21-
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.2/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
22-
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 0881c5b463e89e229b06370e9e2961aec0a5c636772d5142c68d351564464a66
23-
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 58e1f6bfa89ee390cb9abc69a5bc126029a497fe09dd399f38a82d0d86fe95ef
20+
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.3/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
21+
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.3/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
22+
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep faea4e15390e046d2ca8441c21a88dba56f9a0363f92c5d94015df0ac6da1f2d
23+
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 8dab08434a5fe57a6fbbcb8041794bc3c31846d31f8ff5fb353ee74e0fcd3093
2424

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

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd
33
go 1.21
44

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

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25
223223
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
224224
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
225225
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
226-
github.com/CosmWasm/wasmvm/v2 v2.1.2 h1:GkJ5bAsRlLHfIQVg/FY1VHwLyBwlCjAhDea0B8L+e20=
227-
github.com/CosmWasm/wasmvm/v2 v2.1.2/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg=
226+
github.com/CosmWasm/wasmvm/v2 v2.1.3 h1:CSJTauZqkHyb9yic6JVYCjiGUgxI2MJV2QzfSu8m49c=
227+
github.com/CosmWasm/wasmvm/v2 v2.1.3/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg=
228228
github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4=
229229
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
230230
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=

x/wasm/keeper/keeper_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ func TestInstantiate(t *testing.T) {
422422

423423
gasAfter := ctx.GasMeter().GasConsumed()
424424
if types.EnableGasVerification {
425-
require.Equal(t, uint64(0x1bc8f), gasAfter-gasBefore)
425+
require.Equal(t, uint64(0x1bca5), gasAfter-gasBefore)
426426
}
427427

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

x/wasm/keeper/recurse_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ func initRecurseContract(t *testing.T) (contract sdk.AccAddress, ctx sdk.Context
5656

5757
func TestGasCostOnQuery(t *testing.T) {
5858
const (
59-
GasNoWork uint64 = 63_983
59+
GasNoWork uint64 = 0xfa02
6060
// Note: about 100 SDK gas (10k CosmWasm gas) for each round of sha256
61-
GasWork50 uint64 = 64_222 // this is a little shy of 50k gas - to keep an eye on the limit
61+
GasWork50 uint64 = 0xfaf9
6262

63-
GasReturnUnhashed uint64 = 55
64-
GasReturnHashed uint64 = 46
63+
GasReturnUnhashed uint64 = 70
64+
GasReturnHashed uint64 = 59
6565
)
6666

6767
cases := map[string]struct {
@@ -211,9 +211,9 @@ func TestLimitRecursiveQueryGas(t *testing.T) {
211211

212212
const (
213213
// Note: about 100 SDK gas (10k CosmWasm gas) for each round of sha256
214-
GasWork2k uint64 = 76_279 // = SetupContractCost + x // we have 6x gas used in cpu than in the instance
214+
GasWork2k uint64 = 0x12c20 // = SetupContractCost + x // we have 6x gas used in cpu than in the instance
215215
// This is overhead for calling into a sub-contract
216-
GasReturnHashed uint64 = 48
216+
GasReturnHashed uint64 = 0x3B
217217
)
218218

219219
cases := map[string]struct {
@@ -263,7 +263,7 @@ func TestLimitRecursiveQueryGas(t *testing.T) {
263263
expectQueriesFromContract: 10,
264264
expectOutOfGas: false,
265265
expectError: "query wasm contract failed", // Error we get from the contract instance doing the failing query, not wasmd
266-
expectedGas: 10*(GasWork2k+GasReturnHashed) + 3279, // lots of additional gas for long error message
266+
expectedGas: 10*(GasWork2k+GasReturnHashed) + 3400, // lots of additional gas for long error message
267267
},
268268
}
269269

0 commit comments

Comments
 (0)