-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: clean up unused code #207
Conversation
d843da3
to
c1f5ef9
Compare
I realize this interacts more with the validation interface cleanup than I expected. I'm going to try to reformat these so the cleanup is more of a setup for removing the validation hook interface (which is what's really required to drop lots of this stuff) |
3f7a58e
to
5c09a2e
Compare
R1 validation and keys were unreachable after changing the init interface, K1 validation was unused since it was validated directly without a module (simple signature instead of modular signature) Fallback modules were entirely unused. Modules and exec modules could have been used, but were not and weren't supported by the factory to be installed at init.
dropping unused arg
Moving to a single module to elimiate duplicate code
this was unused and too similar to the validator module
This is much more direct path to installing instead of using the install to re-enter the account
removing only locally tests pass
This broke locally, but now fails in CI, maybe the converse is also true
This was recently renamed, and we're still on an older version
This wasn't necessary to pass in ci, but now fails locally :(
This is just a test setup issue combined with a era-test-node change
e602fb7
to
10e5579
Compare
And finally R1 validator interfaces
I got some good feedback on this outside of this PR, so I'll post my responses here for better visibility:
|
Easy rename after cleanup
The normal case appears to be no data, so the key is added elsewhere?
This matches the behaviour of the hook
5cd9542
to
2c6e0d4
Compare
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.
looks good, but needs some fixes
currently if we want to uninstall the session key module, we have to uninstall it as both validator and as hook. if we do it in the wrong order, it will lock itself in a bad state (since we only check for isHook
in isInitialized
). So we have to fix isInitialized
or even skip that check in uninstall
entirely.
yes we should probably let hooks get so it should be fine for now, we might even consider disabling adding hooks temporarily, after initialization |
Updating disable to be more robust!
Description
Removed the following:
Combined the following:
Additional context
Less dead code means a faster audit, even if this code was mostly audited before it was incomplete in some places. Most of this was added in the direction 7579 compatibility or was leftover from Clave after the validation interface was made into a module.
This doesn't functionally change the factory interface, so we'll don't yet need to update the SDK