Skip to content

Concurrent traceTransaction requests targeting the same preconfirmed transaction repeat VM work #4058

Description

@danielntmd

Description

Without preconfirmed trace caching, each traceTransaction request independently reconstructs the preceding state and executes the target transaction in the VM. Concurrent requests for the same transaction repeat this work, even when its execution context has not changed.

Benefit (The "Why")

Reduce redundant VM executions and state reconstruction, freeing node capacity and improving response times for repeated requests targeting popular preconfirmed transactions.

Acceptance Criteria

  • Concurrent and repeated requests reuse traces while the execution context remains valid.
  • Context changes, including reorgs, invalidate affected traces and prevent stale in-flight results from being reused.
  • Failures permit retries; canceling one waiter does not disrupt other callers.
  • Obsolete cache entries are removed as the chain advances.
  • Tests cover reuse, invalidation, reorgs, cancellation, and retries.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions