This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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”.
Comments
I think the block types can be removed when we have the sp-api refactorings implemented. For the extrinsic we first should check where we currently require it. |
Let's assume the worse case, that we need both. Can't we move them to
do you have an issue pr PR? |
I will try to create a prototype to see if this could work. |
|
I would suggest keeping it based on DefaultConfig PR and seeing of you can provide defaults for it as well. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: