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

network: Handle failed to broadcast transactions #5641

Open
jsgranados opened this issue Aug 7, 2023 · 1 comment
Open

network: Handle failed to broadcast transactions #5641

jsgranados opened this issue Aug 7, 2023 · 1 comment

Comments

@jsgranados
Copy link
Contributor

Summary

When a txn accepted by a node (both REST and WS) first we Remember and then attempt to broadcast. Broadcast itself can fail for various reason including a pure network performance errors.New("broadcast queue full") reason.

In this case the txn could stuck on a node (npn, part) until it expires.

Solution options to consider:

  1. Modify txsync to pull from nodes and re-broadcast to nodes excluding the node pulled from (X)
  2. Handle errBcastQFull from Broadcast/Relay in node/txHandler and try again after some delay later (S)
  3. Make txpool to maintain non-flushing txns, and re-broadcast them every 2-3 (N) rounds: after 2+ rounds local txns are expected to be included into some proposal. Note, in p2p world N could be > 3+ (M).

Acceptance

  1. Unit test

Urgency

This is a well known issue. Some partners (i.e. Circle) encounter this.
It would also improve overall txn sending expedience.

@jsgranados
Copy link
Contributor Author

Approach:

  • Make txpool to maintain non-flushing txns, and re-broadcast them every 2-3 (N) rounds: after 2+ rounds local txns are expected to be included into some proposal. Note, in p2p world N could be > 3+ (M)
  • Disambiguate TransactionPool.Remember: transaction already in ledger error as it is misleading due to the transaction not being in the ledger, but in the pending block evaluator

@algonautshant algonautshant self-assigned this Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants