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

v2.1: Fix - loader-v4 (backport of #3586) #3638

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Nov 14, 2024

Problem

While writing the integration tests for loader-v4 I noticed several issues.
The rekeying of the associated feature gate will happen separately in #2796.

Summary of Changes

  • Fix program runtime environment of loader-v4. It was still using the v2 environment in load_program_with_pubkey().

  • Removes program account check in loader-v4 execution. Because there should be no need to look at the program account at all during execution as we have the cached program entry.

  • Loader-v4 needs to use the same verification logic during deployment as in loader-v3. This prevents programs with certain syscalls from being deployed.


    This is an automatic backport of pull request Fix - loader-v4 #3586 done by Mergify.

* Swapping the roles of the macro and wrapper function
allows us to get rid of some lifetime shenanigans and explicit drop().
It is a pure syntactic refactoring and should have no effect on the behavior.

* Loader-v4 needs to use the same verification logic during deployment as is in loader-v3.

* Removes program account check in loader-v4 execution.

* Fix program runtime environment of loader-v4.

(cherry picked from commit 8bf688f)
@mergify mergify bot requested a review from a team as a code owner November 14, 2024 19:27
Copy link
Author

mergify bot commented Nov 14, 2024

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.

@Lichtso Lichtso closed this Nov 21, 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.

1 participant