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

svm: add program cache tests #4656

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

2501babe
Copy link
Member

@2501babe 2501babe commented Jan 28, 2025

Problem

we are planning on refactoring transaction processing to use a per-transaction (changed from per-batch) local program cache. this requires new logic for handling tombstones, which lacks test coverage

Summary of Changes

add tests. also fix a bug in the svm test framework for setting program upgrade authority, and improve logging failures for better test-driven development

@2501babe 2501babe self-assigned this Jan 28, 2025
@LucasSte
Copy link

If you re-work the program cache, please also update the concurrent tests available here: https://github.com/anza-xyz/agave/blob/master/svm/tests/concurrent_tests.rs

@2501babe 2501babe marked this pull request as ready for review January 28, 2025 18:12
@2501babe 2501babe requested a review from a team as a code owner January 28, 2025 18:12
@2501babe
Copy link
Member Author

this changes nothing but tests so im assuming one approval only from svm group is fine

LucasSte
LucasSte previously approved these changes Jan 29, 2025
);

// Other loaders are needed for testing program cache behavior.
// NOTE when LoaderV4 is ready for testing, it must be added here.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loader-v4 is ready for testing now.

fn svm_integration(test_entries: Vec<SvmTestEntry>) {
for test_entry in test_entries {
let env = SvmTestEnvironment::create(test_entry);
env.execute();
}
}

#[test_matrix([false, true], [false, true])]
fn program_cache_create_account(enable_fee_only_transactions: bool, disable_executable_flag: bool) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disable_executable_flag => remove_accounts_executable_flag_checks

It only removes the checks of the flag, not the flag itself.

@2501babe 2501babe requested a review from Lichtso January 29, 2025 23: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