Skip to content

[DataAvailability] Update Access API execution state endpoints to use caching layer #7615

@peterargue

Description

@peterargue

Context

Currently, the Access API has 2 modes of operation:

  • Soft-finality data is available via Execution nodes
  • Sealed data is indexed locally and served from storage.

Unsealed (soft-finality) data may contain execution forks (when 2 execution nodes produce different results for the same block). However, sealed data is final and contains no forks. To serve unsealed data, the API must be aware of forks, and allow users to query a consistent view of the state. In the current API, this is offloaded to Execution nodes.

With optimistic sync, soft-finality data is indexed locally, so the Access node must be updated to handle forks locally. This will require updates to all API endpoints. There will be a new caching layer which abstracts the fork traversal. The API endpoints will use the new caching layer interface in a similar way to existing database objects.

Project

Update all of the Access API (polling, streaming) to use the caching layer for execution state related queries.

caching layer interface defined in #7613

Related endpoints:

Access API

  • GetCollectionByID
  • GetFullCollectionByID
  • SendTransaction
  • GetTransaction
  • GetTransactionsByBlockID
  • GetTransactionResult
  • GetTransactionResultByIndex
  • GetTransactionResultsByBlockID
  • GetSystemTransaction
  • GetSystemTransactionResult
  • GetAccount
  • GetAccountAtLatestBlock
  • GetAccountAtBlockHeight
  • GetAccountBalanceAtLatestBlock
  • GetAccountBalanceAtBlockHeight
  • GetAccountKeyAtLatestBlock
  • GetAccountKeyAtBlockHeight
  • GetAccountKeysAtLatestBlock
  • GetAccountKeysAtBlockHeight
  • ExecuteScriptAtLatestBlock
  • ExecuteScriptAtBlockHeight
  • ExecuteScriptAtBlockID
  • GetEventsForHeightRange
  • GetEventsForBlockIDs
  • SubscribeTransactionStatuses
  • SendAndSubscribeTransactionStatuses

State Stream API

  • GetRegisterValues
  • GetExecutionDataByBlockID
  • SubscribeExecutionData
  • SubscribeExecutionDataFromStartBlockID
  • SubscribeExecutionDataFromStartBlockHeight
  • SubscribeExecutionDataFromLatest
  • SubscribeEvents
  • SubscribeEventsFromStartBlockID
  • SubscribeEventsFromStartHeight
  • SubscribeEventsFromLatest
  • SubscribeAccountStatusesFromStartBlockID
  • SubscribeAccountStatusesFromStartHeight
  • SubscribeAccountStatusesFromLatestBlock

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions