Skip to content

Conversation

@itamar-starkware
Copy link
Contributor

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

TL;DR

Make ProcessTxBlockingTask::new an async function and clone the transaction before conversion.

What changed?

  • Changed ProcessTxBlockingTask::new from a synchronous to an asynchronous function by adding the async keyword and .await to its invocation
  • Added .clone() to the transaction before passing it to convert_rpc_tx_to_internal_rpc_tx to ensure the original transaction is preserved

How to test?

  • Verify that transaction processing still works correctly
  • Test with transactions that require async initialization in the blocking task
  • Ensure that transaction conversion still functions properly with the cloned transaction

Why make this change?

The change to async allows for potential asynchronous initialization steps in the ProcessTxBlockingTask creation process. Cloning the transaction before conversion prevents any potential modifications to the original transaction during the conversion process, which could lead to inconsistent state or unexpected behavior.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

itamar-starkware commented Nov 10, 2025

@itamar-starkware itamar-starkware self-assigned this Nov 10, 2025
@itamar-starkware itamar-starkware marked this pull request as ready for review November 10, 2025 12:10
@itamar-starkware itamar-starkware changed the base branch from 11-06-apollo_gateway_insert_stateful_tx_validator_creating_to_processtxblockingtask_constructor to graphite-base/10057 November 11, 2025 11:07
@itamar-starkware itamar-starkware deleted the 11-09-apollo_gateway_change_processtxblockingtask_new_to_be_async branch November 12, 2025 20:50
@itamar-starkware itamar-starkware restored the 11-09-apollo_gateway_change_processtxblockingtask_new_to_be_async branch November 12, 2025 20:52
@itamar-starkware itamar-starkware changed the base branch from graphite-base/10057 to main-v0.14.1 November 12, 2025 20:55
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2025
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