Skip to content

Commit da019ec

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 987402c commit da019ec

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
@@ -810,7 +810,10 @@ export class LibP2PService<T extends P2PClientType = P2PClientType.Full> extends
810810
const validationFunc: () => Promise<ReceivedMessageValidationResult<BlockProposal>> = async () => {
811811
const block = BlockProposal.fromBuffer(payloadData);
812812
const isValid = await this.validateBlockProposal(source, block);
813-
const exists = isValid && (await this.mempools.attestationPool!.hasBlockProposal(block));
813+
814+
// Note that we dont have an attestation pool if we're a prover node, but we still
815+
// subscribe to block proposal topics in order to prevent their txs from being cleared.
816+
const exists = isValid && (await this.mempools.attestationPool?.hasBlockProposal(block));
814817

815818
this.logger.trace(`Validate propagated block proposal`, {
816819
isValid,

0 commit comments

Comments
 (0)