Skip to content

Improved canonical ancestor retrieval #2990

Description

@Arkenan

Currently, to get the ancestor of a block in the StoreVmDatabase we crawl the ancestors one by one until we reach the desired block number. For the regular non-import case, the state on top of which the VM is executing is canonical. And to get the ancestor of a canonical block we just need to get the canonical hash for a certain block number, which is information we have available on the store and doesn't require iterating through ancestors.

However, this might require an API change, as getting the canonical block for a certain block number is an async function and the StoreVMDatabase is a sync trait.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

performanceBlock execution throughput and performance in general

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions