Metadata V16 updates

Thanks for the feedback everyone! :pray:

It’d be great as well to leak at the metadata the information about which hash function is used in the runtime to construct blocks

By collecting the associated types we’ll also try to expose the Config::Hasher name into the metadata.

Another approach to this might be even to expose the hasher function code:

  • Joseph suggested adding a new runtime API call in this github issue
  • A more generic approach may be to expose code functionality directly by a dedicated wasm blob (Metadata V16: Add code functionality as WASM blob. As mentioned in the issue, there might be concerns about accidentally leaking private information to a malicious rpc node.

I’ll look at the associated types collection and see if we expose enough information to deduce the hasher function