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

StateSync component refactor follow-ups #663

Open
2 of 5 tasks
tomyrd opened this issue Jan 10, 2025 · 1 comment
Open
2 of 5 tasks

StateSync component refactor follow-ups #663

tomyrd opened this issue Jan 10, 2025 · 1 comment
Assignees
Milestone

Comments

@tomyrd
Copy link
Collaborator

tomyrd commented Jan 10, 2025

After #650 gets merged, a few follow-up issues should be tackled to improve the refactor:

  • We should find a way to move the update_mmr_data function inside the StateSync process. It now feels out of place as it performs note record state transitions but is not part of the component.
  • Address this comment about NoteUpdate. While we are at this, we should look into reducing the creation of NoteUpdates inside note_state_sync, most of them just contain one or two notes and shouldn't need a whole Vec.
  • Address this comment about locking accounts. If we decide to keep the stale hash check inside the store, we should move it to their respective lock_account functions inside each store.
  • Change the interface so the sync isn't performed as steps. Instead it should be done as completely in a single call > related comment
  • Address this comment about PartialMmr. We should add a dedicated struct in the client that implements some ease of use methods.
@igamigo
Copy link
Collaborator

igamigo commented Jan 14, 2025

One other thing is that I think we should review the return values from the introduced callbacks. Seems like there is not much value on having on_nullifier_received return a full TransactionUpdates: Since the idea is that this can detect only discarded transactions, maybe returning just a list of discarded transactions might be fine (or maybe this should not even be part of the callback, since you probably always want this to happen anyway).

@bobbinth bobbinth added this to the v0.8.0 milestone Jan 25, 2025
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

No branches or pull requests

3 participants