librustzcash icon indicating copy to clipboard operation
librustzcash copied to clipboard

Add block cache trait

Open Oscar-Pepper opened this issue 1 year ago • 8 comments

Adds a BlockCache trait for BlockSource which aims to generalise the block source for consumers who are not implementing an SQLite database. This lays some of the groundwork for #1184 by removing cyclic dependencies and generalising the sync engine for wallets with different implementations

Closes #1170

Oscar-Pepper avatar Feb 20 '24 19:02 Oscar-Pepper

#1217 shows how this BlockCache trait is implemented into the #1184 sync engine

Oscar-Pepper avatar Mar 07 '24 10:03 Oscar-Pepper

This looks ready to go! What's the protocol for approving a workflow?

zancas avatar Mar 08 '24 16:03 zancas

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 63.76%. Comparing base (e795174) to head (7301c0c). Report is 58 commits behind head on main.

:exclamation: Current head 7301c0c differs from pull request most recent head 48e3ff1. Consider uploading reports for the commit 48e3ff1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1192      +/-   ##
==========================================
+ Coverage   63.59%   63.76%   +0.16%     
==========================================
  Files         121      121              
  Lines       13945    14009      +64     
==========================================
+ Hits         8869     8933      +64     
  Misses       5076     5076              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 08 '24 16:03 codecov[bot]

Oh hi! What needs to be done to approve this workflow?

zancas avatar Mar 13 '24 16:03 zancas

I think this is ready to land. I think @Oscar-Pepper has already addressed @str4d 's requested changes.

zancas avatar Mar 14 '24 17:03 zancas

It looks like this workflow is ready to be kicked...

zancas avatar Mar 21 '24 20:03 zancas

Hi @str4d I've made the requested changes and it's ready for review again

Oscar-Pepper avatar Mar 25 '24 16:03 Oscar-Pepper

Reviewed as of 7301c0c.

Hi @str4d, thanks for the review, I have replied to and made all requested changes except for adding &mut which we should discuss if its felt this is neccessary as its not clear to me how to implement 1169-sync-engine this way or further concurrent optimisations.

I have sent for review again.

Oscar-Pepper avatar Mar 30 '24 12:03 Oscar-Pepper