Skip to content

Commit

Permalink
graphql: Remove TransactionBlockFilter.signAddress and AddressTransac…
Browse files Browse the repository at this point in the history
…tionBlockRelationship.SIGN (#19804)

## Description

Formally remove

- `TransactionBlockFilter.signAddress` and
- `AddressTransactionBlockRelationship.SIGN`

which were deprecated two releases ago. They have been replaced by

- `TransactionBlockFilter.sentAddress` and
- `AddressTransactionBlockRelationship.SENT`

which offer the same features under clearer names.

## Test plan

```
sui$ cargo nextest run -p sui-graphql-rpc
sui$ cargo nextest run -p sui-graphql-rpc --features staging
sui$ cargo nextest run -p sui-graphql-e2e-tests
```

## Stack

- #19708 
- #19802 
- #19803 
---

## 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: Formally remove `TransactionBlockFilter.signAddress` and
`AddressTransactionBlockRelationship.SIGN` which were deprecated two
releases ago. They have been replaced by
`TransactionBlockFilter.sentAddress` and
`AddressTransactionBlockRelationship.SENT` which offer the same features
under clearer names.
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
amnn authored Oct 11, 2024
1 parent ce5829b commit af39b6a
Show file tree
Hide file tree
Showing 26 changed files with 61 additions and 395 deletions.
6 changes: 6 additions & 0 deletions .changeset/green-spies-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@mysten/graphql-transport': patch
'@mysten/zksend': patch
---

Update to reflect GraphQL schema renaming TransactionBlockFilter.signAddress to .sentAddress.
24 changes: 12 additions & 12 deletions crates/sui-graphql-e2e-tests/tests/stable/consistency/balances.move
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module P0::fake {
//# run-graphql --cursors {"c":2,"t":1,"i":false}
# Emulating viewing transaction blocks at checkpoint 2. Fake coin balance should be 700.
{
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand All @@ -101,7 +101,7 @@ module P0::fake {
//# run-graphql --cursors {"c":3,"t":1,"i":false}
# Emulating viewing transaction blocks at checkpoint 3. Fake coin balance should be 500.
{
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand All @@ -124,7 +124,7 @@ module P0::fake {
//# run-graphql --cursors {"c":4,"t":1,"i":false}
# Emulating viewing transaction blocks at checkpoint 4. Fake coin balance should be 400.
{
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand All @@ -151,7 +151,7 @@ module P0::fake {
//# run-graphql --cursors {"c":2,"t":1,"i":false}
# Emulating viewing transaction blocks at checkpoint 2. Fake coin balance should be 700.
{
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand All @@ -174,7 +174,7 @@ module P0::fake {
//# run-graphql --cursors {"c":3,"t":1,"i":false}
# Emulating viewing transaction blocks at checkpoint 3. Fake coin balance should be 500.
{
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand All @@ -197,7 +197,7 @@ module P0::fake {
//# run-graphql --cursors {"c":4,"t":1,"i":false}
# Emulating viewing transaction blocks at checkpoint 4. Fake coin balance should be 400.
{
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand Down Expand Up @@ -236,7 +236,7 @@ module P0::fake {
sequenceNumber
}
}
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand All @@ -259,7 +259,7 @@ module P0::fake {
//# run-graphql --cursors {"c":3,"t":1,"i":false}
# Emulating viewing transaction blocks at checkpoint 3. Fake coin balance should be 500.
{
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand All @@ -282,7 +282,7 @@ module P0::fake {
//# run-graphql --cursors {"c":4,"t":1,"i":false}
# Emulating viewing transaction blocks at checkpoint 4. Fake coin balance should be 400.
{
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand Down Expand Up @@ -329,7 +329,7 @@ module P0::fake {
sequenceNumber
}
}
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand Down Expand Up @@ -360,7 +360,7 @@ module P0::fake {
sequenceNumber
}
}
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand Down Expand Up @@ -391,7 +391,7 @@ module P0::fake {
sequenceNumber
}
}
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
transactionBlocks(first: 1, after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
nodes {
sender {
fakeCoinBalance: balance(type: "@{P0}::fake::FAKE") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module Test::M1 {
checkpoints {
nodes {
sequenceNumber
transactionBlocks(filter: { signAddress: "@{A}"}) {
transactionBlocks(filter: { sentAddress: "@{A}"}) {
edges {
cursor
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ module Test::M1 {
checkpoint {
sequenceNumber
}
with_cursor: transactionBlocks(after: "@{cursor_0}", filter: {signAddress: "@{A}"}) {
with_cursor: transactionBlocks(after: "@{cursor_0}", filter: {sentAddress: "@{A}"}) {
edges {
cursor
node {
Expand All @@ -264,7 +264,7 @@ module Test::M1 {
}
}
}
without_cursor: transactionBlocks(filter: {signAddress: "@{A}"}) {
without_cursor: transactionBlocks(filter: {sentAddress: "@{A}"}) {
edges {
cursor
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module Test::M1 {
}
}
}
latest_tx_at_checkpoint_3: transactionBlocks(last: 1, filter: {signAddress: "@{A}"}) {
latest_tx_at_checkpoint_3: transactionBlocks(last: 1, filter: {sentAddress: "@{A}"}) {
nodes {
sender {
objects_consistent_with_address_at_latest_checkpoint_4: objects(filter: {type: "@{Test}"}) {
Expand Down Expand Up @@ -135,7 +135,7 @@ module Test::M1 {

//# run-graphql
{
all_transactions: transactionBlocks(first: 4, filter: {signAddress: "@{A}"}) {
all_transactions: transactionBlocks(first: 4, filter: {sentAddress: "@{A}"}) {
nodes {
sender {
objects(filter: {type: "@{Test}"}) {
Expand Down Expand Up @@ -195,7 +195,7 @@ module Test::M1 {
}
}
}
latest_tx_at_checkpoint_3: transactionBlocks(last: 1, filter: {signAddress: "@{A}"}) {
latest_tx_at_checkpoint_3: transactionBlocks(last: 1, filter: {sentAddress: "@{A}"}) {
nodes {
sender {
objects(filter: {type: "@{Test}"}) {
Expand Down Expand Up @@ -262,7 +262,7 @@ module Test::M1 {
//# run-graphql
# Regardless of the transaction block, the nested fields should yield the same data.
{
all_transactions: transactionBlocks(first: 4, filter: {signAddress: "@{A}"}) {
all_transactions: transactionBlocks(first: 4, filter: {sentAddress: "@{A}"}) {
nodes {
sender {
objects(filter: {type: "@{Test}"}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module Test::M1 {

//# run-graphql
{
transactionBlocks(filter: { signAddress: "@{A}" }) {
transactionBlocks(filter: { sentAddress: "@{A}" }) {
nodes {
effects{
events {
Expand Down Expand Up @@ -75,7 +75,7 @@ module Test::M1 {

//# run-graphql
{
transactionBlocks(first: 1, filter: { signAddress: "@{A}" }) {
transactionBlocks(first: 1, filter: { sentAddress: "@{A}" }) {
nodes {
effects {
events(last: 1) {
Expand All @@ -98,7 +98,7 @@ module Test::M1 {

//# run-graphql --cursors {"i":0,"c":1}
{
transactionBlocks(last: 1, filter: { signAddress: "@{A}" }) {
transactionBlocks(last: 1, filter: { sentAddress: "@{A}" }) {
nodes {
effects {
events(first: 2, after: "@{cursor_0}") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module Test::M1 {

//# run-graphql
{
transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 signAddress: "@{A}"}) {
transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 sentAddress: "@{A}"}) {
pageInfo {
hasNextPage
hasPreviousPage
Expand All @@ -74,7 +74,7 @@ module Test::M1 {

//# run-graphql
{
transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 signAddress: "@{B}"}) {
transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 sentAddress: "@{B}"}) {
pageInfo {
hasNextPage
hasPreviousPage
Expand All @@ -94,7 +94,7 @@ module Test::M1 {

//# run-graphql
{
transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 signAddress: "@{C}"}) {
transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 sentAddress: "@{C}"}) {
pageInfo {
hasNextPage
hasPreviousPage
Expand All @@ -114,7 +114,7 @@ module Test::M1 {

//# run-graphql
{
transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 signAddress: "@{D}"}) {
transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 sentAddress: "@{D}"}) {
pageInfo {
hasNextPage
hasPreviousPage
Expand All @@ -134,7 +134,7 @@ module Test::M1 {

//# run-graphql
{
transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 signAddress: "@{E}"}) {
transactionBlocks(first: 50 filter: {kind: PROGRAMMABLE_TX atCheckpoint: 2 sentAddress: "@{E}"}) {
pageInfo {
hasNextPage
hasPreviousPage
Expand Down
Loading

0 comments on commit af39b6a

Please sign in to comment.