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

Optimize Snapshot Digest Computation #510

Closed
3 tasks done
jpraynaud opened this issue Sep 20, 2022 · 0 comments
Closed
3 tasks done

Optimize Snapshot Digest Computation #510

jpraynaud opened this issue Sep 20, 2022 · 0 comments
Assignees
Labels
breaking-change 🔥 Contains a breaking change D-medium Difficulty: medium P-low Priority: low task

Comments

@jpraynaud
Copy link
Member

jpraynaud commented Sep 20, 2022

Issue

We need to optimize the computation of the Snapshot Digest that takes place on the Signer and Aggregator.
To do so, we can make use of memoization so that the CPU intensive part of the computation is done only once (do not do the same hashing of the immutable files and use a cached version instead)

Tasks

  • Compute hash of each immutable file and store them in a cache
  • Compute the digest of the immutable files by concatenating their respective hash in a deterministic order (depending on the immutable file number) and hashing this concatenation
  • Store/load the already computed hash in a store (would help when node is restarted)?
@jpraynaud jpraynaud added the breaking-change 🔥 Contains a breaking change label Dec 5, 2022
@Alenar Alenar self-assigned this Dec 7, 2022
@Alenar Alenar closed this as completed Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change 🔥 Contains a breaking change D-medium Difficulty: medium P-low Priority: low task
Projects
None yet
Development

No branches or pull requests

2 participants