Open pashoo2 opened 3 years ago
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?
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?
@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
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