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

Kusama People Chain #217

Merged
merged 23 commits into from
Mar 18, 2024

Conversation

joepetrowski
Copy link
Contributor

@joepetrowski joepetrowski commented Mar 5, 2024

See https://forum.polkadot.network/t/people-chain-launch-and-identity-migration-plan/5930 for launch process.

A branch with runtimes for steps 2 and 3 of the launch process is here: joepetrowski#1

@joepetrowski joepetrowski mentioned this pull request Mar 6, 2024
19 tasks
Copy link
Contributor

@acatangiu acatangiu left a comment

Choose a reason for hiding this comment

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

Did not go in-depth reviewing people code, but compared it against the Rococo deployed code. Integration to Kusama looks good.

pub const PARA_ID: u32 = 1004;
pub const ED: Balance = people_kusama_runtime::ExistentialDeposit::get();

pub fn genesis() -> Storage {
Copy link
Member

Choose a reason for hiding this comment

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

Can the genesis storage not be produced by the runtime?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure, @NachoPal ?

Copy link
Member

Choose a reason for hiding this comment

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

In general it should be possible to do: RuntimeGenesis::default().build() to populate externality storage with the genesis values.
But as i see we have this copy&pasted in all runtimes, so maybe can keep this for a future follow-up to clean them all.

Copy link
Contributor

Choose a reason for hiding this comment

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

There's some refactoring and improvement from @michalkucharczyk in polkadot-sdk on genesis config, maybe he has an opinion on how this can be done best with minimal copy+pasta.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not very familiar with this part of code. But if I understand correctly this function is later used for some integration tests. So it is not strictly runtime function, just a testing helper?

Copy link
Contributor

Choose a reason for hiding this comment

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

When it comes to duplication: If the set of customized fields in genesis config is the same for every runtime/test then we could use single json patch and use GenesisBuilder runtime API to build the storage. But this approach would also require that serialization format is exactly the same for every runtime (e.g. SessionKeys).

However json-patch approach may slow down execution of the tests (this concern was raised by @NachoPal if I recall correctly) - as we need to execute a runtime call to get the state.

relay/kusama/src/impls.rs Show resolved Hide resolved
relay/kusama/src/impls.rs Show resolved Hide resolved
relay/kusama/src/impls.rs Outdated Show resolved Hide resolved
// Straight up local `AccountId32` origins just alias directly to `AccountId`.
AccountId32Aliases<RelayNetwork, AccountId>,
// Here/local root location to `AccountId`.
HashedDescription<AccountId, DescribeTerminus>,
Copy link
Contributor

Choose a reason for hiding this comment

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

We can also include DescribeAllTerminal. I do not see a use case now, but this will let us to derive an account for pallets or plurality locations

// ./target/production/polkadot
// benchmark
// pallet
// --chain=rococo-dev
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these regenerated before release? Or should they be run with bench bot in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we have bench bot in the Fellowship? I assumed they get regenerated on release (cc @bkontur )?

Copy link
Contributor

Choose a reason for hiding this comment

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

No bench bot for fellows (yet?) #50 (comment).
Yes, for sure on release.
I am working on that here: #223, but if you need/want to check before, I could do it just for this branch also, just this pallet and/or the full people chain?
Just let me know

Copy link
Contributor

Choose a reason for hiding this comment

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

All good, wasn't sure how it worked in the fellowship repo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am working on that here: #223, but if you need/want to check before, I could do it just for this branch also, just this pallet and/or the full people chain?

For me there's no need to run in order to merge this, but maybe others disagree. For sure it needs to be part of release though, so perhaps we want to do a run on this branch just to ensure there are no hiccups?

system-parachains/people/people-kusama/src/xcm_config.rs Outdated Show resolved Hide resolved
system-parachains/people/people-kusama/src/lib.rs Outdated Show resolved Hide resolved
system-parachains/people/people-kusama/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@ordian ordian left a comment

Choose a reason for hiding this comment

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

Did only quick scan through. Approving to unblock the merge.

Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

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

Some minor comments but lgtm.

@joepetrowski
Copy link
Contributor Author

/merge

@fellowship-merge-bot
Copy link
Contributor

Enabled auto-merge in Pull Request

Available commands
  • /merge: Enables auto-merge for Pull Request
  • /merge cancel: Cancels auto-merge for Pull Request
  • /merge help: Shows this menu

For more information see the documentation

@fellowship-merge-bot fellowship-merge-bot bot enabled auto-merge (squash) March 18, 2024 13:04
auto-merge was automatically disabled March 18, 2024 13:30

Head branch was pushed to by a user without write access

@joepetrowski
Copy link
Contributor Author

/merge

@fellowship-merge-bot
Copy link
Contributor

Enabled auto-merge in Pull Request

Available commands
  • /merge: Enables auto-merge for Pull Request
  • /merge cancel: Cancels auto-merge for Pull Request
  • /merge help: Shows this menu

For more information see the documentation

@fellowship-merge-bot fellowship-merge-bot bot enabled auto-merge (squash) March 18, 2024 13:47
@fellowship-merge-bot fellowship-merge-bot bot merged commit 6d93705 into polkadot-fellows:main Mar 18, 2024
30 of 31 checks passed
Comment on lines +150 to +155
pub struct ParentOrParentsPlurality;
impl Contains<Location> for ParentOrParentsPlurality {
fn contains(location: &Location) -> bool {
matches!(location.unpack(), (1, []) | (1, [Plurality { .. }]))
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

just one late nit: this is everywhere replaced with parachains_common::xcm_config::ParentRelayOrSiblingParachains

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed here: #245

@bkontur
Copy link
Contributor

bkontur commented Mar 18, 2024

I wanted to regenerate weights for people chain, but I realized that it was not added to the chain-spec-generator,
I can do it (with the previous comment) as a part of the #223

@@ -14,5 +14,9 @@
{
"name": "bridge-hub-polkadot",
"package": "bridge-hub-polkadot-integration-tests"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

also this needs to be added to the runtimes-matrix.json - for running tests/check-migrations...

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed here: #245

@joepetrowski joepetrowski deleted the kusama-people branch March 18, 2024 15:42
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.

9 participants