-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chainHead: Ensure reasonable distance between leaf and finalized block #3562
Merged
Merged
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f69de7e
chainHead: Ensure reasonable distance between leaf and finalized block
lexnv 1afeaf8
chainHead: Introduce custom error for distance too large
lexnv 6f02a08
chainHead: Temporarily suspend subscriptions
lexnv 831f095
chainHead: Move suspending to subscription management
lexnv 887d380
chainHead/subs/tests: Adjust testing to suspending changes
lexnv 34a28ec
chainHead/subs/tests: Check subspended subscriptions
lexnv 4da5073
chainHead/subs/tests: Simplify block production
lexnv e51b932
chainHead: Add config for suspended subscriptions
lexnv 9024461
chainHead: Configure the lagging distance
lexnv e182600
chainHead/tests: Check suspension and lagging distance
lexnv 53b80e8
Merge remote-tracking branch 'origin/master' into lexnv/chainhead-edg…
lexnv 0be419d
Update substrate/client/rpc-spec-v2/src/chain_head/subscription/inner.rs
lexnv 7563d9a
Update substrate/client/rpc-spec-v2/src/chain_head/chain_head_follow.rs
lexnv e9ae914
chainHead: Remove all active subscriptions instead of suspending time
lexnv e500f75
chainHead/tests: Adjust testing
lexnv ab5c218
Merge remote-tracking branch 'origin/lexnv/chainhead-edge-case-laggin…
lexnv 5326ada
Merge remote-tracking branch 'origin/master' into lexnv/chainhead-edg…
lexnv 0e276cc
chainHead: Refactor master with reserved subscriptions
lexnv f2cbb64
chainHead/tests: Adjust testing
lexnv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative for this would be to simply recalculate the:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there much of a computation cost for doing the above? Personally I think fewer constants is a good thing, but if it's expensive to compute then having a delay makes sense :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that makes sense, I was also wondering if the
suspended duration
is overkill for this.We might have a slight increase in reading the blockchain leaves numbers if they are placed on the disk, however I think we can live with that, since this is only an edge-case of an edge-case.
Have removed that constant and we should allow subscriptions to resume normal work as soon as the distance is reasonable.