Skip to content

Explicitly validate public key when processing Deposit#2987

Closed
Nashatyrev wants to merge 4 commits intoethereum:devfrom
Nashatyrev:explicit-deposit-pkey-validation
Closed

Explicitly validate public key when processing Deposit#2987
Nashatyrev wants to merge 4 commits intoethereum:devfrom
Nashatyrev:explicit-deposit-pkey-validation

Conversation

@Nashatyrev
Copy link
Member

Deposits are the only source of non-validated public keys, so suggesting to add explicit public key validation statement to process_deposit function.

bls.Verify function (and its batch variants) is a bit ambiguous in the case if BLSPubkey is not valid (either invalid serialization or outside of the curve or outside of the group): whether it should return false or throw an error.

In all other cases (besides process_deposit) bls.Verify can't receive an invalid BLSPubkey since all of them come from the state and are inherently valid. Reasoning that way it could make sense to throw error if invalid pubkey is passed to bls.Verify since it would mean kind of fatal implementation error. In that case suggested implicit public key validation makes sense.

@Nashatyrev Nashatyrev marked this pull request as draft September 9, 2022 05:04
Copy link
Member

@dapplion dapplion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being explicit about this detail makes sense to me 👍

@hwwhww
Copy link
Contributor

hwwhww commented Sep 14, 2022

It looks fine to me, but I hope to get more reviews 👀 before we modify the phase0 spec.

@leolara
Copy link
Member

leolara commented Jun 4, 2025

I am closing this issue because it seems stale. Please, do not hesitate to reopen it if this is a mistake

@leolara leolara closed this Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants