-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Moves Block
, NodeBlock
and UncheckedExtrinsic
to frame_system
, instead of construct_runtime
#14193
Conversation
Nice! I think now we can even further simplify the Unfortunately, this will be a breaking change though, but I think one for the greater good. The only unfortunate thing is that these new types are not really needed if All in all, in my opinion, a step in the right direction. @bkchr @ggwpez thoughts? |
Do we have proper types for when |
Frame system is since always mandatory for each runtime. In general I would not move forward with the pr as stuff like NodeBlock probably can be removed in the near future. For uncheckedextrinsic we also need to see if we can do this better. |
@bkchr Could you please explain this a bit more? For |
I stumbled upon frame/support/procedural/src/construct_runtime/expand/metadata.rs, in paritytech/polkadot-sdk#198 which is one example usage of what you are looking for. In general, you can start by searching similar usages in |
bot fmt |
@gupnik https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2970900 was started for your command Comment |
bot fmt |
@gupnik https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3028550 was started for your command Comment |
@gupnik Command |
This reverts commit 24e9580.
The CI pipeline was cancelled due to failure one of the required jobs. |
The CI pipeline was cancelled due to failure one of the required jobs. |
@gupnik I'm not happy with the solution you are providing here. You are touching a lot of things that are irrelevant to the things you are doing. I looked into the cycling compile error and came up with the following workaround for the compiler bug: (Run The shitty part of this solution is that we require to have this Another possible solution could be to keep You can also start upstreaming the changes you have done around using |
Thank you @bkchr for looking into this.
Yeah, I do not particularly like this one as well. Happy to brainstorm for sure.
This would mean that we would be able to access T::Header at some places while the others would still require the super-trait. Won't it make sense to choose a consistent approach throughout?
This was again done to ensure consistency. I planned to remove |
bot fmt |
@gupnik https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3037787 was started for your command Comment |
@gupnik Command |
You are breaking tons of code just to workaround a compiler bug. I don't see any reason why we should do this. Everyone using the block trait would need to change the code to a hack that we may revert at some point.
I don't get why you want to do this? This doesn't provide any consistency, just more code to write. |
Thanks @bkchr.
Let me try this one. |
@bkchr Created #14437 to use the super-trait. Let me know if I should pursue that one instead. |
Closing this in favour of #14437 |
Fixes #14126
Currently, one needs to define these params explicitly when using
construct_runtime!
This PR add these types as part of
frame_system
instead and allows the following:Note that this change is backwards compatible. However, a warning is issued if the older syntax is still used.
Further, this PR also removes
BlockNumber
andHeader
fromframe_system::Config
. It instead usesBlock
to retrieve these using the traitHeaderProvider
.Note that this is a breaking change.
Cumulus companion: paritytech/cumulus#2753
Polkadot companion: paritytech/polkadot#7392