parallelchain-io / hotstuff_rs

Rust implementation of the HotStuff consensus algorithm.
38 stars 5 forks source link

Replicas are never removed from `available_sync_servers` unless they are blacklisted #43

Open lyulka opened 4 months ago

lyulka commented 4 months ago

Replicas are never removed from this HashMap unless they are blacklisted, so currently, this HashMap can grow forever. We should preferably clear this HashMap of replicas NOT in the set "committed validators + potential validators" whenever appropriate, perhaps every time we update highest_qc_view.

We should also consider caching the set "committed validators + potential validators" instead of computing it every time we receive an AdvertiseBlock.

_Originally posted by @lyulka in https://github.com/parallelchain-io/hotstuff_rs/pull/36#discussion_r1638800785_