Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate if the config used by the API should take the substrate runtime changes #633

Open
echevrier opened this issue Jul 25, 2023 · 1 comment

Comments

@echevrier
Copy link
Contributor

The runtime changed in substrate:

@haerdib
Copy link
Contributor

haerdib commented Jul 26, 2023

Just noting previously stated observations regarding the Block type:
We could remove Header and BlockNumber from our Config.
Could look like:

type Block = Block<Header<u32, BlakeTwo256>, OpaqueExtrinsic>; 

(or define some types for better readability outside of Config struct)

Pro:

If one defines the config by self, then one could take the Block type directly from Runtime, and does not need to define Header and Blocknumber.

Config {
..... 

type Block = my_node_runtime::Runtime::Block;
...

}

Disadvantage:

The "inner" types can not be accessed anymore with simple Config::Header but a little more complex with somethign like Conifg::<Block as BlockTrait>::Header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants