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

runtime-transaction: get_signature_details #2847

Merged

Conversation

apfitzge
Copy link

@apfitzge apfitzge commented Sep 5, 2024

Problem

  • Cannot get signature details easily for non-SanitizedMessage types

Summary of Changes

  • Add get_signature_details to RuntimeTransaction (eventually this will be stashed)
  • Avoid re-checking already checked keys using similar approach to ComputeBudget
  • eventually this will be cached as meta on the RuntimeTransaction

Fixes #

@apfitzge apfitzge changed the title get_signature_details runtime-transaction: get_signature_details Sep 5, 2024
// array of slots for all possible static and sanitized program_id_index,
// each slot indicates if a program_id_index has not been checked, or is
// already checked with result that can be reused.
flags: [Option<ProgramIdStatus>; FILTER_SIZE as usize],
Copy link
Author

Choose a reason for hiding this comment

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

Not all variants are used in enum, so Option here should not add additional byte.

@apfitzge apfitzge marked this pull request as ready for review September 9, 2024 12:58
@apfitzge apfitzge requested a review from tao-stones September 9, 2024 12:58
runtime-transaction/src/signature_details.rs Show resolved Hide resolved
runtime-transaction/src/signature_details.rs Outdated Show resolved Hide resolved
}

#[inline]
fn get_num_signatures_in_instruction(instruction: &SVMInstruction) -> u8 {

Choose a reason for hiding this comment

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

nit: might as well return u64 here

runtime-transaction/src/signature_details.rs Show resolved Hide resolved
@apfitzge apfitzge force-pushed the runtime_transaction_get_signature_details branch from dd87307 to f834940 Compare September 25, 2024 13:41
@@ -433,6 +433,18 @@ pub struct TransactionSignatureDetails {
}

impl TransactionSignatureDetails {
pub fn new(
Copy link
Author

Choose a reason for hiding this comment

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

this doesn't strictly need to be part of this PR any more.
but it is necessary if we want to take the precompile details and turn it into the full details

Copy link

@tao-stones tao-stones left a comment

Choose a reason for hiding this comment

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

lgtm

@apfitzge apfitzge merged commit 105c365 into anza-xyz:master Sep 25, 2024
52 checks passed
@apfitzge apfitzge deleted the runtime_transaction_get_signature_details branch September 25, 2024 21:11
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
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