v7

package
v7.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 21 Imported by: 4

Documentation

Index

Constants

View Source
const Localhost string = "09-localhost"

Localhost is the client type for a localhost client. It is also used as the clientID for the localhost client.

Variables

View Source
var (
	ErrInvalidLengthSolomachine        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSolomachine          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSolomachine = fmt.Errorf("proto: unexpected end of group")
)
View Source
var DataType_name = map[int32]string{
	0: "DATA_TYPE_UNINITIALIZED_UNSPECIFIED",
	1: "DATA_TYPE_CLIENT_STATE",
	2: "DATA_TYPE_CONSENSUS_STATE",
	3: "DATA_TYPE_CONNECTION_STATE",
	4: "DATA_TYPE_CHANNEL_STATE",
	5: "DATA_TYPE_PACKET_COMMITMENT",
	6: "DATA_TYPE_PACKET_ACKNOWLEDGEMENT",
	7: "DATA_TYPE_PACKET_RECEIPT_ABSENCE",
	8: "DATA_TYPE_NEXT_SEQUENCE_RECV",
	9: "DATA_TYPE_HEADER",
}
View Source
var DataType_value = map[string]int32{
	"DATA_TYPE_UNINITIALIZED_UNSPECIFIED": 0,
	"DATA_TYPE_CLIENT_STATE":              1,
	"DATA_TYPE_CONSENSUS_STATE":           2,
	"DATA_TYPE_CONNECTION_STATE":          3,
	"DATA_TYPE_CHANNEL_STATE":             4,
	"DATA_TYPE_PACKET_COMMITMENT":         5,
	"DATA_TYPE_PACKET_ACKNOWLEDGEMENT":    6,
	"DATA_TYPE_PACKET_RECEIPT_ABSENCE":    7,
	"DATA_TYPE_NEXT_SEQUENCE_RECV":        8,
	"DATA_TYPE_HEADER":                    9,
}

Functions

func MigrateGenesis

func MigrateGenesis(clientGenState *clienttypes.GenesisState, cdc codec.ProtoCodecMarshaler) (*clienttypes.GenesisState, error)

MigrateGenesis accepts an exported IBC client genesis file and migrates it to:

- Update solo machine client state protobuf definition (v2 to v3) - Remove all solo machine consensus states - Remove localhost client

func MigrateLocalhostClient added in v7.1.0

func MigrateLocalhostClient(ctx sdk.Context, clientKeeper ClientKeeper) error

MigrateLocalhostClient initialises the 09-localhost client state and sets it in state.

func MigrateStore

func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, clientKeeper ClientKeeper) error

MigrateStore performs in-place store migrations from ibc-go v6 to ibc-go v7. The migration includes:

- Migrating solo machine client states from v2 to v3 protobuf definition - Pruning all solo machine consensus states - Removing the localhost client - Asserting existing tendermint clients are properly registered on the chain codec

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the solomachine v2 ClientState and ConsensusState types in the interface registry.

Types

type ChannelStateData

type ChannelStateData struct {
	Path    []byte          `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Channel *types2.Channel `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"`
}

ChannelStateData returns the SignBytes data for channel state verification.

func (*ChannelStateData) Descriptor

func (*ChannelStateData) Descriptor() ([]byte, []int)

func (*ChannelStateData) Marshal

func (m *ChannelStateData) Marshal() (dAtA []byte, err error)

func (*ChannelStateData) MarshalTo

func (m *ChannelStateData) MarshalTo(dAtA []byte) (int, error)

func (*ChannelStateData) MarshalToSizedBuffer

func (m *ChannelStateData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ChannelStateData) ProtoMessage

func (*ChannelStateData) ProtoMessage()

func (*ChannelStateData) Reset

func (m *ChannelStateData) Reset()

func (*ChannelStateData) Size

func (m *ChannelStateData) Size() (n int)

func (*ChannelStateData) String

func (m *ChannelStateData) String() string

func (*ChannelStateData) Unmarshal

func (m *ChannelStateData) Unmarshal(dAtA []byte) error

func (*ChannelStateData) XXX_DiscardUnknown

func (m *ChannelStateData) XXX_DiscardUnknown()

func (*ChannelStateData) XXX_Marshal

func (m *ChannelStateData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChannelStateData) XXX_Merge

func (m *ChannelStateData) XXX_Merge(src proto.Message)

func (*ChannelStateData) XXX_Size

func (m *ChannelStateData) XXX_Size() int

func (*ChannelStateData) XXX_Unmarshal

func (m *ChannelStateData) XXX_Unmarshal(b []byte) error

type ClientKeeper

type ClientKeeper interface {
	GetClientState(ctx sdk.Context, clientID string) (exported.ClientState, bool)
	SetClientState(ctx sdk.Context, clientID string, clientState exported.ClientState)
	ClientStore(ctx sdk.Context, clientID string) sdk.KVStore
	CreateLocalhostClient(ctx sdk.Context) error
}

