Bump github.com/CosmWasm/wasmvm/v2 from 2.1.0 to 2.1.2 (#1953)

* Bump github.com/CosmWasm/wasmvm/v2 from 2.1.0 to 2.1.2

Bumps [github.com/CosmWasm/wasmvm/v2](https://github.com/CosmWasm/wasmvm) from 2.1.0 to 2.1.2.
- [Release notes](https://github.com/CosmWasm/wasmvm/releases)
- [Changelog](https://github.com/CosmWasm/wasmvm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/CosmWasm/wasmvm/compare/v2.1.0...v2.1.2)

---
updated-dependencies:
- dependency-name: github.com/CosmWasm/wasmvm/v2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update Dockefile

* Fix gas

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pino' Surace <pino.surace@live.it>
This commit is contained in:
dependabot[bot]
2024-08-12 10:30:58 +02:00
committed by GitHub
parent 09f934763f
commit 8946a3222a
6 changed files with 17 additions and 17 deletions

View File

@@ -17,10 +17,10 @@ RUN apk add git
WORKDIR /code WORKDIR /code
COPY . /code/ COPY . /code/
# See https://github.com/CosmWasm/wasmvm/releases # See https://github.com/CosmWasm/wasmvm/releases
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.2/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.2/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 06945cae8fced839a2be0980887a1c5d04d15fd29837ac644a648d555c49ab4d RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 0881c5b463e89e229b06370e9e2961aec0a5c636772d5142c68d351564464a66
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep df4bd912c35be48781a40edea88fd5f409c643fb27e0dc043184ef51dc50a1cc RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 58e1f6bfa89ee390cb9abc69a5bc126029a497fe09dd399f38a82d0d86fe95ef
# force it to use static lib (from above) not standard libgo_cosmwasm.so file # force it to use static lib (from above) not standard libgo_cosmwasm.so file
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build

2
go.mod
View File

@@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd
go 1.21 go 1.21
require ( require (
github.com/CosmWasm/wasmvm/v2 v2.1.0 github.com/CosmWasm/wasmvm/v2 v2.1.2
github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.50.8 github.com/cosmos/cosmos-sdk v0.50.8
github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect

4
go.sum
View File

@@ -225,8 +225,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/CosmWasm/wasmvm/v2 v2.1.0 h1:bleLhNA36hM8iPjFJsNRi9RjrQW6MtXafw2+wVjAWAE= github.com/CosmWasm/wasmvm/v2 v2.1.2 h1:GkJ5bAsRlLHfIQVg/FY1VHwLyBwlCjAhDea0B8L+e20=
github.com/CosmWasm/wasmvm/v2 v2.1.0/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= github.com/CosmWasm/wasmvm/v2 v2.1.2/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg=
github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=

View File

@@ -422,7 +422,7 @@ func TestInstantiate(t *testing.T) {
gasAfter := ctx.GasMeter().GasConsumed() gasAfter := ctx.GasMeter().GasConsumed()
if types.EnableGasVerification { if types.EnableGasVerification {
require.Equal(t, uint64(0x1bc6b), gasAfter-gasBefore) require.Equal(t, uint64(0x1bc8f), gasAfter-gasBefore)
} }
// ensure it is stored properly // ensure it is stored properly
@@ -959,7 +959,7 @@ func TestExecute(t *testing.T) {
// make sure gas is properly deducted from ctx // make sure gas is properly deducted from ctx
gasAfter := ctx.GasMeter().GasConsumed() gasAfter := ctx.GasMeter().GasConsumed()
if types.EnableGasVerification { if types.EnableGasVerification {
require.Equal(t, uint64(0x1ac76), gasAfter-gasBefore) require.Equal(t, uint64(0x1acb4), gasAfter-gasBefore)
} }
// ensure bob now exists and got both payments released // ensure bob now exists and got both payments released
bobAcct = accKeeper.GetAccount(ctx, bob) bobAcct = accKeeper.GetAccount(ctx, bob)

View File

@@ -56,12 +56,12 @@ func initRecurseContract(t *testing.T) (contract sdk.AccAddress, ctx sdk.Context
func TestGasCostOnQuery(t *testing.T) { func TestGasCostOnQuery(t *testing.T) {
const ( const (
GasNoWork uint64 = 63_956 GasNoWork uint64 = 63_983
// Note: about 100 SDK gas (10k CosmWasm gas) for each round of sha256 // Note: about 100 SDK gas (10k CosmWasm gas) for each round of sha256
GasWork50 uint64 = 64_268 // this is a little shy of 50k gas - to keep an eye on the limit GasWork50 uint64 = 64_222 // this is a little shy of 50k gas - to keep an eye on the limit
GasReturnUnhashed uint64 = 36 GasReturnUnhashed uint64 = 55
GasReturnHashed uint64 = 29 GasReturnHashed uint64 = 46
) )
cases := map[string]struct { cases := map[string]struct {
@@ -211,9 +211,9 @@ func TestLimitRecursiveQueryGas(t *testing.T) {
const ( const (
// Note: about 100 SDK gas (10k CosmWasm gas) for each round of sha256 // Note: about 100 SDK gas (10k CosmWasm gas) for each round of sha256
GasWork2k uint64 = 78_937 // = SetupContractCost + x // we have 6x gas used in cpu than in the instance GasWork2k uint64 = 76_279 // = SetupContractCost + x // we have 6x gas used in cpu than in the instance
// This is overhead for calling into a sub-contract // This is overhead for calling into a sub-contract
GasReturnHashed uint64 = 30 GasReturnHashed uint64 = 48
) )
cases := map[string]struct { cases := map[string]struct {
@@ -263,7 +263,7 @@ func TestLimitRecursiveQueryGas(t *testing.T) {
expectQueriesFromContract: 10, expectQueriesFromContract: 10,
expectOutOfGas: false, expectOutOfGas: false,
expectError: "query wasm contract failed", // Error we get from the contract instance doing the failing query, not wasmd expectError: "query wasm contract failed", // Error we get from the contract instance doing the failing query, not wasmd
expectedGas: 10*(GasWork2k+GasReturnHashed) + 3152, // lots of additional gas for long error message expectedGas: 10*(GasWork2k+GasReturnHashed) + 3279, // lots of additional gas for long error message
}, },
} }

View File

@@ -243,7 +243,7 @@ func TestDispatchSubMsgErrorHandling(t *testing.T) {
"send tokens": { "send tokens": {
submsgID: 5, submsgID: 5,
msg: validBankSend, msg: validBankSend,
resultAssertions: []assertion{assertReturnedEvents(0), assertGasUsed(110_000, 111_000)}, resultAssertions: []assertion{assertReturnedEvents(0), assertGasUsed(110_000, 112_000)},
}, },
"not enough tokens": { "not enough tokens": {
submsgID: 6, submsgID: 6,