This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Migrate frame-system to pallet attribute macro#7898
Merged
57 commits merged intomasterfrom Jan 20, 2021
Merged
Conversation
athei
reviewed
Jan 15, 2021
…ade.rs" This reverts commit d2a2d5b6
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This reverts commit 306f023
44 tasks
# Conflicts: # frame/system/src/lib.rs
Contributor
Author
|
Might need to double check that I've merged #7363 properly, it required some manual merging because of all the reordering in this PR |
Contributor
Author
|
Metadata diff using https://github.com/ascjones/subsee, against TLDR: diff --git a/master-8aa92811-full.json b/migrated-full.json
index f0eb814..8f89e7b 100644
--- a/master-8aa92811-full.json
+++ b/migrated-full.json
@@ -620,7 +620,7 @@
{
"name": "NewAccount",
"arguments": [
- "AccountId"
+ "T::AccountId"
],
"documentation": [
" A new \\[account\\] was created."
@@ -629,7 +629,7 @@
{
"name": "KilledAccount",
"arguments": [
- "AccountId"
+ "T::AccountId"
],
"documentation": [
" An \\[account\\] was reaped."
@@ -637,44 +637,6 @@
}
],
"constants": [
- {
- "name": "BlockHashCount",
- "ty": "T::BlockNumber",
- "value": [
- 96,
- 9,
- 0,
- 0
- ],
- "documentation": [
- " The maximum number of blocks to allow in mortal eras."
- ]
- },
- {
- "name": "DbWeight",
- "ty": "RuntimeDbWeight",
- "value": [
- 64,
- 120,
- 125,
- 1,
- 0,
- 0,
- 0,
- 0,
- 0,
- 225,
- 245,
- 5,
- 0,
- 0,
- 0,
- 0
- ],
- "documentation": [
- " The weight of runtime database operations the runtime can invoke."
- ]
- },
{
"name": "BlockWeights",
"ty": "limits::BlockWeights",
@@ -778,7 +740,256 @@
0
],
"documentation": [
- " The weight configuration (limits & base values) for each class of extrinsics and block."
+ " Block & extrinsics weights: base values and limits."
+ ]
+ },
+ {
+ "name": "BlockLength",
+ "ty": "limits::BlockLength",
+ "value": [
+ 0,
+ 0,
+ 60,
+ 0,
+ 0,
+ 0,
+ 80,
+ 0,
+ 0,
+ 0,
+ 80,
+ 0
+ ],
+ "documentation": [
+ " The maximum length of a block (in bytes)."
+ ]
+ },
+ {
+ "name": "BlockHashCount",
+ "ty": "T::BlockNumber",
+ "value": [
+ 96,
+ 9,
+ 0,
+ 0
+ ],
+ "documentation": [
+ " Maximum number of block number to block hash mappings to keep (oldest pruned first)."
+ ]
+ },
+ {
+ "name": "DbWeight",
+ "ty": "RuntimeDbWeight",
+ "value": [
+ 64,
+ 120,
+ 125,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 225,
+ 245,
+ 5,
+ 0,
+ 0,
+ 0,
+ 0
+ ],
+ "documentation": [
+ " The weight of runtime database operations the runtime can invoke."
+ ]
+ },
+ {
+ "name": "Version",
+ "ty": "RuntimeVersion",
+ "value": [
+ 16,
+ 110,
+ 111,
+ 100,
+ 101,
+ 56,
+ 115,
+ 117,
+ 98,
+ 115,
+ 116,
+ 114,
+ 97,
+ 116,
+ 101,
+ 45,
+ 110,
+ 111,
+ 100,
+ 101,
+ 10,
+ 0,
+ 0,
+ 0,
+ 5,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 48,
+ 223,
+ 106,
+ 203,
+ 104,
+ 153,
+ 7,
+ 96,
+ 155,
+ 3,
+ 0,
+ 0,
+ 0,
+ 55,
+ 227,
+ 151,
+ 252,
+ 124,
+ 145,
+ 245,
+ 228,
+ 1,
+ 0,
+ 0,
+ 0,
+ 64,
+ 254,
+ 58,
+ 212,
+ 1,
+ 248,
+ 149,
+ 154,
+ 4,
+ 0,
+ 0,
+ 0,
+ 210,
+ 188,
+ 152,
+ 151,
+ 238,
+ 208,
+ 143,
+ 21,
+ 2,
+ 0,
+ 0,
+ 0,
+ 247,
+ 139,
+ 39,
+ 139,
+ 229,
+ 63,
+ 69,
+ 76,
+ 2,
+ 0,
+ 0,
+ 0,
+ 237,
+ 153,
+ 197,
+ 172,
+ 178,
+ 94,
+ 237,
+ 245,
+ 2,
+ 0,
+ 0,
+ 0,
+ 203,
+ 202,
+ 37,
+ 227,
+ 159,
+ 20,
+ 35,
+ 135,
+ 2,
+ 0,
+ 0,
+ 0,
+ 104,
+ 122,
+ 212,
+ 74,
+ 211,
+ 127,
+ 3,
+ 194,
+ 1,
+ 0,
+ 0,
+ 0,
+ 188,
+ 157,
+ 137,
+ 144,
+ 79,
+ 91,
+ 146,
+ 63,
+ 1,
+ 0,
+ 0,
+ 0,
+ 104,
+ 182,
+ 107,
+ 161,
+ 34,
+ 201,
+ 63,
+ 167,
+ 1,
+ 0,
+ 0,
+ 0,
+ 55,
+ 200,
+ 187,
+ 19,
+ 80,
+ 169,
+ 162,
+ 168,
+ 1,
+ 0,
+ 0,
+ 0,
+ 171,
+ 60,
+ 5,
+ 114,
+ 41,
+ 31,
+ 235,
+ 139,
+ 1,
+ 0,
+ 0,
+ 0,
+ 2,
+ 0,
+ 0,
+ 0
+ ],
+ "documentation": [
+ " Get the chain's current version."
]
},
{
|
Contributor
|
For the metadata changes such as: "arguments": [
- "AccountId"
+ "T::AccountId"
],We can actually solve by using metadata attribute in event but I guess both are valid metadata of the type. |
gui1117
approved these changes
Jan 20, 2021
Contributor
gui1117
left a comment
There was a problem hiding this comment.
Looks good to me.
Any merge of master must take care that system hasn't been changed.
Also you probably need to merge master again to fix the CI
Contributor
|
bot merge |
|
Trying merge. |
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starting on #7882.
Converts the
Systempallet to the new pallet attribute macro introduced in #6877.Following roughly the upgrade guidelines here: https://crates.parity.io/frame_support/attr.pallet.html#upgrade-guidelines.
For reviewing I would suggest going through commit by commit.
From https://crates.parity.io/frame_support/attr.pallet.html#checking-upgrade-guidelines