ClientKeeper expected IBC client keeper

type ClientState

type ClientState struct {
	// latest sequence of the client state
	Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// frozen sequence of the solo machine
	IsFrozen       bool            `protobuf:"varint,2,opt,name=is_frozen,json=isFrozen,proto3" json:"is_frozen,omitempty" yaml:"is_frozen"`
	ConsensusState *ConsensusState `` /* 126-byte string literal not displayed */
	// when set to true, will allow governance to update a solo machine client.
	// The client will be unfrozen if it is frozen.
	AllowUpdateAfterProposal bool `` /* 173-byte string literal not displayed */
}

ClientState defines a solo machine client that tracks the current consensus state and if the client is frozen.

func (ClientState) CheckForMisbehaviour

func (cs ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, msg exported.ClientMessage) bool

CheckForMisbehaviour panics!

func (*ClientState) CheckHeaderAndUpdateState

CheckHeaderAndUpdateState panics!

func (ClientState) CheckMisbehaviourAndUpdateState

func (cs ClientState) CheckMisbehaviourAndUpdateState(
	_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage,
) (exported.ClientState, error)

CheckMisbehaviourAndUpdateState panics!

func (ClientState) CheckSubstituteAndUpdateState

func (cs ClientState) CheckSubstituteAndUpdateState(
	ctx sdk.Context, _ codec.BinaryCodec, _, _ sdk.KVStore,
	_ exported.ClientState,
) error

CheckSubstituteAndUpdateState panics!

func (ClientState) ClientType

func (cs ClientState) ClientType() string

ClientType panics!

func (*ClientState) Descriptor

func (*ClientState) Descriptor() ([]byte, []int)

func (ClientState) ExportMetadata

func (cs ClientState) ExportMetadata(_ sdk.KVStore) []exported.GenesisMetadata

ExportMetadata panics!

func (ClientState) GetLatestHeight

func (cs ClientState) GetLatestHeight() exported.Height

GetLatestHeight panics!

func (ClientState) GetProofSpecs

func (cs ClientState) GetProofSpecs() []*ics23.ProofSpec

GetProofSpecs panics!

func (ClientState) GetTimestampAtHeight

func (cs ClientState) GetTimestampAtHeight(
	sdk.Context, sdk.KVStore, codec.BinaryCodec, exported.Height,
) (uint64, error)

GetTimestampAtHeight panics!

func (ClientState) Initialize

func (cs ClientState) Initialize(_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, consState exported.ConsensusState) error

Initialize panics!

func (*ClientState) Marshal

func (m *ClientState) Marshal() (dAtA []byte, err error)

func (*ClientState) MarshalTo

func (m *ClientState) MarshalTo(dAtA []byte) (int, error)

func (*ClientState) MarshalToSizedBuffer

func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClientState) ProtoMessage

func (*ClientState) ProtoMessage()

func (*ClientState) Reset

func (m *ClientState) Reset()

func (*ClientState) Size

func (m *ClientState) Size() (n int)

func (ClientState) Status

Status panics!

func (*ClientState) String

func (m *ClientState) String() string

func (*ClientState) Unmarshal

func (m *ClientState) Unmarshal(dAtA []byte) error

func (ClientState) UnpackInterfaces

