-
Notifications
You must be signed in to change notification settings - Fork 700
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: Track reported blocks to capture notification gaps #5856
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c42a4d8
chainHead: Introduce state for block tracking
lexnv d277b87
chainHead: Fix typo in distace_within_reason
lexnv 00e8eab
chainHead: Keep track of blocks from the initial event
lexnv 6e55454
chainHead: Track reported blocks from the NewBlock import path
lexnv 678e9bf
chainHead: Track reported blocks from the Finalized import path
lexnv 35b6573
chainHead: Track announced blocks as finalized
lexnv 5e03600
chainHead/tests: Detect block gaps with unknwon parents
lexnv 5c80006
chainHead: Simplify state tracking
lexnv 7e74e4a
prdoc: Add prdoc
lexnv fbb8b16
Update substrate/client/rpc-spec-v2/src/chain_head/chain_head_follow.rs
lexnv 2b44eaf
chainHead: Move finalized blocks to a shorter lived LRU
lexnv e97b590
chainHead: Use LRU::peak instead of get to not change order
lexnv 45f2bce
chainHead: Extra sanity check for subscription pinning and races
lexnv 28911be
chainHead: Move `pin_block` logic above
lexnv 1d5af1a
chainHead: Add most recently finalized blocks wrapper
lexnv 308d388
chainHead: Apply suggestion
lexnv a05ae72
chainHead: Move comment to the top of the struct
lexnv d8e9a35
Merge remote-tracking branch 'origin/master' into lexnv/chain-head-state
lexnv 5135e89
chainHead/tests: Adjust interface to latest origin/master
lexnv a5bf18e
chainHead/tests: Use mock client instead of client
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Extend state tracking of chainHead to capture notification gaps | ||
|
||
doc: | ||
- audience: Node Dev | ||
description: | | ||
This PR extends the state tracking of the RPC-v2 chainHead methods. | ||
ChainHead tracks the reported blocks to detect notification gaps. | ||
This state tracking ensures we can detect `NewBlock` events for | ||
which we did not report previously the parent hash. | ||
|
||
crates: | ||
- name: sc-rpc-spec-v2 | ||
bump: minor | ||
|
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
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.
Believe that
pruned_blocks
are no longer needed (#5605), will tackle this in another PR