Skip to content

Commit 8c38def

Browse files
authored
Merge pull request #555 from CosmWasm/merge-2.1
Merge updates from 2.1 branch into main
2 parents 57bf368 + f96710f commit 8c38def

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

internal/api/lib_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ func TestInstantiate(t *testing.T) {
485485
res, cost, err := Instantiate(cache, checksum, env, info, msg, &igasMeter, store, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG)
486486
require.NoError(t, err)
487487
requireOkResponse(t, res, 0)
488-
assert.Equal(t, uint64(0x540eb6), cost.UsedInternally)
488+
assert.Equal(t, uint64(0x8c288c), cost.UsedInternally)
489489

490490
var result types.ContractResult
491491
err = json.Unmarshal(res, &result)
@@ -516,7 +516,7 @@ func TestExecute(t *testing.T) {
516516
diff := time.Since(start)
517517
require.NoError(t, err)
518518
requireOkResponse(t, res, 0)
519-
assert.Equal(t, uint64(0x540eb6), cost.UsedInternally)
519+
assert.Equal(t, uint64(0x8c288c), cost.UsedInternally)
520520
t.Logf("Time (%d gas): %s\n", cost.UsedInternally, diff)
521521

522522
// execute with the same store
@@ -529,7 +529,7 @@ func TestExecute(t *testing.T) {
529529
res, cost, err = Execute(cache, checksum, env, info, []byte(`{"release":{}}`), &igasMeter2, store, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG)
530530
diff = time.Since(start)
531531
require.NoError(t, err)
532-
assert.Equal(t, uint64(0x975216), cost.UsedInternally)
532+
assert.Equal(t, uint64(0xfaea3d), cost.UsedInternally)
533533
t.Logf("Time (%d gas): %s\n", cost.UsedInternally, diff)
534534

535535
// make sure it read the balance properly and we got 250 atoms
@@ -637,7 +637,7 @@ func TestExecuteCpuLoop(t *testing.T) {
637637
diff := time.Since(start)
638638
require.NoError(t, err)
639639
requireOkResponse(t, res, 0)
640-
assert.Equal(t, uint64(0x3d997e), cost.UsedInternally)
640+
assert.Equal(t, uint64(0x64fb31), cost.UsedInternally)
641641
t.Logf("Time (%d gas): %s\n", cost.UsedInternally, diff)
642642

643643
// execute a cpu loop
@@ -866,7 +866,7 @@ func TestMultipleInstances(t *testing.T) {
866866
require.NoError(t, err)
867867
requireOkResponse(t, res, 0)
868868
// we now count wasm gas charges and db writes
869-
assert.Equal(t, uint64(0x53541c), cost.UsedInternally)
869+
assert.Equal(t, uint64(0x8b0ca4), cost.UsedInternally)
870870

871871
// instance2 controlled by mary
872872
gasMeter2 := NewMockGasMeter(TESTING_GAS_LIMIT)
@@ -877,14 +877,14 @@ func TestMultipleInstances(t *testing.T) {
877877
res, cost, err = Instantiate(cache, checksum, env, info, msg, &igasMeter2, store2, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG)
878878
require.NoError(t, err)
879879
requireOkResponse(t, res, 0)
880-
assert.Equal(t, uint64(0x53bbb4), cost.UsedInternally)
880+
assert.Equal(t, uint64(0x8baa51), cost.UsedInternally)
881881

882882
// fail to execute store1 with mary
883-
resp := exec(t, cache, checksum, "mary", store1, api, querier, 0x503f70)
883+
resp := exec(t, cache, checksum, "mary", store1, api, querier, 0x85e616)
884884
require.Equal(t, "Unauthorized", resp.Err)
885885

886886
// succeed to execute store1 with fred
887-
resp = exec(t, cache, checksum, "fred", store1, api, querier, 0x970662)
887+
resp = exec(t, cache, checksum, "fred", store1, api, querier, 0xfa70f3)
888888
require.Equal(t, "", resp.Err)
889889
require.Equal(t, 1, len(resp.Ok.Messages))
890890
attributes := resp.Ok.Attributes
@@ -893,7 +893,7 @@ func TestMultipleInstances(t *testing.T) {
893893
require.Equal(t, "bob", attributes[1].Value)
894894

895895
// succeed to execute store2 with mary
896-
resp = exec(t, cache, checksum, "mary", store2, api, querier, 0x972c3c)
896+
resp = exec(t, cache, checksum, "mary", store2, api, querier, 0xfaad98)
897897
require.Equal(t, "", resp.Err)
898898
require.Equal(t, 1, len(resp.Ok.Messages))
899899
attributes = resp.Ok.Attributes

libwasmvm/Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libwasmvm/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wasmvm"
3-
version = "2.1.0"
3+
version = "2.1.2"
44
publish = false
55
authors = ["Ethan Frey <[email protected]>"]
66
edition = "2021"
@@ -26,12 +26,12 @@ default = []
2626
backtraces = []
2727

2828
[dependencies]
29-
cosmwasm-std = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.1.0", features = [
29+
cosmwasm-std = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.1.3", features = [
3030
"staking",
3131
"stargate",
3232
"iterator",
3333
] }
34-
cosmwasm-vm = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.1.0", features = [
34+
cosmwasm-vm = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.1.3", features = [
3535
"staking",
3636
"stargate",
3737
"iterator",

0 commit comments

Comments
 (0)