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.
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_