refactor(juno): stop support for pending block#3498
Merged
Conversation
7dd0ec5 to
3091489
Compare
rodrodros
reviewed
Mar 24, 2026
rodrodros
reviewed
Mar 24, 2026
7a96755 to
cbf6aaa
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3498 +/- ##
==========================================
- Coverage 75.51% 73.20% -2.32%
==========================================
Files 384 384
Lines 34973 35173 +200
==========================================
- Hits 26411 25749 -662
- Misses 6700 7139 +439
- Partials 1862 2285 +423 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
thiagodeev
requested changes
Mar 25, 2026
Contributor
thiagodeev
left a comment
There was a problem hiding this comment.
Hey. We are on the right track.
This is a partial review, I haven't finished yet.
Requesting changes since we still have mentions to pending in the starkinetdata/feeder pkg
rodrodros
reviewed
Mar 27, 2026
rodrodros
approved these changes
Mar 30, 2026
EgeCaner
requested changes
Mar 31, 2026
0c3775c to
531e909
Compare
EgeCaner
reviewed
Apr 1, 2026
EgeCaner
approved these changes
Apr 1, 2026
Contributor
EgeCaner
left a comment
There was a problem hiding this comment.
Looks good, thanks! I love this PR
06916cd to
3bffac0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StarkNet 0.14.0 introduced a new pending block format. The legacy
Pendingblock has been replaced by a two-phasePreConfirmedandPreLatest. This PR removes support forPendingblock in the synchroniser and the RPC. Since the network has been running 0.14.0+ for a long time, nodes no longer receive or produce the old-style pending blocks, meaning the code that handled them was dead weight — untriggered branches, split test cases, and a pending polling phase that never ran.What changed
Sync
The sync layer's polling pipeline previously had two phases: one for the legacy pending format and one for the new pre-confirmed format. The legacy phase, along with all helpers and state logic it relied on, has been removed. Nodes now follow a single polling path (which is
runPreConfirmedPhase()) for pending data.RPC handlers (v9, v10)
The handlers no longer need to detect which pending format they received and adapt accordingly. Every code path that previously forked on "old format vs new format" has been collapsed into one - the support for pending
Varianthas been dropped and only thePreConfirmedis supported. Tests that covered the old-format path have been removed; existing tests have been updated to usePreConfirmed+PreLatestonly.RPC v8
The v8 spec still exposes a "pending" block ID that maps to the old format. The legacy type is therefore kept alive — but marked as deprecated — solely to serve v8 responses. It will be deleted when v8 is retired. Removed
onPendingDatafield, pending data subscription, and the pending event loop case, as it always returns nil for 0.14.0+ versions.Notes
Deprecatedtag being added to thePendingtype andNewPendingconstructor, the linter issues will be present in the CI.rpc/v6package, as its flagged for deprecationPendingDatainterface was moved to a separate PR to reduce the noise and make reviews easier: refactor(juno): obsolete thePendingDatainterface #3512