-
Notifications
You must be signed in to change notification settings - Fork 379
Glutton update script #2681
Glutton update script #2681
Conversation
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.
LGTM, only a few suggestions.
What does it mean to "update" a glutton parachain? Needs more description. |
I have the strong feeling that this could be a 10 line polkadot js script? |
Improved description |
* Fix docs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update client/relay-chain-rpc-interface/src/reconnecting_ws_client.rs Co-authored-by: Davide Galassi <davxy@datawok.net> * Update cargo.lock with substrate Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update Cargo.lock for polkadot Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Davide Galassi <davxy@datawok.net> Co-authored-by: parity-processbot <>
Yeah, it would be definitely shorter, and would have taken me also less time. I considered both options, but Joe preferred me to use Now that is done, I would love it to see it merged so we can start deploying the Glutton Parachains as soon as possible. |
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.
Like the use of subxt!
My only concern is the Cargo.lock changes. At the moment subxt is bringing in another version of substrate. Can/should we persuade it to use the same version of substrate as cumulus does? |
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false } | ||
subxt = { version = "0.29.0", features = ["unstable-metadata"] } | ||
sp-keyring = "23.0.0" |
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.
I think we can nix this dep, don't think it's needed. Seems to compile on my machine without it.
sp-keyring = "23.0.0" |
.runtime_api() | ||
.at_latest() | ||
.await? | ||
.call(runtime_api_call) |
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.
If you want to avoid the unstable-metadata thing you could also use a "raw" call to the same thing (assuming nonce is a u32, which is true in substrate/polkadot and I'd expect most other chains):
let next_nonce: u32 = client
.runtime_api()
.at_latest()
.await?
.call_raw("AccountNonceApi_account_nonce", Some(&account.encode()))
.await?;
I'm actually going to move Subxt to do this too, and will likely expose a way to get this in the next version
.unwrap(); | ||
|
||
// Submit and watch the tx | ||
let in_block = signed_tx.submit_and_watch().await.unwrap().wait_for_in_block().await.unwrap(); |
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.
Just to note that .wait_for_in_block()
doesn't guarantee that the block will be finalized; use .wait_for_finalized()
for that, or even .wait_for_finalized_success()
to also verify that the tx was successfully executed (ie an ExtrinsicSuccess event was produced from its inclusion)
|
@@ -0,0 +1,4403 @@ | |||
# This file is automatically @generated by Cargo. |
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.
@bkchr do you have any opinion on multiple Cargo.lock
files per repo?
I still think its not a good idea and then should rather be its own repo.
The monorepo migration will not profit from this either.
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.
If we do not add it to the main workspace, what is the issue for having other Cargo.lock
files on their own package?
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.
The dependabot does not update it (so the deps will be out dated) and our CI tooling like fmt, clippy will not work.
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.
I do not mind at all to move it to its own repo. It is just a tool to help to achieve a higher goal which is Glutton Parachains management. It is not mandatory to include it in Cumulus.
But if it is true that adding subxt
to the main workspace could potentially lead to multiple versions of the same crate, and at the same time, we do not want to have multiple Cargo.lock
files, then it means we are banning subxt
from Cumulus/monorepo.
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.
The dependabot does not update it (so the deps will be out dated) and our CI tooling like fmt, clippy will not work.
Yes, I understand that, but there are other scripts using Polkadot Js with a yarn.lock
, and those are not checked or updated either by the CI as far as I know. So I do not know why if we accept polkadot js we can not tolerate subxt
getting outdated. I would understand it if it were part of the client/runtime.
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.
I do not mind at all to move it to its own repo
I would personally favour this.
Actually this isn't true; the I am working on adding some native signing support to Subxt so that you can do basic transaction signing like here without pulling in a load of substrate crates. Alternately I'm hoping for a future where substrate crates are published regularly again, and polkadot/cumulus depend on the crates and not github master; it'll be easier to keep things like Subxt in line with the latest deps then :) |
Closing in favor of: paritytech/parachain-utils#1 |
Script to update Gluttons Parachains. It allows to update
Compute
(percentage of the left overref_time
to consume duringon_idle
) andStorage
(percentage of left overproof_size
to consume duringon_idle
) storage items for a range of selected parachain ids.Necessary to learn what are the limits of the Relay chain and subsequently the max number of Parachains it can handle.