Issue
This issue was triggered by a good observation made by @serban300 in #12324 (comment):
Current pallet-mmr APIs work with leaf indices, leaving the burden of translating block numbers to leaf indices to the users of the pallet.
Light clients might have an easier experience dealing only with block numbers, and avoiding managing leaf indices and the conversion from block numbers => leaf indices.
Suggested solution
pallet-mmr could expose APIs based on block numbers and internally map those to leaf indices.
Implications
- Breaking API change, both for Runtime API and RPC API.
- Pallet currently only deployed on Rococo so breaking change only for that. Kusama and Polkadot will directly deploy new API.
Feedback requests
cc @vgeddes and @seunlanlege as current (light-client) users of this pallet