Documentation ¶
Index ¶
- Constants
- Variables
- type AuraModule
- type Config
- type ConsensusLog
- type GenesisConfig
- type Module
- func (m Module) BuildConfig(config []byte) error
- func (m Module) CreateDefaultConfig() ([]byte, error)
- func (m Module) DecodeKey(buffer *bytes.Buffer) (primitives.Sr25519PublicKey, error)
- func (m Module) FindAuthor(digests sc.Sequence[primitives.DigestPreRuntime]) (sc.Option[sc.U32], error)
- func (m Module) Functions() map[sc.U8]primitives.Call
- func (m Module) GetIndex() sc.U8
- func (m Module) KeyType() primitives.PublicKeyType
- func (m Module) KeyTypeId() [4]byte
- func (m Module) Metadata() primitives.MetadataModule
- func (m Module) OnBeforeSessionEnding()
- func (m Module) OnDisabled(validatorIndex sc.U32)
- func (m Module) OnGenesisSession(validators sc.Sequence[primitives.Validator]) error
- func (m Module) OnInitialize(_ sc.U64) (primitives.Weight, error)
- func (m Module) OnNewSession(isChanged bool, validators sc.Sequence[primitives.Validator], ...) error
- func (m Module) OnTimestampSet(now sc.U64) error
- func (m Module) PreDispatch(_ primitives.Call) (sc.Empty, error)
- func (m Module) SlotDuration() sc.U64
- func (m Module) StorageAuthorities() (sc.Sequence[primitives.Sr25519PublicKey], error)
- func (m Module) StorageAuthoritiesBytes() (sc.Option[sc.Sequence[sc.U8]], error)
- func (m Module) StorageCurrentSlot() (sc.U64, error)
- func (m Module) ValidateUnsigned(_ primitives.TransactionSource, _ primitives.Call) (primitives.ValidTransaction, error)
Constants ¶
View Source
const ( ConsensusLogAuthoritiesChange sc.I8 = iota ConsensusLogOnDisabled )
Variables ¶
View Source
var ( EngineId = [4]byte{'a', 'u', 'r', 'a'} KeyTypeId = [4]byte{'a', 'u', 'r', 'a'} )
Functions ¶
This section is empty.
Types ¶
type AuraModule ¶
type AuraModule interface { primitives.Module KeyType() primitives.PublicKeyType KeyTypeId() [4]byte OnTimestampSet(now sc.U64) error SlotDuration() sc.U64 FindAuthor(digests sc.Sequence[primitives.DigestPreRuntime]) (sc.Option[sc.U32], error) StorageAuthorities() (sc.Sequence[primitives.Sr25519PublicKey], error) StorageAuthoritiesBytes() (sc.Option[sc.Sequence[sc.U8]], error) StorageCurrentSlot() (sc.U64, error) }
type Config ¶
type Config struct { Storage io.Storage KeyType primitives.PublicKeyType DbWeight primitives.RuntimeDbWeight MinimumPeriod sc.U64 MaxAuthorities sc.U32 AllowMultipleBlocksPerSlot bool SystemDigest func() (primitives.Digest, error) LogDepositor system.LogDepositor DisabledValidators primitives.DisabledValidators }
func NewConfig ¶
func NewConfig(storage io.Storage, keyType primitives.PublicKeyType, dbWeight primitives.RuntimeDbWeight, minimumPeriod sc.U64, maxAuthorities sc.U32, allowMultipleBlocksPerSlot bool, systemDigest func() (primitives.Digest, error), logDepositor system.LogDepositor, disabledValidators primitives.DisabledValidators) *Config
type ConsensusLog ¶
type ConsensusLog struct {
sc.VaryingData
}
func NewConsensusLogAuthoritiesChange ¶
func NewConsensusLogAuthoritiesChange(authorities sc.Sequence[types.Sr25519PublicKey]) ConsensusLog
func NewConsensusLogOnDisabled ¶
func NewConsensusLogOnDisabled(authorityIndex sc.U32) ConsensusLog
type GenesisConfig ¶
type GenesisConfig struct {
Authorities sc.Sequence[types.Sr25519PublicKey]
}
func (*GenesisConfig) UnmarshalJSON ¶
func (gc *GenesisConfig) UnmarshalJSON(data []byte) error
type Module ¶
type Module struct { primitives.DefaultInherentProvider hooks.DefaultDispatchModule // contains filtered or unexported fields }
func New ¶
func New(index sc.U8, config *Config, mdGenerator *primitives.MetadataTypeGenerator, logger log.RuntimeLogger) Module
func (Module) BuildConfig ¶
func (Module) CreateDefaultConfig ¶
func (Module) DecodeKey ¶
func (m Module) DecodeKey(buffer *bytes.Buffer) (primitives.Sr25519PublicKey, error)
func (Module) FindAuthor ¶
func (m Module) FindAuthor(digests sc.Sequence[primitives.DigestPreRuntime]) (sc.Option[sc.U32], error)
FindAuthor finds the author from the pre-runtime digests.
func (Module) KeyType ¶
func (m Module) KeyType() primitives.PublicKeyType
func (Module) Metadata ¶
func (m Module) Metadata() primitives.MetadataModule
func (Module) OnBeforeSessionEnding ¶
func (m Module) OnBeforeSessionEnding()
func (Module) OnDisabled ¶
func (Module) OnGenesisSession ¶
func (Module) OnInitialize ¶
func (Module) OnNewSession ¶
func (Module) PreDispatch ¶
func (Module) SlotDuration ¶
func (Module) StorageAuthorities ¶
func (m Module) StorageAuthorities() (sc.Sequence[primitives.Sr25519PublicKey], error)
func (Module) StorageAuthoritiesBytes ¶
func (Module) ValidateUnsigned ¶
func (m Module) ValidateUnsigned(_ primitives.TransactionSource, _ primitives.Call) (primitives.ValidTransaction, error)
Click to show internal directories.
Click to hide internal directories.