Skip to content

Commit 03a46fe

Browse files
committed
fix: Do not access attestation pool in prover p2p client
We dont spin up an attestation pool in prover p2p clients, since we dont care to track them. We only subscribe to the topic so we can know which txs may be interesting later and mark them as non-evictable.
1 parent da55b76 commit 03a46fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

yarn-project/p2p/src/services/libp2p/libp2p_service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,10 @@ export class LibP2PService<T extends P2PClientType = P2PClientType.Full> extends
799799
const validationFunc: () => Promise<ReceivedMessageValidationResult<BlockProposal>> = async () => {
800800
const block = BlockProposal.fromBuffer(payloadData);
801801
const isValid = await this.validateBlockProposal(source, block);
802-
const exists = isValid && (await this.mempools.attestationPool!.hasBlockProposal(block));
802+
803+
// Note that we dont have an attestation pool if we're a prover node, but we still
804+
// subscribe to block proposal topics in order to prevent their txs from being cleared.
805+
const exists = isValid && (await this.mempools.attestationPool?.hasBlockProposal(block));
803806

804807
this.logger.trace(`Validate propagated block proposal`, {
805808
isValid,

0 commit comments

Comments
 (0)