-
Notifications
You must be signed in to change notification settings - Fork 32
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
Replay fix for Validator Manager #743
base: main
Are you sure you want to change the base?
Conversation
) internal returns (bytes32) { | ||
(bytes32 validationID, bytes memory registerL1ValidatorMessage) = ValidatorMessages | ||
.packRegisterL1ValidatorMessage( |
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.
Unrelated fix that simplified this code :)
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.
Makes sense to me. Just a comment about the expiry length change.
@@ -94,7 +94,7 @@ contract ValidatorManager is Initializable, OwnableUpgradeable, ACP99Manager { | |||
0xe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb00; | |||
|
|||
uint8 public constant MAXIMUM_CHURN_PERCENTAGE_LIMIT = 20; | |||
uint64 public constant MAXIMUM_REGISTRATION_EXPIRY_LENGTH = 2 days; | |||
uint64 public constant MAXIMUM_REGISTRATION_EXPIRY_LENGTH = 1 days; |
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.
Is this change required for this fix?
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 required, no, but aligns with the value the p-chain uses.
Why this should be merged
Fixes an issue where:
expiry
of original message.initiateValidatorRegistration
message.completeValidatorRegistration
message signed by p-chainThis could cause a validator to be marked as active in the contract, but inactive on the p-chain. Such a validator would not be able to accrue any
uptime
, so in most cases would be ineligible for rewards. We want to avoid potential de-syncs from with the p-chain.Also aligns
MAXIMUM_REGISTRATION_EXPIRY_LENGTH
to be equal to the value on the p-chain.How this works
Since we keep validator state indefinitely, we just check if the status is
Unknown
before initiating a registration.How this was tested
How is this documented