-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix payload availability lookup using the parent block's slot (alpha.13) #9761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,7 +82,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> { | |
| BeaconChainError::BlockRewardAttestationError | ||
| })? | ||
| } else { | ||
| self.compute_beacon_block_attestation_reward_altair_deneb(block, state) | ||
| self.compute_beacon_block_attestation_reward_altair_and_later(block, state) | ||
| .map_err(|e| { | ||
| error!( | ||
| error = ?e, | ||
|
|
@@ -249,7 +249,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> { | |
| Ok(block_reward) | ||
| } | ||
|
|
||
| fn compute_beacon_block_attestation_reward_altair_deneb< | ||
| fn compute_beacon_block_attestation_reward_altair_and_later< | ||
| Payload: AbstractExecPayload<T::EthSpec>, | ||
| >( | ||
| &self, | ||
|
|
@@ -267,13 +267,20 @@ impl<T: BeaconChainTypes> BeaconChain<T> { | |
| let mut previous_epoch_participation = | ||
| state.previous_epoch_participation()?.to_owned_list(); | ||
|
|
||
| let parent_slot = state | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codex tells me that for gloas, we need to run
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah i think we probably should have made a change here when we deferred payload processing to the next slot (ethereum/consensus-specs#5094) in alpha spec 5? Anyways good catch, i opened a separate PR with these changes
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, thanks! |
||
| .latest_execution_payload_bid() | ||
| .ok() | ||
| .map(|bid| bid.slot); | ||
|
|
||
| for attestation in block.body().attestations() { | ||
| let data = attestation.data(); | ||
| let inclusion_delay = state.slot().safe_sub(data.slot)?.as_u64(); | ||
|
|
||
| // [Modified in Deneb:EIP7045] | ||
| let participation_flag_indices = get_attestation_participation_flag_indices( | ||
| state, | ||
| data, | ||
| parent_slot, | ||
| inclusion_delay, | ||
| &self.spec, | ||
| )?; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -728,10 +728,16 @@ impl<E: EthSpec> ValidatorMonitor<E> { | |
|
|
||
| let data = unaggregated_attestation.data(); | ||
|
|
||
| let parent_slot = state | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potentially same issue here? we might end up reporting the wrong thing here.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah similar thing here, fix is in this PR #9828 |
||
| .latest_execution_payload_bid() | ||
| .ok() | ||
| .map(|bid| bid.slot); | ||
|
|
||
| // Get the reward indices for the unaggregated attestation or log an error | ||
| match get_attestation_participation_flag_indices( | ||
| state, | ||
| unaggregated_attestation.data(), | ||
| parent_slot, | ||
| inclusion_delay, | ||
| spec, | ||
| ) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting here that this is a nice rename of the function