Skip to content

Commit

Permalink
GraphQL changes to enable pruning (#20523)
Browse files Browse the repository at this point in the history
## Description 

- main changes from #19237 and
this is the only unknown blocker
- plus rebase, addressing comments and some testing changes.

## Test plan 

cargo nextest run --no-capture sui-graphql-e2e-tests::tests
run_test::stable/prune

---

## 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: 
- [X] GraphQL: graphql changes to enable pruning, mainly around
watermark
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
gegaowp authored Dec 6, 2024
1 parent c6f80b2 commit d7e3bb6
Show file tree
Hide file tree
Showing 11 changed files with 1,021 additions and 147 deletions.
11 changes: 7 additions & 4 deletions crates/sui-graphql-e2e-tests/tests/stable/prune/prune.exp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ task 10, line 43:
//# advance-epoch
Epoch advanced: 2

task 11, lines 45-55:
task 11, lines 45-58:
//# run-graphql --wait-for-checkpoint-pruned 4
Response: {
"data": {
"epoch": {
"epochId": 2
},
"checkpoints": {
"nodes": [
{
Expand All @@ -71,7 +74,7 @@ Response: {
}
}

task 12, lines 57-67:
task 12, lines 60-70:
//# run-graphql
Response: {
"data": {
Expand All @@ -86,15 +89,15 @@ Response: {
}
}

task 13, lines 69-72:
task 13, lines 72-75:
//# run-graphql
Response: {
"data": {
"chainIdentifier": "084d40f2"
}
}

task 14, lines 74-103:
task 14, lines 77-106:
//# run-graphql
Response: {
"data": {
Expand Down
3 changes: 3 additions & 0 deletions crates/sui-graphql-e2e-tests/tests/stable/prune/prune.move
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ module Test::M1 {

//# run-graphql --wait-for-checkpoint-pruned 4
{
epoch {
epochId
}
checkpoints {
nodes {
epoch {
Expand Down
Loading

0 comments on commit d7e3bb6

Please sign in to comment.