-
Notifications
You must be signed in to change notification settings - Fork 277
Refactor uptime tracking #1388
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
Merged
Merged
Refactor uptime tracking #1388
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…bs/subnet-evm into always-sign-uptime
…va-labs/subnet-evm into sign-validator-uptime-warp-msg
darioush
reviewed
Nov 14, 2024
darioush
previously approved these changes
Nov 15, 2024
Co-authored-by: Darioush Jalali <[email protected]> Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]> Signed-off-by: Ceyhun Onur <[email protected]>
darioush
approved these changes
Nov 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why this should be merged
Current VM package was operating state + uptime manager together and had an increased
Initialializecomplexity. This PR is to move that to another component.How this works
This pull request introduces significant changes to the validator management system in the
subnet-evmplugin. The main focus is on refactoring the code to use a newvalidatorsManagerfor managing validators instead of the previousvalidatorStateanduptimeManager. Additionally, it includes the introduction of new interfaces and restructuring of existing code to improve modularity and maintainability.Key changes include:
Refactoring and Code Improvements:
GetCurrentValidatorsfunction inplugin/evm/service.goto usevalidatorsManagerinstead ofvalidatorStatefor retrieving validator information.plugin/evm/validators/interfaces/interfaces.goto defineValidatorReaderandManagerfor better abstraction and modularity.managerimplementation inplugin/evm/validators/manager.goto handle validator synchronization and state management.Testing Enhancements:
plugin/evm/validators/manager_test.goto validate the new validator management functionality, including scenarios for adding, updating, and removing validators.File Restructuring:
plugin/evm/validators/codec.gotoplugin/evm/validators/state/codec.goandplugin/evm/validators/interfaces/interface.gotoplugin/evm/validators/state/interfaces/state.go. [1] [2]Code Cleanup:
noop_state.gofile fromplugin/evm/validators/validatorstestas it is no longer needed.These changes collectively aim to enhance the maintainability and functionality of the validator management system in the
subnet-evmplugin.How this was tested
Locally and UTs
Need to be documented?
No
Need to update RELEASES.md?
No