diff --git a/precompiles/solo/solo_test.go b/precompiles/solo/solo_test.go index 49469cc650..9adfb34264 100644 --- a/precompiles/solo/solo_test.go +++ b/precompiles/solo/solo_test.go @@ -207,7 +207,7 @@ func TestClaimSingleCW721(t *testing.T) { _, remainingGas, err := p.ClaimSpecific(ctx, claimer, &method, []interface{}{signClaimMsg(t, evmtypes.NewMsgClaimSpecific(claimee, claimer, &evmtypes.Asset{AssetType: evmtypes.AssetType_TYPECW721, ContractAddress: contractAddr.String(), Denom: "5"}), claimee, claimer, acc, claimeeKey)}, false) ctx = ctx.WithGasMeter(sdk.NewInfiniteGasMeterWithMultiplier(ctx)) require.NoError(t, err) - require.Equal(t, uint64(1838040), remainingGas) + require.Equal(t, uint64(0x1c0bc6), remainingGas) for i := 0; i < 15; i++ { if i == 5 { require.Equal(t, k.GetSeiAddressOrDefault(ctx, claimer).String(), queryCW721Owner(ctx, testkeeper.EVMTestApp.WasmKeeper, contractAddr, fmt.Sprintf("%d", i))) diff --git a/sei-wasmd/x/wasm/keeper/keeper_test.go b/sei-wasmd/x/wasm/keeper/keeper_test.go index 3f4d991c08..42cbd1cba6 100644 --- a/sei-wasmd/x/wasm/keeper/keeper_test.go +++ b/sei-wasmd/x/wasm/keeper/keeper_test.go @@ -389,7 +389,7 @@ func TestInstantiate(t *testing.T) { gasAfter := ctx.GasMeter().GasConsumed() if types.EnableGasVerification { - require.Equal(t, uint64(0x18b5d), gasAfter-gasBefore) + require.Equal(t, uint64(0x18b7c), gasAfter-gasBefore) } // ensure it is stored properly @@ -622,7 +622,7 @@ func TestExecute(t *testing.T) { // make sure gas is properly deducted from ctx gasAfter := ctx.GasMeter().GasConsumed() if types.EnableGasVerification { - require.Equal(t, uint64(0x17c7a), gasAfter-gasBefore) + require.Equal(t, uint64(0x17ca5), gasAfter-gasBefore) } // ensure bob now exists and got both payments released bobAcct = accKeeper.GetAccount(ctx, bob) diff --git a/sei-wasmvm/internal/api/iterator_test.go b/sei-wasmvm/internal/api/iterator_test.go index 3f2792d2f7..d1f335cb79 100644 --- a/sei-wasmvm/internal/api/iterator_test.go +++ b/sei-wasmvm/internal/api/iterator_test.go @@ -279,7 +279,7 @@ func TestQueueIteratorLimit(t *testing.T) { require.Equal(t, `{}`, string(qres.Ok)) // Open 35000 iterators - gasLimit = TESTING_GAS_LIMIT * 7 + gasLimit = TESTING_GAS_LIMIT * 10 gasMeter = NewMockGasMeter(gasLimit) igasMeter = types.GasMeter(gasMeter) store = setup.Store(gasMeter) diff --git a/sei-wasmvm/internal/api/lib_test.go b/sei-wasmvm/internal/api/lib_test.go index 069556b5a0..b0d5b14186 100644 --- a/sei-wasmvm/internal/api/lib_test.go +++ b/sei-wasmvm/internal/api/lib_test.go @@ -363,7 +363,7 @@ func TestInstantiate(t *testing.T) { res, cost, err := Instantiate(cache, checksum, env, info, msg, &igasMeter, store, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG) require.NoError(t, err) requireOkResponse(t, res, 0) - assert.Equal(t, uint64(0x252528f74), cost.UsedInternally) + assert.Equal(t, uint64(0x325b7c35c), cost.UsedInternally) var result types.ContractResult err = json.Unmarshal(res, &result) @@ -394,7 +394,7 @@ func TestExecute(t *testing.T) { diff := time.Since(start) require.NoError(t, err) requireOkResponse(t, res, 0) - assert.Equal(t, uint64(0x252528f74), cost.UsedInternally) + assert.Equal(t, uint64(0x325b7c35c), cost.UsedInternally) t.Logf("Time (%d gas): %s\n", cost.UsedInternally, diff) // execute with the same store @@ -407,7 +407,7 @@ func TestExecute(t *testing.T) { res, cost, err = Execute(cache, checksum, env, info, []byte(`{"release":{}}`), &igasMeter2, store, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG) diff = time.Since(start) require.NoError(t, err) - assert.Equal(t, uint64(0x3ffe1e058), cost.UsedInternally) + assert.Equal(t, uint64(0x51b149450), cost.UsedInternally) t.Logf("Time (%d gas): %s\n", cost.UsedInternally, diff) // make sure it read the balance properly and we got 250 atoms @@ -515,7 +515,7 @@ func TestExecuteCpuLoop(t *testing.T) { diff := time.Since(start) require.NoError(t, err) requireOkResponse(t, res, 0) - assert.Equal(t, uint64(0x18a753768), cost.UsedInternally) + assert.Equal(t, uint64(0x1e8be2de8), cost.UsedInternally) t.Logf("Time (%d gas): %s\n", cost.UsedInternally, diff) // execute a cpu loop @@ -666,7 +666,7 @@ func TestMultipleInstances(t *testing.T) { require.NoError(t, err) requireOkResponse(t, res, 0) // we now count wasm gas charges and db writes - assert.Equal(t, uint64(0x24e474064), cost.UsedInternally) + assert.Equal(t, uint64(0x320ca1714), cost.UsedInternally) // instance2 controlled by mary gasMeter2 := NewMockGasMeter(TESTING_GAS_LIMIT) @@ -677,14 +677,14 @@ func TestMultipleInstances(t *testing.T) { res, cost, err = Instantiate(cache, checksum, env, info, msg, &igasMeter2, store2, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG) require.NoError(t, err) requireOkResponse(t, res, 0) - assert.Equal(t, uint64(0x250a66614), cost.UsedInternally) + assert.Equal(t, uint64(0x323a5d34c), cost.UsedInternally) // fail to execute store1 with mary - resp := exec(t, cache, checksum, "mary", store1, api, querier, 0x220d6e990) + resp := exec(t, cache, checksum, "mary", store1, api, querier, 0x2a64f3b68) require.Equal(t, "Unauthorized", resp.Err) // succeed to execute store1 with fred - resp = exec(t, cache, checksum, "fred", store1, api, querier, 0x3fe0b99b8) + resp = exec(t, cache, checksum, "fred", store1, api, querier, 0x51910ae00) require.Equal(t, "", resp.Err) require.Equal(t, 1, len(resp.Ok.Messages)) attributes := resp.Ok.Attributes @@ -693,7 +693,7 @@ func TestMultipleInstances(t *testing.T) { require.Equal(t, "bob", attributes[1].Value) // succeed to execute store2 with mary - resp = exec(t, cache, checksum, "mary", store2, api, querier, 0x3fef6bd08) + resp = exec(t, cache, checksum, "mary", store2, api, querier, 0x51a12a128) require.Equal(t, "", resp.Err) require.Equal(t, 1, len(resp.Ok.Messages)) attributes = resp.Ok.Attributes diff --git a/sei-wasmvm/internal/api/libwasmvm.aarch64.so b/sei-wasmvm/internal/api/libwasmvm.aarch64.so index 1f08282674..fe8acbeb15 100755 Binary files a/sei-wasmvm/internal/api/libwasmvm.aarch64.so and b/sei-wasmvm/internal/api/libwasmvm.aarch64.so differ diff --git a/sei-wasmvm/internal/api/libwasmvm.dylib b/sei-wasmvm/internal/api/libwasmvm.dylib index c35f461871..dc310a98a6 100755 Binary files a/sei-wasmvm/internal/api/libwasmvm.dylib and b/sei-wasmvm/internal/api/libwasmvm.dylib differ diff --git a/sei-wasmvm/internal/api/libwasmvm.x86_64.so b/sei-wasmvm/internal/api/libwasmvm.x86_64.so index 2617b50a5c..0de5ddaa68 100755 Binary files a/sei-wasmvm/internal/api/libwasmvm.x86_64.so and b/sei-wasmvm/internal/api/libwasmvm.x86_64.so differ diff --git a/sei-wasmvm/internal/api/libwasmvm_muslc.a b/sei-wasmvm/internal/api/libwasmvm_muslc.a index f014c15970..e2bad3be15 100644 Binary files a/sei-wasmvm/internal/api/libwasmvm_muslc.a and b/sei-wasmvm/internal/api/libwasmvm_muslc.a differ diff --git a/sei-wasmvm/internal/api/libwasmvm_muslc.aarch64.a b/sei-wasmvm/internal/api/libwasmvm_muslc.aarch64.a index 315df325a9..2bafc1c92b 100644 Binary files a/sei-wasmvm/internal/api/libwasmvm_muslc.aarch64.a and b/sei-wasmvm/internal/api/libwasmvm_muslc.aarch64.a differ diff --git a/sei-wasmvm/libwasmvm/Cargo.lock b/sei-wasmvm/libwasmvm/Cargo.lock index 0782413165..0bfcd89f6b 100644 --- a/sei-wasmvm/libwasmvm/Cargo.lock +++ b/sei-wasmvm/libwasmvm/Cargo.lock @@ -254,8 +254,8 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.5.7" -source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v1.5.7#3d91925ee82c9d40c1368015fde436836089469e" +version = "1.5.12" +source = "git+https://github.com/sei-protocol/cosmwasm.git?rev=v1.5.12#876555b37e48a66857df3fc23faa801ef73e176e" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -266,16 +266,16 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.5.7" -source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v1.5.7#3d91925ee82c9d40c1368015fde436836089469e" +version = "1.5.12" +source = "git+https://github.com/sei-protocol/cosmwasm.git?rev=v1.5.12#876555b37e48a66857df3fc23faa801ef73e176e" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-std" -version = "1.5.7" -source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v1.5.7#3d91925ee82c9d40c1368015fde436836089469e" +version = "1.5.12" +source = "git+https://github.com/sei-protocol/cosmwasm.git?rev=v1.5.12#876555b37e48a66857df3fc23faa801ef73e176e" dependencies = [ "base64", "bech32", @@ -295,8 +295,8 @@ dependencies = [ [[package]] name = "cosmwasm-vm" -version = "1.5.7" -source = "git+https://github.com/CosmWasm/cosmwasm.git?rev=v1.5.7#3d91925ee82c9d40c1368015fde436836089469e" +version = "1.5.12" +source = "git+https://github.com/sei-protocol/cosmwasm.git?rev=v1.5.12#876555b37e48a66857df3fc23faa801ef73e176e" dependencies = [ "bitflags", "bytecheck", @@ -315,6 +315,7 @@ dependencies = [ "thiserror", "wasmer", "wasmer-middlewares", + "wasmer-types", ] [[package]] diff --git a/sei-wasmvm/libwasmvm/Cargo.toml b/sei-wasmvm/libwasmvm/Cargo.toml index d057c1ef67..855f443f3f 100644 --- a/sei-wasmvm/libwasmvm/Cargo.toml +++ b/sei-wasmvm/libwasmvm/Cargo.toml @@ -26,12 +26,12 @@ default = [] backtraces = [] [dependencies] -cosmwasm-std = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v1.5.7", features = [ +cosmwasm-std = { git = "https://github.com/sei-protocol/cosmwasm.git", rev = "v1.5.12", features = [ "staking", "stargate", "iterator", ] } -cosmwasm-vm = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v1.5.7", features = [ +cosmwasm-vm = { git = "https://github.com/sei-protocol/cosmwasm.git", rev = "v1.5.12", features = [ "staking", "stargate", "iterator",