Skip to content

Conversation

@itamar-starkware
Copy link
Contributor

@itamar-starkware itamar-starkware commented Nov 10, 2025

TL;DR

Made instantiate_validator method async in the StatefulTransactionValidatorFactoryTrait.

What changed?

  • Changed the instantiate_validator method in StatefulTransactionValidatorFactoryTrait to be async by adding the async keyword and using #[async_trait]
  • Updated all implementations and calls to this method to use .await
  • Modified test functions to support the async nature of the validator instantiation
  • Updated the process_tx_task function in tests to be async

How to test?

  • Run the existing test suite to ensure all tests pass with the async implementation
  • Verify that the gateway can still instantiate validators correctly
  • Check that the async flow works properly in the transaction processing pipeline

Why make this change?

This change allows for asynchronous initialization of transaction validators, which can improve performance by not blocking the execution thread during validator instantiation. This is particularly important for operations that might involve I/O or other potentially blocking operations during validator setup.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

itamar-starkware commented Nov 10, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants