Closed
Description
GRANDPA and parachains finality pallets are accepting the chain header/head and storing it directly in the runtime. For most of cases (including ours) we may only store the storage root, thus decreasing the occupied runtime storage + message transactions bandwidth (?).
The implementation may look like:
trait HeaderArtifacts {
type Artifacts;
fn into(header: Header) -> Self::Artifacts;
}
struct StorageRootArtifact;
impl HeaderArtifacts for StorageRootArtifact {
type Artifacts = H256;
fn into(header: Header) -> H256 {
*header.storage_root()
}
}
...
impl pallet_grandpa::Config for Runtime {
...
type Artifacts = StorageRootArtifact;
...
}