MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
5.96k stars 11.08k forks source link

Consensus crash-recovery #5200

Open asonnino opened 2 years ago

asonnino commented 2 years ago

Description

To ensure crash-recovery of consensus, it is not enough to have the CertificatesWaiter to send to consensus every certificate for which their ancestors are in the storage. After crash-recovery, we may also need to send all parents certificates with rounds greater than last_committed. This means we need to boot the CertificatesWaiter with knowledge of the last committed round and modify its workings to potentially re-serve some past certificates as well.

Note that the Primary core also need to persist last_voted to not equivocate on certificates.

asonnino commented 2 years ago

Tagging as bug as this seems to become urgent

huitseeker commented 2 years ago

See also MystenLabs/narwhal#17.

asonnino commented 2 years ago

fixed by https://github.com/MystenLabs/narwhal/pull/481

gdanezis commented 2 years ago

I do not think this is entirely done. As per the discussion with @akichidis - the interface between client <-> Bullshark has to be adapted to ensure upon recovery the stream of agreed messages is correct. See also (new) issue MystenLabs/sui#5215

asonnino commented 2 years ago

You are right! sorry for that