Skip to content

Stop indexing and gate messages once the epoch is sealed - #503

Closed
samliok wants to merge 3 commits into
mainfrom
sealed-epoch-handling
Closed

Stop indexing and gate messages once the epoch is sealed#503
samliok wants to merge 3 commits into
mainfrom
sealed-epoch-handling

Conversation

@samliok

@samliok samliok commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Split out of the cleanup-instance branch.

Two related fixes for behavior after an epoch seals:

  • HandleMessage now treats every sender like a non-validator once the epoch is sealed, so only replication requests are served.
  • indexFinalization no longer indexes blocks after the epoch is sealed, though it still tracks the last block and progresses rounds.

@samliok
samliok marked this pull request as ready for review August 13, 2026 22:30
Comment thread simplex/epoch.go Outdated
if err := e.Storage.Index(e.finishCtx, block, finalization); err != nil {
return err
// index only if the epoch is not sealed
if !e.isEpochSealed() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but don't we already enforce that at the instance level? Why do this here too?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea agreed it can be removed

Comment thread simplex/epoch.go
@@ -166,7 +166,7 @@ func (e *Epoch) HandleMessage(msg *common.Message, from common.NodeID) error {
}

_, known := e.validatorsToPKs[string(from)]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should enforce this externally, not internally.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, should this be done in a separate pr though?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but if we do that in a separate PR then we don't do it here...

@samliok

samliok commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

closed with #513

@samliok samliok closed this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants