Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Explain Opaque Types #8

Open
JoshOrndorff opened this issue Mar 25, 2020 · 0 comments
Open

Explain Opaque Types #8

JoshOrndorff opened this issue Mar 25, 2020 · 0 comments
Labels
K1 - Runtime Info about the runtime. K2 - Client Info about the client. T2 - New Page Add a new page to the KB.

Comments

@JoshOrndorff
Copy link
Contributor

A Pattern in Substrate is that there are some types in the runtime which have corresponding opaque types in the outer node. Opaque means that the outer node cannot inspect the data contained in hte type or use other type system features like pattern matching. Rather the outer node see the data only as Vec. This allows the outer node to abstract over these types, and not need upgrading when the runtime is upgraded and the types change.

This is done at least for the Extrinsic and Block types.

@bkchr (because you requested this on riot) Can you confirm whether my limited understanding above is correct, and provide a few examples of types that follow this pattern?

@JoshOrndorff JoshOrndorff added K1 - Runtime Info about the runtime. K2 - Client Info about the client. T2 - New Page Add a new page to the KB. labels Mar 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
K1 - Runtime Info about the runtime. K2 - Client Info about the client. T2 - New Page Add a new page to the KB.
Projects
None yet
Development

No branches or pull requests

1 participant