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
Copy file name to clipboardExpand all lines: changelog.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,6 @@ prevent unauthorized re-submission of metadata updates. The `sign-block-producer
24
24
match this change.
25
25
*`partner-chain-cli` (wizards) does not execute `<pc-node> build-spec` but creates the chain-spec.json file directly with a code injected into the command.
26
26
* Debug strings generated by `byte-string-derive` crate now fully pad output hex with zeros
27
-
* Generic candidates keys:
28
-
** getAriadneParameters and getRegistrations results format has changed, `auraPubKey` and `grandpaPubKey` are replaced by `"keys": {"aura": "...", "gran": "..."}`
29
-
** toolkit user should provide a way of mapping `CandidateKeys` from and into their chain session keys
30
27
*`authority-selection-inherents` crate now exports all its public members from the crate root
31
28
*`select_authorities` in `authority-selection-inherents` crate now returns a `BoundedVec` of `CommitteeMembers`. Projects that used the old version no longer
32
29
need to transform the data in their own runtime code
@@ -35,7 +32,22 @@ need to transform the data in their own runtime code
35
32
36
33
## Added
37
34
38
-
* Parsing of V1 datum of Permissioned Candidate
35
+
### Generic keys feature
36
+
37
+
Up to v1.7.x the toolkit has supported only a triplet of keys: Partner-Chain keys, AURA, and Grandpa. Partner Chain key's special meaning and presence is preserved, but the number and types of the remaining keys can be configured according to the needs of a particular Partner Chain.
38
+
39
+
This enables use of additional pallets that require other keys.
40
+
41
+
Integration with the `wizards` CLI is done by means of `PartnerChainRuntime` trait implementation. See [Update Guide](docs/developer-guides/sdk-update-v1.7-to-v1.8.0.md) for more details.
42
+
43
+
On Cardano side the Plutus Data format has been changed from `[Partner-chain, AURA, Grandpa]`, to `[Partner-chain, [[key_1_id, key_1_bytes],...,[key_n_id, key_n_bytes]]]`, where `key_i_id` is 4 bytes encoding key type. This is present in version 1 of datums that are now used in place of version 0.
44
+
45
+
In SCALE encoding of inherent data custom implementations of `Encode` and `Decode` have been added to make this transition backward and forward compatible and transparent for the toolkit users. This change does not imply any order of nodes and runtime upgrade.
46
+
47
+
`getAriadneParameters` and `getRegistrations` RPC results format has changed, `auraPubKey` and `grandpaPubKey` are replaced by `"keys": {"aura": "...", "gran": "..."}`.
48
+
49
+
### Other additions
50
+
39
51
*`delete_metadata` extrinsic in `pallet-block-producer-metadata`
40
52
* Added litep2p networking stack support to pc demo node as default. libp2p can be set with explicitly `--network-backend` parameter.
The biggest change in the Partner Chains Toolkit v1.8.0 is the support of generic session keys.
6
+
One implication of having the keys generic and not hardcoded is that the toolkit users have to inject some behavior to the toolkit.
7
+
This dependency injection is required by `partner-chains-cli` create (`wizards` subcommand), and it is done by implementing the `PartnerChainRuntime` trait.
8
+
Following items have to be defined:
9
+
*`type Keys: MaybeFromCandidateKeys` - should be the type of the session keys used in the Runtime. This type is used for the chain-spec creation, to insert initial committee and validators keys into genesis.
10
+
*`fn key_definitions() -> Vec<KeyDefinition<'static>>` - should define textual information about `Keys`. This function is used in the user interface and for interactions with the substrate CLI keystore commands.
11
+
*`fn create_chain_spec(config: &CreateChainSpecConfig<Self::Keys>) -> serde_json::Value` - should return a JSON object of the chain-spec. This function is used by the `create-chain-spec` subcommand. The toolkit no longer makes assumptions about `build-spec` behavior when no `--chain` parameter is supplied. The toolkit provides functions from `CreateChainSpecConfig` to `GenesisConfig`, for each of the pallets, to be used when implementing `create_chain_spec`.
12
+
13
+
Changes required:
14
+
1. Add `impl authority_selection_inherents::MaybeFromCandidateKeys for SessionKeys {}` for your runtime SessionKeys type
15
+
1.`select_authorities` function now requires explicit type annotations, please provide them in your runtime implementation, also remove wrapping of the result into `BoundedVec` - function returns this type now
16
+
1. Add dependency on `partner-chains-cli` in the node (final executable) crate
17
+
1. Implement `PartnerChainRuntime` for your chain and pass it to the code that wires in partner-chains-commands
18
+
1. Remove `impl RuntimeTypeWrapper`
19
+
20
+
## Export changes in `authority-selection-inherents` crate
21
+
22
+
*`authority-selection-inherents` crate now exports types from the top level, please adjust `use` clauses.
23
+
24
+
## `pallet-address-associations` - security fixes
25
+
26
+
This pallet is now protected against space attacks. Runtime implementation has to be updated.
27
+
28
+
* Please define cost of association:
29
+
```rust
30
+
parameter_types! {
31
+
/// Amount of tokens to burn when making irreversible, forever association
The pallet is now protected against space, front running and replay attacks
44
+
Required changes are:
45
+
* update `type RuntimeHoldReason = RuntimeHoldReason;` in `pallet-balances` config implementations
46
+
* define the metadata deposit amount for space attack prevention:
47
+
```rust
48
+
parameter_types! {
49
+
/// Amount of tokens to hold when upserting block producer metadata.
50
+
pubconstMetadataHoldAmount:Balance=1_000_000;
51
+
}
52
+
```
53
+
* set the hold amount, currency and possible reason types and the current time getter in the `pallet-block-producer-metadata` implementation config implementation:
0 commit comments