dymensionxyz / dymension

Dymension Hub
https://dymension.xyz
Other
364 stars 341 forks source link

fraud liveness: schedule another liveness event if sequencer is jailed? #1050

Open danwt opened 2 months ago

danwt commented 2 months ago

Close criteria: make sure to reset liveness timer when sequencer jailed

When sequencer is jailed, the ticker should be removed When a sequencer becomes active, ticker should start afresh

Should probs be done via onJail hook or similar


See also https://github.com/dymensionxyz/dymension/issues/1028

https://github.com/dymensionxyz/dymension/blob/0a624a3c0f2843b23dff595573fee57c3c33e4bd/x/rollapp/keeper/liveness.go#L62-L75

danwt commented 2 weeks ago

"""Within the lifecycle of a rollapp, there are a few situations where liveness events are not needed: in case a proposer is jailed, or in case the rollapp is frozen. These two cases are not handled, with the rollapp renewing by default liveness events in an infinite schedule. Recommendation We recommend updating the liveness scheduling logic to not reschedule events in case the proposer is jailed or when the rollapp is frozen."""

danwt commented 1 week ago

omri: "also re liveness - currently we start to count “liveness” the moment the sequencer registered right? not upon first state update."

we need to make sure it's fair to new sequencer

danwt commented 1 week ago

yea just to make sure I’m clear - we should count once he registered, and not once he sent his first state update. this has big product implications.