-
Notifications
You must be signed in to change notification settings - Fork 767
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/fix: Report bestBlock events only for newBlock reports #5527
Merged
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9bec983
chainHead/fix: Report bestBlock events only for newBlock reports
lexnv cc9524b
chainHead/tests: Check BestBlock is reported on edge-cases by known
lexnv d57578f
Add PRdoc
lexnv abc2734
Merge remote-tracking branch 'origin/master' into lenxv/fix-chainhead…
lexnv 5d30d7e
chainHead/follow: Move comment to the right section
lexnv e42f104
chainHead/follow: Generate new event only if not descendant
lexnv cf73041
chainHead/tests: Adjust to lowest_common_ancestor
lexnv 020adee
Update prdoc
lexnv 8a28364
Update prdoc/pr_5527.prdoc
lexnv b5bdb31
Update prdoc/pr_5527.prdoc
lexnv 45fc52b
Merge remote-tracking branch 'origin/master' into lenxv/fix-chainhead…
lexnv 46fe86b
chainHead/tests: Adjust testing to new prunning logic
lexnv 92e9400
chainHead/follow: Update comment wrt finalization and pruning
lexnv 91c407d
chainHead/tests: Adjust testing to reporduce client.info race
lexnv 2298b72
".git/.scripts/commands/fmt/fmt.sh"
9da84df
Merge branch 'master' into lenxv/fix-chainhead-best-block
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: Report BestBlock events only for newBlock reports | ||
|
||
doc: | ||
- audience: Node Dev | ||
description: | | ||
This PR ensures that the chainHead_v1_follow method of the RPC-v2 API is always | ||
reporting a `BestBlock` event after a `NewBlock`. | ||
There was a race condition in the chainHead follow logic which led to the `BestBlock` | ||
event to be emitted without an associated `NewBlock` event. | ||
|
||
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
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.
I don't get why we need this. If the best block was not pruned, it needs to be a descendant of the finalized block.