@@ -42,6 +42,7 @@ import {
4242import { PublicContractsDB , PublicProcessorFactory } from '@aztec/simulator/server' ;
4343import {
4444 AttestationsBlockWatcher ,
45+ BroadcastedInvalidCheckpointProposalWatcher ,
4546 EpochPruneWatcher ,
4647 type SlasherClientInterface ,
4748 type Watcher ,
@@ -720,6 +721,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb
720721 let validatorsSentinel : Awaited < ReturnType < typeof createSentinel > > | undefined ;
721722 let epochPruneWatcher : EpochPruneWatcher | undefined ;
722723 let attestationsBlockWatcher : AttestationsBlockWatcher | undefined ;
724+ let broadcastedInvalidCheckpointProposalWatcher : BroadcastedInvalidCheckpointProposalWatcher | undefined ;
723725
724726 if ( ! proverOnly ) {
725727 validatorsSentinel = await createSentinel ( epochCache , archiver , p2pClient , config ) ;
@@ -739,6 +741,15 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb
739741 watchers . push ( epochPruneWatcher ) ;
740742 }
741743
744+ if ( config . slashBroadcastedInvalidCheckpointProposalPenalty > 0n ) {
745+ broadcastedInvalidCheckpointProposalWatcher = new BroadcastedInvalidCheckpointProposalWatcher (
746+ p2pClient ,
747+ epochCache ,
748+ config ,
749+ ) ;
750+ watchers . push ( broadcastedInvalidCheckpointProposalWatcher ) ;
751+ }
752+
742753 // We assume we want to slash for invalid attestations unless all max penalties are set to 0
743754 if ( config . slashProposeInvalidAttestationsPenalty > 0n || config . slashAttestDescendantOfInvalidPenalty > 0n ) {
744755 attestationsBlockWatcher = new AttestationsBlockWatcher ( archiver , epochCache , config ) ;
@@ -762,6 +773,10 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb
762773 await attestationsBlockWatcher . start ( ) ;
763774 started . push ( attestationsBlockWatcher ) ;
764775 }
776+ if ( broadcastedInvalidCheckpointProposalWatcher ) {
777+ await broadcastedInvalidCheckpointProposalWatcher . start ( ) ;
778+ started . push ( broadcastedInvalidCheckpointProposalWatcher ) ;
779+ }
765780 log . info ( `All p2p services started` ) ;
766781 } )
767782 . catch ( err => log . error ( 'Failed to start p2p services after archiver sync' , err ) ) ;
0 commit comments