Skip to content
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

Import Runtimes from Polkadot-SDK v1.1.0-rc2 #28

Merged
merged 33 commits into from
Sep 26, 2023
Merged

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Sep 13, 2023

This marks a clear cut in the development process and implies that from now on, this repository will be used to maintain the Polkadot, Kusama and their System-Parachain runtimes. The cut retroactively applies to the runtimes at v1.1.0-rc2. All posterior changes need to be ported and re-applied here.

Changes:

  • Importing the runtimes from the Polkadot-SDK v1.1.0-rc2 (f60318f686)
  • Rename folder glutton to gluttons
  • Use dependencies from crates-io instead of git

The changes can be reproduce with this script (it requires two user-interactions):

git clone https://github.com/ggwpez/substrate-scripts/ --depth 1 --branch master
cd substrate-scripts/import-runtime-repos/
./runtime-import.sh

The path mappings for manually importing code can be taken from this scripts.

@ggwpez ggwpez mentioned this pull request Sep 13, 2023
@ggwpez ggwpez changed the title Import Polkadot-SDK v1.1.0-rc2 Import Runtimes from Polkadot-SDK v1.1.0-rc2 Sep 14, 2023
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez marked this pull request as ready for review September 14, 2023 14:00
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Cargo.toml Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Cargo.toml Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
LICENSE Outdated Show resolved Hide resolved
@bkchr
Copy link
Contributor

bkchr commented Sep 18, 2023

@ggwpez the weights are all "fresh"? If not, do they need to be regenerated?

@ggwpez
Copy link
Member Author

ggwpez commented Sep 18, 2023

@ggwpez the weights are all "fresh"? If not, do they need to be regenerated?

It is best practice to re-generate before each release, so I will open another MR on top of this to update them.

@bkchr
Copy link
Contributor

bkchr commented Sep 18, 2023

You can directly push to this pr. I don't see any need to open another pr?

@bkchr
Copy link
Contributor

bkchr commented Sep 18, 2023

@liamaharon could you please run all the runtimes using your new try-runtime cli? And best would also be to post instructions on how to reproduce.

@pepyakin
Copy link
Contributor

Now it looks a bit more success-y, but the end of the output is as follows:

<...snip...>
✅ FINAL CHECK PASSED. EMPTY DIFF TO REMOTE 'origin/oty-import-v1.1.0-rc2'
sha256sum: WARNING: 8 computed checksums did NOT match

@gavofyork
Copy link
Contributor

I got the same

@bkchr
Copy link
Contributor

bkchr commented Sep 25, 2023

sha256sum: WARNING: 8 computed checksums did NOT match

Yeah that is fine. I think @ggwpez is trying to do reproducible builds, without using a reproducible env.

@ggwpez
Copy link
Member Author

ggwpez commented Sep 25, 2023

sha256sum: WARNING: 8 computed checksums did NOT match

Yeah that is fine. I think @ggwpez is trying to do reproducible builds, without using a reproducible env.

Yes exactly. It can be ignored, as the final already passed.

Copy link
Member

@andresilva andresilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All checks passed (except getting mismatched runtime hashes which is expected).

liamaharon and others added 3 commits September 25, 2023 17:15
* remove executed migration

* init storage versions

* fix reads

* review comments
* Update system-parachain weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update system-parachain weights again

Just a sanity check for the consistency.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update Relay weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add CHANGELOG.md

* Bring back .gitattributes
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
If the channel exists, the channel will be closed. The function is only callable by a privileged origin and thus, it should be fine to ignore `c` for now.
@kianenigma
Copy link
Contributor

I would like to try try-runtime fast-forward or follow-chain on this as well, but those are not urgent atm. cc @liamaharon maybe you already have the infra to that?

@xlc
Copy link
Contributor

xlc commented Sep 26, 2023

I guess this is fine?

Corrected 6 deps in runtimes/relay/kusama/constants//Cargo.toml
[oty-import-v1.1.0-rc2 4cd27d5c] Update dependencies to use crates-io
 10 files changed, 496 insertions(+), 496 deletions(-)
✅ REPRODUCED CHECKPOINT 06de008bb5
Collecting toml
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Installing collected packages: toml
Successfully installed toml-0.10.2
🔎 Checking folder /Users/xiliangchen/projects/substrate-scripts/import-runtime-repos/runtimes
📜 Found 10 crates in the workspace
🔗 asset-hub-kusama-runtime -> kusama-runtime-constants
🔗 asset-hub-polkadot-runtime -> polkadot-runtime-constants
🔗 bridge-hub-kusama-runtime -> kusama-runtime-constants
🔗 bridge-hub-polkadot-runtime -> polkadot-runtime-constants
🔗 collectives-polkadot-runtime -> polkadot-runtime-constants
🔗 polkadot-runtime -> polkadot-runtime-constants
🔗 staging-kusama-runtime -> kusama-runtime-constants
✅ All 7 local links are correct since they DO NOT use crates-io.
Compiling runtimes ...
⚡ Found 3 strongly connected components which includes at least one cycle each
cycle(001) ∈ α: ApprovalVoting ~~{"ApprovalDistributionMessage"}~~> ApprovalDistribution ~~{"ApprovalVotingMessage"}~~>  *
cycle(002) ∈ β: CandidateBacking ~~{"StatementDistributionMessage"}~~> StatementDistribution ~~{"CandidateBackingMessage"}~~>  *
cycle(003) ∈ γ: NetworkBridgeRx ~~{"GossipSupportMessage"}~~> GossipSupport ~~{"NetworkBridgeRxMessage"}~~>  *
[oty-import-v1.1.0-rc2 ddea3070] Generate lockfile
 1 file changed, 2581 insertions(+), 1853 deletions(-)
✅ REPRODUCED CHECKPOINT 37ef1da4fe
Runtimes compiled.
DIFF TO REMOTE IS NOT EMPTY

@xlc
Copy link
Contributor

xlc commented Sep 26, 2023

Yeah the diff is weight files and some migrations, which looks fine.

@xlc
Copy link
Contributor

xlc commented Sep 26, 2023

Looks like the review-bot is working good 👍

@gavofyork gavofyork merged commit dcb9f62 into main Sep 26, 2023
7 checks passed
@ggwpez ggwpez mentioned this pull request Sep 26, 2023
@bkchr bkchr deleted the oty-import-v1.1.0-rc2 branch September 26, 2023 10:58
bkchr added a commit that referenced this pull request Sep 29, 2023
* Update README

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add one more clippy lint from Polkadot-SDK

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update CI dependencies

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use workspace version 1.1.0

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Cleanup Cargo.toml and rename glutton-runtime

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add GPL-3.0 license

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use version 1.0.0

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update .gitignore and rustfmt

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Delete empty CHANGELOG

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update Cargo.lock

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Set authors to the Fellowship

Co-authored-by: Bastian Köcher <git@kchr.de>

* Add the `on-chain-release-build` feature to all runtimes

* Rework release action

* Test the action

* Don't use deprecated command

* Use correct name

* Try to get it running

* Try

* Fixes

* ...

* Try

* Now?

* Rename

* Revert and let it only run on main

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <info@kchr.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.