Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Ensure relay chain block number strictly increases #1280

Merged
merged 7 commits into from
Jun 5, 2022

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented May 20, 2022

This is a safeguard for when async backing is enabled on the relay chain and multiple parachain
blocks per relay chain block are legal. We will need to later change this to support then multiple
parachain blocks per relay chain block.

This is a safeguard for when async backing is enabled on the relay chain and multiple parachain
blocks per relay chain block are legal. We will need to later change this to support then multiple
parachain blocks per relay chain block.
@xlc
Copy link
Contributor

xlc commented May 20, 2022

This means we cannot easily swap the relaychain of a testnet parachain, which is a very useful feature to maintain a long term testnet.

@bkchr
Copy link
Member Author

bkchr commented May 21, 2022

Stuff like the latest message head already prevent this (it may currently works for you because you don't have send any messages on your test chain).

However, I can make this configurable from the beginning.

@xlc
Copy link
Contributor

xlc commented May 21, 2022

The latest message head can be fixed by setting storages on relaychain with sudo. We tried this with last rococo reset. We can't just bump block number on relaychain (or can we?)

@bkchr
Copy link
Member Author

bkchr commented May 22, 2022

The latest message head can be fixed by setting storages on relaychain with sudo. We tried this with last rococo reset. We can't just bump block number on relaychain (or can we?)

No, but if I make it configurable, you can ignore this test on your test parachain.

@xlc
Copy link
Contributor

xlc commented May 25, 2022

The latest message head can be fixed by setting storages on relaychain with sudo. We tried this with last rococo reset. We can't just bump block number on relaychain (or can we?)

No, but if I make it configurable, you can ignore this test on your test parachain.

That works. Can we make it configurable? Should I make a new issue?

@bkchr
Copy link
Member Author

bkchr commented May 25, 2022

I will push the changes to this pr before merging it.

@paritytech-ci paritytech-ci requested a review from a team May 31, 2022 20:52
@bkchr
Copy link
Member Author

bkchr commented May 31, 2022

I have made it configurable. However, my naming is really shitty. @xlc or @rphmeier someone of you may have a better idea for the naming?

@paritytech-ci paritytech-ci requested a review from a team June 1, 2022 00:05
@xlc
Copy link
Contributor

xlc commented Jun 1, 2022

Thanks. The name looks fine to me.

Copy link
Contributor

@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.

lgtm just need to fix the test

pallets/parachain-system/src/lib.rs Outdated Show resolved Hide resolved
@@ -107,6 +107,7 @@ impl Config for Test {
type ReservedDmpWeight = ReservedDmpWeight;
type XcmpMessageHandler = SaveIntoThreadLocal;
type ReservedXcmpWeight = ReservedXcmpWeight;
type CheckAssociatedRelayNumber = AnyRelayNumber;
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be RelayNumberStrictlyIncreases for the test below to work?

pallets/parachain-system/src/lib.rs Outdated Show resolved Hide resolved
bkchr and others added 3 commits June 3, 2022 22:30
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants