Implement PTC reprocess queue - #9458
Conversation
…c-payload-attestations-reprocess-queue # Conflicts: # beacon_node/beacon_processor/src/scheduler/work_reprocessing_queue.rs # beacon_node/network/src/network_beacon_processor/tests.rs
There was a problem hiding this comment.
Looks pretty good, just some small changes
Also would be good to add reprocess metrics, see BEACON_PROCESSOR_AGGREGATED_ATTESTATION_REQUEUED_TOTAL and BEACON_PROCESSOR_UNAGGREGATED_ATTESTATION_REQUEUED_TOTAL as examples
We can introduce a BEACON_PROCESSOR_PAYLOAD_ATTESTATION_REQUEUED_TOTAL when a payload attestation gets queued for reprocessing
Also we have a test case requeue_unknown_block_gossip_attestation_without_import. I think we could add a similar test cases for payload attestations.
| // PTC size ~512 per slot, buffer 2-3 slots for reorgs and processing delays (512 * 3 = 1536) | ||
| // TODO(EIP-7732): verify if this is preferable queue length or otherwise |
There was a problem hiding this comment.
yeah this is fine, you can remove this TODO
| self.send_sync_message(SyncMessage::UnknownBlockHashFromAttestation( | ||
| peer_id, | ||
| *beacon_block_root, | ||
| )) | ||
| )); | ||
|
|
||
| if allow_reprocess { | ||
| // Queue the payload attestation for re-processing | ||
| let processor = self.clone(); | ||
| let msg = ReprocessQueueMessage::UnknownBlockPayloadAttestation( |
There was a problem hiding this comment.
we call UnknownBlockHashFromAttestation both inside and outside the if allow_reprocess. we should only call it inside the if allow_reprocess
| error: PayloadAttestationError, | ||
| message_slot: Slot, | ||
| payload_attestation_message: Box<PayloadAttestationMessage>, | ||
| allow_reprocess: bool, |
There was a problem hiding this comment.
PR #9440 introduced a ReprocessAllowance enum. We should use that instead of the allow_reprocess flag. We'd probably want to add a new variant to the enum BlockOnly
There was a problem hiding this comment.
Thanks for the context on this! I added the new variant and switched to using the ReprocessAllowance enum in 918ea83
…reporcess bool flag
Thank you for the review and the guidance! 🙏 I addressed the comments and added the suggested test and metric. |
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 29 minutes in the queue, including 27 minutes 12 seconds running CI. Waiting for
All conditions
ReasonThe merge conditions cannot be satisfied due to failing checks
HintYou may have to fix your CI before adding the pull request to the queue again. Requeued — the merge queue status continues in this comment ↓. |
|
@mergify requeue |
Merge Queue Status
This pull request spent 30 minutes 11 seconds in the queue, including 28 minutes 29 seconds running CI. Waiting for
All conditions
ReasonThe merge conditions cannot be satisfied due to failing checks
HintYou may have to fix your CI before adding the pull request to the queue again. Requeued — the merge queue status continues in this comment ↓. |
|
@mergify requeue |
Merge Queue Status
This pull request spent 29 minutes 13 seconds in the queue, including 27 minutes 46 seconds running CI. Waiting for
All conditions
ReasonThe merge conditions cannot be satisfied due to failing checks
HintYou may have to fix your CI before adding the pull request to the queue again. Requeued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 28 minutes 47 seconds in the queue, including 27 minutes 32 seconds running CI. Required conditions to merge
|
Issue Addressed
This PR closes issue #9421.
Proposed Changes
UnknownBlockUnaggregate).attestation_to_unknown_block_processed(gossip and RPC block import variants).