Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: nodes keep out of sync when missing gossiped block (issue #284) #540

Merged
merged 15 commits into from
Dec 28, 2023
Merged
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
removing commented code
  • Loading branch information
srene committed Dec 28, 2023
commit 5773d825d120cc1de51d9f9677a15e18a433c914
10 changes: 0 additions & 10 deletions block/retriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,13 @@ func (m *Manager) syncUntilTarget(ctx context.Context, syncTarget uint64) error
return err
}

//code commented out because it may be the case the start height from the da batch is not exactly the next block from the last received
/*if settlementBatch.StartHeight != currentHeight+1 {
return fmt.Errorf("settlement batch start height (%d) on index (%d) is not the expected", settlementBatch.StartHeight, currStateIdx)
}*/

err = m.processNextDABatch(ctx, settlementBatch.MetaData.DA.Height)
if err != nil {
return err
}

currentHeight = m.store.Height()

//code commented out because it may be the case the current height is higher than da height after applying pending blocks, in case of missing blocks
/*if currentHeight != settlementBatch.EndHeight {
return fmt.Errorf("after applying state index (%d), the height (%d) is not as expected (%d)", currStateIdx, currentHeight, settlementBatch.EndHeight)
}*/

err = m.updateStateIndex(settlementBatch.StateIndex)
if err != nil {
return err
Expand Down
Loading