Skip to content

Return empty digest when failing verification - #626

Merged
samliok merged 2 commits into
mainfrom
schedTaskDespiteEmptyNot
Oct 15, 2026
Merged

samliok merged 2 commits into
mainfrom
schedTaskDespiteEmptyNot

Conversation

@yacovm

@yacovm yacovm commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

When we verify a block, the task returns the ID of the block.

But a block's verification may fail. In case it fails, we shouldn't schedule the next block, as the previous one should successfully verify first.

Also fixes a corner case where we replicate a finalization but don't schedule the dependent tasks.

Comment thread simplex/epoch_test.go

// block1 was finalized by the rest of the network, which is what allowed block0 to be finalized
// despite round 0 being empty notarized. We ensure that finalizing block1 through replication commits it.
finalization1, _ := testutil.NewFinalizationRecord(t, sigAggr, block1, nodes[0:3])

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.

why is this last check necessary for the test?

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.

Because otherwise the scenario doesn't make sense, because the only reason we finalized block0 is because we finalized block1 above it.

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.

I don't want us or anyone else in the future think we didn't know that

@yacovm
yacovm force-pushed the schedTaskDespiteEmptyNot branch from c1c2531 to c41ceb4 Compare October 14, 2026 17:15
When we verify a block, the task returns the ID of the block.

But a block's verification may fail. In case it fails, we shouldn't schedule the next block,
as the previous one should successfully verify first.

Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
@yacovm
yacovm force-pushed the schedTaskDespiteEmptyNot branch from c41ceb4 to 066aaef Compare October 14, 2026 17:47
@samliok
samliok merged commit b837d88 into main Oct 15, 2026
7 checks passed
@samliok
samliok deleted the schedTaskDespiteEmptyNot branch October 15, 2026 14:51
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