Skip to content

Conversation

@refcell
Copy link
Contributor

@refcell refcell commented Jan 8, 2026

Description

Fixes #310

Refactors validation logic from the StateProcessor into a new stateless type FlashblockSequenceValidator.

@refcell refcell self-assigned this Jan 8, 2026
@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Jan 8, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@refcell refcell requested review from danyalprout and meyer9 January 8, 2026 17:19
@refcell refcell marked this pull request as ready for review January 8, 2026 17:19
Copy link
Contributor

@meyer9 meyer9 left a comment

Choose a reason for hiding this comment

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

LG, makes the logic much more clear! Do you know if we check transaction order somewhere? If a canonical block reorders transactions compared to the flashblocks, that should count as a reorg I would think.

meyer9
meyer9 previously approved these changes Jan 8, 2026
Copy link
Contributor

@meyer9 meyer9 left a comment

Choose a reason for hiding this comment

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

LG! might want to wait for @danyalprout or @haardikk21 to review unless it's blocking something else since I'm not 100% familiar with this repo yet

@refcell refcell requested a review from haardikk21 January 8, 2026 18:18
@refcell
Copy link
Contributor Author

refcell commented Jan 8, 2026

LG! might want to wait for @danyalprout or @haardikk21 to review unless it's blocking something else since I'm not 100% familiar with this repo yet

Agree, will wait on their review :) TY

haardikk21
haardikk21 previously approved these changes Jan 8, 2026
Copy link
Collaborator

@haardikk21 haardikk21 left a comment

Choose a reason for hiding this comment

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

This is pretty cool

danyalprout
danyalprout previously approved these changes Jan 8, 2026
Copy link
Collaborator

@danyalprout danyalprout left a comment

Choose a reason for hiding this comment

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

lgtm, few nits

self.build_pending_state(None, &flashblocks)
}
ReconciliationStrategy::DepthLimitExceeded { depth, max_depth } => {
debug!(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would make this a warn log, it's a sign the node is falling behind

Copy link
Collaborator

@haardikk21 haardikk21 Jan 8, 2026

Choose a reason for hiding this comment

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

DepthLimitExceeded is not a sign of the node lagging. This occurs because the default Continue case doesn't clear pending state to avoid re-execution of transactions. When flashblocks regularly outpace canon blocks, eventually it will have a LOT of pending state which can cause slowness. The depth limit check ensures that after a certain threshold, we force clear the state and eat the cost of re-executing some (small) number of txns (< 1 block)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the context

@refcell refcell dismissed stale reviews from danyalprout, haardikk21, and meyer9 via d7d9806 January 8, 2026 20:03
@refcell refcell merged commit 51c82c1 into main Jan 9, 2026
19 checks passed
@refcell refcell deleted the rf/validation branch January 9, 2026 01:29
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.

feat(flashblocks): Extract Validation & Sequencing Logic from StateProcessor

6 participants