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

Reduce parallel prewarming overwork #7983

Merged
merged 7 commits into from
Dec 31, 2024
Merged

Conversation

benaadams
Copy link
Member

@benaadams benaadams commented Dec 30, 2024

Changes

To prewarm faster than main thread

  • ExecutionOptions.Warmup => ExecutionOptions.SkipValidation
  • ExecutionOptions.NoValidation => ExecutionOptions.SkipValidationAndCommit (which is SkipValidation | Commit)
  • Then skip validations based on the SkipValidation flag rather than the previous NoValidation flag which also needed the tx to Commit and wasn't the flag prewarming was using
  • Use actual tx don't clone them
  • Don't clone block header

Fastest code is the code that doesn't run

Types of changes

What types of changes does your code introduce?

  • Optimization

Testing

Requires testing

  • No

@benaadams benaadams changed the title Reduce prewarming overwork Reduce parallel prewarming overwork Dec 31, 2024
@benaadams benaadams requested a review from asdacap December 31, 2024 03:51
@@ -696,7 +696,7 @@ protected virtual void ExecuteEvmCall(
WorldState.Restore(snapshot);

Complete:
if (!opts.HasFlag(ExecutionOptions.NoValidation))
if (!opts.HasFlag(ExecutionOptions.SkipValidation))
Copy link
Member

Choose a reason for hiding this comment

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

I was worried that we might modify the header, but we probably are not modifying it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not inside a single tx run as we aren't doing block processing

@benaadams benaadams merged commit c924576 into master Dec 31, 2024
79 checks passed
@benaadams benaadams deleted the reduce-wraming-overwork branch December 31, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants