Clean up PersistedValidationData (#2353)

* PVD: `block_number`->`relay_parent_number`

* ValidationParams: `relay_chain_height`->`relay_parent_number`

* Expose DMQ MQC hash as a well-known-key

This way the relay storage merkle proofs will be able to obtain the DMQ
MQC hash and we will be able to remove the it from the
PersistedValidationData struct.

* PersistedValidationData: Remove HRMP MQC heads

* PersistedValidationData: Remove `dmq_mqc_head`

* Expose the HRMP ingress channel index as a well-known-key

This way a parachain (PVF and collator) can find all the parachains that
have an outbound channel to the given one. That allows in turn to find
all the inbound channels for the given para.

Having access to that allows the parachain to get the same information
as the hrmp_mqc_heads now provide.

* Rename `relay_storage_root` to `relay_parent_storage_root`
This commit is contained in:
Sergei Shulepov
2021-02-02 17:35:13 +01:00
committed by GitHub
parent 16b250d7ea
commit d4fdbf7db9
17 changed files with 112 additions and 100 deletions
@@ -201,11 +201,9 @@ impl Default for TestState {
let persisted_validation_data = PersistedValidationData {
parent_head: HeadData(vec![7, 8, 9]),
block_number: Default::default(),
hrmp_mqc_heads: Vec::new(),
dmq_mqc_head: Default::default(),
relay_parent_number: Default::default(),
max_pov_size: 1024,
relay_storage_root: Default::default(),
relay_parent_storage_root: Default::default(),
};
let pov_block_a = PoV {