func (cs ClientState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method

func (*ClientState) UpdateState

UpdateState panis!

func (*ClientState) UpdateStateOnMisbehaviour

func (cs *ClientState) UpdateStateOnMisbehaviour(
	_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage,
)

UpdateStateOnMisbehaviour panics!

func (ClientState) Validate

func (cs ClientState) Validate() error

Validate panics!

func (ClientState) VerifyChannelState

VerifyChannelState panics!

func (ClientState) VerifyClientConsensusState

VerifyClientConsensusState panics!

func (*ClientState) VerifyClientMessage

func (cs *ClientState) VerifyClientMessage(
	_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage,
) error

VerifyClientMessage panics!

func (ClientState) VerifyClientState

func (cs ClientState) VerifyClientState(
	store sdk.KVStore, cdc codec.BinaryCodec,
	_ exported.Height, _ exported.Prefix, _ string, _ []byte, clientState exported.ClientState,
) error

VerifyClientState panics!

func (ClientState) VerifyConnectionState

VerifyConnectionState panics!

func (*ClientState) VerifyMembership

func (cs *ClientState) VerifyMembership(
	ctx sdk.Context,
	clientStore sdk.KVStore,
	cdc codec.BinaryCodec,
	height exported.Height,
	delayTimePeriod uint64,
	delayBlockPeriod uint64,
	proof []byte,
	path exported.Path,
	value []byte,
) error

VerifyMembership panics!

func (ClientState) VerifyNextSequenceRecv

VerifyNextSequenceRecv panics!

func (*ClientState) VerifyNonMembership

func (cs *ClientState) VerifyNonMembership(
	ctx sdk.Context,
	clientStore sdk.KVStore,
	cdc codec.BinaryCodec,
	height exported.Height,
	delayTimePeriod uint64,
	delayBlockPeriod uint64,
	proof []byte,
	path exported.Path,
) error

VerifyNonMembership panics!

func (ClientState) VerifyPacketAcknowledgement

VerifyPacketAcknowledgement panics!

func (ClientState) VerifyPacketCommitment

VerifyPacketCommitment panics!

func (ClientState) VerifyPacketReceiptAbsence

VerifyPacketReceiptAbsence panics!

func (ClientState) VerifyUpgradeAndUpdateState

func (cs ClientState) VerifyUpgradeAndUpdateState(
	_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore,
	_ exported.ClientState, _ exported.ConsensusState, _, _ []byte,
) error

VerifyUpgradeAndUpdateState panics!

func (*ClientState) XXX_DiscardUnknown

func (m *ClientState) XXX_DiscardUnknown()

func (*ClientState) XXX_Marshal

func (m *ClientState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientState) XXX_Merge

func (m *ClientState) XXX_Merge(src proto.Message)

func (*ClientState) XXX_Size

func (m *ClientState) XXX_Size() int

func (*ClientState) XXX_Unmarshal

func (m *ClientState) XXX_Unmarshal(b []byte) error

func (ClientState) ZeroCustomFields

func (cs ClientState) ZeroCustomFields() exported.ClientState

ZeroCustomFields panics!

type ClientStateData

type ClientStateData struct {
	Path        []byte     `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	ClientState *types.Any `protobuf:"bytes,2,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"`
}

ClientStateData returns the SignBytes data for client state verification.

func (*ClientStateData) Descriptor

func (*ClientStateData) Descriptor() ([]byte, []int)

func (*ClientStateData) Marshal

func (m *ClientStateData) Marshal() (dAtA []byte, err error)

func (*ClientStateData) MarshalTo

func (m *ClientStateData) MarshalTo(dAtA []byte) (int, error)

func (*ClientStateData) MarshalToSizedBuffer

func (m *ClientStateData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClientStateData) ProtoMessage

func (*ClientStateData) ProtoMessage()

func (*ClientStateData) Reset

func (m *ClientStateData) Reset()

func (*ClientStateData) Size

func (m *ClientStateData) Size() (n int)

func (*ClientStateData) String

func (m *ClientStateData) String() string

func (*ClientStateData) Unmarshal

func (m *ClientStateData) Unmarshal(dAtA []byte) error

func (*ClientStateData) XXX_DiscardUnknown

func (m *ClientStateData) XXX_DiscardUnknown()

func (*ClientStateData) XXX_Marshal

func (m *ClientStateData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientStateData) XXX_Merge

func (m *ClientStateData) XXX_Merge(src proto.Message)

func (*ClientStateData) XXX_Size

func (m *ClientStateData) XXX_Size() int

func (*ClientStateData) XXX_Unmarshal

func (m *ClientStateData) XXX_Unmarshal(b []byte) error

type ConnectionStateData

type ConnectionStateData struct {
	Path       []byte                `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Connection *types1.ConnectionEnd `protobuf:"bytes,2,opt,name=connection,proto3" json:"connection,omitempty"`
}

ConnectionStateData returns the SignBytes data for connection state verification.

func (*ConnectionStateData) Descriptor

func (*ConnectionStateData) Descriptor() ([]byte, []int)

func (*ConnectionStateData) Marshal

func (m *ConnectionStateData) Marshal() (dAtA []byte, err error)

func (*ConnectionStateData) MarshalTo

func (m *ConnectionStateData) MarshalTo(dAtA []byte) (int, error)

func (*ConnectionStateData) MarshalToSizedBuffer

func (m *ConnectionStateData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnectionStateData) ProtoMessage

func (*ConnectionStateData) ProtoMessage()

func (*ConnectionStateData) Reset

func (m *ConnectionStateData) Reset()

func (*ConnectionStateData) Size

func (m *ConnectionStateData) Size() (n int)

func (*ConnectionStateData) String

func (m *ConnectionStateData) String() string

func (*ConnectionStateData) Unmarshal

func (m *ConnectionStateData) Unmarshal(dAtA []byte) error

func (*ConnectionStateData) XXX_DiscardUnknown

func (m *ConnectionStateData) XXX_DiscardUnknown()

func (*ConnectionStateData) XXX_Marshal

func (m *ConnectionStateData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnectionStateData) XXX_Merge

func (m *ConnectionStateData) XXX_Merge(src proto.Message)

func (*ConnectionStateData) XXX_Size

func (m *ConnectionStateData) XXX_Size() int

func (*ConnectionStateData) XXX_Unmarshal

func (m *ConnectionStateData) XXX_Unmarshal(b []byte) error

type ConsensusState

type ConsensusState struct {
	// public key of the solo machine
	PublicKey *types.Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" yaml:"public_key"`
	// diversifier allows the same public key to be re-used across different solo
	// machine clients (potentially on different chains) without being considered
	// misbehaviour.
	Diversifier string `protobuf:"bytes,2,opt,name=diversifier,proto3" json:"diversifier,omitempty"`
	Timestamp   uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

ConsensusState defines a solo machine consensus state. The sequence of a consensus state is contained in the "height" key used in storing the consensus state.

func (ConsensusState) ClientType

func (ConsensusState) ClientType() string

ClientType panics!

func (*ConsensusState) Descriptor

func (*ConsensusState) Descriptor() ([]byte, []int)

func (ConsensusState) GetTimestamp

func (cs ConsensusState) GetTimestamp() uint64

GetTimestamp panics!

func (*ConsensusState) Marshal

func (m *ConsensusState) Marshal() (dAtA []byte, err error)

func (*ConsensusState) MarshalTo

func (m *ConsensusState) MarshalTo(dAtA []byte) (int, error)

func (*ConsensusState) MarshalToSizedBuffer

func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConsensusState) ProtoMessage

func (*ConsensusState) ProtoMessage()

func (*ConsensusState) Reset

func (m *ConsensusState) Reset()

func (*ConsensusState) Size

func (m *ConsensusState) Size() (n int)

func (*ConsensusState) String

func (m *ConsensusState) String() string

func (*ConsensusState) Unmarshal

func (m *ConsensusState) Unmarshal(dAtA []byte) error

func (ConsensusState) UnpackInterfaces

func (cs ConsensusState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method

func (ConsensusState) ValidateBasic

func (cs ConsensusState) ValidateBasic() error

ValidateBasic panics!

func (*ConsensusState) XXX_DiscardUnknown

func (m *ConsensusState) XXX_DiscardUnknown()

func (*ConsensusState) XXX_Marshal

func (m *ConsensusState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConsensusState) XXX_Merge

func (m *ConsensusState) XXX_Merge(src proto.Message)

func (*ConsensusState) XXX_Size

func (m *ConsensusState) XXX_Size() int

func (*ConsensusState) XXX_Unmarshal

func (m *ConsensusState) XXX_Unmarshal(b []byte) error

type ConsensusStateData

type ConsensusStateData struct {
	Path           []byte     `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	ConsensusState *types.Any `` /* 126-byte string literal not displayed */
}

ConsensusStateData returns the SignBytes data for consensus state verification.

func (*ConsensusStateData) Descriptor

func (*ConsensusStateData) Descriptor() ([]byte, []int)

func (*ConsensusStateData) Marshal

func (m *ConsensusStateData) Marshal() (dAtA []byte, err error)

func (*ConsensusStateData) MarshalTo

func (m *ConsensusStateData) MarshalTo(dAtA []byte) (int, error)

func (*ConsensusStateData) MarshalToSizedBuffer

func (m *ConsensusStateData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConsensusStateData) ProtoMessage

func (*ConsensusStateData) ProtoMessage()

func (*ConsensusStateData) Reset

func (m *ConsensusStateData) Reset()

func (*ConsensusStateData) Size

func (m *ConsensusStateData) Size() (n int)

func (*ConsensusStateData) String

func (m *ConsensusStateData) String() string

func (*ConsensusStateData) Unmarshal

func (m *ConsensusStateData) Unmarshal(dAtA []byte) error

func (*ConsensusStateData) XXX_DiscardUnknown

func (m *ConsensusStateData) XXX_DiscardUnknown()

func (*ConsensusStateData) XXX_Marshal

func (m *ConsensusStateData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConsensusStateData) XXX_Merge

func (m *ConsensusStateData) XXX_Merge(src proto.Message)

func (*ConsensusStateData) XXX_Size

func (m *ConsensusStateData) XXX_Size() int

func (*ConsensusStateData) XXX_Unmarshal

func (m *ConsensusStateData) XXX_Unmarshal(b []byte) error

type DataType

type DataType int32

DataType defines the type of solo machine proof being created. This is done to preserve uniqueness of different data sign byte encodings.

const (
	// Default State
	UNSPECIFIED DataType = 0
	// Data type for client state verification
	CLIENT DataType = 1
	// Data type for consensus state verification
	CONSENSUS DataType = 2
	// Data type for connection state verification
	CONNECTION DataType = 3
	// Data type for channel state verification
	CHANNEL DataType = 4
	// Data type for packet commitment verification
	PACKETCOMMITMENT DataType = 5
	// Data type for packet acknowledgement verification
	PACKETACKNOWLEDGEMENT DataType = 6
	// Data type for packet receipt absence verification
	PACKETRECEIPTABSENCE DataType = 7
	// Data type for next sequence recv verification
	NEXTSEQUENCERECV DataType = 8
	// Data type for header verification
	HEADER DataType = 9
)

func (DataType) EnumDescriptor

func (DataType) EnumDescriptor() ([]byte, []int)

func (DataType) String

func (x DataType) String() string
type Header struct {
	// sequence to update solo machine public key at
	Sequence       uint64     `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	Timestamp      uint64     `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Signature      []byte     `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	NewPublicKey   *types.Any `protobuf:"bytes,4,opt,name=new_public_key,json=newPublicKey,proto3" json:"new_public_key,omitempty" yaml:"new_public_key"`
	NewDiversifier string     `` /* 126-byte string literal not displayed */
}

Header defines a solo machine consensus header

func (*Header) Descriptor

func (*Header) Descriptor() ([]byte, []int)

func (*Header) Marshal

func (m *Header) Marshal() (dAtA []byte, err error)

func (*Header) MarshalTo

func (m *Header) MarshalTo(dAtA []byte) (int, error)

func (*Header) MarshalToSizedBuffer

func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) Size

func (m *Header) Size() (n int)

func (*Header) String

func (m *Header) String() string

func (*Header) Unmarshal

func (m *Header) Unmarshal(dAtA []byte) error

func (*Header) XXX_DiscardUnknown

func (m *Header) XXX_DiscardUnknown()

func (*Header) XXX_Marshal

func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Header) XXX_Merge

