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

Transaction history optimizations #1386

Merged
merged 2 commits into from
Mar 3, 2023

Conversation

sisou
Copy link
Member

@sisou sisou commented Mar 3, 2023

What's in this pull request?

Two optimizations for requesting and receiving transactions by address as added in

  1. Change TransactionsByAddress network messages into TransactionReceiptsByAddress and only transmit transaction hashes and their block number, not whole ExtendedTransactions. The whole extended transactions are part of the following TransactionsProof messages, and are used from there when retrieved. By only sending transaction receipts in the first round-trip, we prevent the double-sending of whole extended transactions over the network.
  2. In the client, batch received transaction receipts by epoch when requesting their proof, reducing number of proofs requested if more than one transaction is in the same epoch, making the process more efficient for both requester and responder nodes.

Pull request checklist

  • All tests pass. The project builds and runs.
  • I have resolved any merge conflicts.
  • I have resolved all clippy and rustfmt warnings.

sisou added 2 commits March 3, 2023 09:58
Group transaction hashes by epoch to reduce number of requested transactions proofs.
@sisou sisou requested a review from viquezclaudio March 3, 2023 09:38
@sisou sisou self-assigned this Mar 3, 2023
@sisou sisou changed the title JS transaction history optimizations Transaction history optimizations Mar 3, 2023
@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Patch coverage: 4.54% and project coverage change: -0.02 ⚠️

Comparison is base (22f575c) 66.15% compared to head (2309cb1) 66.13%.

Additional details and impacted files
@@              Coverage Diff              @@
##           albatross    #1386      +/-   ##
=============================================
- Coverage      66.15%   66.13%   -0.02%     
=============================================
  Files            408      408              
  Lines          52193    52205      +12     
=============================================
  Hits           34528    34528              
- Misses         17665    17677      +12     
Flag Coverage Δ
unittests 66.13% <4.54%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
consensus/src/consensus/consensus_proxy.rs 5.94% <0.00%> (-0.38%) ⬇️
consensus/src/messages/handlers.rs 61.62% <0.00%> (-1.40%) ⬇️
consensus/src/messages/mod.rs 21.42% <ø> (ø)
consensus/src/consensus/mod.rs 98.24% <100.00%> (ø)
validator/src/micro.rs 93.02% <0.00%> (-0.78%) ⬇️
handel/src/aggregation.rs 91.91% <0.00%> (-0.60%) ⬇️
handel/src/todo.rs 87.30% <0.00%> (+3.17%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jsdanielh jsdanielh merged commit 2309cb1 into albatross Mar 3, 2023
@jsdanielh jsdanielh deleted the soeren/tx-history-optimizations branch March 3, 2023 16:44
@sisou sisou mentioned this pull request Mar 11, 2023
10 tasks
@sisou sisou added the WASM label Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants