Skip to content

Mmr


Storage functions


Nodes

Hashes of the nodes in the MMR.

Note this collection only contains MMR peaks, the inner nodes (and leaves) are pruned and only stored in the Offchain DB.

Python

result = substrate.query(
    'Mmr', 'Nodes', ['u64']
)

Return value

'scale_info::12'

NumberOfLeaves

Current size of the MMR (number of leaves).

Python

result = substrate.query(
    'Mmr', 'NumberOfLeaves', []
)

Return value

'u64'

RootHash

Latest MMR Root hash.

Python

result = substrate.query(
    'Mmr', 'RootHash', []
)

Return value

'scale_info::12'