-
Notifications
You must be signed in to change notification settings - Fork 94
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: implement client recovery feature #1127
Conversation
… into sean/client-recovery
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.
Great work @seanchen1991 ! Good to get it merged.
I added a last commit following @Farhad-Shabani 's comments.
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.
Great job @seanchen1991 on this PR, and big thanks to @rnbguy for the thorough reviews. Much appreciated!
Let's proceed with merging the PR once we've incorporated the changes and run integration tests on the basecoin-rs
.
Additionally, it would be great to include adequate unit tests as well, though perhaps in a follow-up PR?
If the tests are in separate PR, please add the changelog entries before merging 🙂 |
Is there anything pending for this PR? otherwise, we can wrap it us by adding changelog entries 🙂 |
* Initial scaffolding for testing client recovery * Add MsgRecoverClient variant to ClientMsg * Stub out `test_recover_client_ok` * Update recover client test fixture * Perform client updates on subject and substitute clients * Create mock headers with timestamps * Extend substitute client state's trusting period * Remove eprintln statements * Add some more tests * Refactor to not require call to `sleep` * Add docstring for `MockClientState::new` * Formatting * Remove recover_client validate and execute calls from dispatch * Remove recover_client validate and execute calls from dispatch * Call recover_client::validate and execute correctly * Change MockClientState default trusting period to 10 seconds
* Add `MsgRecoverClient` domain type * Working on client recovery validation handler logic * Implement recover_client::validate function * Add ClientStateValidation::check_substitute function * Working on `recover_client::execute` function * Stub out `update_on_recovery` function * Implement standalone `update_on_recovery` function * Change `update_on_recovery` function param * Remove `ClientState::initialise` call from `execute` * Implement `check_substitute` in ics07 * Update `update_on_recovery` function * Add `MsgRecoverClient` domain type * Working on client recovery validation handler logic * Implement recover_client::validate function * Add ClientStateValidation::check_substitute function * Working on `recover_client::execute` function * Stub out `update_on_recovery` function * Implement standalone `update_on_recovery` function * Change `update_on_recovery` function param * Remove `ClientState::initialise` call from `execute` * Implement `check_substitute` in ics07 * Update `update_on_recovery` function * Resolve errors upon rebasing * Add additional bounds on `check_substitute` and `update_on_recovery` * Implement TryFrom<AnyClientState> for ClientStateType * Attempt to implement check_substitute and update_on_recovery in ibc-derive * fix: introduce fully-qualified path to get ibc-derive work * Change substitute client state function params to Any * Update change_substitute and update_on_recovery call sites * Add additional bounds on other validation and execution context methods * Implement `update_on_recovery` for MockClientState * Silence unused variables warning * Add missing MockClientState fields * Fix some typos in doc comments * Remove unnecessary trait bound * Change `upgrade_client_proposal_handler` -> `execute_upgrade_client_proposal` * Add upgrade proposal type url * Remove commented-out trait bounds * Convert Any to ClientState instead of ClientStateType * Improve error message wording * Improve error message wording * Remove unnused function paramter * Replace `self` with `&self` * Convert substitute client state to MockClientState instead of Tm client state * Update ClientNotInactive error variant message * Improve `check_substitute` implementation * Make `Status` type `Copy` * Remove some imports and streamline mock client state initialization * rm redundant methods * Remove unnecessary TryFrom impl * tests: add unit tests for client recovery (#1151) * Initial scaffolding for testing client recovery * Add MsgRecoverClient variant to ClientMsg * Stub out `test_recover_client_ok` * Update recover client test fixture * Perform client updates on subject and substitute clients * Create mock headers with timestamps * Extend substitute client state's trusting period * Remove eprintln statements * Add some more tests * Refactor to not require call to `sleep` * Add docstring for `MockClientState::new` * Formatting * Remove recover_client validate and execute calls from dispatch * Remove recover_client validate and execute calls from dispatch * Call recover_client::validate and execute correctly * Change MockClientState default trusting period to 10 seconds * Add changelog entry --------- Co-authored-by: Farhad Shabani <[email protected]> Co-authored-by: Ranadeep Biswas <[email protected]>
Closes: #1110
Closes: #1111
Closes: #1112
Description
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.