linera-protocol
linera-protocol copied to clipboard
Use events for adding and removing committees.
Motivation
To make epoch changes scalable, we want to use events instead of messages (https://github.com/linera-io/linera-protocol/issues/365).
Proposal
Remove the committee messages and add add ProcessNewEpoch and ProcessRemovedEpoch system operations instead. The committee change operations on the admin change create events now, and the two new operations consume those events, i.e. verify that they exist, change the epoch and committees on the local chain, and create an OracleResponse::Event entry in the execution outcome.
Clients get notified about new epochs because they always follow/synchronize the admin chain and thus store the epoch change events locally. They will then run process_inbox which, in addition to incoming messages, looks for epoch change events, and includes the new operations in the proposal accordingly.
Test Plan
Several existing tests verify that reconfigurations are processed correctly. These check the new mechanism now instead of the message-based one.
Release Plan
- Nothing to do / These changes follow the usual release cycle.
Links
- Part of #365.
- reviewer checklist
Closing this in favor of https://github.com/linera-io/linera-protocol/issues/3453. (The implementation will probably use some of this PR's code, but also change a lot.)
Reopening as a draft. I will mark it ready for review when https://github.com/linera-io/linera-protocol/issues/3453 is fully implemented.