-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Inner instruction indexes don't increment for precompiles #24705
Comments
I guess this if invoke_context
.feature_set
.is_active(&prevent_calling_precompiles_as_programs::id())
&& is_precompile(program_id, |id| invoke_context.feature_set.is_active(id))
{
// Precompiled programs don't have an instruction processor
continue;
} And thus is record_instruction not called for precompiles: self.transaction_context
.record_instruction(InstructionContext::new(
nesting_level,
program_indices,
instruction_accounts,
instruction_data,
)); @jstarry Does this also occur if |
Last functional change appears to be #19930, the |
My mistake, it's not enabled on mainnet-beta yet. And as your new PR shows, the missing call to |
The feature gates here are going to be tricky as this is already somewhat of a mess.
|
Yeah, I think that's best. I added a note here so that jack is aware: #24746 (comment)
I don't know anything about that feature so I'll take a look at your fix and respond in a bit |
I just realized that this bug breaks the behavior of the |
Yes, the bug in Therefore, |
Okay, so to be clear, the |
Correct, see this comment on the |
Also, #24743 needs to be back-ported before |
Problem
In the transaction's metadata we store a record of the inner instructions that were called by a program. Those are matched up to transaction instructions using the index field but transaction instructions that are precompiles don't cause the inner ix index to be incremented.
In the following example, the inner instructions index should be 7, not 6.
https://explorer.solana.com/tx/4oDFDuBTKxth5kyfnpzTNEUnUjYWgEFByYELKb9P1VhEp4QpYE9qWy9Eyn1x5rM5MCDcrKuwrjoJQ7rNQt3fYeK3?cluster=testnet
Example response
Proposed Solution
Ensure that the inner ix index is incremented for precompiles as well
The text was updated successfully, but these errors were encountered: