Skip to content
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

Merged
merged 6 commits into from
Jan 4, 2024
Merged

polygon/sync: canonical chain builder #9117

merged 6 commits into from
Jan 4, 2024

Conversation

battlmonstr
Copy link
Contributor

No description provided.

return errors.New("canonicalChainBuilderImpl.Connect: invalid header.Time")
}

if err := bor.ValidateHeaderExtraField(header.Extra); err != nil {
Copy link
Member

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?

Copy link
Contributor Author

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.

@battlmonstr battlmonstr merged commit b57cbdc into devel Jan 4, 2024
7 checks passed
@battlmonstr battlmonstr deleted the pr/cc_builder branch January 4, 2024 09:44
AskAlexSharov pushed a commit that referenced this pull request Jan 5, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants