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

Implement concurrent test for the SVM #2610

Merged
merged 2 commits into from
Aug 16, 2024
Merged

Conversation

LucasSte
Copy link

Problem

The SVM interface can be used in multithreaded scenarios, provided that the writable accounts do not intersect between threads. We do not have any test to guarantee the proper workings for this case.

Summary of Changes

I implement a test that performs a transfer between two accounts, using the amount specified in the data field of a third account. The test run in multiple threads and reads from the same account but write to different ones in each thread.

@LucasSte LucasSte marked this pull request as ready for review August 15, 2024 16:38
Copy link

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

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

Looks great! Just some questions/comments about reusing this test to do some benchmarking.

svm/tests/mock_bank.rs Outdated Show resolved Hide resolved
svm/tests/concurrent_tests.rs Outdated Show resolved Hide resolved
svm/tests/concurrent_tests.rs Show resolved Hide resolved
Copy link

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

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

Lgtm! I don't think CI is related.

@LucasSte LucasSte merged commit 0df0aaa into anza-xyz:master Aug 16, 2024
51 checks passed
@LucasSte LucasSte deleted the svm-concur branch August 16, 2024 17:39
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
* Implement concurrent test for the SVM

* Remove debug print and optimize lock
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.

2 participants