Skip to content

Conversation

@illia-malachyn
Copy link
Contributor

@illia-malachyn illia-malachyn commented Nov 27, 2025

Closes #8059, #7587, #8231, #8135

Changes:

  1. No more separate test for a streaming from a spork root block. Any test does it!
  2. Result info provider extended with new functionality: it recognizes execution forks now!
  3. Removed index from execution data tracker
  4. Removed tests for different backfill types as they are not needed.

Streamer streams all available blocks at the start, so either such tests should be there, or they should be removed, since they're basically useless - no matter how many blocks are available, all of them are streamed to the subscription.

  1. Introduce a data provider interface instead of a callback.
    Initially, I wanted to do it for testing, so I could easily mock this behavior and write good tests for the backend. However, the problem is that this logic is not injected into the endpoints. Therefore, it is not as useful for the backend tests, but they're useful for the tests in the subscription package (which might be extended/refactored in the [Data Availability] Introduction of a new subscription package #8131). Also, the interface makes it easier to reason about both the backend and subscription packages, as well as their interaction.

Please, review in the following order:
optimistic sync package (changes to result provider + its tests) -> subscription package (changes to streamer and response handler/data provider interface) -> backend -> tests for backend

Note, the tests for events and account statutes MUST fail in this PR, as the result provider and response handler func were significantly changed. We should merge PRs for the events/accounts into this one, then check if CI passes, and only after that we can merge everything into the feature/optimistic_sync

To be done in this PR:

  • more tests to TestGetExecutionData
  • fix all TODOs
  • enhance error handling

@illia-malachyn illia-malachyn changed the base branch from master to feature/optimistic-sync November 27, 2025 19:10
@illia-malachyn
Copy link
Contributor Author

@AndriiDiachuk

Refactored execution data tracker. I completely
removed the indexer dependency from it.

Response handler in execution data backend was
refactored in a way it supports criteria and
execution forks. More work to be done on this but
this is the first step forward.
@illia-malachyn illia-malachyn force-pushed the illia-malachyn/new-execution-data-tests branch from d0c8497 to 661a1d5 Compare November 28, 2025 11:19
@illia-malachyn illia-malachyn force-pushed the illia-malachyn/new-execution-data-tests branch 2 times, most recently from e0cbb11 to 5ecb6ab Compare November 28, 2025 14:26
@illia-malachyn illia-malachyn force-pushed the illia-malachyn/new-execution-data-tests branch from 5ecb6ab to 720d4c8 Compare December 1, 2025 13:15
@illia-malachyn
Copy link
Contributor Author

Note: tests are a bit flaky currently. I need to come up with a solution to that.

@illia-malachyn illia-malachyn marked this pull request as ready for review December 1, 2025 13:17
@illia-malachyn illia-malachyn requested a review from a team as a code owner December 1, 2025 13:17
@illia-malachyn
Copy link
Contributor Author

@peterargue can u look into that ?

illia-malachyn and others added 6 commits December 3, 2025 09:47
- Removed tests for different types of backfill.
- Simplify tests by removing unecessary goroutines.
…handler-function-with-interface

Illia malachyn/replace response handler function with interface
@illia-malachyn
Copy link
Contributor Author

@peterargue @UlyanaAndrukhiv @AndriiDiachuk, guys, I guess this is ready for review. I'd really appreciate your comments/criticisms. If it feels too clumsy and complex, I can split it up into several smaller PRs.

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.

3 participants