-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update preconf registry 2 #72
Conversation
revert InvalidValidatorSignature(); | ||
} | ||
|
||
// Revert if the signature has expired | ||
if (block.timestamp > addValidatorParams[i].signatureExpiry) { |
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.
Maybe we should check it before verifying the signature?
emit ValidatorRemoved(msg.sender, validatorPubKeyHashes[i]); | ||
|
||
// Revert if the signature has expired | ||
if (block.timestamp > removeValidatorParams[i].signatureExpiry) { |
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.
Maybe we should check it before verifying the signature?
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.
The transaction libraries stop the transaction on estimation stage itself, so in practise, the order of reverts usually does not matter in the contracts.
pragma solidity 0.8.25; | ||
|
||
library PreconfConstants { | ||
uint256 internal constant TWO_EPOCHS = 768; |
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.
uint256 internal constant TWO_EPOCHS = 768; | |
uint256 internal constant TWO_EPOCHS = 768; // 2 * 32 slots * 12 sec |
Update lookahead and connect it to new registry
indexToPreconfer
mapping to remove the need to index preconfers on the node.validators
map and can be pulled by node (to build the lookahead) usinggetValidator
view.addValidators
andremoveValidators
so they can be called by anyone with the correct signatures and not necessarily the preconfer's address.