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

Refactor: RuntimeTransaction Instruction Processing #3490

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

apfitzge
Copy link

@apfitzge apfitzge commented Nov 5, 2024

Problem

  • Currently RuntimeTransaction does multiple loops over instructions to do minor processing for caching meta data
  • It would be more efficient to do a single loop over instructions
  • Previously this work was not done because we did not want to duplicate code OR run into inefficiencies when we wanted to get a single instruction detail item

Summary of Changes

  • Top-level ProgramIdFlag to assign labels to program keys
  • Convert from top-level to "inner" flags when needed
  • Trait for processing transactions individually and getting output
  • Generic cached processor for caching converted flags
  • Top-level processor to do all processings in single-loop

Fixes #

@apfitzge apfitzge added the noCI Suppress CI on this Pull Request label Nov 5, 2024
.program_instructions_iter()
.map(|(program_id, ix)| (program_id, SVMInstruction::from(ix))),
);
let (precompile_signature_details, compute_budget_instruction_details) =
Copy link
Author

Choose a reason for hiding this comment

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

@tao-stones this is top-level processing function. Single loop over the instructions that we can use to get all the details we want. very easy to add more to this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
noCI Suppress CI on this Pull Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant