Skip to content

Use Instruction instead of StableInstruction across runtime#7040

Merged
LucasSte merged 1 commit intoanza-xyz:masterfrom
LucasSte:refactor-stable
Jul 18, 2025
Merged

Use Instruction instead of StableInstruction across runtime#7040
LucasSte merged 1 commit intoanza-xyz:masterfrom
LucasSte:refactor-stable

Conversation

@LucasSte
Copy link
Copy Markdown

Problem

The runtime code is very complex, containing multiple sites with similar code doing the same thing, many data structures to represent the same underlying data and too many conversions between them.

That conundrum hinders proper refactors for ABIv2 and the simplification of our runtime code.

Summary of Changes

This PR replaces StableIntruction by Instruction across runtime, except in address translation, where the switch is not possible.

That reduces the conversion overhead and will allow us to further simplify our code in future PRs.

@LucasSte LucasSte changed the title Use Instruction instead of StableInstruction across runtime Use Instruction instead of StableInstruction across runtime Jul 18, 2025
@mergify
Copy link
Copy Markdown

mergify Bot commented Jul 18, 2025

If this PR represents a change to the public RPC API:

  1. Make sure it includes a complementary update to rpc-client/ (example)
  2. Open a follow-up PR to update the JavaScript client @solana/kit (example)

Thank you for keeping the RPC clients in sync with the server API @LucasSte.

@mergify
Copy link
Copy Markdown

mergify Bot commented Jul 18, 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
Copy Markdown

Codecov Report

Attention: Patch coverage is 65.21739% with 8 lines in your changes missing coverage. Please review.

Project coverage is 83.2%. Comparing base (7e7ad5b) to head (bb3a89c).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7040   +/-   ##
=======================================
  Coverage    83.2%    83.2%           
=======================================
  Files         853      853           
  Lines      374864   374856    -8     
=======================================
+ Hits       312074   312082    +8     
+ Misses      62790    62774   -16     
🚀 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 July 18, 2025 19:39
@LucasSte LucasSte marked this pull request as ready for review July 18, 2025 19:39
@LucasSte LucasSte requested a review from a team as a code owner July 18, 2025 19:39
@LucasSte LucasSte merged commit c87ab7c into anza-xyz:master Jul 18, 2025
41 checks passed
@LucasSte LucasSte deleted the refactor-stable branch July 18, 2025 19:52
puhtaytow pushed a commit to puhtaytow/agave that referenced this pull request Jul 24, 2025
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