Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

### Fixed

- [#6613](https://github.com/ChainSafe/forest/pull/6613): Fixed chain sync getting stuck when encountering time-travelling blocks by not marking the corresponding tipsets as permanently bad.
Comment thread
LesnyRumcajs marked this conversation as resolved.

## Forest v0.32.1 "Malfoy"

This is a non-mandatory release for all node operators. It sets F3 initial power table on calibnet for late F3 participation and F3 data verification scenarios. It also includes new V2 RPC methods, a few bug fixes and `lotus-gateway` compatibility fixes.
Expand Down
12 changes: 11 additions & 1 deletion src/chain_sync/chain_follower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ use crate::{
chain::ChainStore,
chain_sync::{
ForkSyncInfo, ForkSyncStage, SyncStatus, SyncStatusReport, TipsetValidator,
bad_block_cache::BadBlockCache, metrics, tipset_syncer::validate_tipset,
bad_block_cache::BadBlockCache,
metrics,
tipset_syncer::{TipsetSyncerError, validate_tipset},
},
libp2p::{NetworkEvent, PubsubMessage, hello::HelloRequest},
message_pool::{MessagePool, MpoolRpcProvider},
Expand Down Expand Up @@ -846,6 +848,14 @@ impl SyncTask {
tipset,
is_proposed_head,
}),
// If temporal drift error, don't mark as bad, just skip validation and try again
// later. This mirrors internal logic where temporal drift doesn't mark a block as
// bad permanently, since it could be valid later on. If not done, a single
// time-traveling block could cause the node to be stuck without making progress.
Err(e) if matches!(e, TipsetSyncerError::TimeTravellingBlock { .. }) => {
warn!("Time travelling block detected, skipping tipset for now: {e}");
None
}
Err(e) => {
warn!("Error validating tipset: {e}");
Some(SyncEvent::BadTipset(tipset))
Expand Down
Loading