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

Clean up reject_callx_r10 #2414

Closed

Conversation

ripatel-fd
Copy link

@ripatel-fd ripatel-fd commented Aug 2, 2024

Problem

Firedancer always cleans up features after Agave does.
We do so to ensure latest version Firedancer can replay a ledger produced by latest version Agave.

We'd like to see reject_callx_r10 (activated on all networks) cleaned up in Agave to allow Firedancer to also clean up the feature.

Summary of Changes

Hardcodes reject_callx_r10 to on.

Fixes #

Lichtso
Lichtso previously approved these changes Aug 2, 2024
@ripatel-fd
Copy link
Author

ripatel-fd commented Aug 4, 2024

@Lichtso There is a loaded program cache test built around the reject_callx_r10 feature. How do you suggest we fix the test I broke?

@Lichtso
Copy link

Lichtso commented Aug 4, 2024

Ah yes, we need a different test program and a different feature. Currently it uses reject_callx_r10 because it is easy to have a program which succeeds or fails the verifier depending on the status of the feature.

Copy link

mergify bot commented Aug 9, 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
Copy link

Lichtso commented Sep 5, 2024

@ripatel-fd In test_feature_activation_loaded_programs_epoch_transition and test_deploy_last_epoch_slot can you replace reject_callx_r10 with disable_fees_sysvar? I think that should suffice.

@ripatel-fd
Copy link
Author

@Lichtso Done, getting this test failure:

---- bank::tests::test_feature_activation_loaded_programs_cache_preparation_phase stdout ----
thread 'bank::tests::test_feature_activation_loaded_programs_cache_preparation_phase' panicked at runtime/src/bank/tests.rs:11947:5:
assertion `left == right` failed
  left: Err(InstructionError(0, InvalidAccountData))
 right: Err(InstructionError(0, ProgramFailedToComplete))

@ripatel-fd
Copy link
Author

Well, makes sense. The test binary is called callx-r10-sbfv1.so. I can write a new test that attempts to read the fees sysvar.

@Lichtso
Copy link

Lichtso commented Sep 11, 2024

I can write a new test that attempts to read the fees sysvar.

Not necessary anymore, I found a cleaner solution. Instead of continuing to kick the can down the street and updating that program manually each time we clean a verifier-affecting feature we introduce a generally program rejecting test feature.

@ripatel-fd
Copy link
Author

Not necessary anymore, I found a cleaner solution. Instead of continuing to kick the can down the street and updating that program manually each time we clean a verifier-affecting feature we introduce a generally program rejecting test feature.

That sounds great, thanks. I'll mark this PR as a draft then and wait for that test feature to be merged. Or maybe you can just copy over my patch to your branch to save time...

@ripatel-fd ripatel-fd marked this pull request as draft September 11, 2024 13:38
@Lichtso
Copy link

Lichtso commented Sep 12, 2024

Resolved in #2884

@Lichtso Lichtso closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants