Accessing Execution state at different Block Statuses (Latest Finalized/Executed/Sealed)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 361
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
Description
Issue To Be Solved
Currently, when we query against the execution state (GetAccountAtLatestBlock, ExecuteScriptAtLatestBlock) we do so assuming we always want the latest Sealed block, but we want this query to be much more flexible.
While adding this flexibility, it may also be prudent to rethink the functions around state querying, and maybe if the ...ByHeight and ..ByBlockID functions should actually be consolidated. Example:
GetAccount(address, opts)
where opts would indicate if I want the account at a specific Block Height or ID, or i want latest sealed/executed state
(Optional): Suggest A Solution
Change the current GetAccountAtLatestBlock, ExecuteScriptAtLatestBlock functions to allow input argument to indicate if we want a specific state, e.g. LatestExecuted or LatestSealed
OR
Add new functions : GetAccountAtLatestExecutedBlock, ExecuteScriptAtLatestExecuteBlock
OR
Add new generic functions GetAccount, ExecuteScript that just take options as the last parameter that will describe in some way, which block to we want to execute against.
(Optional): Context
Not being able to query the execution state at an "Executed" block is currently blocking anyone using the Executed state in a meaningful way when they get it back from the access node when querying for transaction results
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating GetAccountAtLatestBlock and ExecuteScriptAtLatestBlock, then trace how block height, block ID, and sealed state are currently selected. Define and document the supported execution-state options, including latest executed and latest sealed; done when callers can query the required state and the existing use cases remain supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100