func (m *Header) XXX_Merge(src proto.Message)

func (*Header) XXX_Size

func (m *Header) XXX_Size() int

func (*Header) XXX_Unmarshal

func (m *Header) XXX_Unmarshal(b []byte) error

type HeaderData

type HeaderData struct {
	// header public key
	NewPubKey *types.Any `protobuf:"bytes,1,opt,name=new_pub_key,json=newPubKey,proto3" json:"new_pub_key,omitempty" yaml:"new_pub_key"`
	// header diversifier
	NewDiversifier string `` /* 126-byte string literal not displayed */
}

HeaderData returns the SignBytes data for update verification.

func (*HeaderData) Descriptor

func (*HeaderData) Descriptor() ([]byte, []int)

func (*HeaderData) Marshal

func (m *HeaderData) Marshal() (dAtA []byte, err error)

func (*HeaderData) MarshalTo

func (m *HeaderData) MarshalTo(dAtA []byte) (int, error)

func (*HeaderData) MarshalToSizedBuffer

func (m *HeaderData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HeaderData) ProtoMessage

func (*HeaderData) ProtoMessage()

func (*HeaderData) Reset

func (m *HeaderData) Reset()

func (*HeaderData) Size

func (m *HeaderData) Size() (n int)

func (*HeaderData) String

func (m *HeaderData) String() string

func (*HeaderData) Unmarshal

func (m *HeaderData) Unmarshal(dAtA []byte) error

func (*HeaderData) XXX_DiscardUnknown

func (m *HeaderData) XXX_DiscardUnknown()

func (*HeaderData) XXX_Marshal

func (m *HeaderData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HeaderData) XXX_Merge

func (m *HeaderData) XXX_Merge(src proto.Message)

func (*HeaderData) XXX_Size

func (m *HeaderData) XXX_Size() int

func (*HeaderData) XXX_Unmarshal

func (m *HeaderData) XXX_Unmarshal(b []byte) error

type Misbehaviour

type Misbehaviour struct {
	ClientId     string            `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"`
	Sequence     uint64            `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
	SignatureOne *SignatureAndData `protobuf:"bytes,3,opt,name=signature_one,json=signatureOne,proto3" json:"signature_one,omitempty" yaml:"signature_one"`
	SignatureTwo *SignatureAndData `protobuf:"bytes,4,opt,name=signature_two,json=signatureTwo,proto3" json:"signature_two,omitempty" yaml:"signature_two"`
}

Misbehaviour defines misbehaviour for a solo machine which consists of a sequence and two signatures over different messages at that sequence.

func (*Misbehaviour) Descriptor

func (*Misbehaviour) Descriptor() ([]byte, []int)

func (*Misbehaviour) Marshal

func (m *Misbehaviour) Marshal() (dAtA []byte, err error)

func (*Misbehaviour) MarshalTo

func (m *Misbehaviour) MarshalTo(dAtA []byte) (int, error)

func (*Misbehaviour) MarshalToSizedBuffer

func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Misbehaviour) ProtoMessage

func (*Misbehaviour) ProtoMessage()

func (*Misbehaviour) Reset

func (m *Misbehaviour) Reset()

func (*Misbehaviour) Size

func (m *Misbehaviour) Size() (n int)

func (*Misbehaviour) String

func (m *Misbehaviour) String() string

func (*Misbehaviour) Unmarshal

func (m *Misbehaviour) Unmarshal(dAtA []byte) error

func (*Misbehaviour) XXX_DiscardUnknown

func (m *Misbehaviour) XXX_DiscardUnknown()

func (*Misbehaviour) XXX_Marshal

func (m *Misbehaviour) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Misbehaviour) XXX_Merge

func (m *Misbehaviour) XXX_Merge(src proto.Message)

func (*Misbehaviour) XXX_Size

func (m *Misbehaviour) XXX_Size() int

func (*Misbehaviour) XXX_Unmarshal

func (m *Misbehaviour) XXX_Unmarshal(b []byte) error

type NextSequenceRecvData

type NextSequenceRecvData struct {
	Path        []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	NextSeqRecv uint64 `protobuf:"varint,2,opt,name=next_seq_recv,json=nextSeqRecv,proto3" json:"next_seq_recv,omitempty" yaml:"next_seq_recv"`
}

NextSequenceRecvData returns the SignBytes data for verification of the next sequence to be received.

func (*NextSequenceRecvData) Descriptor

func (*NextSequenceRecvData) Descriptor() ([]byte, []int)

func (*NextSequenceRecvData) GetNextSeqRecv

func (m *NextSequenceRecvData) GetNextSeqRecv() uint64

func (*NextSequenceRecvData) GetPath

func (m *NextSequenceRecvData) GetPath() []byte

func (*NextSequenceRecvData) Marshal

func (m *NextSequenceRecvData) Marshal() (dAtA []byte, err error)

func (*NextSequenceRecvData) MarshalTo

func (m *NextSequenceRecvData) MarshalTo(dAtA []byte) (int, error)

func (*NextSequenceRecvData) MarshalToSizedBuffer

func (m *NextSequenceRecvData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NextSequenceRecvData) ProtoMessage

func (*NextSequenceRecvData) ProtoMessage()

func (*NextSequenceRecvData) Reset

func (m *NextSequenceRecvData) Reset()

func (*NextSequenceRecvData) Size

func (m *NextSequenceRecvData) Size() (n int)

func (*NextSequenceRecvData) String

func (m *NextSequenceRecvData) String() string

func (*NextSequenceRecvData) Unmarshal

func (m *NextSequenceRecvData) Unmarshal(dAtA []byte) error

func (*NextSequenceRecvData) XXX_DiscardUnknown

func (m *NextSequenceRecvData) XXX_DiscardUnknown()

func (*NextSequenceRecvData) XXX_Marshal

func (m *NextSequenceRecvData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NextSequenceRecvData) XXX_Merge

func (m *NextSequenceRecvData) XXX_Merge(src proto.Message)

func (*NextSequenceRecvData) XXX_Size

func (m *NextSequenceRecvData) XXX_Size() int

func (*NextSequenceRecvData) XXX_Unmarshal

func (m *NextSequenceRecvData) XXX_Unmarshal(b []byte) error

type PacketAcknowledgementData

type PacketAcknowledgementData struct {
	Path            []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"`
}

