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

Transactions can be lost in the network #1049

Closed
Voxelot opened this issue Feb 27, 2023 · 1 comment
Closed

Transactions can be lost in the network #1049

Voxelot opened this issue Feb 27, 2023 · 1 comment
Assignees

Comments

@Voxelot
Copy link
Member

Voxelot commented Feb 27, 2023

Due to various reasons(disconnection at the moment of transaction broadcasting; non-actual state of the transaction broadcaster/receiver) transactions can be lost in the network.

For the cases like this, we need a transaction reconciliation protocol. Where missed transactions can be synced again.

@xgreenx xgreenx added the SDK team The issue is ready to be addressed by SDK team label Aug 16, 2023
@xgreenx xgreenx changed the title P2P request response protocol for txpool sync Transactions can be lost in the network Jun 14, 2024
@FuelLabs FuelLabs deleted a comment from freesig Jun 14, 2024
@AurelienFT AurelienFT assigned AurelienFT and unassigned AurelienFT Aug 26, 2024
@xgreenx xgreenx added good first issue Good for newcomers and removed SDK team The issue is ready to be addressed by SDK team good first issue Good for newcomers labels Aug 26, 2024
AurelienFT added a commit that referenced this issue Sep 19, 2024
## Linked Issues/PRs
Part of #1049

## Description
This PR introduce a new workflow when we successfully subscribed to the
TX topic in gossip we try ask for all the tx_ids in the pool's peer and
then ask the full transactions that we don't have.
This PR also build the `SharedState` of `P2PService` independently to
give more flexibility to the initialisation and avoid cyclic
dependencies.

### Detailed workflow : 

- When a peer has subscribed to our topic send inform the TxPool
- The TxPool asks the tx ids of the peer
- The TxPool filter the one it already knows and ask for the full
transactions of the others (a multi message send should be done if the
number of txs asked is above the limit (currently 10k chosen randomly)).
- We verify and add them to our txpool

### Questions for review

- What's happens if the peer doesn't answer to a request that we await ?
- I placed Option in the request/response because there was in the other
messages but why it's needed ?

## Checklist
- [x] Breaking changes are clearly marked as such in the PR description
and changelog
- [x] New behavior is reflected in tests
- [x] [The specification](https://github.com/FuelLabs/fuel-specs/)
matches the implemented behavior (link update PR if changes are needed)

### Before requesting review
- [x] I have reviewed the code myself
- [x] I have created follow-up issues caused by this PR and linked them
here

---------

Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
@MitchTurner
Copy link
Member

Closed with #2131

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 a pull request may close this issue.

5 participants