Documentation
¶
Index ¶
- Constants
- Variables
- func BuildTrie(rootHash []byte, db db.Database) (t *inmemory.InMemoryTrie, err error)
- func DecodeOptionUpgradeGoAhead(buffer *bytes.Buffer) (sc.Option[sc.U8], error)
- func DecodeOptionUpgradeRestrictionSignal(buffer *bytes.Buffer) (sc.Option[sc.U8], error)
- func DecodeOutboundHrmpMessages(buffer *bytes.Buffer) (sc.Sequence[OutboundHrmpMessage], error)
- func DecodeUpgradeGoAhead(buffer *bytes.Buffer) (sc.U8, error)
- func DecodeUpgradeRestrictionSignal(buffer *bytes.Buffer) (sc.U8, error)
- func DecodeUpwardMessages(buffer *bytes.Buffer) (sc.Sequence[UpwardMessage], error)
- func NewDigestRelayParentStorageRoot(storageRoot primitives.H256, number RelayChainBlockNumber) primitives.DigestItem
- type AbridgedHRMPChannel
- type AbridgedHostConfiguration
- type Ancestor
- type AsyncBackingParams
- type BlockData
- type Channel
- type CollationInfo
- type DownwardMessage
- type HeadData
- type HorizontalMessages
- type HrmpChannelUpdate
- type HrmpOutboundLimits
- type InboundDownwardMessage
- type InboundHrmpMessage
- type InherentData
- type MessageQueueChain
- type MessagingStateSnapshot
- type OutboundBandwidthLimits
- type OutboundHrmpMessage
- type PersistedValidationData
- type ReadEntryError
- type RelayChainBlockNumber
- type RelayChainStateProof
- type RelayDispatchQueueRemainingCapacity
- type SegmentTracker
- type StateProofError
- func NewErrorStateProofConfig(entryError ReadEntryError) StateProofError
- func NewErrorStateProofDmqMqcHead(entryError ReadEntryError) StateProofError
- func NewErrorStateProofHrmpChannel(from sc.U32, to sc.U32, entryError ReadEntryError) StateProofError
- func NewErrorStateProofHrmpEgressChannelIndex(entryError ReadEntryError) StateProofError
- func NewErrorStateProofHrmpIngressChannelIndex(entryError ReadEntryError) StateProofError
- func NewErrorStateProofParaHead(entryError ReadEntryError) StateProofError
- func NewErrorStateProofReadEntry() StateProofError
- func NewErrorStateProofRelayDispatchQueueRemainingCapacity(entryError ReadEntryError) StateProofError
- func NewErrorStateProofRootMismatch() StateProofError
- func NewErrorStateProofSlot(entryError ReadEntryError) StateProofError
- func NewErrorStateProofUpgradeGoAhead(entryError ReadEntryError) StateProofError
- func NewErrorStateProofUpgradeRestriction(entryError ReadEntryError) StateProofError
- type StorageProof
- type UnincludedSegment
- type UnincludedSegmentCapacity
- type UpwardMessage
- type UsedBandwidth
- type ValidationParams
- type ValidationResult
Constants ¶
View Source
const ( ErrorStateProofRootMismatch sc.U8 = iota ErrorStateProofReadEntry ErrorStateProofSlot ErrorStateProofUpgradeGoAhead ErrorStateProofUpgradeRestriction ErrorStateProofConfig ErrorStateProofDmqMqcHead ErrorStateProofRelayDispatchQueueRemainingCapacity ErrorStateProofHrmpIngressChannelIndex ErrorStateProofHrmpEgressChannelIndex ErrorStateProofHrmpChannel ErrorStateProofParaHead )
View Source
const ( UnincludedSegmentCapacityInnerExpectParentIncluded sc.U8 = iota UnincludedSegmentCapacityInnerValue )
View Source
const ( UpgradeGoAheadAbort sc.U8 = iota UpgradeGoAheadGoAhead )
View Source
const (
UpgradeRestrictionSignalPresent sc.U8 = iota
)
Variables ¶
View Source
var (
ConsensusTypeId = [4]byte{'R', 'S', 'P', 'R'}
)
Functions ¶
func DecodeUpwardMessages ¶
func NewDigestRelayParentStorageRoot ¶
func NewDigestRelayParentStorageRoot(storageRoot primitives.H256, number RelayChainBlockNumber) primitives.DigestItem
Types ¶
type AbridgedHRMPChannel ¶
type AbridgedHRMPChannel struct { MaxCapacity sc.U32 MaxTotalSize sc.U32 MaxMessageSize sc.U32 MsgCount sc.U32 TotalSize sc.U32 MqcHead sc.Option[types.H256] }
func DecodeAbridgedHRMPChannel ¶
func DecodeAbridgedHRMPChannel(buffer *bytes.Buffer) (AbridgedHRMPChannel, error)
func (AbridgedHRMPChannel) Bytes ¶
func (ahc AbridgedHRMPChannel) Bytes() []byte
type AbridgedHostConfiguration ¶
type AbridgedHostConfiguration struct { MaxCodeSize sc.U32 MaxHeadDataSize sc.U32 MaxUpwardQueueCount sc.U32 MaxUpwardQueueSize sc.U32 MaxUpwardMessageSize sc.U32 MaxUpwardMessageNumPerCandidate sc.U32 MaxHrmpMessageNumPerCandidate sc.U32 ValidationUpgradeCooldown sc.U32 ValidationUpgradeDelay sc.U32 AsyncBackingParams AsyncBackingParams }
func DecodeAbridgeHostConfiguration ¶
func DecodeAbridgeHostConfiguration(buffer *bytes.Buffer) (AbridgedHostConfiguration, error)
func (AbridgedHostConfiguration) Bytes ¶
func (ahc AbridgedHostConfiguration) Bytes() []byte
type Ancestor ¶
type Ancestor struct { UsedBandwidth UsedBandwidth ParaHeadHash sc.Option[types.H256] ConsumedGoAheadSignal sc.Option[sc.U8] }
Ancestor of the block being currently executed, not yet included into the relay chain.
type AsyncBackingParams ¶
func DecodeAsyncBackingParams ¶
func DecodeAsyncBackingParams(buffer *bytes.Buffer) (AsyncBackingParams, error)
func (AsyncBackingParams) Bytes ¶
func (abp AsyncBackingParams) Bytes() []byte
type BlockData ¶
type BlockData struct { Block types.Block CompactProof StorageProof }
type Channel ¶
type Channel struct { ParachainId sc.U32 AbridgedHRMPChannel AbridgedHRMPChannel }
type CollationInfo ¶
type CollationInfo struct { UpwardMessages sc.Sequence[UpwardMessage] HorizontalMessages sc.Sequence[OutboundHrmpMessage] ValidationCode sc.Option[sc.Sequence[sc.U8]] ProcessedDownwardMessages sc.U32 HrmpWatermark RelayChainBlockNumber HeadData HeadData }
func DecodeCollationInfo ¶
func DecodeCollationInfo(buffer *bytes.Buffer) (CollationInfo, error)
func (CollationInfo) Bytes ¶
func (ci CollationInfo) Bytes() []byte
type HorizontalMessages ¶
type HorizontalMessages struct {
// contains filtered or unexported fields
}
func DecodeHorizontalMessages ¶
func DecodeHorizontalMessages(buffer *bytes.Buffer) (HorizontalMessages, error)
func (HorizontalMessages) Bytes ¶
func (hm HorizontalMessages) Bytes() []byte
func (HorizontalMessages) UnprocessedMessages ¶
func (hm HorizontalMessages) UnprocessedMessages(number RelayChainBlockNumber) HorizontalMessages
type HrmpChannelUpdate ¶
func DecodeHrmpChannelUpdate ¶
func DecodeHrmpChannelUpdate(buffer *bytes.Buffer) (HrmpChannelUpdate, error)
func (HrmpChannelUpdate) Bytes ¶
func (hcu HrmpChannelUpdate) Bytes() []byte
func (HrmpChannelUpdate) IsEmpty ¶
func (hcu HrmpChannelUpdate) IsEmpty() bool
func (*HrmpChannelUpdate) Subtract ¶
func (hcu *HrmpChannelUpdate) Subtract(other HrmpChannelUpdate)
type HrmpOutboundLimits ¶
func DecodeHrmpOutboundLimits ¶
func DecodeHrmpOutboundLimits(buffer *bytes.Buffer) (HrmpOutboundLimits, error)
func (HrmpOutboundLimits) Bytes ¶
func (hol HrmpOutboundLimits) Bytes() []byte
type InboundDownwardMessage ¶
type InboundDownwardMessage struct { SentAt RelayChainBlockNumber Msg DownwardMessage }
func DecodeInboundDownwardMessage ¶
func DecodeInboundDownwardMessage(buffer *bytes.Buffer) (InboundDownwardMessage, error)
func (InboundDownwardMessage) Bytes ¶
func (idm InboundDownwardMessage) Bytes() []byte
type InboundHrmpMessage ¶
type InboundHrmpMessage struct { SentAt RelayChainBlockNumber Data sc.Sequence[sc.U8] }
func (InboundHrmpMessage) Bytes ¶
func (ihm InboundHrmpMessage) Bytes() []byte
type InherentData ¶
type InherentData struct { ValidationData PersistedValidationData RelayChainState StorageProof DownwardMessages sc.Sequence[InboundDownwardMessage] HorizontalMessages HorizontalMessages }
func DecodeInherentData ¶
func DecodeInherentData(buffer *bytes.Buffer) (InherentData, error)
func (InherentData) Bytes ¶
func (id InherentData) Bytes() []byte
type MessageQueueChain ¶
func DecodeMessageQueueChain ¶
func DecodeMessageQueueChain(buffer *bytes.Buffer) (MessageQueueChain, error)
func (MessageQueueChain) Bytes ¶
func (mqc MessageQueueChain) Bytes() []byte
func (*MessageQueueChain) ExtendDownward ¶
func (mqc *MessageQueueChain) ExtendDownward(downwardMessage InboundDownwardMessage, hashing io.Hashing) error
type MessagingStateSnapshot ¶
type MessagingStateSnapshot struct { DmqMqcHead types.H256 RelayDispatchQueueRemainingCapacity RelayDispatchQueueRemainingCapacity IngressChannels sc.Sequence[Channel] EgressChannels sc.Sequence[Channel] }
func DecodeMessagingStateSnapshot ¶
func DecodeMessagingStateSnapshot(buffer *bytes.Buffer) (MessagingStateSnapshot, error)
func (MessagingStateSnapshot) Bytes ¶
func (mss MessagingStateSnapshot) Bytes() []byte
type OutboundBandwidthLimits ¶
type OutboundBandwidthLimits struct { UmpMessagesRemaining sc.U32 UmpBytesRemaining sc.U32 HrmpOutgoing sc.Dictionary[sc.U32, HrmpOutboundLimits] }
func NewOutboundBandwidthLimitsFromMessagingStateSnapshot ¶
func NewOutboundBandwidthLimitsFromMessagingStateSnapshot(mss MessagingStateSnapshot) OutboundBandwidthLimits
func (OutboundBandwidthLimits) Bytes ¶
func (obl OutboundBandwidthLimits) Bytes() []byte
type OutboundHrmpMessage ¶
func DecodeOutboundHrmpMessage ¶
func DecodeOutboundHrmpMessage(buffer *bytes.Buffer) (OutboundHrmpMessage, error)
func (OutboundHrmpMessage) Bytes ¶
func (ohm OutboundHrmpMessage) Bytes() []byte
type PersistedValidationData ¶
type PersistedValidationData struct { ParentHead HeadData RelayParentNumber RelayChainBlockNumber RelayParentStorageRoot types.H256 MaxPovSize sc.U32 }
func DecodePersistedValidationData ¶
func DecodePersistedValidationData(buffer *bytes.Buffer) (PersistedValidationData, error)
func (PersistedValidationData) Bytes ¶
func (pvd PersistedValidationData) Bytes() []byte
type ReadEntryError ¶
const ( ReadEntryErrorProof ReadEntryError = iota ReadEntryErrorDecode ReadEntryErrorAbsent )
type RelayChainBlockNumber ¶
type RelayChainStateProof ¶
type RelayChainStateProof interface { ReadSlot() (sc.U64, error) ReadUpgradeGoAheadSignal() (sc.Option[sc.U8], error) ReadRestrictionSignal() (sc.Option[sc.U8], error) ReadAbridgedHostConfiguration() (AbridgedHostConfiguration, error) ReadIncludedParaHeadHash() sc.Option[sc.FixedSequence[sc.U8]] ReadMessagingStateSnapshot(ahc AbridgedHostConfiguration) (MessagingStateSnapshot, error) }
func NewRelayChainStateProof ¶
func NewRelayChainStateProof(parachainId sc.U32, relayChainHash primitives.H256, proof StorageProof, hashing io.Hashing) (RelayChainStateProof, error)
type RelayDispatchQueueRemainingCapacity ¶
func DecodeRelayDispatchQueueRemainingCapacity ¶
func DecodeRelayDispatchQueueRemainingCapacity(buffer *bytes.Buffer) (RelayDispatchQueueRemainingCapacity, error)
func (RelayDispatchQueueRemainingCapacity) Bytes ¶
func (rdqrc RelayDispatchQueueRemainingCapacity) Bytes() []byte
type SegmentTracker ¶
type SegmentTracker struct { UsedBandwidth UsedBandwidth HrmpWatermark sc.Option[RelayChainBlockNumber] ConsumedGoAheadSignal sc.Option[sc.U8] }
func DecodeSegmentTracker ¶
func DecodeSegmentTracker(buffer *bytes.Buffer) (SegmentTracker, error)
func (SegmentTracker) Bytes ¶
func (st SegmentTracker) Bytes() []byte
func (*SegmentTracker) Subtract ¶
func (st *SegmentTracker) Subtract(block *Ancestor) error
Subtract removes previously added block from the tracker.
type StateProofError ¶
type StateProofError struct {
sc.VaryingData
}
func NewErrorStateProofConfig ¶
func NewErrorStateProofConfig(entryError ReadEntryError) StateProofError
func NewErrorStateProofDmqMqcHead ¶
func NewErrorStateProofDmqMqcHead(entryError ReadEntryError) StateProofError
func NewErrorStateProofHrmpChannel ¶
func NewErrorStateProofHrmpChannel(from sc.U32, to sc.U32, entryError ReadEntryError) StateProofError
func NewErrorStateProofHrmpEgressChannelIndex ¶
func NewErrorStateProofHrmpEgressChannelIndex(entryError ReadEntryError) StateProofError
func NewErrorStateProofHrmpIngressChannelIndex ¶
func NewErrorStateProofHrmpIngressChannelIndex(entryError ReadEntryError) StateProofError
func NewErrorStateProofParaHead ¶
func NewErrorStateProofParaHead(entryError ReadEntryError) StateProofError
func NewErrorStateProofReadEntry ¶
func NewErrorStateProofReadEntry() StateProofError
func NewErrorStateProofRelayDispatchQueueRemainingCapacity ¶
func NewErrorStateProofRelayDispatchQueueRemainingCapacity(entryError ReadEntryError) StateProofError
func NewErrorStateProofRootMismatch ¶
func NewErrorStateProofRootMismatch() StateProofError
func NewErrorStateProofSlot ¶
func NewErrorStateProofSlot(entryError ReadEntryError) StateProofError
func NewErrorStateProofUpgradeGoAhead ¶
func NewErrorStateProofUpgradeGoAhead(entryError ReadEntryError) StateProofError
func NewErrorStateProofUpgradeRestriction ¶
func NewErrorStateProofUpgradeRestriction(entryError ReadEntryError) StateProofError
func (StateProofError) Error ¶
func (err StateProofError) Error() string
type StorageProof ¶
func DecodeStorageProof ¶
func DecodeStorageProof(buffer *bytes.Buffer) (StorageProof, error)
func (StorageProof) Bytes ¶
func (sp StorageProof) Bytes() []byte
func (StorageProof) ToBytes ¶
func (sp StorageProof) ToBytes() [][]byte
type UnincludedSegment ¶
func DecodeUnincludedSegment ¶
func DecodeUnincludedSegment(buffer *bytes.Buffer) (UnincludedSegment, error)
func (UnincludedSegment) Bytes ¶
func (us UnincludedSegment) Bytes() []byte
type UnincludedSegmentCapacity ¶
type UnincludedSegmentCapacity struct {
sc.VaryingData
}
func NewUnincludedSegmentCapacityInnerExpectParentIncluded ¶
func NewUnincludedSegmentCapacityInnerExpectParentIncluded() UnincludedSegmentCapacity
func NewUnincludedSegmentCapacityValue ¶
func NewUnincludedSegmentCapacityValue(value sc.U32) UnincludedSegmentCapacity
func (UnincludedSegmentCapacity) Get ¶
func (usc UnincludedSegmentCapacity) Get() sc.U32
func (UnincludedSegmentCapacity) IsExpectingIncludedParent ¶
func (usc UnincludedSegmentCapacity) IsExpectingIncludedParent() bool
type UsedBandwidth ¶
type UsedBandwidth struct { UmpMsgCount sc.U32 UmpTotalBytes sc.U32 HrmpOutgoing sc.Dictionary[sc.U32, HrmpChannelUpdate] }
func DecodeUsedBandwidth ¶
func DecodeUsedBandwidth(buffer *bytes.Buffer) (UsedBandwidth, error)
func (UsedBandwidth) Bytes ¶
func (ub UsedBandwidth) Bytes() []byte
func (*UsedBandwidth) Subtract ¶
func (ub *UsedBandwidth) Subtract(other *UsedBandwidth) error
type ValidationParams ¶
type ValidationParams struct { ParentHead sc.Sequence[sc.U8] BlockData sc.Sequence[sc.U8] RelayParentBlockNumber RelayChainBlockNumber RelayParentStorageRoot primitives.H256 }
func DecodeValidationParams ¶
func DecodeValidationParams(buffer *bytes.Buffer) (ValidationParams, error)
func (ValidationParams) Bytes ¶
func (vp ValidationParams) Bytes() []byte
type ValidationResult ¶
type ValidationResult struct { HeadData sc.Sequence[sc.U8] NewValidationCode sc.Option[sc.Sequence[sc.U8]] UpwardMessages sc.Sequence[UpwardMessage] // Convert to bounded vec (aka to have max limit, max 16 * 1024) HorizontalMessages sc.Sequence[OutboundHrmpMessage] // Convert to bounded vec (aka to have max limit, max 16 * 1024) ProcessedDownwardMessages sc.U32 HrmpWatermark RelayChainBlockNumber }
func DecodeValidationResult ¶
func DecodeValidationResult(buffer *bytes.Buffer) (ValidationResult, error)
func (ValidationResult) Bytes ¶
func (vr ValidationResult) Bytes() []byte
Source Files
¶
- abridged_host_configuration.go
- abridged_hrmp_channel.go
- ancestor.go
- async_backing_params.go
- block.go
- channel.go
- collation_info.go
- digest.go
- horizontal_messages.go
- hrmp_channel_update.go
- hrmp_outbound_limits.go
- inbound_downward_message.go
- inbound_hrmp_message.go
- inherent_data.go
- message_queue_chain.go
- messaging_state_snapshot.go
- outbound_bandwith_limits.go
- outbound_hrmp_message.go
- persisted_validation_data.go
- read_entry_error.go
- relay_chain_state_proof.go
- relay_dispatch_queue_remaining_capacity.go
- segment_tracker.go
- state_proof_error.go
- storage_proof.go
- types.go
- unincluded_segment.go
- unincluded_segment_capacity.go
- upgrade_go_ahead.go
- upgrade_restriction_signal.go
- upward_message.go
- user_bandwidth.go
- validation_params.go
- validation_result.go
Click to show internal directories.
Click to hide internal directories.