You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parachain locks are designed in such way to ensure the decentralization of parachains. If parachains are not locked when it should be, it could introduce centralization risk for new parachains.
11
+
12
+
A parachain can be locked only with following conditions:
13
+
14
+
- Relaychain governance MUST be able to lock any parachain.
15
+
- A parachain MUST be able to lock its own lock.
16
+
- A parachain manager SHOULD be able to lock the parachain.
17
+
- A parachain SHOULD be locked when it successfully produced a block for the first time.
18
+
19
+
A parachain can be unlocked only with following conditions:
20
+
- Relaychain governance MUST be able to unlock any parachain.
21
+
- A parachain MUST be able to unlock its own lock.
- [**`decl_test_networks`**](https://github.com/paritytech/polkadot-sdk/blob/{{dependencies.repositories.polkadot_sdk.version}}/cumulus/xcm/xcm-emulator/src/lib.rs#L916){target=\_blank} - defines a testing network with relay chains, parachains, and bridges, implementing message transport and processing logic. Example:
693
694
694
695
```rust
695
-
decl_test_networks! {
696
-
pub struct WestendMockNet {
697
-
relay_chain = Westend,
698
-
parachains = vec![
699
-
AssetHubWestend,
700
-
BridgeHubWestend,
701
-
CollectivesWestend,
702
-
CoretimeWestend,
703
-
PeopleWestend,
704
-
PenpalA,
705
-
PenpalB,
706
-
],
707
-
bridge = ()
708
-
},
709
-
}
696
+
Failed to fetch snippet after 3 attempts
710
697
```
711
698
712
699
By leveraging these macros, developers can customize their testing networks by defining relay chains and parachains tailored to their needs. For guidance on implementing a mock runtime for a Polkadot SDK-based chain, refer to the [Pallet Testing](/develop/parachains/testing/pallet-testing/){target=\_blank} article.
@@ -5610,6 +5597,35 @@ The primary trade-off is increased implementation complexity, as you must manage
5610
5597
For a complete implementation example of multi-block migrations, refer to the [official example](https://github.com/paritytech/polkadot-sdk/tree/{{dependencies.repositories.polkadot_sdk.version}}/substrate/frame/examples/multi-block-migrations){target=\_blank} in the Polkadot SDK.
Parachain locks are designed in such way to ensure the decentralization of parachains. If parachains are not locked when it should be, it could introduce centralization risk for new parachains.
5612
+
5613
+
A parachain can be locked only with following conditions:
5614
+
5615
+
- Relaychain governance MUST be able to lock any parachain.
5616
+
- A parachain MUST be able to lock its own lock.
5617
+
- A parachain manager SHOULD be able to lock the parachain.
5618
+
- A parachain SHOULD be locked when it successfully produced a block for the first time.
5619
+
5620
+
A parachain can be unlocked only with following conditions:
5621
+
- Relaychain governance MUST be able to unlock any parachain.
5622
+
- A parachain MUST be able to unlock its own lock.
0 commit comments