PacketAcknowledgementData returns the SignBytes data for acknowledgement verification.

func (*PacketAcknowledgementData) Descriptor

func (*PacketAcknowledgementData) Descriptor() ([]byte, []int)

func (*PacketAcknowledgementData) GetAcknowledgement

func (m *PacketAcknowledgementData) GetAcknowledgement() []byte

func (*PacketAcknowledgementData) GetPath

func (m *PacketAcknowledgementData) GetPath() []byte

func (*PacketAcknowledgementData) Marshal

func (m *PacketAcknowledgementData) Marshal() (dAtA []byte, err error)

func (*PacketAcknowledgementData) MarshalTo

func (m *PacketAcknowledgementData) MarshalTo(dAtA []byte) (int, error)

func (*PacketAcknowledgementData) MarshalToSizedBuffer

func (m *PacketAcknowledgementData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PacketAcknowledgementData) ProtoMessage

func (*PacketAcknowledgementData) ProtoMessage()

func (*PacketAcknowledgementData) Reset

func (m *PacketAcknowledgementData) Reset()

func (*PacketAcknowledgementData) Size

func (m *PacketAcknowledgementData) Size() (n int)

func (*PacketAcknowledgementData) String

func (m *PacketAcknowledgementData) String() string

func (*PacketAcknowledgementData) Unmarshal

func (m *PacketAcknowledgementData) Unmarshal(dAtA []byte) error

func (*PacketAcknowledgementData) XXX_DiscardUnknown

func (m *PacketAcknowledgementData) XXX_DiscardUnknown()

func (*PacketAcknowledgementData) XXX_Marshal

func (m *PacketAcknowledgementData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PacketAcknowledgementData) XXX_Merge

func (m *PacketAcknowledgementData) XXX_Merge(src proto.Message)

func (*PacketAcknowledgementData) XXX_Size

