Repository navigation
feat: keep fork lanes stable when a fork overtakes the best block - #188
Merged
Merged
Conversation
|
@sharmis-tp is attempting to deploy a commit to the Streamsphere Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Contributor
Author
josepot
self-requested a review
October 13, 2026 07:51
josepot
approved these changes
Oct 13, 2026
josepot
left a comment
Member
There was a problem hiding this comment.
LGTM! Thanks a lot @sharmis-tp for this, really nice work!
Although, I want to make sure that we have @voliva's green-light before we merge.
voliva
approved these changes
Oct 13, 2026
voliva
left a comment
Contributor
There was a problem hiding this comment.
That's great, thanks again!
Contributor
Author
|
Thanks both, glad it landed! |
This branch was successfully deployed
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.


Closes #172.
Replaces the top-down fork layout in the block explorer with a bottom-up one so lanes stay stable when a fork overtakes the best block:
The layout lives in blockLayout.ts as a pure function, one pass per height(about 0.7 ms for 660 blocks). BlockTable draws a diagonal whenever a block's lane differs from its parent's, and uses a canonical flag for best-chain styling since lane 0 no longer always means best chain.
Tested with synthetic fork scenarios (linear, losing fork, fork overtaking, two forks from one parent) and live on Polkadot (screenshot attached).