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

Download range of transactions during syncing #1315

Closed
xgreenx opened this issue Aug 22, 2023 · 2 comments · Fixed by #1349
Closed

Download range of transactions during syncing #1315

xgreenx opened this issue Aug 22, 2023 · 2 comments · Fixed by #1349
Assignees

Comments

@xgreenx
Copy link
Collaborator

xgreenx commented Aug 22, 2023

Ref #1133

Instead of fetching transactions per header, add a new p2p API that allows entire ranges of blocks to be downloaded from a peer.

@bvrooman
Copy link
Contributor

bvrooman commented Sep 6, 2023

To clarify: by "range of blocks", I believe this means something more like "list of blocks", since block IDs are not continuous (versus block heights, which are continuous). In my current WIP, the new API takes in a vector of block IDs, rather than a range.

@xgreenx
Copy link
Collaborator Author

xgreenx commented Sep 6, 2023

It's up to us. We can request transactions by the range of block heights instead of block ids.

On the blockchain level we don't have use cases for list of ids, its more API node kind functionality and maybe indexer will provide that.

bvrooman pushed a commit that referenced this issue Oct 2, 2023
Related issues:
- Closes #1315
- Closes #1089

This PR introduces a structure for holding data collections called
`Batch`. A Batch encapsulates a collection of homogeneous data returned
by a P2P request, retaining only successfully received items. A Batch
may contain fewer items than originally requested, in which case an
error has occurred.

For transactions, we now use batches to request and return transaction
data from peers. This means a reduced number of database trips and more
succinct (less chatty) p2p communication.

---------

Co-authored-by: xgreenx <[email protected]>
crypto523 pushed a commit to crypto523/fuel-core that referenced this issue Oct 7, 2024
Related issues:
- Closes FuelLabs/fuel-core#1315
- Closes FuelLabs/fuel-core#1089

This PR introduces a structure for holding data collections called
`Batch`. A Batch encapsulates a collection of homogeneous data returned
by a P2P request, retaining only successfully received items. A Batch
may contain fewer items than originally requested, in which case an
error has occurred.

For transactions, we now use batches to request and return transaction
data from peers. This means a reduced number of database trips and more
succinct (less chatty) p2p communication.

---------

Co-authored-by: xgreenx <[email protected]>
sui319 added a commit to sui319/fuel-core that referenced this issue Feb 17, 2025
Related issues:
- Closes FuelLabs/fuel-core#1315
- Closes FuelLabs/fuel-core#1089

This PR introduces a structure for holding data collections called
`Batch`. A Batch encapsulates a collection of homogeneous data returned
by a P2P request, retaining only successfully received items. A Batch
may contain fewer items than originally requested, in which case an
error has occurred.

For transactions, we now use batches to request and return transaction
data from peers. This means a reduced number of database trips and more
succinct (less chatty) p2p communication.

---------

Co-authored-by: xgreenx <[email protected]>
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.

2 participants