Skip to content

Conversation

@LucasSte
Copy link

@LucasSte LucasSte commented Jul 31, 2025

Problem

In SIMD-0177, we want InstructionContext to have only index_in_transaction, is_signer and is_writable. We must, then, remove index_in_callee.

Summary of Changes

  1. Use the duplication map created in prepare_next_to_level_instruction, and in prepare_next_instruction for detecting duplicated accounts and retrieving the index_in_instruction from the index_in_transaction.
  2. fn configure now receives the aforementioned map as an argument, so I crated fn configure_for_test to facilitate the usage in tests.
  3. Add tests to ensure the functionality is correct.

@mergify
Copy link

mergify bot commented Jul 31, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@codecov-commenter
Copy link

codecov-commenter commented Aug 1, 2025

Codecov Report

❌ Patch coverage is 99.62825% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.0%. Comparing base (3e2d6a9) to head (f44cb52).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #7263    +/-   ##
========================================
  Coverage    83.0%    83.0%            
========================================
  Files         801      801            
  Lines      362242   362439   +197     
========================================
+ Hits       300807   300987   +180     
- Misses      61435    61452    +17     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucasSte LucasSte requested a review from Lichtso August 1, 2025 16:14
@LucasSte LucasSte marked this pull request as ready for review August 1, 2025 16:14
@LucasSte LucasSte requested a review from a team as a code owner August 1, 2025 16:14
@LucasSte LucasSte changed the title Remove index_in_callee from InstructionContext Remove index_in_callee from InstructionAccount Aug 4, 2025
@LucasSte LucasSte merged commit ae86b4f into anza-xyz:master Aug 6, 2025
52 checks passed
@LucasSte LucasSte deleted the callee-idx-2 branch August 6, 2025 19:05
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.

3 participants