This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Move Block
, NodeBlock
and UncheckedExtrinsic
to frame_system
, instead construct_runtime
#14126
Labels
J0-enhancement
An additional feature request.
T1-runtime
This PR/Issue is related to the topic “runtime”.
I came across this in my effort to make the simplest FRAME runtime and pallet, for the new tutorials in https://github.com/paritytech/polkadot-sdk-docs/.
The observation is that
construct_runtime
, and the need to definetype UncheckedExtrinsic
andtype Block
is quite noisy. At best, in a tutorial, you should say: "shuuush... just ignore these for now", which sucks.Ideally, I want this to just be:
And I am inclined to think that it is possible.
The fact that
construct_runtime
needs to know these types is unavoidable. But, can't it get these fromframe_system::Config
? I think we already have a pretty hard requirement for theframe_system
to exist, and exist with the exact crate nameframe-system
. So it should be possible forconstruct_runtime
to get these types as<#frame_system::Pallet as #frame_system::Config>::Block
.Even further, I think with #13454 we can actually have these have their defaults be set to the things that are in
frame_system::mocking::
and free the whole universe from needing to define them at all in 95% of tests.Needs to be verified. Would love to hear @ggwpez and @bkchr's opinion.
If deemed feasible, suggest @gupnik to take it over.
The text was updated successfully, but these errors were encountered: