Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add ErrHeightFromFuture check to local-da GetAll
The LocalDA's GetAll method was missing the height-from-future check
that existed in the old GetIDs method. This caused the syncer to
iterate indefinitely instead of backing off when caught up with DA.

Also simplified IsHeightDAIncluded by removing unused variable.
  • Loading branch information
randygrok committed Nov 28, 2025
commit 4ad19eeaf2378029312d3c1a970261c89eed1ff9
3 changes: 1 addition & 2 deletions block/internal/submitting/submitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,9 @@ func (s *Submitter) IsHeightDAIncluded(height uint64, header *types.SignedHeader

headerHash := header.Hash().String()
dataCommitment := data.DACommitment()
dataHash := dataCommitment.String()

_, headerIncluded := s.cache.GetHeaderDAIncluded(headerHash)
_, dataIncluded := s.cache.GetDataDAIncluded(dataHash)
_, dataIncluded := s.cache.GetDataDAIncluded(dataCommitment.String())

dataIncluded = bytes.Equal(dataCommitment, common.DataHashForEmptyTxs) || dataIncluded

Expand Down
5 changes: 5 additions & 0 deletions da/cmd/local-da/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ func (d *LocalDA) GetAll(ctx context.Context, height uint64, namespaces []share.
d.mu.RLock()
defer d.mu.RUnlock()

// Return error if requesting a height from the future
if height > d.height {
return nil, fmt.Errorf("height %d is in the future (current: %d): given height is from the future", height, d.height)
}

entries, ok := d.blobs[height]
if !ok {
return nil, nil
Expand Down
Loading