substrate-docs icon indicating copy to clipboard operation
substrate-docs copied to clipboard

Metadata v14 content

Open nuke-web3 opened this issue 4 years ago • 7 comments

With the new scale-info features, many need to migrate and in general we should discuss and inform builders of it.

  • What versions of Substrate include this?
  • What changes in your nodes need to be made?
  • What changes in clients/apps need to be made?

Migration guide: https://gist.github.com/ascjones/0d81a4c44e84cacd9f714cd34a6de823

nuke-web3 avatar Oct 18 '21 15:10 nuke-web3

@ascjones could I ask you to add a few links/resources in this issue so we can make this content? :pray: Any key things we should point out?

nuke-web3 avatar Oct 18 '21 15:10 nuke-web3

I had promised to write some docs on this which I have failed to do so far. I will do a session on this at the retreat so need to do some prep this week and can send over my unedited notes for this as a start.

ascjones avatar Oct 18 '21 15:10 ascjones

The scale-info crate docs are helpful too https://docs.rs/crate/scale-info/1.0.0

And great tip from @wischli in https://gist.github.com/ascjones/0d81a4c44e84cacd9f714cd34a6de823#gistcomment-3931135

I would like to add that you should add #[scale_info(skip_type_params(T))] for structs which lazily use the pallet's Config as generic such as pub struct Example<T: Config> - if this statement is correct. This would have saved me quite some time when debugging our upgrade to 0.9.11 sweat_smile

JoshOrndorff avatar Oct 21 '21 18:10 JoshOrndorff

Pro tip for easy grabbing of a local node ( or remote with RPC unsafe ports open?):

curl -H "Content-Type: application/json" -d '{ "id": 1, "jsonrpc": "2.0", "method": "state_getMetadata"}' http://localhost:9933

nuke-web3 avatar Nov 28 '21 20:11 nuke-web3

@ascjones - I still woudl love to see more formal content around this - are you able to help out here? :grinning:

nuke-web3 avatar Jun 25 '22 04:06 nuke-web3

Yes but realistically I won't get around to it until August. It is on my list.

ascjones avatar Jun 27 '22 09:06 ascjones

https://docs.substrate.io/main-docs/build/application-dev/#metadata-system what we have so far

#494 related

nuke-web3 avatar Jun 30 '22 13:06 nuke-web3