Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

mmr: move RPC from frame to client #12804

Closed
Tracked by #1636
acatangiu opened this issue Nov 29, 2022 · 2 comments
Closed
Tracked by #1636

mmr: move RPC from frame to client #12804

acatangiu opened this issue Nov 29, 2022 · 2 comments
Assignees
Labels
I7-refactor Code needs refactoring. U2-some_time_soon Issue is worth doing soon.

Comments

@acatangiu
Copy link
Contributor

Now that there is a dedicated client-side gadget with easy access to offchain db (#12753), move all offchain-specific functionality including proof generation from the pallet to the gadget.

This will greatly simplify the pallet which will no longer need both Storage<RuntimeStorage> and Storage<OffchainStorage> abstractions - it will simply have Storage (and will only work with runtime storage).

We should also move the MMR RPC code from frame/merkle-mountain-range/rpc to client/merkle-mountain-range/rpc; RPC is definitely not FRAME, but client-side.

@acatangiu
Copy link
Contributor Author

After giving this a try, I'm not convinced it's actually better. We still need to call into runtime to get MMR size when generating proof (so it's not really more efficient), and we ultimately end up with proof generation and verification split across multiple components. I now think keeping proof generation in the pallet is better. The gadget is then responsible for only offchain canonicalization and pruning.

@acatangiu acatangiu changed the title client/mmr: move all offchain functionality including proof generation to mmr gadget mmr: move RPC from frame to client Nov 30, 2022
@acatangiu
Copy link
Contributor Author

Fixed in #12805

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I7-refactor Code needs refactoring. U2-some_time_soon Issue is worth doing soon.
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant