-
Notifications
You must be signed in to change notification settings - Fork 341
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(hard_fork): Lightclient rollback #1363
feat(hard_fork): Lightclient rollback #1363
Conversation
mtsitrin
commented
Oct 30, 2024
•
edited
Loading
edited
- Implement the OnHardFork hook in the LightClient module
- LightClient HardFork mode
- no LC updates are accepted until the fork is fully resolved.
- ResolveHardFork
617fa63
into
mtsitrin/937-rollapp-hard-fork-hub-side
return nil | ||
} | ||
|
||
func (k Keeper) RollbackCanonicalClient(ctx sdk.Context, rollappId string, height uint64) { |
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.
not clear if height
is target height or fraud height. I suggest renaming it accordingly.
if h.GetRevisionHeight() < height { | ||
return false | ||
} |
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.
2 things here:
- if it's target height it should probably be
<=
(unless it's the fraud height?) - the acennding iteration could be very pricy. desc iteration would be far more efficeint but I guess we don't have this api? thinking of 1 year of iteration.. not sure if the consensus states get pruned at some point?
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.
- it's
fraud height
- consensus states got pruned after
TrustingPeriod
. anyway I'll change it to descending
} | ||
|
||
// FIXME: assure there's no case with no proposer | ||
func (k Keeper) getValidatorHashForHeight(ctx sdk.Context, rollappId string, height uint64) []byte { |
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.
height
is not used