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

scheduler optimization - worker precompile verification #1531

Merged
merged 1 commit into from
May 30, 2024

Conversation

apfitzge
Copy link

Problem

scheduler is single threaded. doing precompile verification during the intial sanitization is thus also single-threaded.

Summary of Changes

move precompile verification to worker threads to improve efficiency

Fixes #

@apfitzge apfitzge requested a review from jstarry May 29, 2024 23:15
@apfitzge apfitzge force-pushed the pcv_optimization branch from 7804f40 to 6cff6e7 Compare May 30, 2024 02:51
@apfitzge apfitzge marked this pull request as ready for review May 30, 2024 03:01
@apfitzge apfitzge merged commit 0d34a1a into anza-xyz:master May 30, 2024
41 of 42 checks passed
@apfitzge apfitzge added the v1.18 label May 30, 2024
@apfitzge apfitzge deleted the pcv_optimization branch May 30, 2024 05:27
Copy link

mergify bot commented May 30, 2024

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

mergify bot pushed a commit that referenced this pull request May 30, 2024
(cherry picked from commit 0d34a1a)

# Conflicts:
#	core/src/banking_stage/consumer.rs
jstarry pushed a commit that referenced this pull request May 30, 2024
…ort of #1531) (#1535)

* scheduler optimization - worker precompile verification (#1531)

(cherry picked from commit 0d34a1a)

# Conflicts:
#	core/src/banking_stage/consumer.rs

* resolve conflicts

---------

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
Ok(_) => tx.verify_precompiles(&bank.feature_set),
Err(err) => Err(err),
})
.collect();

Choose a reason for hiding this comment

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

Does this need to add another allocation?

Copy link

Choose a reason for hiding this comment

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

Discussed offline that this is to ensure that downstream timing isn't affected by this extra verification

Choose a reason for hiding this comment

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

ok, probably deserves a comment at least

pub fn build_sanitized_transaction(
&self,
feature_set: &Arc<feature_set::FeatureSet>,
_feature_set: &Arc<feature_set::FeatureSet>,

Choose a reason for hiding this comment

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

why not remove? reduce backport diff?

Copy link

Choose a reason for hiding this comment

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

Yup exactly

anwayde pushed a commit to firedancer-io/agave that referenced this pull request Jul 23, 2024
…ort of anza-xyz#1531) (anza-xyz#1535)

* scheduler optimization - worker precompile verification (anza-xyz#1531)

(cherry picked from commit 0d34a1a)

# Conflicts:
#	core/src/banking_stage/consumer.rs

* resolve conflicts

---------

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
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