Skip to content

Support type: "closestDescendantMerkleValue" for chainHead_v1_storage #870

@voliva

Description

@voliva

We recently released [email protected], introducing a new feature: storage.watchEntries.

This feature uses the JSON-RPC spec for storage with the closestDescendantMerkleValue type. This provides the Merkle value for a partial key, allowing us to avoid re-requesting the entire list of entries on every block. Instead, it can compare the Merkle value (essentially a hash of all the nodes below that storage entry in the Merkle tree), and recompute the entries only if it changes.

Currently, Chopsticks' chainHead_v1_storage supports value and descendantValues but doesn't support closestDescendantMerkleValue yet.

I attempted to start implementing this, but I couldn't find any reference to the merkle tree data structure of the chain. I'm interested in contributing to this feature, but I would appreciate some guidance, or if it would need too big of a refactor.
Any pointers or suggestions on how to approach this would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions