-
Notifications
You must be signed in to change notification settings - Fork 202
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
[sovereign] Do not request incoming headers upon receiving #6585
[sovereign] Do not request incoming headers upon receiving #6585
Conversation
) | ||
|
||
// GetCurrentSovereignHeader returns current sovereign chain block handler from blockchain hook | ||
func GetCurrentSovereignHeader(nodeHandler process.NodeHandler) data.SovereignChainHeaderHandler { | ||
return nodeHandler.GetChainHandler().GetCurrentBlockHeader().(data.SovereignChainHeaderHandler) | ||
} | ||
|
||
// CreateSovereignRunTypeComponents will create sovereign run type components | ||
func CreateSovereignRunTypeComponents(args runType.ArgsRunTypeComponents, sovereignExtraConfig config.SovereignConfig) (factory.RunTypeComponentsHolder, error) { |
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.
The cleanest solution would be to move this function somewhere in /sovereignnode/runtype
and use it in both chainSimualtor and sovereignNodeRunner
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.
Not quite same usage, just verified.
Will leave it as it is
The base branch was changed.
…-request-incoming-header
a9dcce7
into
feat/sovereign-mainchain-header-sync
Reasoning behind the pull request
X+2
to be added before one with nonceX+1
.doJobOnReceivedCrossNotarizedHeader
receives a new main chain header, it notifies all relevant handlers viacrossBlockNotifier
, which then callsComputeLongestChain
. If a header with nonce X+2 is processed first, unnecessary network requests are made to receive headers with nonce X+1.Proposed changes
crossBlockNotifier
,we return earlyTesting procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?