@@ -466,7 +466,11 @@ func (s *Syncer) trySyncNextBlock(event *common.DAHeightEvent) error {
466466 // Verify forced inclusion transactions if configured
467467 if err := s .verifyForcedInclusionTxs (currentState , data ); err != nil {
468468 s .logger .Error ().Err (err ).Uint64 ("height" , nextHeight ).Msg ("forced inclusion verification failed" )
469- // TODO(@julienrbrt): Eventually halt the syncer and request the node to be started using the based sequencer.
469+ if errors .Is (err , errMaliciousProposer ) {
470+ s .logger .Error ().Msg ("Restart with based sequencer." )
471+ s .cache .RemoveHeaderDAIncluded (headerHash )
472+ return err
473+ }
470474 }
471475
472476 // Apply block
@@ -586,6 +590,8 @@ func (s *Syncer) validateBlock(currState types.State, data *types.Data, header *
586590 return nil
587591}
588592
593+ var errMaliciousProposer = errors .New ("malicious proposer detected" )
594+
589595// verifyForcedInclusionTxs verifies that all forced inclusion transactions from DA are included in the block
590596func (s * Syncer ) verifyForcedInclusionTxs (currentState types.State , data * types.Data ) error {
591597 if s .daRetriever == nil {
@@ -631,7 +637,7 @@ func (s *Syncer) verifyForcedInclusionTxs(currentState types.State, data *types.
631637 Int ("missing_count" , len (missingTxs )).
632638 Int ("total_forced" , len (forcedIncludedTxsEvent .Txs )).
633639 Msg ("SEQUENCER IS MALICIOUS: forced inclusion transactions missing from block" )
634- return fmt .Errorf ("sequencer is malicious: %d forced inclusion transactions not included in block" , len (missingTxs ))
640+ return errors . Join ( errMaliciousProposer , fmt .Errorf ("sequencer is malicious: %d forced inclusion transactions not included in block" , len (missingTxs ) ))
635641 }
636642
637643 s .logger .Debug ().
0 commit comments