-
Notifications
You must be signed in to change notification settings - Fork 216
feat: add view functions for verify proof of validator and deposit me… #1045
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
base: feat/vaults
Are you sure you want to change the base?
Conversation
…it message signature
Hardhat Unit Tests Coverage Summary
Diff against master
Results for commit: e6a2d55 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
@@ -317,7 +339,7 @@ contract PredepositGuarantee is IPredepositGuarantee, CLProofVerifier, PausableU | |||
|
|||
// this check isn't needed in `depositToBeaconChain` because | |||
// Beacon Chain doesn't enforce the signature checks for existing validators and just top-ups to their balance | |||
BLS12_381.verifyDepositMessage(_deposit, _depositsY[i], withdrawalCredentials); | |||
verifyDepositMessage(_deposit, _depositsY[i], withdrawalCredentials); |
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.
Can we check that this extra call does not increase gas cost due to args?
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.
can quickly compare via tx.gasUsed in some existing tests
A short summary of the changes.
Context
New Public Functions:
validatePubKeyWCProof
to validate a validator's proof against the Beacon block root using withdrawal credentials and a public key. This function wraps the private_validatePubKeyWCProof
method for external use.verifyDepositMessage
to verify the deposit message signature using BLS12-381 pairing checks. This function wraps theBLS12_381.verifyDepositMessage
method for external use.Refactoring of Existing Calls:
_validatePubKeyWCProof
withvalidatePubKeyWCProof
for proof validation in multiple locations, ensuring consistency and reusability. [1] [2] [3]BLS12_381.verifyDepositMessage
withverifyDepositMessage
for deposit verification, improving code readability and modularity.Problem
What problem this PR solves, link relevant issue if it exists
Solution
Your proposed solution