Skip to content

Commit

Permalink
Merged to version 1.32.1
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Baez <cb@mamoru.ai>
  • Loading branch information
carlosbmamoru committed Sep 9, 2024
1 parent 1a3c18f commit 7260c98
Show file tree
Hide file tree
Showing 30 changed files with 2,725 additions and 695 deletions.
841 changes: 380 additions & 461 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ members = [

[workspace.package]
# This version string will be inherited by sui-core, sui-faucet, sui-node, sui-tools, sui-sdk, sui-move-build, and sui crates.
version = "1.32.0"
version = "1.32.1"

[profile.release]
# debug = 1 means line charts only, which is minimum needed for good stack traces
Expand Down Expand Up @@ -374,6 +374,7 @@ jsonrpsee = { git = "https://github.com/wlmyng/jsonrpsee.git", rev = "b1b3007847
json_to_table = { git = "https://github.com/zhiburt/tabled/", rev = "e449317a1c02eb6b29e409ad6617e5d9eb7b3bd4" }
leb128 = "0.2.5"
lru = "0.10"
markdown-gen = "1.2.1"
match_opt = "0.1.2"
miette = { version = "7", features = ["fancy"] }
mime = "0.3"
Expand Down Expand Up @@ -504,6 +505,7 @@ tower-http = { version = "0.5", features = [
"set-header",
"propagate-header",
] }
# tower-http = { version="0.4", features = ["trace"] }
tower-layer = "0.3.2"
twox-hash = "1.6.3"
tracing = "0.1.37"
Expand Down Expand Up @@ -607,6 +609,7 @@ sui-authority-aggregation = { path = "crates/sui-authority-aggregation" }
sui-benchmark = { path = "crates/sui-benchmark" }
sui-bridge = { path = "crates/sui-bridge" }
sui-cluster-test = { path = "crates/sui-cluster-test" }
sui-common = { path = "crates/sui-common" }
sui-config = { path = "crates/sui-config" }
sui-core = { path = "crates/sui-core" }
sui-cost = { path = "crates/sui-cost" }
Expand Down Expand Up @@ -674,6 +677,7 @@ telemetry-subscribers = { path = "crates/telemetry-subscribers" }
test-cluster = { path = "crates/test-cluster" }
transaction-fuzzer = { path = "crates/transaction-fuzzer" }
typed-store = { path = "crates/typed-store" }
typed-store-derive = { path = "crates/typed-store-derive" }
typed-store-error = { path = "crates/typed-store-error" }
x = { path = "crates/x" }

Expand Down
1 change: 1 addition & 0 deletions crates/sui-core/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5530,6 +5530,7 @@ impl NodeStateDump {
Ok(path)
}

#[cfg(not(release))]
pub fn read_from_file(path: &PathBuf) -> Result<Self, anyhow::Error> {
let file = File::open(path)?;
serde_json::from_reader(file).map_err(|e| anyhow::anyhow!(e))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
processed 5 tasks

init:
A: object(0,0), B: object(0,1)

task 1, lines 9-28:
//# publish
created: object(1,0)
mutated: object(0,2)
gas summary: computation_cost: 1000000, storage_cost: 5380800, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, line 30:
//# run Test::M2::emit_emit_a --sender A --args 20
events: Event { package_id: Test, transaction_module: Identifier("M2"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [20, 0, 0, 0, 0, 0, 0, 0] }
mutated: object(0,0)
gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0

task 3, line 32:
//# create-checkpoint
Checkpoint created: 1

task 4, lines 34-51:
//# run-graphql
Response: {
"data": null,
"errors": [
{
"message": "Filtering by both emitting module and event type is not supported",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"events"
],
"extensions": {
"code": "BAD_USER_INPUT"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

// Tests that fetching events filtered on both emitting module and event would result
// in an error.

//# init --protocol-version 51 --addresses Test=0x0 --accounts A B --simulator

//# publish
module Test::M1 {
use sui::event;

public struct EventA has copy, drop {
new_value: u64
}

public fun emit_a(value: u64) {
event::emit(EventA { new_value: value })
}
}

module Test::M2 {
use Test::M1;

public fun emit_emit_a(value: u64) {
M1::emit_a(value);
}
}

//# run Test::M2::emit_emit_a --sender A --args 20

//# create-checkpoint

//# run-graphql
{
events(filter: {sender: "@{A}", emittingModule: "@{Test}::M2", eventType: "@{Test}::M1::EventA"}) {
nodes {
sendingModule {
name
}
type {
repr
}
sender {
address
}
json
bcs
}
}
}
254 changes: 254 additions & 0 deletions crates/sui-graphql-e2e-tests/tests/event_connection/no_filter.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
processed 6 tasks

init:
A: object(0,0)

task 1, lines 6-25:
//# publish
created: object(1,0)
mutated: object(0,1)
gas summary: computation_cost: 1000000, storage_cost: 4970400, storage_rebate: 0, non_refundable_storage_fee: 0

task 2, line 27:
//# run Test::M1::emit --sender A --args 0
events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [1, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [2, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [3, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [4, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [5, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [6, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [7, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [8, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [9, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [10, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [11, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [12, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [13, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [14, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [15, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [16, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [17, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [18, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [19, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [20, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [21, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [22, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [23, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [24, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [25, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [26, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [27, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [28, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [29, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [30, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [31, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [32, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [33, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [34, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [35, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [36, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [37, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [38, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [39, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [40, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [41, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [42, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [43, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [44, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [45, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [46, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [47, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [48, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [49, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [50, 0, 0, 0, 0, 0, 0, 0] }
mutated: object(0,0)
gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0

task 3, line 29:
//# create-checkpoint
Checkpoint created: 1

task 4, lines 31-44:
//# run-graphql
Response: {
"data": {
"events": {
"pageInfo": {
"hasPreviousPage": false,
"hasNextPage": true,
"startCursor": "eyJ0eCI6MiwiZSI6MCwiYyI6MX0",
"endCursor": "eyJ0eCI6MiwiZSI6MTksImMiOjF9"
},
"nodes": [
{
"json": {
"new_value": "0"
}
},
{
"json": {
"new_value": "1"
}
},
{
"json": {
"new_value": "2"
}
},
{
"json": {
"new_value": "3"
}
},
{
"json": {
"new_value": "4"
}
},
{
"json": {
"new_value": "5"
}
},
{
"json": {
"new_value": "6"
}
},
{
"json": {
"new_value": "7"
}
},
{
"json": {
"new_value": "8"
}
},
{
"json": {
"new_value": "9"
}
},
{
"json": {
"new_value": "10"
}
},
{
"json": {
"new_value": "11"
}
},
{
"json": {
"new_value": "12"
}
},
{
"json": {
"new_value": "13"
}
},
{
"json": {
"new_value": "14"
}
},
{
"json": {
"new_value": "15"
}
},
{
"json": {
"new_value": "16"
}
},
{
"json": {
"new_value": "17"
}
},
{
"json": {
"new_value": "18"
}
},
{
"json": {
"new_value": "19"
}
}
]
}
}
}

task 5, lines 46-59:
//# run-graphql --cursors {"tx":2,"e":19,"c":1}
Response: {
"data": {
"events": {
"pageInfo": {
"hasPreviousPage": true,
"hasNextPage": true,
"startCursor": "eyJ0eCI6MiwiZSI6MjAsImMiOjF9",
"endCursor": "eyJ0eCI6MiwiZSI6MzksImMiOjF9"
},
"nodes": [
{
"json": {
"new_value": "20"
}
},
{
"json": {
"new_value": "21"
}
},
{
"json": {
"new_value": "22"
}
},
{
"json": {
"new_value": "23"
}
},
{
"json": {
"new_value": "24"
}
},
{
"json": {
"new_value": "25"
}
},
{
"json": {
"new_value": "26"
}
},
{
"json": {
"new_value": "27"
}
},
{
"json": {
"new_value": "28"
}
},
{
"json": {
"new_value": "29"
}
},
{
"json": {
"new_value": "30"
}
},
{
"json": {
"new_value": "31"
}
},
{
"json": {
"new_value": "32"
}
},
{
"json": {
"new_value": "33"
}
},
{
"json": {
"new_value": "34"
}
},
{
"json": {
"new_value": "35"
}
},
{
"json": {
"new_value": "36"
}
},
{
"json": {
"new_value": "37"
}
},
{
"json": {
"new_value": "38"
}
},
{
"json": {
"new_value": "39"
}
}
]
}
}
}
Loading

0 comments on commit 7260c98

Please sign in to comment.