Oftentimes in a runtime, we want to access the current block author. Right now, the only way that runtimes have to get data like that about the outside world is via inherents. A simple solution would be to add an Author inherent and be done with it.
However, for consensus engines we need the property that the header, which doesn't contain any inherents, is enough to verify consensus. Consensus engines like BABE will include the public key of the author in a digest item added after finalize_block, along with the signature and other data. Aura is similar, except it uses a slot number instead of a public key, as that is more compact.
Adding an Author inherent is still possible, but it comes with a few problems:
- Duplication of data when the author would be derivable from the digest seal
- potentially complex cross-checking logic to make sure the seal digest item matches the author stated there (usually not a problem)
One possible solution is Inherent Digests. If the import pipeline can be extended to have initialize_block take consensus-engine data structured similarly to InherentData, this process can initialize the header with digests containing things like author.
This would mean that items previously combined in seal digests would be split. The Aura seal can be used as an example. Previously, this would contain the slot_number and signature of the corresponding public key. Now, the slot_number would be passed in as InherentData to initialize_block and this would perform a runtime lookup to find the public key. A special digest would be produced that encoded the slot number, and the author's key would be available throughout runtime execution (kept in storage, wiped in on_finalize). The signature would be the only item in the post-runtime digest.