Skip to content

Commit 976bb69

Browse files
committed
fix syncer
1 parent 1be4565 commit 976bb69

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

block/internal/syncing/syncer.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -749,17 +749,11 @@ func (s *Syncer) TrySyncNextBlock(ctx context.Context, event *common.DAHeightEve
749749
}
750750

751751
// Verify forced inclusion transactions if configured.
752-
// The checks is actually only performed on DA only enabled nodes, or P2P nodes catching up with the HEAD.
753-
// P2P nodes at HEAD aren't actually able to verify forced inclusions txs as DA inclusion happens later (so DA hints are not available). This is a known limitation described in the ADR.
754-
if event.Source == common.SourceDA || event.DaHeightHints != [2]uint64{0, 0} {
755-
currentDAHeight := currentState.DAHeight
756-
if event.DaHeightHints[0] > currentDAHeight {
757-
currentDAHeight = event.DaHeightHints[0]
758-
} else if event.DaHeightHints[1] > currentDAHeight {
759-
currentDAHeight = event.DaHeightHints[1]
760-
}
761-
762-
if err := s.VerifyForcedInclusionTxs(ctx, currentDAHeight, data); err != nil {
752+
// The checks is actually only performed on DA only enabled nodes.
753+
// P2P nodes aren't actually able to verify forced inclusions txs as DA inclusion happens later (so DA hints are not available) and DA hints cannot be trusted. This is a known limitation described in the ADR.
754+
// In the future we should verify force inclusion txs completely asynchronously, while still waiting for block n-1 execution.
755+
if event.Source == common.SourceDA {
756+
if err := s.VerifyForcedInclusionTxs(ctx, event.DaHeight, data); err != nil {
763757
s.logger.Error().Err(err).Uint64("height", nextHeight).Msg("forced inclusion verification failed")
764758
if errors.Is(err, errMaliciousProposer) {
765759
// remove header as da included from cache

0 commit comments

Comments
 (0)