Skip to content

Do not de-allocate space used by accounts sparse trie #15648

@shekhirin

Description

@shekhirin

Describe the feature

Currently, every time we have a new block, we create an empty SparseTrie for the accounts trie to reveal new proofs and apply updates in there.

After #15637, still at least half of the time in reveal_account_proof is spent reserving the space for new nodes to insert

Image

This can be optimized by not de-allocating the accounts trie

/// Sparse account trie.
state: SparseTrie<F::AccountNodeProvider>,

and instead just clear it and carry over to the next state root task invocation.

Additional context

No response

Metadata

Metadata

Assignees

Labels

A-trieRelated to Merkle Patricia Trie implementationC-perfA change motivated by improving speed, memory usage or disk footprint

Type

No type

Projects

Status

Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions