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

feat: avoid mut constraint for simulation #64

Merged

Conversation

losman0s
Copy link
Contributor

@losman0s losman0s commented Apr 16, 2024

In cases where this is used as an a amnesiac executor, the self mut on the tx processing functions unnecessarily prevent parallelisation due to a single shared line.

This PR splits the necessary code into a read-only branch that gets used by the simulate function, and allows the removal of mut for self.

It does introduce a bit of duplication between execute_sanitized_transaction_readonly and execute_sanitized_transaction and the naming might be suboptimal. If you have proposal to make it cleaner on those points lmk.

@losman0s losman0s force-pushed the man0s/enable-parallel-exec-for-sim branch from c685c97 to 736ee93 Compare April 16, 2024 08:24
@Aursen Aursen requested a review from kevinheavey April 16, 2024 09:38
src/lib.rs Show resolved Hide resolved
@kevinheavey kevinheavey merged commit 3e9e68e into LiteSVM:master Apr 16, 2024
2 checks passed
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