-
Notifications
You must be signed in to change notification settings - Fork 337
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
Split runtime-transaction crate and reduce SVM dependency #3983
Split runtime-transaction crate and reduce SVM dependency #3983
Conversation
1d959af
to
620a09e
Compare
Hey @kevinheavey, do you happen to have the crate name reserved under your username? This PR is getting this error: |
620a09e
to
3d473fc
Compare
Yes I do. I've sent an ownership invitation to anza-team now so @yihau can accept and you can use it for this PR |
Thank you! |
compute-budget-instruction/src/compute_budget_instruction_details.rs
Outdated
Show resolved
Hide resolved
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.
Thanks for picking this up @pgarg66! Left a couple last comments about Clone and FrozenABI.
With this split, I can now:
- Add
compute_budget_limits
toSVMMessage
trait- default implementation calls
process_compute_budget_instructions
- override for structs implementing
StaticMeta
- default implementation calls
This will let SVM be slightly more efficient, since we can use cached-metadata to get the compute-budget instructions quickly, instead of re-calculating. Main thing getting in the way of doing this previously was just the code organization - which this PR solves!
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.
lgtm - thanks for doing it
673b7a9
to
1ef6530
Compare
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.
Thanks for cleaning everything up!
298c917
to
45cc59a
Compare
45cc59a
to
dcab4f7
Compare
dcab4f7
to
1580abc
Compare
Problem
SVM dependency on
runtime-transaction
can be reduced by splitting relevant code in its own crate.Summary of Changes
Split
compute-budget
related code to a new cratecompute-budget-instruction
.Fixes #