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

[DataAvailability] Allow syncing Execution Data before block is sealed #6901

Open
peterargue opened this issue Jan 16, 2025 · 0 comments
Open

Comments

@peterargue
Copy link
Contributor

Problem Definition

Currently, the ExecutionDataRequester waits until a block is sealed before it begins to download its BlockExecutionData. This simplified the initial implementation at the expense of added latency. Now that execution data is indexed and the data is used to serve the Access API, there's greater need to reduce that latency. A few of the main reasons:

  • Currently about 30% of script executions on mainnet are for blocks that have not yet been indexed by the AN. Reducing the latency would allow ANs to serve an even higher percent.
  • As data sizes get larger (more tx/events, larger account storage, etc) it will take longer to download the data. Starting earlier will ensure it's available within a reasonable amount of time.
  • Some users want access to data as soon as the block is executed. By syncing before sealed, the data will become available several seconds sooner and likely within a tolerable range for these users.
  • Eventually, we will want to phase out the use of Execution nodes to service requests from Access nodes for the Access API.

Proposed Solution

Update the requester to sync execution data for blocks that are executed but not yet sealed. There is an initial implementation that we can use as a starting point: #2842. This may also work as-is. We originally did not deploy this to keep the system simpler during it's initial rollout.

Staked access nodes subscribe to the ExecutionReceipts channel which is where Execution nodes publish notifications for newly executed blocks. These block may or may not be finalized yet.

Definition of Done

  • BlockExecutionData is downloaded by Access nodes before the block is sealed. Ideally as soon after the block was executed as possible.
  • Data from orphaned forks is pruned from the db.
  • There are metrics and logging that provide observibility into how the system is performing, and the latency.
  • There is unit and integration test coverage for the new features.
  • There is documentation both in code and a readme outlining how the system works.
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

No branches or pull requests

1 participant