AleoNet / snarkOS

A Decentralized Operating System for ZK Applications
http://snarkos.org
Apache License 2.0
4.24k stars 2.59k forks source link

[Optimize] Store pending certificates to proposal cache file #3247

Closed raychu86 closed 2 months ago

raychu86 commented 2 months ago

Motivation

This PR is an extension of https://github.com/AleoHQ/snarkOS/pull/3239 that addresses https://github.com/AleoHQ/snarkOS/issues/3171.

This PR adds to the functionality of the ProposalCache by adding pending certificates (that have not yet been included in ledger) to the list of attributes to store to file.

This should increase the robustness of reboots because nodes should now not need to rely on PrimaryPings to catch up to other peers in a reboot scenario. Initial testing has observed successful restarts (in the honest case) for any number of validators (including scenarios of more than f+1 validators rebooting).

Test Plan

Burn-in tests and additional reboot testing needs to be done to ensure robustness of this change.

Related PRs

Extension of https://github.com/AleoHQ/snarkOS/pull/3239