-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bump to polkadot-v1.3.0
#598
Conversation
Starts introducing some of the changes brought in by paritytech/polkadot-sdk#1484.
This includes the deprecation of `Balances::transfer` from paritytech/polkadot-sdk#1226.
Haven't fixed the Rust code yet though
Values were mostly taken from the Polkadot runtime config
Changes introduced in paritytech/polkadot-sdk#1363
Also introduced in paritytech/substrate#14471
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. This looks like no easy task, and the Cargo.toml
s are now looking much neater.
When you say there is still stuff to do relating to there no longer being separate controller accounts - what is that, and is that something also needed before a release?
@@ -38,28 +41,34 @@ fn pause_transaction_work() { | |||
TransactionPause::pause_transaction( | |||
RuntimeOrigin::signed(5), | |||
b"Balances".to_vec(), | |||
b"transfer".to_vec() | |||
b"transfer_allow_death".to_vec() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds scary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha yeah. What this dispatchable does is that it allows you to transfer an amount of tokens out of your account which brings your account balance under the existential deposit. Once this happens the account will be reaped from the chain.
The alternative to this is transfer_keep_alive
in case you don't want to accidentally reap an account.
// One cent: $10,000 / MB | ||
pub const PreimageByteDeposit: Balance = CENTS; | ||
pub const PreimageBaseDeposit: Balance = deposit(2, 64); | ||
pub const PreimageByteDeposit: Balance = deposit(0, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do these values come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were taken from the production Polkadot runtime, whereas the values from before were from the Substrate node template (although probably at a later point in time). As far as the actual values here, not sure about why 64
bytes was used as the base deposit.
One thing I noticed here actually is that our deposit
implementation is also still following that of the Substrate node template, and it's orders of magnitude lower than the Polkadot and Kusama implementation.
We may want to re-consider this before launch. cc @JesseAbram
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looked brutal I do find it weird that tests are passing but metadata did not need to be updated but I guess no interfaces were changed
@@ -1366,7 +1456,6 @@ construct_runtime!( | |||
AuthorityDiscovery: pallet_authority_discovery =34, | |||
Offences: pallet_offences = 35, | |||
Historical: pallet_session_historical = 36, | |||
RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip = 37, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looked brutal I do find it weird that tests are passing but metadata did not need to be updated but I guess no interfaces were changed
@JesseAbram good observation. As far as our pallets are concerned, no interfaces were changed, only imports and changes to internal calls.
For the runtime though we do have changes, for example I removed this pallet. I guess the reason why all that tests pass is because we never made use of this anywhere, or any of the other pallets with API changes.
I've included updated metadata in this PR.
A controller account was used as a way to interact on behalf of a stash account. However, with the improved support for proxy accounts recently there's an argument to be made that people should just use a staking specific proxy instead of a controller account. From what I can tell there's been a lot of discussion here starting from early last year - so I gotta catch up on what's actually happened before doing anything. We don't need to do this before this release since they're only soft deprecated right now. We'll really have to get on it once they're actually removed from the codebase. |
Congrats on getting this over the line @HCastano |
This PR updates our version of Substrate from
polkadot-v1.0.0
topolkadot-v1.3.0.
This represents several months worth of changes, so there is a lot going on here.
Some notable changes include:
When a breaking change was encountered I did my best to find the corresponding PR and
note it down in the commit message fixing the break.
For runtime config values, I tended to take the values from the most recent production
Polkadot runtime (
v1.1.0
). These are for the most part sane values to start with, andwe can tune them later if we need.
For reviewers: the place I would focus on is the
runtime/lib.rs
file. It's important toat least sanity check any new configuraton values and make sure we're not introducing a
bug from cargo-culting stuff in.
If that looks fine, then the next thing would be the
service.rs
file, and finally aquick look through the pallets.
Some helpful links:
v1.3.0
release, so I've been using those runtimes referencesv1.3.0
upgrade PR