Conversation
| >; | ||
| pub enum PolkadotConfig {} | ||
|
|
||
| impl Config for PolkadotConfig { |
There was a problem hiding this comment.
I do wonder, we implement the Config directly to gain more flexibility for the PolkadotConfig?
There was a problem hiding this comment.
Yeah, WithExtrinsicParams only lets you change the extrinsic params bit; Tadeo needed to change another param so implementing Config "properly" is the way to go :)
I might be wrong, but the question I think is, when you run It's a good point though that people basing things off the I think what you've done here is all good for now; maybe we need to look through more things and provide more |
There was a problem hiding this comment.
pausing merge this....
we shouldn't target the node template in substrate it's different from the substrate --dev (it's called node)
https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1833 the AccountIndex is actually a u32, it might not matter for subxt anyway in most cases
I would prefer to have SubstrateNodeTemplateConfig and SubstrateNodeConfig or something SubstrateConfig is not obvious what it refer to but as most folks just run substrate --dev it's most reasonable to support by default
Yeah, PolkadotConfig is () but I'm not against removing the inheritance from SubstrateConfig
If the two are different in the |
|
My complete guess for why the two are different: the address type looks like: pub enum MultiAddress<AccountId, AccountIndex> {
/// It's an account ID (pubkey).
Id(AccountId),
/// It's an account index.
Index(#[codec(compact)] AccountIndex),
/// It's some arbitrary raw bytes.
Raw(Vec<u8>),
/// It's a 32 byte representation.
Address32([u8; 32]),
/// Its a 20 byte representation.
Address20([u8; 20]),
}And so Substrate uses Ultimately it won't affect anybody to use I wouldn't be opposed to more |
|
So just to check, This PR changes @niklasad1 what do you reckon? |
Go ahead and merge it, missed that it didn't modify the SubstrateConfig so all good from myside |
I changed the second generic parameter in the polkadot config to
(), but I am a bit confused still about the default for substrate.There are the two directories
nodeandnode-templateinsubstate/bin.node-templateseems to use():in
substrate/bin/node-template/runtime/src/lib.rswhile
nodeseems to use u32:in
substrate/bin/node/primitives/src/lib.rsandin
substrate/bin/node/runtime/src/lib.rs