-
Notifications
You must be signed in to change notification settings - Fork 2.6k
pallet-mmr: Change runtime API and RPC API to work with block numbers instead of leaf indices #12339
Comments
I will give this a try. |
As shown in #12345 there is also the option to change only RPC API to use block numbers, while leaving existing Runtime API unchanged. |
And while this change is harmless, it's actually unneccessary. As light clients need to be aware of the |
I'm in favour of the change. It does simplify our offchain relayers that call Our system also requires the MMR leaf index for a block. But since the output of |
Seeing how |
sounds fine with us 👍 |
So is the final decision to have this implemented? If so should #12345 also change the runtime API? Initially, I didn't change the runtime API in the PR, but I don't actually see a reason why we wouldn't change that also. |
Yes, decision is to implement full breaking change. Let's change Runtime API too in #12345 |
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
Feedback requests
cc @vgeddes and @seunlanlege as current (light-client) users of this pallet
The text was updated successfully, but these errors were encountered: