-
Notifications
You must be signed in to change notification settings - Fork 345
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
feat(fork): restricts to post genesis transfer heights only #1600
Conversation
if !k.rollappKeeper.ForkLatestAllowed(ctx, seq.RollappId) { | ||
return nil, gerrc.ErrFailedPrecondition.Wrap("rotation could cause fork before genesis transfer") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eagerly prevent rotation when it would end up in a fork before genesis transfer
better ux and prevents rollapp getting completely broken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why u check it on the notice period start?
I think it will male more sense, to check on rotation start (notice period ends), in case nextProposer is sentinel
// is the rollback fork going to violate assumptions? | ||
func (k Keeper) ForkAllowed(ctx sdk.Context, rollapp string, lastValidHeight uint64) bool { | ||
ra := k.MustGetRollapp(ctx, rollapp) | ||
return 0 < ra.GenesisState.TransferProofHeight && ra.GenesisState.TransferProofHeight <= lastValidHeight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing true
on ra.GenesisState.TransferProofHeight == 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're not gonna allow to fork before genesis bridge period (regardless of if ibc opened or not) to avoid now edge cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it the use case this PR tries to solve?
we want to allow fork before genesis bridge as well
we just want to avoid rollback from post GB
to pre GB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No @mtsitrin we are not
if !k.rollappKeeper.ForkLatestAllowed(ctx, seq.RollappId) { | ||
return nil, gerrc.ErrFailedPrecondition.Wrap("rotation could cause fork before genesis transfer") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why u check it on the notice period start?
I think it will male more sense, to check on rotation start (notice period ends), in case nextProposer is sentinel
why u check it on the notice period start? I disagree that's way more complicated and no ux improvement |
Description
Closes
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.
PR review checkboxes:
I have...
Unreleased
section inCHANGELOG.md
godoc
commentsSDK Checklist
map
time.Now()
sendCoin
and notSendCoins
Full security checklist here
For Reviewer:
After reviewer approval: