Adjust session Keys for Babe (#1209)
This commit is contained in:
@@ -105,7 +105,7 @@ These custom types implement specific types that are found as part of the Substr
|
||||
| [[InherentOfflineReport]] | Describes the offline-reporting extrinsic |
|
||||
| [[Justification]] | A generic justification as a stream of [[Bytes]], this is specific per consensus implementation |
|
||||
| [[Key]] | The Substrate Key representation as a [[Bytes]] (`vec<u8>`) |
|
||||
| [[Keys]] | The session keys |
|
||||
| [[Keys]] | The session keys for both Grandpa (ed25519) and Babe (sr25519) |
|
||||
| [[KeyValue]] | KeyValue structure. Since most of the keys and resultant values in Subtrate are hashed and/or encoded, keys and values are reprsented as [[Bytes]] |
|
||||
| [[KeyValueOption]] | A key/value change. Similar to the [[KeyValue]] structure, but the value can be optional |
|
||||
| [[LockIdentifier]] | The Substrate LockIdentifier for staking |
|
||||
@@ -132,7 +132,6 @@ These custom types implement specific types that are found as part of the Substr
|
||||
| [[SeedOf]] | The Substrate SeedOf representation as a [[Hash]] |
|
||||
| [[SessionIndex]] | Simple index type with which we can count sessions as [[U32]] |
|
||||
| [[SessionKey]] | Wrapper for a SessionKey. Same as an normal [[AuthorityId]], i.e. a wrapper around publicKey |
|
||||
| [[SessionKeys]] | Wrapper for the session and authority ids |
|
||||
| [[SetIndex]] | Set index, implemented as a [[U32]] |
|
||||
| [[StakingLedger]] | The ledger of a (bonded) stash |
|
||||
| [[StoredPendingChange]] | Stored pending change for a Grandpa events |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Compact, Option, Vec } from './codec';
|
||||
import { Bytes, Data, Fixed64, H160, H256, H512, Moment, Null, StorageHasher, StorageKey, Text, Type, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from './primitive';
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, Balance, BalanceOf, Block, BlockNumber, Consensus, ConsensusEngineId, Digest, DigestItem, Ed25519Signature, Extrinsic, ExtrinsicEra, ExtrinsicPayload, Hash, Header, ImmortalEra, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, Method, MortalEra, Origin, Perbill, Permill, Phantom, PreRuntime, Seal, SealV0, SessionKeys, Signature, SignedBlock, Sr25519Signature, StorageData, ValidatorId, Weight, WeightMultiplier } from './interfaces/runtime';
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, Balance, BalanceOf, Block, BlockNumber, Consensus, ConsensusEngineId, Digest, DigestItem, Ed25519Signature, Extrinsic, ExtrinsicEra, ExtrinsicPayload, Hash, Header, ImmortalEra, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, Method, MortalEra, Origin, Perbill, Permill, Phantom, PreRuntime, Seal, SealV0, Signature, SignedBlock, Sr25519Signature, StorageData, ValidatorId, Weight, WeightMultiplier } from './interfaces/runtime';
|
||||
import { AuthorityId } from './interfaces/consensus';
|
||||
import { Keys, SessionIndex } from './interfaces/session';
|
||||
import { AuthorityWeight, NextAuthority, PendingPause, PendingResume, StoredPendingChange, StoredState } from './interfaces/grandpa';
|
||||
@@ -200,9 +200,6 @@ export interface InterfaceRegistry {
|
||||
Phantom: Phantom;
|
||||
'Option<Phantom>': Option<Phantom>;
|
||||
'Vec<Phantom>': Vec<Phantom>;
|
||||
SessionKeys: SessionKeys;
|
||||
'Option<SessionKeys>': Option<SessionKeys>;
|
||||
'Vec<SessionKeys>': Vec<SessionKeys>;
|
||||
StorageData: StorageData;
|
||||
'Option<StorageData>': Option<StorageData>;
|
||||
'Vec<StorageData>': Vec<StorageData>;
|
||||
|
||||
@@ -48,9 +48,6 @@ export default {
|
||||
Perbill: 'u32',
|
||||
Permill: 'u32',
|
||||
Phantom: 'Null',
|
||||
SessionKeys: {
|
||||
ed25519: 'AccountId'
|
||||
},
|
||||
StorageData: 'Bytes',
|
||||
KeyValue: '(StorageKey, StorageData)',
|
||||
ValidatorId: 'AccountId',
|
||||
|
||||
@@ -114,12 +114,6 @@ export type Seal = [ConsensusEngineId, Bytes] & Codec;
|
||||
/** [u64, Signature] & Codec */
|
||||
export type SealV0 = [u64, Signature] & Codec;
|
||||
|
||||
/** Struct */
|
||||
export interface SessionKeys extends Struct {
|
||||
/** AccountId */
|
||||
readonly ed25519: AccountId;
|
||||
}
|
||||
|
||||
/** H512 */
|
||||
export type Signature = H512;
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
export default {
|
||||
types: {
|
||||
SessionIndex: 'u32',
|
||||
Keys: 'SessionKeys'
|
||||
// node/runtime/src/lib.rs, impl_opaque_keys
|
||||
Keys: {
|
||||
ed25519: 'AccountId', // Grandpa, aka GrandpaId
|
||||
sr25519: 'AccountId' // Babe, aka BabeId
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
|
||||
import { Struct } from '../../codec';
|
||||
import { u32 } from '../../primitive';
|
||||
import { SessionKeys } from '../runtime';
|
||||
import { AccountId } from '../runtime';
|
||||
|
||||
/** SessionKeys */
|
||||
export type Keys = SessionKeys;
|
||||
/** Struct */
|
||||
export interface Keys extends Struct {
|
||||
/** AccountId */
|
||||
readonly ed25519: AccountId;
|
||||
/** AccountId */
|
||||
readonly sr25519: AccountId;
|
||||
}
|
||||
|
||||
/** u32 */
|
||||
export type SessionIndex = u32;
|
||||
|
||||
Reference in New Issue
Block a user