Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Filter heads by invocation of "access.canAppend" during a loading #101

Open
pashoo2 opened this issue Apr 2, 2021 · 3 comments
Open

Filter heads by invocation of "access.canAppend" during a loading #101

pashoo2 opened this issue Apr 2, 2021 · 3 comments

Comments

@pashoo2
Copy link

pashoo2 commented Apr 2, 2021

https://github.com/orbitdb/orbit-db-store/blob/2ebc0c2cbec70cc98e7cd0f45edc077853098f72/src/Store.js#L241

Why don't to filter the heads as it's already implemented within the "sync" method, that is called during synchronization with another peer?

https://github.com/orbitdb/orbit-db-store/blob/2ebc0c2cbec70cc98e7cd0f45edc077853098f72/src/Store.js#L295

@aphelionz
Copy link
Contributor

It seems like it could be a valuable update but I would need to know the performance tradeoff, since usually a cryptographic key verification needs to take place within canAppend.

@tabcat can you help @pashoo2 with benchmarking when you get a chance?

@tabcat
Copy link
Contributor

tabcat commented May 7, 2021

Trying to understand what the change is being suggested here...

@pashoo2 you are saying we could use the same code that loads entries also to sync entries?

@pashoo2
Copy link
Author

pashoo2 commented May 19, 2021

@aphelionz @tabcat sorry i've seen the mention today.
I meant that there is a code that apply filters to heads when a syncronization with another peer is performing, but i suppose it should be done also when reading heads from a local presistant storage to memory.
I don't remember the exact case, but it seems not neccessary to read such heads for consistency of a local statw with another peer sync logic

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants