Remove source credential type check in process_consolidation_request#4158
Remove source credential type check in process_consolidation_request#4158ensi321 wants to merge 1 commit intoethereum:devfrom
process_consolidation_request#4158Conversation
|
Hey @ensi321, just curious what the rationale for this change is. Just simplification? I agree with BLS creds it's practically impossible to have a source address collision. But the withdrawal creds type check is very minimal and it doesn't hurt to be safe. I'm not sure how I feel about this change. |
In general, there can be a collision |
in theory yes, but is this possibility likely in practice? eg. I could generate a new seed right now and if I am lucky I get Vitalik's private key but that's not gonna happen ever in practice |
|
So while very very unlikely, it's not impossible therefore we must keep this check. Closing this PR. |
I am not a cryptographer, but afaik, outputs of two different hash functions has a higher chance of collision than outputs of a single one |
I think the issue is more severe and not just a random collision, it seems like it's possible to set arbitrary withdrawal credentials when submitting a deposit to the contract (it's user input in the The changes as proposed in this PR could be merged as is and it would pass the CL spec tests as we rely on |
One of the conditions for a consolidation request to be processed is if source validator has credential type of 0x01 or 0x02.
However one can argue that source validator with 0x00 BLS credential will not pass the source address check ie. the last 20 bytes of the BLS credential cannot match the request's source address.
BLS credential is made up from a hash of validator's public key, whereas request's source address is populated from
msg.senderie. the execution address on the contract level. It is impossible for these two to be equal so it is unnecessary to check for credential type here.