Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jsonrpc): Flaky fullnode JSON-RPC test #19047

Merged
merged 1 commit into from
Aug 20, 2024
Merged

fix(jsonrpc): Flaky fullnode JSON-RPC test #19047

merged 1 commit into from
Aug 20, 2024

Conversation

amnn
Copy link
Member

@amnn amnn commented Aug 20, 2024

Description

transaction_tests::test_get_fullnode_transaction included a flaky assertion that if you fetch 5 transactions, then the rest of the transactions, and then fetched the latest 10 transactions, the latter would match up with the suffix of the former two queries concatenated together.

This does not work in general (at least not with this test set-up), because of consensus commit transactions.

I have updated the test to check a similar property: That if you fetch 5 transactions, then the rest, and then fetch the first 10 transactions, then the prefixes match (this tests that transaction order is stable).

There are other existing tests for what happens when you query transactions in descending order.

Test plan

This seed previously exhibited the failure, and now it succeeds.

sui-json-rpc-tests$ MSIM_TEST_SEED=968774516445189525 cargo simtest -- test_get_fullnode_transaction

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:
  • REST API:

## Description

`transaction_tests::test_get_fullnode_transaction` included a flaky
assertion that if you fetch 5 transactions, then the rest of the
transactions, and then fetched the latest 10 transactions, the latter
would match up with the suffix of the former two queries concatenated
together.

This does not work in general (at least not with this test set-up),
because of consensus commit transactions.

I have updated the test to check a similar property: That if you fetch 5
transactions, then the rest, and then fetch the first 10 transactions,
then the prefixes match (this tests that transaction order is stable).

There are other existing tests for what happens when you query
transactions in descending order.

## Test plan

This seed previously exhibited the failure, and now it succeeds.

```
sui-json-rpc-tests$ MSIM_TEST_SEED=968774516445189525 cargo simtest -- test_get_fullnode_transaction
```
@amnn amnn requested review from lxfind, bmwill and mystenmark August 20, 2024 13:32
@amnn amnn self-assigned this Aug 20, 2024
Copy link

vercel bot commented Aug 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 1:36pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Aug 20, 2024 1:36pm
sui-kiosk ⬜️ Ignored (Inspect) Aug 20, 2024 1:36pm
sui-typescript-docs ⬜️ Ignored (Inspect) Aug 20, 2024 1:36pm

@bmwill bmwill merged commit c68131b into main Aug 20, 2024
48 checks passed
@bmwill bmwill deleted the amnn/fix-fn-tx branch August 20, 2024 15:41
amnn added a commit that referenced this pull request Aug 20, 2024
## Description

Gathering all the suggested docs fixes across the stack in #17543 into
one PR.

## Test plan

:eyes:

## Stack

- #19047 

---

## 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:
- [ ] REST API:
tx-tomcat pushed a commit to tx-tomcat/sui-network that referenced this pull request Aug 27, 2024
`transaction_tests::test_get_fullnode_transaction` included a flaky
assertion that if you fetch 5 transactions, then the rest of the
transactions, and then fetched the latest 10 transactions, the latter
would match up with the suffix of the former two queries concatenated
together.

This does not work in general (at least not with this test set-up),
because of consensus commit transactions.

I have updated the test to check a similar property: That if you fetch 5
transactions, then the rest, and then fetch the first 10 transactions,
then the prefixes match (this tests that transaction order is stable).

There are other existing tests for what happens when you query
transactions in descending order.

This seed previously exhibited the failure, and now it succeeds.

```
sui-json-rpc-tests$ MSIM_TEST_SEED=968774516445189525 cargo simtest -- test_get_fullnode_transaction
```
tx-tomcat pushed a commit to tx-tomcat/sui-network that referenced this pull request Aug 27, 2024
## Description

Gathering all the suggested docs fixes across the stack in MystenLabs#17543 into
one PR.

## Test plan

:eyes:

## Stack

- MystenLabs#19047 

---

## 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:
- [ ] REST API:
suiwombat pushed a commit that referenced this pull request Sep 16, 2024
`transaction_tests::test_get_fullnode_transaction` included a flaky
assertion that if you fetch 5 transactions, then the rest of the
transactions, and then fetched the latest 10 transactions, the latter
would match up with the suffix of the former two queries concatenated
together.

This does not work in general (at least not with this test set-up),
because of consensus commit transactions.

I have updated the test to check a similar property: That if you fetch 5
transactions, then the rest, and then fetch the first 10 transactions,
then the prefixes match (this tests that transaction order is stable).

There are other existing tests for what happens when you query
transactions in descending order.

This seed previously exhibited the failure, and now it succeeds.

```
sui-json-rpc-tests$ MSIM_TEST_SEED=968774516445189525 cargo simtest -- test_get_fullnode_transaction
```
suiwombat pushed a commit that referenced this pull request Sep 16, 2024
## Description

Gathering all the suggested docs fixes across the stack in #17543 into
one PR.

## Test plan

:eyes:

## Stack

- #19047 

---

## 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:
- [ ] REST API:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants