Cardinal-Cryptography / AlephBFT

Rust implementation of Aleph consensus protocol
https://cardinal-cryptography.github.io/AlephBFT/index.html
Apache License 2.0
53 stars 28 forks source link

A0-4155: Unit saving pipeline #432

Closed timorleph closed 5 months ago

timorleph commented 5 months ago

Make the unit saving into a pipeline, to simplify the semantics of units being officially added to the Dag.

github-actions[bot] commented 5 months ago

Please make sure the following happened

alfellati commented 5 months ago

lgtm, nice change in the add_unit function but a little risky :P

What makes it a little risky?

timorleph commented 5 months ago

What makes it a little risky?

I think @kostekIV means that it will no longer remove the units from the cache immediately after they are being processed by the dag component, which was a nice property to have (no need to remember to call finished_processing outside of dag). It's not really that risky, since the cache cannot create different outputs if it's not cleaned, worst case scenario it would use a tad more memory.