Documentation ¶
Index ¶
- Variables
- func MakeChannelStateCommitmentEntryKey(prefix exported.Prefix, portID, channelID string) string
- func MakeClientStateCommitmentEntryKey(prefix exported.Prefix, clientID string) string
- func MakeConnectionStateCommitmentEntryKey(prefix exported.Prefix, connectionID string) string
- func MakeConsensusStateCommitmentEntryKey(prefix exported.Prefix, clientID string, height exported.Height) string
- func MakeCurrentSequenceKey(prefix exported.Prefix) string
- func MakeEntryKey(prefix exported.Prefix, key string) string
- func MakeNextSequenceRecvEntryKey(prefix exported.Prefix, portID, channelID string) string
- func MakePacketAcknowledgementAbsenceEntryKey(prefix exported.Prefix, portID, channelID string, sequence uint64) string
- func MakePacketAcknowledgementEntryKey(prefix exported.Prefix, portID, channelID string, sequence uint64) string
- func MakePacketCommitmentEntryKey(prefix exported.Prefix, portID, channelID string, sequence uint64) string
- func MakeSequenceCommitmentEntryKey(seq uint64) string
- func MakeSequenceKey(prefix exported.Prefix, seq uint64) string
- type CommitmentConfig
- type CommitmentEntry
- func (*CommitmentEntry) Descriptor() ([]byte, []int)
- func (m *CommitmentEntry) GetKey() string
- func (m *CommitmentEntry) GetValue() string
- func (m *CommitmentEntry) Marshal() (dAtA []byte, err error)
- func (m *CommitmentEntry) MarshalTo(dAtA []byte) (int, error)
- func (m *CommitmentEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CommitmentEntry) ProtoMessage()
- func (m *CommitmentEntry) Reset()
- func (m *CommitmentEntry) Size() (n int)
- func (m *CommitmentEntry) String() string
- func (m *CommitmentEntry) Unmarshal(dAtA []byte) error
- func (m *CommitmentEntry) XXX_DiscardUnknown()
- func (m *CommitmentEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CommitmentEntry) XXX_Merge(src proto.Message)
- func (m *CommitmentEntry) XXX_Size() int
- func (m *CommitmentEntry) XXX_Unmarshal(b []byte) error
- type Entry
- func EntryFromCommitment(ce *CommitmentEntry) (*Entry, error)
- func MakeChannelStateCommitmentEntry(prefix exported.Prefix, portID string, channelID string, channelBytes []byte) (*Entry, error)
- func MakeClientStateCommitmentEntry(prefix exported.Prefix, clientID string, clientStateBytes []byte) (*Entry, error)
- func MakeConnectionStateCommitmentEntry(prefix exported.Prefix, connectionID string, connectionBytes []byte) (*Entry, error)
- func MakeConsensusStateCommitmentEntry(prefix exported.Prefix, clientID string, height exported.Height, ...) (*Entry, error)
- func MakeNextSequenceRecvEntry(prefix exported.Prefix, portID, channelID string, seq uint64) (*Entry, error)
- func MakePacketAcknowledgementAbsenceEntry(prefix exported.Prefix, portID, channelID string, sequence uint64) (*Entry, error)
- func MakePacketAcknowledgementEntry(prefix exported.Prefix, portID, channelID string, sequence uint64, ...) (*Entry, error)
- func MakePacketCommitmentEntry(prefix exported.Prefix, portID, channelID string, sequence uint64, ...) (*Entry, error)
- func MakeSequenceCommitmentEntry(sequence *Sequence) (*Entry, error)
- type Sequence
- func (seq *Sequence) Bytes() []byte
- func (*Sequence) Descriptor() ([]byte, []int)
- func (m *Sequence) GetTimestamp() int64
- func (m *Sequence) GetValue() uint64
- func (m *Sequence) Marshal() (dAtA []byte, err error)
- func (m *Sequence) MarshalTo(dAtA []byte) (int, error)
- func (m *Sequence) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Sequence) ProtoMessage()
- func (m *Sequence) Reset()
- func (m *Sequence) Size() (n int)
- func (m *Sequence) String() string
- func (m *Sequence) Unmarshal(dAtA []byte) error
- func (m *Sequence) XXX_DiscardUnknown()
- func (m *Sequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Sequence) XXX_Merge(src proto.Message)
- func (m *Sequence) XXX_Size() int
- func (m *Sequence) XXX_Unmarshal(b []byte) error
- type SequenceManager
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func MakeCurrentSequenceKey ¶
Types ¶
type CommitmentConfig ¶
type CommitmentConfig struct { MinTimeInterval time.Duration // Minimum time interval to advance the sequence MaxTimestampDiff time.Duration // Difference between client and endorser }
func DefaultConfig ¶
func DefaultConfig() CommitmentConfig
type CommitmentEntry ¶
type CommitmentEntry struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value"` }
func (*CommitmentEntry) Descriptor ¶
func (*CommitmentEntry) Descriptor() ([]byte, []int)
func (*CommitmentEntry) GetKey ¶
func (m *CommitmentEntry) GetKey() string
func (*CommitmentEntry) GetValue ¶
func (m *CommitmentEntry) GetValue() string
func (*CommitmentEntry) Marshal ¶
func (m *CommitmentEntry) Marshal() (dAtA []byte, err error)
func (*CommitmentEntry) MarshalToSizedBuffer ¶
func (m *CommitmentEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CommitmentEntry) ProtoMessage ¶
func (*CommitmentEntry) ProtoMessage()
func (*CommitmentEntry) Reset ¶
func (m *CommitmentEntry) Reset()
func (*CommitmentEntry) Size ¶
func (m *CommitmentEntry) Size() (n int)
func (*CommitmentEntry) String ¶
func (m *CommitmentEntry) String() string
func (*CommitmentEntry) Unmarshal ¶
func (m *CommitmentEntry) Unmarshal(dAtA []byte) error
func (*CommitmentEntry) XXX_DiscardUnknown ¶
func (m *CommitmentEntry) XXX_DiscardUnknown()
func (*CommitmentEntry) XXX_Marshal ¶
func (m *CommitmentEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CommitmentEntry) XXX_Merge ¶
func (m *CommitmentEntry) XXX_Merge(src proto.Message)
func (*CommitmentEntry) XXX_Size ¶
func (m *CommitmentEntry) XXX_Size() int
func (*CommitmentEntry) XXX_Unmarshal ¶
func (m *CommitmentEntry) XXX_Unmarshal(b []byte) error
type Entry ¶
func EntryFromCommitment ¶
func EntryFromCommitment(ce *CommitmentEntry) (*Entry, error)
func (Entry) ToCommitment ¶
func (e Entry) ToCommitment() *CommitmentEntry
type Sequence ¶
type Sequence struct { Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp"` }
func NewSequence ¶
func (*Sequence) Descriptor ¶
func (*Sequence) GetTimestamp ¶
func (*Sequence) MarshalToSizedBuffer ¶
func (*Sequence) ProtoMessage ¶
func (*Sequence) ProtoMessage()
func (*Sequence) XXX_DiscardUnknown ¶
func (m *Sequence) XXX_DiscardUnknown()
func (*Sequence) XXX_Marshal ¶
func (*Sequence) XXX_Unmarshal ¶
type SequenceManager ¶
type SequenceManager interface { InitSequence(stub shim.ChaincodeStubInterface) (*Sequence, error) GetCurrentSequence(stub shim.ChaincodeStubInterface) (*Sequence, error) GetSequence(stub shim.ChaincodeStubInterface, seq uint64) (*Sequence, error) UpdateSequence(stub shim.ChaincodeStubInterface) (*Sequence, error) ValidateTimestamp(now time.Time, prevSec int64, next *timestamp.Timestamp) error SetClock(clock func() time.Time) }
func NewDefaultSequenceManager ¶
func NewDefaultSequenceManager() SequenceManager
func NewSequenceManager ¶
func NewSequenceManager(config CommitmentConfig, prefix exported.Prefix) SequenceManager
Click to show internal directories.
Click to hide internal directories.