[fork detection] Disable transaction execution on split brain condition
Description
To accomplish this, we add a new singleton perpetual table to AuthorityState that saves the current execution_state of the authority, along with an in-memory field within AuthorityServer. This is initialized at startup by reading the table, and defaults to Ready. Before execution of a new transaction request in the authority, we reference the in memory execution state, and early return an error to the client if we are halted due to fork.
TODO
Note that since this state is persisted, in order to undo it, there needs to be another call to reset the state. Planning on adding an api to the admin port for mutating the state, either to or from the Ready state, so that a validator can re-enable execution after an issue has been resolved.
Test Plan
Added to split brain e2e test
If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.
Type of Change (Check all that apply)
- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration
Release notes
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| explorer | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 13, 2024 11:46pm |
| multisig-toolkit | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 13, 2024 11:46pm |
| mysten-ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 13, 2024 11:46pm |
| sui-core | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 13, 2024 11:46pm |
| sui-kiosk | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 13, 2024 11:46pm |
| sui-typescript-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 13, 2024 11:46pm |
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.