Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

system_syncState: Always return highest block #11979

Merged
merged 1 commit into from
Aug 5, 2022
Merged

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Aug 4, 2022

Before highestBlock was an optional that was omitted when it was None. We recently changed the
way the highestBlock is determined, this resulted in having this value in 99.99% of the time being
None when the node is syncing blocks at the tip. Now we always return a block for highestBlock.
If sync doesn't return us any best seen block, we return our own local best block as highestBlock.
This should mainly reflect the same behavior to before we changed the way the best seen block is determined.

Closes: paritytech/polkadot#5860

Before `highestBlock` was an optional that was omitted when it was `None`. We recently changed the
way the `highestBlock` is determined, this resulted in having this value in 99.99% of the time being
`None` when the node is syncing blocks at the tip. Now we always return a block for `highestBlock`.
If sync doesn't return us any best seen block, we return our own local best block as `highestBlock`.
This should mainly reflect the same behavior to before we changed the way the best seen block is determined.
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Aug 4, 2022
@bkchr bkchr requested review from arkpar and a team August 4, 2022 20:38
@bkchr bkchr merged commit c172d0f into master Aug 5, 2022
@bkchr bkchr deleted the bkchr-sync-state-rpc branch August 5, 2022 17:53
DaviRain-Su pushed a commit to octopus-network/substrate that referenced this pull request Aug 23, 2022
Before `highestBlock` was an optional that was omitted when it was `None`. We recently changed the
way the `highestBlock` is determined, this resulted in having this value in 99.99% of the time being
`None` when the node is syncing blocks at the tip. Now we always return a block for `highestBlock`.
If sync doesn't return us any best seen block, we return our own local best block as `highestBlock`.
This should mainly reflect the same behavior to before we changed the way the best seen block is determined.
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
Before `highestBlock` was an optional that was omitted when it was `None`. We recently changed the
way the `highestBlock` is determined, this resulted in having this value in 99.99% of the time being
`None` when the node is syncing blocks at the tip. Now we always return a block for `highestBlock`.
If sync doesn't return us any best seen block, we return our own local best block as `highestBlock`.
This should mainly reflect the same behavior to before we changed the way the best seen block is determined.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing key 'higestBlock' in RPC responce system_syncState.
3 participants