pallet-mmr: Consolidate/deduplicate methods in runtime API and RPC API
Since we're changing the pallet-mmr runtime & RPC APIs as part of #12339 it's a good opportunity to revisit some other decisions related to the API:
- Whether we should have 2 separate methods
generate_batch_proof()andgenerate_historical_batch_proof(). Since in the endgenerate_batch_proof()is a special case ofgenerate_historical_batch_proof(). See the discussion here: https://github.com/paritytech/substrate/pull/12324#discussion_r976692621 - If we should keep generate_proof(), verify_proof(), and verify_proof_stateless() since all these can be done via batching methods (e.g. generate_batch_proof(), etc)
cc: @acatangiu @Lederstrumpf @svyatonik
I agree with unifying all, but drop "batching" or "historical" from new "universal" API name, should be simple generate_proof(), verify_proof(), and verify_proof_stateless() with optional extra params. Documentation should also be very clear to explain specific param combinations.
I agree with unifying all, but drop "batching" or "historical" from new "universal" API name, should be simple generate_proof(), verify_proof(), and verify_proof_stateless() with optional extra params. Documentation should also be very clear to explain specific param combinations.
ditto: I support unification, and if unified, then batching & historical qualifiers are superfluous and should be dropped.
Sounds good ! I also agree with this naming scheme.