func (m *PacketAcknowledgementData) XXX_Size() int

func (*PacketAcknowledgementData) XXX_Unmarshal

func (m *PacketAcknowledgementData) XXX_Unmarshal(b []byte) error

type PacketCommitmentData

type PacketCommitmentData struct {
	Path       []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Commitment []byte `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"`
}

PacketCommitmentData returns the SignBytes data for packet commitment verification.

func (*PacketCommitmentData) Descriptor

func (*PacketCommitmentData) Descriptor() ([]byte, []int)

func (*PacketCommitmentData) GetCommitment

func (m *PacketCommitmentData) GetCommitment() []byte

func (*PacketCommitmentData) GetPath

func (m *PacketCommitmentData) GetPath() []byte

func (*PacketCommitmentData) Marshal

func (m *PacketCommitmentData) Marshal() (dAtA []byte, err error)

func (*PacketCommitmentData) MarshalTo

func (m *PacketCommitmentData) MarshalTo(dAtA []byte) (int, error)

func (*PacketCommitmentData) MarshalToSizedBuffer

func (m *PacketCommitmentData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PacketCommitmentData) ProtoMessage

func (*PacketCommitmentData) ProtoMessage()

func (*PacketCommitmentData) Reset

func (m *PacketCommitmentData) Reset()

func (*PacketCommitmentData) Size

func (m *PacketCommitmentData) Size() (n int)

func (*PacketCommitmentData) String

func (m *PacketCommitmentData) String() string

func (*PacketCommitmentData) Unmarshal

func (m *PacketCommitmentData) Unmarshal(dAtA []byte) error

func (*PacketCommitmentData) XXX_DiscardUnknown

func (m *PacketCommitmentData) XXX_DiscardUnknown()

func (*PacketCommitmentData) XXX_Marshal

func (m *PacketCommitmentData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PacketCommitmentData) XXX_Merge

func (m *PacketCommitmentData) XXX_Merge(src proto.Message)

func (*PacketCommitmentData) XXX_Size

func (m *PacketCommitmentData) XXX_Size() int

func (*PacketCommitmentData) XXX_Unmarshal

func (m *PacketCommitmentData) XXX_Unmarshal(b []byte) error

type PacketReceiptAbsenceData

type PacketReceiptAbsenceData struct {
	Path []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
}

PacketReceiptAbsenceData returns the SignBytes data for packet receipt absence verification.

func (*PacketReceiptAbsenceData) Descriptor

func (*PacketReceiptAbsenceData) Descriptor() ([]byte, []int)

func (*PacketReceiptAbsenceData) GetPath

func (m *PacketReceiptAbsenceData) GetPath() []byte

func (*PacketReceiptAbsenceData) Marshal

func (m *PacketReceiptAbsenceData) Marshal() (dAtA []byte, err error)

func (*PacketReceiptAbsenceData) MarshalTo

func (m *PacketReceiptAbsenceData) MarshalTo(dAtA []byte) (int, error)

func (*PacketReceiptAbsenceData) MarshalToSizedBuffer

func (m *PacketReceiptAbsenceData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PacketReceiptAbsenceData) ProtoMessage

func (*PacketReceiptAbsenceData) ProtoMessage()

func (*PacketReceiptAbsenceData) Reset

func (m *PacketReceiptAbsenceData) Reset()

func (*PacketReceiptAbsenceData) Size

func (m *PacketReceiptAbsenceData) Size() (n int)

func (*PacketReceiptAbsenceData) String

func (m *PacketReceiptAbsenceData) String() string

func (*PacketReceiptAbsenceData) Unmarshal

func (m *PacketReceiptAbsenceData) Unmarshal(dAtA []byte) error

func (*PacketReceiptAbsenceData) XXX_DiscardUnknown

func (m *PacketReceiptAbsenceData) XXX_DiscardUnknown()

func (*PacketReceiptAbsenceData) XXX_Marshal

func (m *PacketReceiptAbsenceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PacketReceiptAbsenceData) XXX_Merge

func (m *PacketReceiptAbsenceData) XXX_Merge(src proto.Message)

func (*PacketReceiptAbsenceData) XXX_Size

func (m *PacketReceiptAbsenceData) XXX_Size() int

func (*PacketReceiptAbsenceData) XXX_Unmarshal

func (m *PacketReceiptAbsenceData) XXX_Unmarshal(b []byte) error

type SignBytes

type SignBytes struct {
	Sequence    uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	Timestamp   uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Diversifier string `protobuf:"bytes,3,opt,name=diversifier,proto3" json:"diversifier,omitempty"`
	// type of the data used
	DataType DataType `` /* 149-byte string literal not displayed */
	// marshaled data
	Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
}

SignBytes defines the signed bytes used for signature verification.

func (*SignBytes) Descriptor

func (*SignBytes) Descriptor() ([]byte, []int)

