-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
polygon/sync: canonical chain builder #9117
Conversation
fe91291
to
6d8d76b
Compare
return errors.New("canonicalChainBuilderImpl.Connect: invalid header.Time") | ||
} | ||
|
||
if err := bor.ValidateHeaderExtraField(header.Extra); err != nil { |
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.
Have a look at checkHeaderExtraData - when the header is the last of a sprint we do more validations - check the span selected proposers match the validator bytes in the header extra data.
Maybe add a todo if not adding as part of this PR?
On another note it may be a good idea if we write down a list of all validations we should be doing and double check the code later on that we have them all?
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.
👍 Yes, I planned to do more validations in the next PRs and wanted to discuss some of them.
993a264
to
42f188e
Compare
16a41b7
to
9f290f1
Compare
A crash on startup happens on --chain=mumbai , because I've confused chainConfig.Bor (from type chain.Config) and config.Bor (from type ethconfig.Config) in the setup code. ethconfig.Config.Bor property contained bogus values, and was used only to check its type in CreateConsensusEngine(). Its value was never read (before PR #9117). This change removes the property to avoid confusion and fix the crash. Devnet network.BorStateSyncDelay was implemented using ethconfig.Config.Bor, but it wasn't taking any effect. It should be fixed separately in a different way.
No description provided.