Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Tracked by #1282
danwt opened this issue Aug 8, 2024 · 4 comments
Closed
Tracked by #1282
Assignees
Labels

Comments

@danwt
Copy link
Contributor

danwt commented Aug 8, 2024

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 #1028

if e.IsJail {
err := k.sequencerKeeper.JailLiveness(ctx, e.RollappId)
if err != nil {
return errorsmod.Wrap(err, "jail liveness")
}
} else {
err := k.sequencerKeeper.SlashLiveness(ctx, e.RollappId)
if err != nil {
return errorsmod.Wrap(err, "slash liveness")
}
}
ra := k.MustGetRollapp(ctx, e.RollappId)
k.RescheduleLivenessEvent(ctx, &ra)

@danwt danwt self-assigned this Aug 8, 2024
@danwt danwt added the security label Aug 22, 2024
@danwt danwt changed the title Liveness: schedule another liveness event if sequencer is jailed? fraud liveness: schedule another liveness event if sequencer is jailed? Aug 22, 2024
@danwt
Copy link
Contributor Author

danwt commented Sep 25, 2024

"""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
Copy link
Contributor Author

danwt commented Sep 26, 2024

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
Copy link
Contributor Author

danwt commented Sep 26, 2024

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.

@danwt danwt mentioned this issue Oct 4, 2024
5 tasks
@omritoptix omritoptix assigned zale144 and unassigned danwt Oct 6, 2024
@danwt
Copy link
Contributor Author

danwt commented Oct 16, 2024

superseded by #1328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants