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

Add feature flag to treat all blocks as optimistic at startup #11303

Merged
merged 7 commits into from
Aug 25, 2022

Conversation

potuz
Copy link
Contributor

@potuz potuz commented Aug 24, 2022

Adds a feature flag to treat every node as optimistic at launch. Currently this is essentially a noop, since the only node in forkchoice we do not revalidate is the finalized checkpoint. However this may be useful in case of an emergency when we implement sync from head.

Credit to @paulhauner for calling attention to this feature.

@potuz potuz requested a review from a team as a code owner August 24, 2022 18:33
@@ -66,6 +66,7 @@ type Flags struct {
DisableForkchoiceDoublyLinkedTree bool // DisableForkChoiceDoublyLinkedTree specifies whether fork choice store will use a doubly linked tree.
EnableBatchGossipAggregation bool // EnableBatchGossipAggregation specifies whether to further aggregate our gossip batches before verifying them.
EnableOnlyBlindedBeaconBlocks bool // EnableOnlyBlindedBeaconBlocks enables only storing blinded beacon blocks in the DB post-Bellatrix fork.
EnableEverytingOptimistic bool // EnableEverythingOptimistic treats every block as optimistic at startup.
Copy link
Member

@terencechain terencechain Aug 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about EnableStartupOptimistic ?

@@ -113,6 +113,12 @@ var (
Name: "enable-only-blinded-beacon-blocks",
Usage: "Enables storing only blinded beacon blocks in the database without full execution layer transactions",
}
enableEverythingOptimistic = &cli.BoolFlag{
Name: "everything-optimistic",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about?

Suggested change
Name: "everything-optimistic",
Name: "startup-optimistic",

terencechain
terencechain previously approved these changes Aug 24, 2022
terencechain
terencechain previously approved these changes Aug 24, 2022
@potuz potuz force-pushed the treat_everything_optimistic_flag branch from 05fcb3e to 059d4cf Compare August 24, 2022 19:27
@potuz potuz force-pushed the treat_everything_optimistic_flag branch from 65dcc80 to 5c62692 Compare August 24, 2022 19:38
@prylabs-bulldozer prylabs-bulldozer bot merged commit 2317375 into develop Aug 25, 2022
@delete-merged-branch delete-merged-branch bot deleted the treat_everything_optimistic_flag branch August 25, 2022 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants