You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Flow, scripts query (read) the blockchain state, unlike transactions (write calls) which mutate blockchain state.
Without DPS, Access Nodes delegate script execution to Execution Nodes. This is very read-heavy and poses numerous scalability concerns. When deployed, DPS provides access to the execution state at any block height and does not increase main network load.
The Flow API Service will serve as an entry-point API for both transactions and Cadence scripts. While transactions will still make their way to the network through an Access Node, ExecuteScript requests should be sent to DPS for local script execution.
Proposed Solution
• Interface on Flow API translates script execution requests into DPS API calls
• Flow API handles routing of scripts (read-only) to the corresponding target
• Flow API communicates with DPS API for local script execution, running against indexed state data
• Leverage DPS for state indexing and local script execution, reducing load on Execution Nodes
• Integration with the Cadence Client Library, so that clients can execute scripts
Step Definitions
• Implement DPS API-Access API translation interface for script execution on the Flow API
• Endpoints for Cadence scripts should use the DPS client to execute against the DPS API and return the results
Definition of Done
• Read-only Cadence script against the latest sealed execution state rpc ExecuteScriptAtLatestBlock (ExecuteScriptAtLatestBlockRequest) returns (ExecuteScriptResponse)
• Read-only Cadence script against the execution state of a block with a given ID, to read account state, rpc ExecuteScriptAtBlockID (ExecuteScriptAtBlockIDRequest) returns (ExecuteScriptResponse)
• Read-only Cadence script against the execution state at a particular block height rpc ExecuteScriptAtBlockHeight (ExecuteScriptAtBlockHeightRequest) returns (ExecuteScriptResponse)
• Calls for read-only scripts are routed from Flow API Service to DPS
• Results returned from DPS API are served to clients
• If there is no downstream DPS, an error is returned
• DPS executes scripts locally, runs state queries from its local IndexDB, and returns results through the DPS API.
• DPS indexed blockchain state is used to answer script execution requests from the DPS API.
• Those answers and synced state data are cached for timely future access.
The text was updated successfully, but these errors were encountered:
Problem Definition
On Flow, scripts query (read) the blockchain state, unlike transactions (write calls) which mutate blockchain state.
Without DPS, Access Nodes delegate script execution to Execution Nodes. This is very read-heavy and poses numerous scalability concerns. When deployed, DPS provides access to the execution state at any block height and does not increase main network load.
The Flow API Service will serve as an entry-point API for both transactions and Cadence scripts. While transactions will still make their way to the network through an Access Node,
ExecuteScript
requests should be sent to DPS for local script execution.Proposed Solution
• Interface on Flow API translates script execution requests into DPS API calls
• Flow API handles routing of scripts (read-only) to the corresponding target
• Flow API communicates with DPS API for local script execution, running against indexed state data
• Leverage DPS for state indexing and local script execution, reducing load on Execution Nodes
• Integration with the Cadence Client Library, so that clients can execute scripts
Step Definitions
• Implement DPS API-Access API translation interface for script execution on the Flow API
• Endpoints for Cadence scripts should use the DPS client to execute against the DPS API and return the results
Definition of Done
• Read-only Cadence script against the latest sealed execution state
rpc ExecuteScriptAtLatestBlock (ExecuteScriptAtLatestBlockRequest)
returns(ExecuteScriptResponse)
• Read-only Cadence script against the execution state of a block with a given ID, to read account state,
rpc ExecuteScriptAtBlockID (ExecuteScriptAtBlockIDRequest)
returns(ExecuteScriptResponse)
• Read-only Cadence script against the execution state at a particular block height
rpc ExecuteScriptAtBlockHeight (ExecuteScriptAtBlockHeightRequest)
returns(ExecuteScriptResponse)
• Calls for read-only scripts are routed from Flow API Service to DPS
• Results returned from DPS API are served to clients
• If there is no downstream DPS, an error is returned
• DPS executes scripts locally, runs state queries from its local IndexDB, and returns results through the DPS API.
• DPS indexed blockchain state is used to answer script execution requests from the DPS API.
• Those answers and synced state data are cached for timely future access.
The text was updated successfully, but these errors were encountered: