Make it possible to disable BLS verification for everything except Deposits (attempt 2)#7065
Conversation
…posits (Consensys#6116) (cherry picked from commit 35eb475)
…nvalid BLSPublicKey passed instead of throwing and exception. Add unit test
…posit-bls-verifier-1
|
Today @rolfyone was actually working on the BLS verification area. You may need some coordination :) |
I'll keep digging and see if theres reasons I can't do what I'm thinking, but I'd really like to be avoiding using BlsSignatureVerifier.SIMPLE, or somehow making sure we minimise individual verify calls where possible... It's just that in production we seem to be spending a significant amount of time doing individual verifies rather than batching... I'll drill into uses of the single verify function when i get a sec... |
| */ | ||
| public static boolean blsVerifyDeposit = true; | ||
| @VisibleForTesting | ||
| public static BLSSignatureVerifier depositSignatureVerifier = DEFAULT_DEPOSIT_SIGNATURE_VERIFIER; |
There was a problem hiding this comment.
are we planning on differentiating? why not just reference the default_deposit_signature_verifier?
There was a problem hiding this comment.
DEFAULT_DEPOSIT_SIGNATURE_VERIFIER was intended as a default value for resetting the depositSignatureVerifier field after testing with disabled verifier. But you are right, it's probably an over-complication for the production code.
PR Description
Replace
AbstractBlockProcessor.blsVerifyDepositstatic flag withBLSSignatureVerifierreference to be able to set the verifier to the working instance even if the BLS verification is globally disabled withBLSConstants.disableBLSVerification()This is the second attempt to enable this feature.
The first one #6116 had an issue #6147 and had to be reverted: #6148
The problem was in inconsistent
BLS.verify*methods behavior with respect to invalidBLSPublicKey: some methods returnedfalse, some thrownBLSException. This PR also aligns these methods behavior: they are now all returnfalse. Additionallycatch(BLSException)clauses were added aroundverify*calls inAbstractBlockProcessorbefore (in revert PR #6148)Documentation
doc-change-requiredlabel to this PR if updates are required.Changelog