func (*SignBytes) Marshal

func (m *SignBytes) Marshal() (dAtA []byte, err error)

func (*SignBytes) MarshalTo

func (m *SignBytes) MarshalTo(dAtA []byte) (int, error)

func (*SignBytes) MarshalToSizedBuffer

func (m *SignBytes) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SignBytes) ProtoMessage

func (*SignBytes) ProtoMessage()

func (*SignBytes) Reset

func (m *SignBytes) Reset()

func (*SignBytes) Size

func (m *SignBytes) Size() (n int)

func (*SignBytes) String

func (m *SignBytes) String() string

func (*SignBytes) Unmarshal

func (m *SignBytes) Unmarshal(dAtA []byte) error

func (*SignBytes) XXX_DiscardUnknown

func (m *SignBytes) XXX_DiscardUnknown()

func (*SignBytes) XXX_Marshal

func (m *SignBytes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignBytes) XXX_Merge

func (m *SignBytes) XXX_Merge(src proto.Message)

func (*SignBytes) XXX_Size

func (m *SignBytes) XXX_Size() int

func (*SignBytes) XXX_Unmarshal

func (m *SignBytes) XXX_Unmarshal(b []byte) error

type SignatureAndData

type SignatureAndData struct {
	Signature []byte   `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	DataType  DataType `` /* 149-byte string literal not displayed */
	Data      []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Timestamp uint64   `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

SignatureAndData contains a signature and the data signed over to create that signature.

func (*SignatureAndData) Descriptor

func (*SignatureAndData) Descriptor() ([]byte, []int)

func (*SignatureAndData) Marshal

func (m *SignatureAndData) Marshal() (dAtA []byte, err error)

func (*SignatureAndData) MarshalTo

func (m *SignatureAndData) MarshalTo(dAtA []byte) (int, error)

func (*SignatureAndData) MarshalToSizedBuffer

func (m *SignatureAndData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SignatureAndData) ProtoMessage

func (*SignatureAndData) ProtoMessage()

func (*SignatureAndData) Reset

func (m *SignatureAndData) Reset()

func (*SignatureAndData) Size

func (m *SignatureAndData) Size() (n int)

func (*SignatureAndData) String

func (m *SignatureAndData) String() string

func (*SignatureAndData) Unmarshal

func (m *SignatureAndData) Unmarshal(dAtA []byte) error

func (*SignatureAndData) XXX_DiscardUnknown

func (m *SignatureAndData) XXX_DiscardUnknown()

func (*SignatureAndData) XXX_Marshal

func (m *SignatureAndData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignatureAndData) XXX_Merge

func (m *SignatureAndData) XXX_Merge(src proto.Message)

func (*SignatureAndData) XXX_Size

func (m *SignatureAndData) XXX_Size() int

func (*SignatureAndData) XXX_Unmarshal

func (m *SignatureAndData) XXX_Unmarshal(b []byte) error

type TimestampedSignatureData

type TimestampedSignatureData struct {
	SignatureData []byte `protobuf:"bytes,1,opt,name=signature_data,json=signatureData,proto3" json:"signature_data,omitempty" yaml:"signature_data"`
	Timestamp     uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

TimestampedSignatureData contains the signature data and the timestamp of the signature.

func (*TimestampedSignatureData) Descriptor

func (*TimestampedSignatureData) Descriptor() ([]byte, []int)

func (*TimestampedSignatureData) Marshal

func (m *TimestampedSignatureData) Marshal() (dAtA []byte, err error)

func (*TimestampedSignatureData) MarshalTo

func (m *TimestampedSignatureData) MarshalTo(dAtA []byte) (int, error)

func (*TimestampedSignatureData) MarshalToSizedBuffer

func (m *TimestampedSignatureData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TimestampedSignatureData) ProtoMessage

func (*TimestampedSignatureData) ProtoMessage()

func (*TimestampedSignatureData) Reset

func (m *TimestampedSignatureData) Reset()

func (*TimestampedSignatureData) Size

func (m *TimestampedSignatureData) Size() (n int)

func (*TimestampedSignatureData) String

func (m *TimestampedSignatureData) String() string

func (*TimestampedSignatureData) Unmarshal

func (m *TimestampedSignatureData) Unmarshal(dAtA []byte) error

func (*TimestampedSignatureData) XXX_DiscardUnknown

func (m *TimestampedSignatureData) XXX_DiscardUnknown()

func (*TimestampedSignatureData) XXX_Marshal

func (m *TimestampedSignatureData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimestampedSignatureData) XXX_Merge

func (m *TimestampedSignatureData) XXX_Merge(src proto.Message)

func (*TimestampedSignatureData) XXX_Size

func (m *TimestampedSignatureData) XXX_Size() int

func (*TimestampedSignatureData) XXX_Unmarshal

func (m *TimestampedSignatureData) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL