Submit ptc votes that we produce to the ptc op pool (#9231)

We are not submitting ptc votes that we produce to our lcoal ptc op pool. So when we are the block producer we don't include our own ptc votes!


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
Eitan Seri-Levi
2026-04-30 08:43:14 +02:00
committed by GitHub
parent 8d77b1c08d
commit 728356ad03
2 changed files with 23 additions and 0 deletions

View File

@@ -629,6 +629,13 @@ fn publish_payload_attestation_messages<T: BeaconChainTypes>(
"Payload attestation invalid for fork choice" "Payload attestation invalid for fork choice"
); );
} }
if let Err(e) = chain.add_payload_attestation_to_pool(&verified) {
warn!(
reason = ?e,
"Failed to add payload attestation to pool"
);
}
} }
Err(PayloadAttestationError::PriorPayloadAttestationMessageKnown { .. }) => { Err(PayloadAttestationError::PriorPayloadAttestationMessageKnown { .. }) => {
num_already_known += 1; num_already_known += 1;

View File

@@ -2846,6 +2846,8 @@ impl ApiTester {
let message = self.make_valid_payload_attestation_message(0); let message = self.make_valid_payload_attestation_message(0);
let fork_name = self.chain.spec.fork_name_at_slot::<E>(message.data.slot); let fork_name = self.chain.spec.fork_name_at_slot::<E>(message.data.slot);
let pool_count_before = self.chain.op_pool.num_payload_attestation_messages();
self.client self.client
.post_beacon_pool_payload_attestations(&[message], fork_name) .post_beacon_pool_payload_attestations(&[message], fork_name)
.await .await
@@ -2856,6 +2858,12 @@ impl ApiTester {
"valid payload attestation should be sent to network" "valid payload attestation should be sent to network"
); );
assert_eq!(
self.chain.op_pool.num_payload_attestation_messages(),
pool_count_before + 1,
"payload attestation should be added to op pool"
);
self self
} }
@@ -2863,6 +2871,8 @@ impl ApiTester {
let message = self.make_valid_payload_attestation_message(1); let message = self.make_valid_payload_attestation_message(1);
let fork_name = self.chain.spec.fork_name_at_slot::<E>(message.data.slot); let fork_name = self.chain.spec.fork_name_at_slot::<E>(message.data.slot);
let pool_count_before = self.chain.op_pool.num_payload_attestation_messages();
self.client self.client
.post_beacon_pool_payload_attestations_ssz(&[message], fork_name) .post_beacon_pool_payload_attestations_ssz(&[message], fork_name)
.await .await
@@ -2873,6 +2883,12 @@ impl ApiTester {
"valid payload attestation (SSZ) should be sent to network" "valid payload attestation (SSZ) should be sent to network"
); );
assert_eq!(
self.chain.op_pool.num_payload_attestation_messages(),
pool_count_before + 1,
"payload attestation should be added to op pool"
);
self self
} }