-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Construct Runtime v2 #1378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Construct Runtime v2 #1378
Changes from 53 commits
496bbac
cec8668
73327a1
40919d7
99a43cf
1467f0a
140e05f
6568852
2a70549
6a59057
9beb3ba
88fa35a
8ab5c66
977a553
c232d49
df4fc3d
88fa662
a3d9319
d5dd8ec
e2ab4f6
ed2d9e9
d1cd1a9
2df5888
51f1a70
996fefe
fc3b765
0498dc4
502fda4
e8b5371
dcc0b60
8a4b13c
1e44e9b
6660575
9aa6aaf
985faef
5be682d
aba35c6
7733d61
143ba02
0774bca
2c17eda
61fb110
19db6d7
69a49a4
dd1df58
c3c0be3
a8fd228
044d106
2f8b62c
c779b74
d1c976b
1aac057
d150a5b
7ad4fc7
d22e45b
017bd41
0aeb0f3
a5401ed
fcdb613
761cedb
e5c7f79
97a4425
29c2259
d71dbbc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| title: Construct Runtime V2 - An outer macro approach to define the runtime | ||
|
|
||
| doc: | ||
| - audience: Runtime Dev | ||
| description: | | ||
| Introduces `#[frame_support::runtime]` that can be attached to a mod to define a runtime. The items | ||
| in this mod can be attached to the following attributes to define the key components of the runtime. | ||
| 1. `#[runtime::runtime]` attached to a struct defines the main runtime | ||
| 2. `#[runtime::derive]` attached to this struct defines the types generated by the runtime | ||
| 3. `#[runtime::pallet_index]` must be attached to a pallet to define its index | ||
| 4. `#[runtime::disable_call]` can be optionally attached to a pallet to disable its calls | ||
| 5. `#[runtime::disable_unsigned]` can be optionally attached to a pallet to disable unsigned calls | ||
ggwpez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 6. A pallet instance can be defined as `TemplateModule: pallet_template<Instance>` | ||
| An optional attribute can be defined as `#[frame_support::runtime(legacy_ordering)]` to ensure that | ||
| the order of hooks is same as the order of pallets (and not based on the pallet_index). This is to support | ||
| legacy runtimes and should be avoided for new ones. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bkchr do you have an opinion on this?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. Not sure this is such a great idea (ordering based on the index). But also wasn't the idea that this would be changed with the new
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I thought this was causing a lot of issues as the user expectation would be to have everything as per the
I am not aware of this. Could you please link the issue?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the poll hook it can explicitly be set, yes. But my question was about the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah that is a good point 👍
If we have poll explicit and have everything fixed up with |
||
|
|
||
| migrations: | ||
| db: [] | ||
|
|
||
| runtime: [] | ||
|
|
||
| crates: | ||
| - name: frame-support | ||
| - name: frame-support-procedural | ||
|
|
||
| host_functions: [] | ||
Uh oh!
There was an error while loading. Please reload this page.