celestiaorg / celestia-app

Celestia consensus node
https://celestiaorg.github.io/celestia-app/
Apache License 2.0
341 stars 279 forks source link

Add a delay between `MsgTryUpgrade` and upgrade height #3552

Closed rootulp closed 3 months ago

rootulp commented 3 months ago

Context

Informal Systems v2 audit finding 3.

Problem

A user can submit a MsgTryUpgrade as soon as 5/6 voting power has signaled for a version. The remaining 1/6 of voting power won't have any time to upgrade prior to the upgrade height.

Proposal

Add a delay between the block that includes a successful MsgTryUpgrade and the upgrade height.

  1. Determine a reasonable delay time period. Ex: 2 days or 1 week.
  2. Add the delay. Note: during this time all signals and future cranks should be no-ops.