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.98k stars 11.09k forks source link

[Narwhal] remove SharedCommittee and SharedWorkerCache #7640

Open mwtian opened 1 year ago

mwtian commented 1 year ago

When Narwhal needs to support epoch updates, data structures for Committee and WorkerCache can get updated dynamically. So SharedCommittee and SharedWorkerCache were created to support this use case.

Now Narwhal is recreated on epoch changes. The SharedCommittee and SharedWorkerCache wrappers are no longer needed, because the underlying Committee and WorkerCache structs never change throughput the lifetime of each Narwhal instance. Input arguments and struct members of the wrapper types can be replaced with storing the base types Committee and WorkerCache value.

mwtian commented 1 year ago

Another possible related cleanup is to rename WorkerCache to WorkerConfig, which seems more appropriate.