Documentation ¶
Index ¶
- Variables
- type Authorship
- func (*Authorship) Descriptor() ([]byte, []int)deprecated
- func (x *Authorship) GetIdentity() *Identity
- func (x *Authorship) GetPostCommitment() *PostCommitment
- func (x *Authorship) GetPreCommitment() *PreCommitment
- func (x *Authorship) GetSignature() *Signature
- func (*Authorship) ProtoMessage()
- func (x *Authorship) ProtoReflect() protoreflect.Message
- func (x *Authorship) Reset()
- func (x *Authorship) String() string
- type Frame
- func (*Frame) Descriptor() ([]byte, []int)deprecated
- func (x *Frame) GetLastField() *NoOp
- func (x *Frame) GetMessage() *Message
- func (x *Frame) GetNoop() *NoOp
- func (m *Frame) GetPayload() isFrame_Payload
- func (x *Frame) GetPeer() *Peer
- func (x *Frame) GetRequestMessages() *RequestMessages
- func (x *Frame) GetRequestPeers() *RequestPeers
- func (*Frame) ProtoMessage()
- func (x *Frame) ProtoReflect() protoreflect.Message
- func (x *Frame) Reset()
- func (x *Frame) String() string
- type Frame_LastField
- type Frame_Message
- type Frame_Noop
- type Frame_Peer
- type Frame_RequestMessages
- type Frame_RequestPeers
- type FrontierRef
- type Identity
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetAuthorship() *Authorship
- func (x *Message) GetData() *Payload
- func (x *Message) GetParentage() *Parentage
- func (x *Message) GetTimestamp() *timestamp.Timestamp
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type MessageRef
- type MessageSetRef
- type NoOp
- type ParentRef
- type Parentage
- type Payload
- type PayloadRef
- type Peer
- type PostCommitment
- func (*PostCommitment) Descriptor() ([]byte, []int)deprecated
- func (x *PostCommitment) GetCut() *timestamp.Timestamp
- func (x *PostCommitment) GetMessages() *MessageSetRef
- func (x *PostCommitment) GetState() *StateRef
- func (*PostCommitment) ProtoMessage()
- func (x *PostCommitment) ProtoReflect() protoreflect.Message
- func (x *PostCommitment) Reset()
- func (x *PostCommitment) String() string
- type PreCommitment
- type RequestMessages
- func (*RequestMessages) Descriptor() ([]byte, []int)deprecated
- func (x *RequestMessages) GetFrontier() *FrontierRef
- func (x *RequestMessages) GetWant() []*MessageRef
- func (*RequestMessages) ProtoMessage()
- func (x *RequestMessages) ProtoReflect() protoreflect.Message
- func (x *RequestMessages) Reset()
- func (x *RequestMessages) String() string
- type RequestPeers
- type Secret
- type Signature
- type StateRef
Constants ¶
This section is empty.
Variables ¶
var File_braid_proto protoreflect.FileDescriptor
var File_protocol_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Authorship ¶
type Authorship struct { Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` PostCommitment *PostCommitment `protobuf:"bytes,3,opt,name=post_commitment,json=postCommitment,proto3" json:"post_commitment,omitempty"` PreCommitment *PreCommitment `protobuf:"bytes,4,opt,name=pre_commitment,json=preCommitment,proto3" json:"pre_commitment,omitempty"` // contains filtered or unexported fields }
Authorship identifies a particular message author and the committed state that author was in when authoring a given message.
func (*Authorship) Descriptor
deprecated
func (*Authorship) Descriptor() ([]byte, []int)
Deprecated: Use Authorship.ProtoReflect.Descriptor instead.
func (*Authorship) GetIdentity ¶
func (x *Authorship) GetIdentity() *Identity
func (*Authorship) GetPostCommitment ¶
func (x *Authorship) GetPostCommitment() *PostCommitment
func (*Authorship) GetPreCommitment ¶
func (x *Authorship) GetPreCommitment() *PreCommitment
func (*Authorship) GetSignature ¶
func (x *Authorship) GetSignature() *Signature
func (*Authorship) ProtoMessage ¶
func (*Authorship) ProtoMessage()
func (*Authorship) ProtoReflect ¶
func (x *Authorship) ProtoReflect() protoreflect.Message
func (*Authorship) Reset ¶
func (x *Authorship) Reset()
func (*Authorship) String ¶
func (x *Authorship) String() string
type Frame ¶
type Frame struct { // Types that are assignable to Payload: // // *Frame_Noop // *Frame_Message // *Frame_RequestMessages // *Frame_Peer // *Frame_RequestPeers // *Frame_LastField Payload isFrame_Payload `protobuf_oneof:"payload"` // contains filtered or unexported fields }
func (*Frame) Descriptor
deprecated
func (*Frame) GetLastField ¶
func (*Frame) GetMessage ¶
func (*Frame) GetPayload ¶
func (m *Frame) GetPayload() isFrame_Payload
func (*Frame) GetRequestMessages ¶
func (x *Frame) GetRequestMessages() *RequestMessages
func (*Frame) GetRequestPeers ¶
func (x *Frame) GetRequestPeers() *RequestPeers
func (*Frame) ProtoMessage ¶
func (*Frame) ProtoMessage()
func (*Frame) ProtoReflect ¶
func (x *Frame) ProtoReflect() protoreflect.Message
type Frame_LastField ¶
type Frame_LastField struct {
LastField *NoOp `protobuf:"bytes,536870911,opt,name=lastField,proto3,oneof"` // for testing
}
type Frame_Message ¶
type Frame_Message struct {
Message *Message `protobuf:"bytes,2,opt,name=message,proto3,oneof"`
}
type Frame_Noop ¶
type Frame_Noop struct {
Noop *NoOp `protobuf:"bytes,1,opt,name=noop,proto3,oneof"`
}
type Frame_Peer ¶
type Frame_Peer struct {
Peer *Peer `protobuf:"bytes,4,opt,name=peer,proto3,oneof"`
}
type Frame_RequestMessages ¶
type Frame_RequestMessages struct {
RequestMessages *RequestMessages `protobuf:"bytes,3,opt,name=request_messages,json=requestMessages,proto3,oneof"`
}
type Frame_RequestPeers ¶
type Frame_RequestPeers struct {
RequestPeers *RequestPeers `protobuf:"bytes,5,opt,name=request_peers,json=requestPeers,proto3,oneof"`
}
type FrontierRef ¶
type FrontierRef struct { // Nodes should order messagerefs in messages as described in MessageSetRef // and not in the order of the node's frontier parent table since this would // leak the bookkeepping work for other nodes to exploit. Messages *MessageSetRef `protobuf:"bytes,1,opt,name=messages,proto3" json:"messages,omitempty"` // contains filtered or unexported fields }
func (*FrontierRef) Descriptor
deprecated
func (*FrontierRef) Descriptor() ([]byte, []int)
Deprecated: Use FrontierRef.ProtoReflect.Descriptor instead.
func (*FrontierRef) GetMessages ¶
func (x *FrontierRef) GetMessages() *MessageSetRef
func (*FrontierRef) ProtoMessage ¶
func (*FrontierRef) ProtoMessage()
func (*FrontierRef) ProtoReflect ¶
func (x *FrontierRef) ProtoReflect() protoreflect.Message
func (*FrontierRef) Reset ¶
func (x *FrontierRef) Reset()
func (*FrontierRef) String ¶
func (x *FrontierRef) String() string
type Identity ¶
type Identity struct { Ed25519PublicKey []byte `protobuf:"bytes,1,opt,name=ed25519_public_key,json=ed25519PublicKey,proto3" json:"ed25519_public_key,omitempty"` // contains filtered or unexported fields }
Identity is a public reference to a specific peer.
Identity is conceptually similar to a cryptographic public key and can be shared freely.
Identity is not validated or signed by any other authority and it is up to the application to determine if the peer presenting an Identity is trustworthy.
func (*Identity) Descriptor
deprecated
func (*Identity) GetEd25519PublicKey ¶
func (*Identity) ProtoMessage ¶
func (*Identity) ProtoMessage()
func (*Identity) ProtoReflect ¶
func (x *Identity) ProtoReflect() protoreflect.Message
type Message ¶
type Message struct { Authorship *Authorship `protobuf:"bytes,1,opt,name=authorship,proto3" json:"authorship,omitempty"` Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Parentage *Parentage `protobuf:"bytes,3,opt,name=parentage,proto3" json:"parentage,omitempty"` Data *Payload `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetAuthorship ¶
func (x *Message) GetAuthorship() *Authorship
func (*Message) GetParentage ¶
func (*Message) GetTimestamp ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type MessageRef ¶
type MessageRef struct { // shake256_64_v1 for a message is the SHAKE256 hash obtained by writing // the following in order to a sponge: // // 1. message.authorship.identity.ed25519_public_key // - omitted: signature (would be circular dependancy) // 2. message.authorship.post_commitment // .timestamp // .messages // .state // 3. message.authorship.pre_commitment.payload_refs[] // 4. message.timestamp // - little-endian UTC seconds since Unix epoch (8 bytes) // - little-endian UTC nanoseconds (4 bytes) // 3. message.parentage.parents[i].ref.shake256_64_v1 // - omitted: contribution (validated on receipt of message) // 4. message.data.data // // Output of 64 bytes is then obtained from the sponge. // // No data is written for a field that is empty or the zero timestamp. As // a result, the shake256_64_v1 for the genesis message is simply 64 bytes // of output read from an initialized SHAKE256 sponge. Shake256_64V1 []byte `protobuf:"bytes,1,opt,name=shake256_64_v1,json=shake25664V1,proto3" json:"shake256_64_v1,omitempty"` // contains filtered or unexported fields }
MessageRef uniquely identifies a message in a braid.
MessageRef must be derived entirely from the contents of a single Message and must not require looking up any referred Messages. This allows MessageRef to refer to orphans that a node has not yet linked into a braid.
func (*MessageRef) Descriptor
deprecated
func (*MessageRef) Descriptor() ([]byte, []int)
Deprecated: Use MessageRef.ProtoReflect.Descriptor instead.
func (*MessageRef) GetShake256_64V1 ¶
func (x *MessageRef) GetShake256_64V1() []byte
func (*MessageRef) ProtoMessage ¶
func (*MessageRef) ProtoMessage()
func (*MessageRef) ProtoReflect ¶
func (x *MessageRef) ProtoReflect() protoreflect.Message
func (*MessageRef) Reset ¶
func (x *MessageRef) Reset()
func (*MessageRef) String ¶
func (x *MessageRef) String() string
type MessageSetRef ¶
type MessageSetRef struct { // shake256_64_v1 for a set of messages is the SHAKE256 hash of the Ref's of // each of the messages in the set. // // The set is ordered first by increasing timestamp, and ties are broken by // increasing message hash value (Ref(message).shake256_64_v1). Shake256_64V1 []byte `protobuf:"bytes,1,opt,name=shake256_64_v1,json=shake25664V1,proto3" json:"shake256_64_v1,omitempty"` // contains filtered or unexported fields }
func (*MessageSetRef) Descriptor
deprecated
func (*MessageSetRef) Descriptor() ([]byte, []int)
Deprecated: Use MessageSetRef.ProtoReflect.Descriptor instead.
func (*MessageSetRef) GetShake256_64V1 ¶
func (x *MessageSetRef) GetShake256_64V1() []byte
func (*MessageSetRef) ProtoMessage ¶
func (*MessageSetRef) ProtoMessage()
func (*MessageSetRef) ProtoReflect ¶
func (x *MessageSetRef) ProtoReflect() protoreflect.Message
func (*MessageSetRef) Reset ¶
func (x *MessageSetRef) Reset()
func (*MessageSetRef) String ¶
func (x *MessageSetRef) String() string
type NoOp ¶
type NoOp struct {
// contains filtered or unexported fields
}
func (*NoOp) Descriptor
deprecated
func (*NoOp) ProtoMessage ¶
func (*NoOp) ProtoMessage()
func (*NoOp) ProtoReflect ¶
func (x *NoOp) ProtoReflect() protoreflect.Message
type ParentRef ¶
type ParentRef struct { Ref *MessageRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` Contribution uint64 `protobuf:"varint,2,opt,name=contribution,proto3" json:"contribution,omitempty"` // contains filtered or unexported fields }
func (*ParentRef) Descriptor
deprecated
func (*ParentRef) GetContribution ¶
func (*ParentRef) GetRef ¶
func (x *ParentRef) GetRef() *MessageRef
func (*ParentRef) ProtoMessage ¶
func (*ParentRef) ProtoMessage()
func (*ParentRef) ProtoReflect ¶
func (x *ParentRef) ProtoReflect() protoreflect.Message
type Parentage ¶
type Parentage struct { Parents []*ParentRef `protobuf:"bytes,1,rep,name=parents,proto3" json:"parents,omitempty"` // contains filtered or unexported fields }
func (*Parentage) Descriptor
deprecated
func (*Parentage) GetParents ¶
func (*Parentage) ProtoMessage ¶
func (*Parentage) ProtoMessage()
func (*Parentage) ProtoReflect ¶
func (x *Parentage) ProtoReflect() protoreflect.Message
type Payload ¶
type Payload struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // Message containing a precommitment matching hash(data) Msg *MessageRef `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*Payload) Descriptor
deprecated
func (*Payload) GetMsg ¶
func (x *Payload) GetMsg() *MessageRef
func (*Payload) ProtoMessage ¶
func (*Payload) ProtoMessage()
func (*Payload) ProtoReflect ¶
func (x *Payload) ProtoReflect() protoreflect.Message
type PayloadRef ¶
type PayloadRef struct { Shake256_64V1 []byte `protobuf:"bytes,1,opt,name=shake256_64_v1,json=shake25664V1,proto3" json:"shake256_64_v1,omitempty"` // SHAKE256(payload.data) --> 64 bytes output // contains filtered or unexported fields }
func (*PayloadRef) Descriptor
deprecated
func (*PayloadRef) Descriptor() ([]byte, []int)
Deprecated: Use PayloadRef.ProtoReflect.Descriptor instead.
func (*PayloadRef) GetShake256_64V1 ¶
func (x *PayloadRef) GetShake256_64V1() []byte
func (*PayloadRef) ProtoMessage ¶
func (*PayloadRef) ProtoMessage()
func (*PayloadRef) ProtoReflect ¶
func (x *PayloadRef) ProtoReflect() protoreflect.Message
func (*PayloadRef) Reset ¶
func (x *PayloadRef) Reset()
func (*PayloadRef) String ¶
func (x *PayloadRef) String() string
type Peer ¶
type Peer struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Identity *Identity `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // optional, validate if provided // contains filtered or unexported fields }
func (*Peer) Descriptor
deprecated
func (*Peer) GetAddress ¶
func (*Peer) GetIdentity ¶
func (*Peer) ProtoMessage ¶
func (*Peer) ProtoMessage()
func (*Peer) ProtoReflect ¶
func (x *Peer) ProtoReflect() protoreflect.Message
type PostCommitment ¶
type PostCommitment struct { // Cut defines a boundary in the braid that splits all messages into either // a "prior" side (timestamps < cut) or "recent" side (timestamps >= cut). Cut *timestamp.Timestamp `protobuf:"bytes,1,opt,name=cut,proto3" json:"cut,omitempty"` // Messages refers to the ordered set of orphans resulting from removing // messages on the prior side of the cut; i.e. messages on the recent side // with one or more parents on the prior side. Messages *MessageSetRef `protobuf:"bytes,2,opt,name=messages,proto3" json:"messages,omitempty"` // state is an application-defined state after applying all messages on the // prior side of the cut to the application. State *StateRef `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` // contains filtered or unexported fields }
PostCommitment commits an author to a particular historical state of the braid and the application.
func (*PostCommitment) Descriptor
deprecated
func (*PostCommitment) Descriptor() ([]byte, []int)
Deprecated: Use PostCommitment.ProtoReflect.Descriptor instead.
func (*PostCommitment) GetCut ¶
func (x *PostCommitment) GetCut() *timestamp.Timestamp
func (*PostCommitment) GetMessages ¶
func (x *PostCommitment) GetMessages() *MessageSetRef
func (*PostCommitment) GetState ¶
func (x *PostCommitment) GetState() *StateRef
func (*PostCommitment) ProtoMessage ¶
func (*PostCommitment) ProtoMessage()
func (*PostCommitment) ProtoReflect ¶
func (x *PostCommitment) ProtoReflect() protoreflect.Message
func (*PostCommitment) Reset ¶
func (x *PostCommitment) Reset()
func (*PostCommitment) String ¶
func (x *PostCommitment) String() string
type PreCommitment ¶
type PreCommitment struct { PayloadRefs []*PayloadRef `protobuf:"bytes,1,rep,name=payload_refs,json=payloadRefs,proto3" json:"payload_refs,omitempty"` // contains filtered or unexported fields }
Precommitment commits an author to a particular set of future payloads.
func (*PreCommitment) Descriptor
deprecated
func (*PreCommitment) Descriptor() ([]byte, []int)
Deprecated: Use PreCommitment.ProtoReflect.Descriptor instead.
func (*PreCommitment) GetPayloadRefs ¶
func (x *PreCommitment) GetPayloadRefs() []*PayloadRef
func (*PreCommitment) ProtoMessage ¶
func (*PreCommitment) ProtoMessage()
func (*PreCommitment) ProtoReflect ¶
func (x *PreCommitment) ProtoReflect() protoreflect.Message
func (*PreCommitment) Reset ¶
func (x *PreCommitment) Reset()
func (*PreCommitment) String ¶
func (x *PreCommitment) String() string
type RequestMessages ¶
type RequestMessages struct { Want []*MessageRef `protobuf:"bytes,1,rep,name=want,proto3" json:"want,omitempty"` // Optional frontier of the requesting node so that the responding node can // also send other messages the requesting node might need (e.g. the // transitive parents of the messages in want). Frontier *FrontierRef `protobuf:"bytes,2,opt,name=frontier,proto3" json:"frontier,omitempty"` // contains filtered or unexported fields }
func (*RequestMessages) Descriptor
deprecated
func (*RequestMessages) Descriptor() ([]byte, []int)
Deprecated: Use RequestMessages.ProtoReflect.Descriptor instead.
func (*RequestMessages) GetFrontier ¶
func (x *RequestMessages) GetFrontier() *FrontierRef
func (*RequestMessages) GetWant ¶
func (x *RequestMessages) GetWant() []*MessageRef
func (*RequestMessages) ProtoMessage ¶
func (*RequestMessages) ProtoMessage()
func (*RequestMessages) ProtoReflect ¶
func (x *RequestMessages) ProtoReflect() protoreflect.Message
func (*RequestMessages) Reset ¶
func (x *RequestMessages) Reset()
func (*RequestMessages) String ¶
func (x *RequestMessages) String() string
type RequestPeers ¶
type RequestPeers struct {
// contains filtered or unexported fields
}
func (*RequestPeers) Descriptor
deprecated
func (*RequestPeers) Descriptor() ([]byte, []int)
Deprecated: Use RequestPeers.ProtoReflect.Descriptor instead.
func (*RequestPeers) ProtoMessage ¶
func (*RequestPeers) ProtoMessage()
func (*RequestPeers) ProtoReflect ¶
func (x *RequestPeers) ProtoReflect() protoreflect.Message
func (*RequestPeers) Reset ¶
func (x *RequestPeers) Reset()
func (*RequestPeers) String ¶
func (x *RequestPeers) String() string
type Secret ¶
type Secret struct { Ed25519PrivateKey []byte `protobuf:"bytes,1,opt,name=ed25519_private_key,json=ed25519PrivateKey,proto3" json:"ed25519_private_key,omitempty"` // contains filtered or unexported fields }
Secret is a private value that can be used by a node to act as an Identity.
Secret is conceptually similar to a cryptographic private key and should not be shared.
func (*Secret) Descriptor
deprecated
func (*Secret) GetEd25519PrivateKey ¶
func (*Secret) ProtoMessage ¶
func (*Secret) ProtoMessage()
func (*Secret) ProtoReflect ¶
func (x *Secret) ProtoReflect() protoreflect.Message
type Signature ¶
type Signature struct { Ed25519V1 []byte `protobuf:"bytes,1,opt,name=ed25519_v1,json=ed25519V1,proto3" json:"ed25519_v1,omitempty"` // == sign(Ref(Message).shake256_64_v1) // contains filtered or unexported fields }
func (*Signature) Descriptor
deprecated
func (*Signature) GetEd25519V1 ¶
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()
func (*Signature) ProtoReflect ¶
func (x *Signature) ProtoReflect() protoreflect.Message
type StateRef ¶
type StateRef struct { Ref []byte `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` // contains filtered or unexported fields }
StateRef is a reference to a state of the application after processing a set of messages.
func (*StateRef) Descriptor
deprecated
func (*StateRef) ProtoMessage ¶
func (*StateRef) ProtoMessage()
func (*StateRef) ProtoReflect ¶
func (x *StateRef) ProtoReflect() protoreflect.Message