Skip to content

Commit

Permalink
Update graphql e2e test to protocol version 51 (MystenLabs#18653)
Browse files Browse the repository at this point in the history
## Description 

I wanted to update it to version 49, since there is a change related to
consensus commit prologue V3. But since testnet
now uses 51, I choose to use it here as well.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
halfprice authored and tx-tomcat committed Jul 29, 2024
1 parent dc1789a commit 1e4e548
Show file tree
Hide file tree
Showing 114 changed files with 2,645 additions and 1,995 deletions.
4 changes: 2 additions & 2 deletions crates/simulacrum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ impl<R, S: store::SimulatorStore> Simulacrum<R, S> {
let round = self.epoch_state.next_consensus_round();
let timestamp_ms = self.store.get_clock().timestamp_ms() + duration.as_millis() as u64;

// TODO(zhewu): use V3 once graphql tests are upgraded to protocol version 49.
let consensus_commit_prologue_transaction =
VerifiedTransaction::new_consensus_commit_prologue_v2(
VerifiedTransaction::new_consensus_commit_prologue_v3(
epoch,
round,
timestamp_ms,
ConsensusCommitDigest::default(),
Vec::new(),
);

self.execute_transaction(consensus_commit_prologue_transaction.into())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ Response: {
"data": {
"availableRange": {
"first": {
"digest": "DKLNxHiQP2JHxDHhCSDcDtvBcw6PrCXLVvYB2KVfUctJ",
"digest": "ZQawQqeikA4pRqKnkcuHuMnGZuKJTSt3V3EVmMjG56k",
"sequenceNumber": 0
},
"last": {
"digest": "DKLNxHiQP2JHxDHhCSDcDtvBcw6PrCXLVvYB2KVfUctJ",
"digest": "ZQawQqeikA4pRqKnkcuHuMnGZuKJTSt3V3EVmMjG56k",
"sequenceNumber": 0
}
},
"first": {
"digest": "DKLNxHiQP2JHxDHhCSDcDtvBcw6PrCXLVvYB2KVfUctJ",
"digest": "ZQawQqeikA4pRqKnkcuHuMnGZuKJTSt3V3EVmMjG56k",
"sequenceNumber": 0
},
"last": {
"digest": "DKLNxHiQP2JHxDHhCSDcDtvBcw6PrCXLVvYB2KVfUctJ",
"digest": "ZQawQqeikA4pRqKnkcuHuMnGZuKJTSt3V3EVmMjG56k",
"sequenceNumber": 0
}
}
Expand All @@ -35,20 +35,20 @@ Response: {
"data": {
"availableRange": {
"first": {
"digest": "DKLNxHiQP2JHxDHhCSDcDtvBcw6PrCXLVvYB2KVfUctJ",
"digest": "ZQawQqeikA4pRqKnkcuHuMnGZuKJTSt3V3EVmMjG56k",
"sequenceNumber": 0
},
"last": {
"digest": "C3gNdxw7tLsULYLt541SEEY2vuyPYBimZwutcY8YQB1a",
"digest": "5GTvEftM57hVrNtNapMU73cE5Wj6mYFuzd9K644n1Zqs",
"sequenceNumber": 2
}
},
"first": {
"digest": "DKLNxHiQP2JHxDHhCSDcDtvBcw6PrCXLVvYB2KVfUctJ",
"digest": "ZQawQqeikA4pRqKnkcuHuMnGZuKJTSt3V3EVmMjG56k",
"sequenceNumber": 0
},
"last": {
"digest": "C3gNdxw7tLsULYLt541SEEY2vuyPYBimZwutcY8YQB1a",
"digest": "5GTvEftM57hVrNtNapMU73cE5Wj6mYFuzd9K644n1Zqs",
"sequenceNumber": 2
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# init --protocol-version 48 --simulator
//# init --protocol-version 51 --simulator

//# run-graphql
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# init --protocol-version 48 --addresses Test=0x0 --simulator
//# init --protocol-version 51 --addresses Test=0x0 --simulator

// Test cursor connection pagination logic
// The implementation privileges `after`, `before`, `first`, and `last` in that order.
Expand Down
1 change: 1 addition & 0 deletions crates/sui-graphql-e2e-tests/tests/call/coin_metadata.exp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Response: {
task 4 'programmable'. lines 35-37:
created: object(4,0)
mutated: object(0,0), object(1,2)
unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403
gas summary: computation_cost: 1000000, storage_cost: 4012800, storage_rebate: 2663496, non_refundable_storage_fee: 26904

task 5 'create-checkpoint'. lines 39-39:
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-graphql-e2e-tests/tests/call/coin_metadata.move
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# init --protocol-version 48 --addresses test=0x0 --accounts A --simulator
//# init --protocol-version 51 --addresses test=0x0 --accounts A --simulator

//# publish --sender A
module test::fake {
Expand Down
60 changes: 30 additions & 30 deletions crates/sui-graphql-e2e-tests/tests/call/dynamic_fields.exp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Response: {
{
"name": {
"type": {
"repr": "bool"
"repr": "vector<u8>"
},
"data": {
"Bool": false
"Vector": []
},
"bcs": "AA=="
},
Expand All @@ -63,12 +63,12 @@ Response: {
{
"name": {
"type": {
"repr": "u64"
"repr": "bool"
},
"data": {
"Number": "0"
"Bool": false
},
"bcs": "AAAAAAAAAAA="
"bcs": "AA=="
},
"value": {
"__typename": "MoveValue"
Expand All @@ -77,12 +77,12 @@ Response: {
{
"name": {
"type": {
"repr": "vector<u8>"
"repr": "u64"
},
"data": {
"Vector": []
"Number": "0"
},
"bcs": "AA=="
"bcs": "AAAAAAAAAAA="
},
"value": {
"__typename": "MoveValue"
Expand Down Expand Up @@ -112,10 +112,10 @@ Response: {
{
"name": {
"type": {
"repr": "bool"
"repr": "vector<u8>"
},
"data": {
"Bool": false
"Vector": []
},
"bcs": "AA=="
},
Expand All @@ -140,12 +140,12 @@ Response: {
{
"name": {
"type": {
"repr": "u64"
"repr": "bool"
},
"data": {
"Number": "0"
"Bool": false
},
"bcs": "AAAAAAAAAAA="
"bcs": "AA=="
},
"value": {
"__typename": "MoveValue"
Expand All @@ -154,12 +154,12 @@ Response: {
{
"name": {
"type": {
"repr": "vector<u8>"
"repr": "u64"
},
"data": {
"Vector": []
"Number": "0"
},
"bcs": "AA=="
"bcs": "AAAAAAAAAAA="
},
"value": {
"__typename": "MoveValue"
Expand All @@ -180,17 +180,17 @@ Response: {
{
"name": {
"type": {
"repr": "bool"
"repr": "vector<u8>"
},
"data": {
"Bool": false
"Vector": []
},
"bcs": "AA=="
},
"value": {
"bcs": "AgAAAAAAAAA=",
"bcs": "AQAAAAAAAAA=",
"data": {
"Number": "2"
"Number": "1"
},
"__typename": "MoveValue"
}
Expand All @@ -212,35 +212,35 @@ Response: {
{
"name": {
"type": {
"repr": "u64"
"repr": "bool"
},
"data": {
"Number": "0"
"Bool": false
},
"bcs": "AAAAAAAAAAA="
"bcs": "AA=="
},
"value": {
"bcs": "AAAAAAAAAAA=",
"bcs": "AgAAAAAAAAA=",
"data": {
"Number": "0"
"Number": "2"
},
"__typename": "MoveValue"
}
},
{
"name": {
"type": {
"repr": "vector<u8>"
"repr": "u64"
},
"data": {
"Vector": []
"Number": "0"
},
"bcs": "AA=="
"bcs": "AAAAAAAAAAA="
},
"value": {
"bcs": "AQAAAAAAAAA=",
"bcs": "AAAAAAAAAAA=",
"data": {
"Number": "1"
"Number": "0"
},
"__typename": "MoveValue"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// This test also demonstrates why we need separate dynamicField and dynamicObjectField APIs.
// It is possible for a dynamic field and a dynamic object field to share the same name lookup.

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

//# publish
module Test::m {
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-graphql-e2e-tests/tests/call/owned_objects.move
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# init --protocol-version 48 --addresses Test=0x0 A=0x42 --simulator
//# init --protocol-version 51 --addresses Test=0x0 A=0x42 --simulator

// Tests objects on address, object, and owner.
//
Expand Down
34 changes: 17 additions & 17 deletions crates/sui-graphql-e2e-tests/tests/call/simple.exp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ task 9 'advance-epoch'. lines 41-41:
Epoch advanced: 5

task 10 'view-checkpoint'. lines 43-43:
CheckpointSummary { epoch: 5, seq: 10, content_digest: EANv9gfNqrc3zQszFfPeZbsf8ytTgrjbhPuRKL1JFDjR,
CheckpointSummary { epoch: 5, seq: 10, content_digest: BDEsevJNRZ9x9xxb3eCdVtrHpu1EQP6gz2fTCGjcswdL,
epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 0, storage_cost: 0, storage_rebate: 0, non_refundable_storage_fee: 0 }}

task 11 'run-graphql'. lines 45-50:
Expand Down Expand Up @@ -139,8 +139,8 @@ Response: {
"edges": [
{
"node": {
"address": "0xd0ee3488b5f0ebf60bfd0762ad1291e9873bf709d927fea294dd9e8ceb41d8be",
"digest": "B5KRdJ3bhVZ5p9qiV8ee2DPuSqWhVqAtmGu3ngdcwxk5",
"address": "0x23ef71b8e66389131447b14f452128212257d2db53805e37af8fba4b41ad8ca3",
"digest": "3qUjwuGdE86PTc8Z3ucr1WKZC4SmUXtXdjUcPywy6hLQ",
"owner": {
"__typename": "AddressOwner"
}
Expand All @@ -165,8 +165,8 @@ Response: {
"edges": [
{
"node": {
"address": "0xd0ee3488b5f0ebf60bfd0762ad1291e9873bf709d927fea294dd9e8ceb41d8be",
"digest": "B5KRdJ3bhVZ5p9qiV8ee2DPuSqWhVqAtmGu3ngdcwxk5",
"address": "0x23ef71b8e66389131447b14f452128212257d2db53805e37af8fba4b41ad8ca3",
"digest": "3qUjwuGdE86PTc8Z3ucr1WKZC4SmUXtXdjUcPywy6hLQ",
"owner": {
"__typename": "AddressOwner"
}
Expand All @@ -180,53 +180,53 @@ Response: {
"edges": [
{
"node": {
"address": "0x2c6b4bac8eb891f26d75e357a04d432507ce28e360bcf4e43659b96072bc3c53",
"digest": "8pbfonjvo3mczuSBJFY2qxaoGPU4Z9Qy1wSGmmg1bf5b",
"address": "0x423c9d76d2aaf5fcacfe5c95b934d44c43f9e88775264c1316a802b3f4623afb",
"digest": "83GBKCTiDtfEV5F8QaProZjfzHVfH3p5Y9hrSt9FW85Z",
"owner": {
"__typename": "AddressOwner"
}
}
},
{
"node": {
"address": "0x6099d85f9f20169105988442b6c82fd45632dd0e8d47beb4e991842271ba41f9",
"digest": "24hWWDvKPbSd6qVqrpQwyadPrxTWcukfHM26VebnpfHc",
"address": "0x6163fffa44de65f44ccaf0a0d661c40822af07ceaa02e601b4cb59b458ab6ce2",
"digest": "2y11yoS1zEnvCqvHFGrQDaXaQSFhd9hKvN9haoP8jNqz",
"owner": {
"__typename": "AddressOwner"
}
}
},
{
"node": {
"address": "0xa595dcc92eb897757da558be7ff7332385ad0b285b537ac80c9176698e9be713",
"digest": "4aYQ3gTV2zanQ8LzRhyiT2TsNErrmuK17f4GYEZY9L7J",
"address": "0x860b53513475993cdbf119f102b717aae27b89e98976f60bf7d5ab12745bcfee",
"digest": "QGwjjqDADc9nKpPs4adk3psoDk1J7zqT85wdPxkrSW9",
"owner": {
"__typename": "AddressOwner"
}
}
},
{
"node": {
"address": "0xbb7dbe1592122e91c5c403c9ddf4d029f532950f855e260e5a876b1986092c5c",
"digest": "GkPyMcNdpehHikEpWnVqK4jgcP4Yrh4mKBitAWKbifWq",
"address": "0xc54929d1ab1827a88599f75721ab9664f3511e51cff51dfd40a1c2ec0475bf7f",
"digest": "AgssqQczdyipDRxi1j9pMGgC9FuC7CCFmn4Y14PeyNst",
"owner": {
"__typename": "AddressOwner"
}
}
},
{
"node": {
"address": "0xc7ad0217e82376799893bc234d79d9f774b9e769d1c9b0c100e9c4860660236e",
"digest": "58WMysQQDjV33YC8WPeVEcLncMUKS3oBFUtfVygRQDm7",
"address": "0xe82d10c71669c207b6b2381daabe3079cedb17983d0cbe20e0062811feafdcd1",
"digest": "Gp6pvP9Q8hMK2b15mica61hENUJBatvQXx75q2P4MTuV",
"owner": {
"__typename": "AddressOwner"
}
}
},
{
"node": {
"address": "0xf264b2c3b43738574821da90a969b02ce247bc7c3ff410d667dc46b40d8e4743",
"digest": "BBtanixT9e92HBXmCJQqiYhpPfqSLGsb9ELsKTXdNjPQ",
"address": "0xfe887d694d116e30f8efa961484a199fff9f845542845a86be86b4d8f474ed4a",
"digest": "8qaumCh1NPMvjdwamiaVy8LnqMQPbSmhSSigcHZQ6Cy1",
"owner": {
"__typename": "AddressOwner"
}
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-graphql-e2e-tests/tests/call/simple.move
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# init --protocol-version 48 --addresses Test=0x0 A=0x42 --simulator --custom-validator-account --reference-gas-price 234 --default-gas-price 1000
//# init --protocol-version 51 --addresses Test=0x0 A=0x42 --simulator --custom-validator-account --reference-gas-price 234 --default-gas-price 1000

//# publish
module Test::M1 {
Expand Down
Loading

0 comments on commit 1e4e548

Please sign in to comment.