mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 03:42:46 +00:00
Gloas process execution payload bid (#8355)
* add proces_execution_bid * add has_builder_withdrawal_credential * process_execution_payload_bid signature is infinity check for self-build * process_execution_payload_bid updates per consensus spec v1.6.0-beta.1 release * process_execution_bid to avoid expensive lookups for 0 amount bids * verify builder not slashed even for self-building
This commit is contained in:
@@ -113,16 +113,18 @@ impl<E: EthSpec> BlsToExecutionChanges<E> {
|
||||
.validators()
|
||||
.get(validator_index as usize)
|
||||
.is_none_or(|validator| {
|
||||
let prune = validator.has_execution_withdrawal_credential(spec)
|
||||
&& head_block
|
||||
.message()
|
||||
.body()
|
||||
.bls_to_execution_changes()
|
||||
.map_or(true, |recent_changes| {
|
||||
!recent_changes
|
||||
.iter()
|
||||
.any(|c| c.message.validator_index == validator_index)
|
||||
});
|
||||
let prune = validator.has_execution_withdrawal_credential(
|
||||
spec,
|
||||
head_state.fork_name_unchecked(),
|
||||
) && head_block
|
||||
.message()
|
||||
.body()
|
||||
.bls_to_execution_changes()
|
||||
.map_or(true, |recent_changes| {
|
||||
!recent_changes
|
||||
.iter()
|
||||
.any(|c| c.message.validator_index == validator_index)
|
||||
});
|
||||
if prune {
|
||||
validator_indices_pruned.push(validator_index);
|
||||
}
|
||||
|
||||
@@ -582,7 +582,12 @@ impl<E: EthSpec> OperationPool<E> {
|
||||
address_change.signature_is_still_valid(&state.fork())
|
||||
&& state
|
||||
.get_validator(address_change.as_inner().message.validator_index as usize)
|
||||
.is_ok_and(|validator| !validator.has_execution_withdrawal_credential(spec))
|
||||
.is_ok_and(|validator| {
|
||||
!validator.has_execution_withdrawal_credential(
|
||||
spec,
|
||||
state.fork_name_unchecked(),
|
||||
)
|
||||
})
|
||||
},
|
||||
|address_change| address_change.as_inner().clone(),
|
||||
E::MaxBlsToExecutionChanges::to_usize(),
|
||||
|
||||
Reference in New Issue
Block a user