Documentation ¶
Index ¶
- Variables
- type Channel
- func (*Channel) Descriptor() ([]byte, []int)
- func (m *Channel) Marshal() (dAtA []byte, err error)
- func (m *Channel) MarshalTo(dAtA []byte) (int, error)
- func (m *Channel) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Channel) ProtoMessage()
- func (m *Channel) Reset()
- func (m *Channel) Size() (n int)
- func (m *Channel) String() string
- func (m *Channel) Unmarshal(dAtA []byte) error
- func (m *Channel) XXX_DiscardUnknown()
- func (m *Channel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Channel) XXX_Merge(src proto.Message)
- func (m *Channel) XXX_Size() int
- func (m *Channel) XXX_Unmarshal(b []byte) error
- type Channel_Counterparty
- func (*Channel_Counterparty) Descriptor() ([]byte, []int)
- func (m *Channel_Counterparty) Marshal() (dAtA []byte, err error)
- func (m *Channel_Counterparty) MarshalTo(dAtA []byte) (int, error)
- func (m *Channel_Counterparty) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Channel_Counterparty) ProtoMessage()
- func (m *Channel_Counterparty) Reset()
- func (m *Channel_Counterparty) Size() (n int)
- func (m *Channel_Counterparty) String() string
- func (m *Channel_Counterparty) Unmarshal(dAtA []byte) error
- func (m *Channel_Counterparty) XXX_DiscardUnknown()
- func (m *Channel_Counterparty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Channel_Counterparty) XXX_Merge(src proto.Message)
- func (m *Channel_Counterparty) XXX_Size() int
- func (m *Channel_Counterparty) XXX_Unmarshal(b []byte) error
- type Channel_Order
- type Channel_State
- type ErrorReceipt
- func (*ErrorReceipt) Descriptor() ([]byte, []int)
- func (m *ErrorReceipt) Marshal() (dAtA []byte, err error)
- func (m *ErrorReceipt) MarshalTo(dAtA []byte) (int, error)
- func (m *ErrorReceipt) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ErrorReceipt) ProtoMessage()
- func (m *ErrorReceipt) Reset()
- func (m *ErrorReceipt) Size() (n int)
- func (m *ErrorReceipt) String() string
- func (m *ErrorReceipt) Unmarshal(dAtA []byte) error
- func (m *ErrorReceipt) XXX_DiscardUnknown()
- func (m *ErrorReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ErrorReceipt) XXX_Merge(src proto.Message)
- func (m *ErrorReceipt) XXX_Size() int
- func (m *ErrorReceipt) XXX_Unmarshal(b []byte) error
- type Timeout
- func (*Timeout) Descriptor() ([]byte, []int)
- func (m *Timeout) GetHeight() client.Height
- func (m *Timeout) GetTimestamp() uint64
- func (m *Timeout) Marshal() (dAtA []byte, err error)
- func (m *Timeout) MarshalTo(dAtA []byte) (int, error)
- func (m *Timeout) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Timeout) ProtoMessage()
- func (m *Timeout) Reset()
- func (m *Timeout) Size() (n int)
- func (m *Timeout) String() string
- func (m *Timeout) Unmarshal(dAtA []byte) error
- func (m *Timeout) XXX_DiscardUnknown()
- func (m *Timeout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Timeout) XXX_Merge(src proto.Message)
- func (m *Timeout) XXX_Size() int
- func (m *Timeout) XXX_Unmarshal(b []byte) error
- type Upgrade
- func (*Upgrade) Descriptor() ([]byte, []int)
- func (m *Upgrade) Marshal() (dAtA []byte, err error)
- func (m *Upgrade) MarshalTo(dAtA []byte) (int, error)
- func (m *Upgrade) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Upgrade) ProtoMessage()
- func (m *Upgrade) Reset()
- func (m *Upgrade) Size() (n int)
- func (m *Upgrade) String() string
- func (m *Upgrade) Unmarshal(dAtA []byte) error
- func (m *Upgrade) XXX_DiscardUnknown()
- func (m *Upgrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Upgrade) XXX_Merge(src proto.Message)
- func (m *Upgrade) XXX_Size() int
- func (m *Upgrade) XXX_Unmarshal(b []byte) error
- type UpgradeFields
- func (*UpgradeFields) Descriptor() ([]byte, []int)
- func (m *UpgradeFields) Marshal() (dAtA []byte, err error)
- func (m *UpgradeFields) MarshalTo(dAtA []byte) (int, error)
- func (m *UpgradeFields) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UpgradeFields) ProtoMessage()
- func (m *UpgradeFields) Reset()
- func (m *UpgradeFields) Size() (n int)
- func (m *UpgradeFields) String() string
- func (m *UpgradeFields) Unmarshal(dAtA []byte) error
- func (m *UpgradeFields) XXX_DiscardUnknown()
- func (m *UpgradeFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpgradeFields) XXX_Merge(src proto.Message)
- func (m *UpgradeFields) XXX_Size() int
- func (m *UpgradeFields) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthChannel = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowChannel = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupChannel = fmt.Errorf("proto: unexpected end of group") )
var Channel_Order_name = map[int32]string{
0: "ORDER_NONE_UNSPECIFIED",
1: "ORDER_UNORDERED",
2: "ORDER_ORDERED",
}
var Channel_Order_value = map[string]int32{
"ORDER_NONE_UNSPECIFIED": 0,
"ORDER_UNORDERED": 1,
"ORDER_ORDERED": 2,
}
var Channel_State_name = map[int32]string{
0: "STATE_UNINITIALIZED_UNSPECIFIED",
1: "STATE_INIT",
2: "STATE_TRYOPEN",
3: "STATE_OPEN",
4: "STATE_CLOSED",
5: "STATE_FLUSHING",
6: "STATE_FLUSHCOMPLETE",
}
var Channel_State_value = map[string]int32{
"STATE_UNINITIALIZED_UNSPECIFIED": 0,
"STATE_INIT": 1,
"STATE_TRYOPEN": 2,
"STATE_OPEN": 3,
"STATE_CLOSED": 4,
"STATE_FLUSHING": 5,
"STATE_FLUSHCOMPLETE": 6,
}
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { // current state of the channel end State Channel_State `protobuf:"varint,1,opt,name=state,proto3,enum=Channel_State" json:"state,omitempty"` // whether the channel is ordered or unordered Ordering Channel_Order `protobuf:"varint,2,opt,name=ordering,proto3,enum=Channel_Order" json:"ordering,omitempty"` // counterparty channel end Counterparty Channel_Counterparty `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"` // list of connection identifiers, in order, along which packets sent on // this channel will travel ConnectionHops []string `` /* 126-byte string literal not displayed */ // opaque channel version, which is agreed upon during the handshake Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` // upgrade sequence indicates the latest upgrade attempt performed by this channel // the value of 0 indicates the channel has never been upgraded UpgradeSequence uint64 `protobuf:"varint,6,opt,name=upgrade_sequence,json=upgradeSequence,proto3" json:"upgrade_sequence,omitempty"` }
Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets.
func (*Channel) Descriptor ¶
func (*Channel) MarshalToSizedBuffer ¶
func (*Channel) ProtoMessage ¶
func (*Channel) ProtoMessage()
func (*Channel) XXX_DiscardUnknown ¶
func (m *Channel) XXX_DiscardUnknown()
func (*Channel) XXX_Marshal ¶
func (*Channel) XXX_Unmarshal ¶
type Channel_Counterparty ¶
type Channel_Counterparty struct { // port on the counterparty chain which owns the other end of the channel. PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` // channel end on the counterparty chain ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` }
Counterparty defines a channel end counterparty
func (*Channel_Counterparty) Descriptor ¶
func (*Channel_Counterparty) Descriptor() ([]byte, []int)
func (*Channel_Counterparty) Marshal ¶
func (m *Channel_Counterparty) Marshal() (dAtA []byte, err error)
func (*Channel_Counterparty) MarshalTo ¶
func (m *Channel_Counterparty) MarshalTo(dAtA []byte) (int, error)
func (*Channel_Counterparty) MarshalToSizedBuffer ¶
func (m *Channel_Counterparty) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Channel_Counterparty) ProtoMessage ¶
func (*Channel_Counterparty) ProtoMessage()
func (*Channel_Counterparty) Reset ¶
func (m *Channel_Counterparty) Reset()
func (*Channel_Counterparty) Size ¶
func (m *Channel_Counterparty) Size() (n int)
func (*Channel_Counterparty) String ¶
func (m *Channel_Counterparty) String() string
func (*Channel_Counterparty) Unmarshal ¶
func (m *Channel_Counterparty) Unmarshal(dAtA []byte) error
func (*Channel_Counterparty) XXX_DiscardUnknown ¶
func (m *Channel_Counterparty) XXX_DiscardUnknown()
func (*Channel_Counterparty) XXX_Marshal ¶
func (m *Channel_Counterparty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Channel_Counterparty) XXX_Merge ¶
func (m *Channel_Counterparty) XXX_Merge(src proto.Message)
func (*Channel_Counterparty) XXX_Size ¶
func (m *Channel_Counterparty) XXX_Size() int
func (*Channel_Counterparty) XXX_Unmarshal ¶
func (m *Channel_Counterparty) XXX_Unmarshal(b []byte) error
type Channel_Order ¶
type Channel_Order int32
Order defines if a channel is ORDERED or UNORDERED
const ( // zero-value for channel ordering NONE Channel_Order = 0 // packets can be delivered in any order, which may differ from the order in // which they were sent. UNORDERED Channel_Order = 1 // packets are delivered exactly in the order which they were sent ORDERED Channel_Order = 2 )
func (Channel_Order) EnumDescriptor ¶
func (Channel_Order) EnumDescriptor() ([]byte, []int)
func (Channel_Order) String ¶
func (x Channel_Order) String() string
type Channel_State ¶
type Channel_State int32
State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN, FLUSHING, FLUSHCOMPLETE or UNINITIALIZED.
const ( // Default State UNINITIALIZED Channel_State = 0 // A channel has just started the opening handshake. INIT Channel_State = 1 // A channel has acknowledged the handshake step on the counterparty chain. TRYOPEN Channel_State = 2 // A channel has completed the handshake. Open channels are // ready to send and receive packets. OPEN Channel_State = 3 // A channel has been closed and can no longer be used to send or receive // packets. CLOSED Channel_State = 4 // A channel has just accepted the upgrade handshake attempt and is flushing in-flight packets. FLUSHING Channel_State = 5 // A channel has just completed flushing any in-flight packets. FLUSHCOMPLETE Channel_State = 6 )
func (Channel_State) EnumDescriptor ¶
func (Channel_State) EnumDescriptor() ([]byte, []int)
func (Channel_State) String ¶
func (x Channel_State) String() string
type ErrorReceipt ¶ added in v0.3.29
type ErrorReceipt struct { // the channel upgrade sequence Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` // the error message detailing the cause of failure Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` }
ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the next sequence.
func (*ErrorReceipt) Descriptor ¶ added in v0.3.29
func (*ErrorReceipt) Descriptor() ([]byte, []int)
func (*ErrorReceipt) Marshal ¶ added in v0.3.29
func (m *ErrorReceipt) Marshal() (dAtA []byte, err error)
func (*ErrorReceipt) MarshalTo ¶ added in v0.3.29
func (m *ErrorReceipt) MarshalTo(dAtA []byte) (int, error)
func (*ErrorReceipt) MarshalToSizedBuffer ¶ added in v0.3.29
func (m *ErrorReceipt) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ErrorReceipt) ProtoMessage ¶ added in v0.3.29
func (*ErrorReceipt) ProtoMessage()
func (*ErrorReceipt) Reset ¶ added in v0.3.29
func (m *ErrorReceipt) Reset()
func (*ErrorReceipt) Size ¶ added in v0.3.29
func (m *ErrorReceipt) Size() (n int)
func (*ErrorReceipt) String ¶ added in v0.3.29
func (m *ErrorReceipt) String() string
func (*ErrorReceipt) Unmarshal ¶ added in v0.3.29
func (m *ErrorReceipt) Unmarshal(dAtA []byte) error
func (*ErrorReceipt) XXX_DiscardUnknown ¶ added in v0.3.29
func (m *ErrorReceipt) XXX_DiscardUnknown()
func (*ErrorReceipt) XXX_Marshal ¶ added in v0.3.29
func (m *ErrorReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ErrorReceipt) XXX_Merge ¶ added in v0.3.29
func (m *ErrorReceipt) XXX_Merge(src proto.Message)
func (*ErrorReceipt) XXX_Size ¶ added in v0.3.29
func (m *ErrorReceipt) XXX_Size() int
func (*ErrorReceipt) XXX_Unmarshal ¶ added in v0.3.29
func (m *ErrorReceipt) XXX_Unmarshal(b []byte) error
type Timeout ¶ added in v0.3.29
type Timeout struct { // block height after which the packet or upgrade times out Height client.Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height"` // block timestamp (in nanoseconds) after which the packet or upgrade times out Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` }
Timeout defines an execution deadline structure for 04-channel handlers. This includes packet lifecycle handlers as well as the upgrade handshake handlers. A valid Timeout contains either one or both of a timestamp and block height (sequence).
func (*Timeout) Descriptor ¶ added in v0.3.29
func (*Timeout) GetTimestamp ¶ added in v0.3.29
func (*Timeout) MarshalToSizedBuffer ¶ added in v0.3.29
func (*Timeout) ProtoMessage ¶ added in v0.3.29
func (*Timeout) ProtoMessage()
func (*Timeout) XXX_DiscardUnknown ¶ added in v0.3.29
func (m *Timeout) XXX_DiscardUnknown()
func (*Timeout) XXX_Marshal ¶ added in v0.3.29
func (*Timeout) XXX_Unmarshal ¶ added in v0.3.29
type Upgrade ¶ added in v0.3.29
type Upgrade struct { Fields UpgradeFields `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields"` Timeout Timeout `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout"` NextSequenceSend uint64 `protobuf:"varint,3,opt,name=next_sequence_send,json=nextSequenceSend,proto3" json:"next_sequence_send,omitempty"` }
Upgrade is a verifiable type which contains the relevant information for an attempted upgrade. It provides the proposed changes to the channel end, the timeout for this upgrade attempt and the next packet sequence which allows the counterparty to efficiently know the highest sequence it has received. The next sequence send is used for pruning and upgrading from unordered to ordered channels.
func (*Upgrade) Descriptor ¶ added in v0.3.29
func (*Upgrade) MarshalToSizedBuffer ¶ added in v0.3.29
func (*Upgrade) ProtoMessage ¶ added in v0.3.29
func (*Upgrade) ProtoMessage()
func (*Upgrade) XXX_DiscardUnknown ¶ added in v0.3.29
func (m *Upgrade) XXX_DiscardUnknown()
func (*Upgrade) XXX_Marshal ¶ added in v0.3.29
func (*Upgrade) XXX_Unmarshal ¶ added in v0.3.29
type UpgradeFields ¶ added in v0.3.29
type UpgradeFields struct { Ordering Channel_Order `protobuf:"varint,1,opt,name=ordering,proto3,enum=Channel_Order" json:"ordering,omitempty"` ConnectionHops []string `protobuf:"bytes,2,rep,name=connection_hops,json=connectionHops,proto3" json:"connection_hops,omitempty"` Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` }
UpgradeFields are the fields in a channel end which may be changed during a channel upgrade.
func (*UpgradeFields) Descriptor ¶ added in v0.3.29
func (*UpgradeFields) Descriptor() ([]byte, []int)
func (*UpgradeFields) Marshal ¶ added in v0.3.29
func (m *UpgradeFields) Marshal() (dAtA []byte, err error)
func (*UpgradeFields) MarshalTo ¶ added in v0.3.29
func (m *UpgradeFields) MarshalTo(dAtA []byte) (int, error)
func (*UpgradeFields) MarshalToSizedBuffer ¶ added in v0.3.29
func (m *UpgradeFields) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*UpgradeFields) ProtoMessage ¶ added in v0.3.29
func (*UpgradeFields) ProtoMessage()
func (*UpgradeFields) Reset ¶ added in v0.3.29
func (m *UpgradeFields) Reset()
func (*UpgradeFields) Size ¶ added in v0.3.29
func (m *UpgradeFields) Size() (n int)
func (*UpgradeFields) String ¶ added in v0.3.29
func (m *UpgradeFields) String() string
func (*UpgradeFields) Unmarshal ¶ added in v0.3.29
func (m *UpgradeFields) Unmarshal(dAtA []byte) error
func (*UpgradeFields) XXX_DiscardUnknown ¶ added in v0.3.29
func (m *UpgradeFields) XXX_DiscardUnknown()
func (*UpgradeFields) XXX_Marshal ¶ added in v0.3.29
func (m *UpgradeFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpgradeFields) XXX_Merge ¶ added in v0.3.29
func (m *UpgradeFields) XXX_Merge(src proto.Message)
func (*UpgradeFields) XXX_Size ¶ added in v0.3.29
func (m *UpgradeFields) XXX_Size() int
func (*UpgradeFields) XXX_Unmarshal ¶ added in v0.3.29
func (m *UpgradeFields) XXX_Unmarshal(b []byte) error