merge with upstream

This commit is contained in:
realbigsean
2023-02-15 14:20:12 -05:00
63 changed files with 2499 additions and 454 deletions

View File

@@ -348,8 +348,7 @@ where
&mut self,
block: &'a SignedBeaconBlock<T, Payload>,
) -> Result<()> {
// FIXME(capella): to improve performance we might want to decompress the withdrawal pubkeys
// in parallel.
// To improve performance we might want to decompress the withdrawal pubkeys in parallel.
if let Ok(bls_to_execution_changes) = block.message().body().bls_to_execution_changes() {
for bls_to_execution_change in bls_to_execution_changes {
self.sets.push(bls_execution_change_signature_set(

View File

@@ -37,10 +37,9 @@ pub fn verify_bls_to_execution_change<T: EthSpec>(
Invalid::NonBlsWithdrawalCredentials
);
// Re-hashing the pubkey isn't necessary during block replay, so we may want to skip that in
// future.
let pubkey_hash = hash(address_change.from_bls_pubkey.as_serialized());
// FIXME: Should this check be put inside the verify_signatures.is_true() condition?
// I believe that's used for fuzzing so this is a Mehdi question..
verify!(
validator.withdrawal_credentials.as_bytes().get(1..) == pubkey_hash.get(1..),
Invalid::WithdrawalCredentialsMismatch