substrate icon indicating copy to clipboard operation
substrate copied to clipboard

feat: `FRAME` umbrella crate.

Open kianenigma opened this issue 1 year ago • 13 comments

This brings in a new crate that is a mere re-export of common FRAME APIs into a new crate, and re-exports them, with better documentation.

This is WIP experiment. My initial goal is to build https://github.com/paritytech/polkadot-sdk-docs/issues/3 using only this crate.

Whether it would be feasible to actually build things with it, I am not sure. Consider this an experiment for now. As a next step, I can re-build node-template/pallets using this crate.

An end-goal is something along the lines of:

  • frame = { version = "X" } is the umbrella crate with which you should be a frame pallet
  • frame = { version = "X", feature = "runtime" } is the umbrella crate to build a frame-based runtime.
  • Of course, for certain deep functionality, you can tap into things like sp_io and sp_core directly.
  • With that, your runtime's dependency would be:
    • a list of frame pallets, each built with a specific version of frame.
    • frame itself, with a matching version.
  • substrate-node should be the umbrella crate for all things sc-* related.
  • parachain-sdk or cumulus (name tbd) should be the umbrella crate for turning both of the above into a parachain PVF and Collator, as opposed to a normal runtime and node respectively.

You can see an example pallet built with this method here, and an example runtime here.

  • [ ] blocker: https://github.com/paritytech/polkadot-sdk/issues/173
  • [x] blocker: https://github.com/paritytech/substrate/issues/14145
  • [ ] I am open to a different name, perhaps frame-api?

kianenigma avatar May 13 '23 14:05 kianenigma