-
Notifications
You must be signed in to change notification settings - Fork 233
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
Refactor uptime tracking #1388
Merged
Merged
Refactor uptime tracking #1388
Conversation
This file contains 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
Initialialize
complexity. 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-evm
plugin. The main focus is on refactoring the code to use a newvalidatorsManager
for managing validators instead of the previousvalidatorState
anduptimeManager
. 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:
GetCurrentValidators
function inplugin/evm/service.go
to usevalidatorsManager
instead ofvalidatorState
for retrieving validator information.plugin/evm/validators/interfaces/interfaces.go
to defineValidatorReader
andManager
for better abstraction and modularity.manager
implementation inplugin/evm/validators/manager.go
to handle validator synchronization and state management.Testing Enhancements:
plugin/evm/validators/manager_test.go
to validate the new validator management functionality, including scenarios for adding, updating, and removing validators.File Restructuring:
plugin/evm/validators/codec.go
toplugin/evm/validators/state/codec.go
andplugin/evm/validators/interfaces/interface.go
toplugin/evm/validators/state/interfaces/state.go
. [1] [2]Code Cleanup:
noop_state.go
file fromplugin/evm/validators/validatorstest
as it is no longer needed.These changes collectively aim to enhance the maintainability and functionality of the validator management system in the
subnet-evm
plugin.How this was tested
Locally and UTs
Need to be documented?
No
Need to update RELEASES.md?
No