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

Provide guidelines for retrying transaction submission #8879

Closed
3 tasks
Tracked by #8878
aborg-dev opened this issue Apr 4, 2023 · 4 comments
Closed
3 tasks
Tracked by #8878

Provide guidelines for retrying transaction submission #8879

aborg-dev opened this issue Apr 4, 2023 · 4 comments
Labels
A-congestion Work aimed at ensuring good system performance under congestion C-tracking-issue Category: a tracking issue

Comments

@aborg-dev
Copy link
Contributor

aborg-dev commented Apr 4, 2023

This is a tracking issue for work on guidelines on how to write a well-functioning client that reliably submits transactions to the RPC nodes.

We need to decide how transactions that are rejected due to overload (#8878) get retried in the clients (e.g. wallets, near.social frontend).

If we don’t agree on this with the clients and suddenly start dropping transactions in the pool the clients might:

  • DDOS the RPC nodes retrying the same transaction
  • End up in the invalid state, assuming that a transaction got accepted while it didn’t

Concretely, we should understand what the clients are doing today and see if it’s realistic to migrate them towards exponential backoff policy.

Clients that we should check/notify:

Concrete steps

@aborg-dev aborg-dev added the A-congestion Work aimed at ensuring good system performance under congestion label Apr 4, 2023
@aborg-dev aborg-dev added the C-tracking-issue Category: a tracking issue label Apr 12, 2023
@aborg-dev aborg-dev assigned jakmeier and unassigned jakmeier Apr 14, 2023
@aborg-dev
Copy link
Contributor Author

The next step here would be to chat with @DavidM-D about the NEAR client ecosystem and how they approach waiting for transactions/retrying failures.

@aborg-dev
Copy link
Contributor Author

We had a good discussion with @bowenwang1996 about this and identified the following challenges to address:

  • Long-polling connections to broadcast_tx might start to time out under congestion
  • Clients of JSONRPC API will have to handle a new error code during transaction submission when Validator rejects the transaction due to running out of space in the transaction pool

For completeness, here is the whiteboard from the discussion:
image

@bowenwang1996
Copy link
Collaborator

Long-polling connections to broadcast_tx might start to time out under congestion

Minor correction: it is broadcast_tx_commit. broadcast_tx_async works differently. It does not wait for the transaction to finish before returning.

@aborg-dev
Copy link
Contributor Author

I believe the work on congestion control partially covered this, so closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-congestion Work aimed at ensuring good system performance under congestion C-tracking-issue Category: a tracking issue
Projects
None yet
Development

No branches or pull requests

3 participants