braidpb

package
v0.0.0-...-888bb8d Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_braid_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Frame.ProtoReflect.Descriptor instead.

func (*Frame) GetLastField

func (x *Frame) GetLastField() *NoOp

func (*Frame) GetMessage

func (x *Frame) GetMessage() *Message

func (*Frame) GetNoop

func (x *Frame) GetNoop() *NoOp

func (*Frame) GetPayload

func (m *Frame) GetPayload() isFrame_Payload

func (*Frame) GetPeer

func (x *Frame) GetPeer() *Peer

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

func (*Frame) Reset

func (x *Frame) Reset()

func (*Frame) String

func (x *Frame) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Identity.ProtoReflect.Descriptor instead.

func (*Identity) GetEd25519PublicKey

func (x *Identity) GetEd25519PublicKey() []byte

func (*Identity) ProtoMessage

func (*Identity) ProtoMessage()

func (*Identity) ProtoReflect

func (x *Identity) ProtoReflect() protoreflect.Message

func (*Identity) Reset

func (x *Identity) Reset()

func (*Identity) String

func (x *Identity) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetAuthorship

func (x *Message) GetAuthorship() *Authorship

func (*Message) GetData

func (x *Message) GetData() *Payload

func (*Message) GetParentage

func (x *Message) GetParentage() *Parentage

func (*Message) GetTimestamp

func (x *Message) GetTimestamp() *timestamp.Timestamp

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use NoOp.ProtoReflect.Descriptor instead.

func (*NoOp) ProtoMessage

func (*NoOp) ProtoMessage()

func (*NoOp) ProtoReflect

func (x *NoOp) ProtoReflect() protoreflect.Message

func (*NoOp) Reset

func (x *NoOp) Reset()

func (*NoOp) String

func (x *NoOp) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use ParentRef.ProtoReflect.Descriptor instead.

func (*ParentRef) GetContribution

func (x *ParentRef) GetContribution() uint64

func (*ParentRef) GetRef

func (x *ParentRef) GetRef() *MessageRef

func (*ParentRef) ProtoMessage

func (*ParentRef) ProtoMessage()

func (*ParentRef) ProtoReflect

func (x *ParentRef) ProtoReflect() protoreflect.Message

func (*ParentRef) Reset

func (x *ParentRef) Reset()

func (*ParentRef) String

func (x *ParentRef) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Parentage.ProtoReflect.Descriptor instead.

func (*Parentage) GetParents

func (x *Parentage) GetParents() []*ParentRef

func (*Parentage) ProtoMessage

func (*Parentage) ProtoMessage()

func (*Parentage) ProtoReflect

func (x *Parentage) ProtoReflect() protoreflect.Message

func (*Parentage) Reset

func (x *Parentage) Reset()

func (*Parentage) String

func (x *Parentage) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetData

func (x *Payload) GetData() []byte

func (*Payload) GetMsg

func (x *Payload) GetMsg() *MessageRef

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

func (x *Payload) ProtoReflect() protoreflect.Message

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Peer.ProtoReflect.Descriptor instead.

func (*Peer) GetAddress

func (x *Peer) GetAddress() string

func (*Peer) GetIdentity

func (x *Peer) GetIdentity() *Identity

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) ProtoReflect

func (x *Peer) ProtoReflect() protoreflect.Message

func (*Peer) Reset

func (x *Peer) Reset()

func (*Peer) String

func (x *Peer) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Secret.ProtoReflect.Descriptor instead.

func (*Secret) GetEd25519PrivateKey

func (x *Secret) GetEd25519PrivateKey() []byte

func (*Secret) ProtoMessage

func (*Secret) ProtoMessage()

func (*Secret) ProtoReflect

func (x *Secret) ProtoReflect() protoreflect.Message

func (*Secret) Reset

func (x *Secret) Reset()

func (*Secret) String

func (x *Secret) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Signature.ProtoReflect.Descriptor instead.

func (*Signature) GetEd25519V1

func (x *Signature) GetEd25519V1() []byte

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) ProtoReflect

func (x *Signature) ProtoReflect() protoreflect.Message

func (*Signature) Reset

func (x *Signature) Reset()

func (*Signature) String

func (x *Signature) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use StateRef.ProtoReflect.Descriptor instead.

func (*StateRef) GetRef

func (x *StateRef) GetRef() []byte

func (*StateRef) ProtoMessage

func (*StateRef) ProtoMessage()

func (*StateRef) ProtoReflect

func (x *StateRef) ProtoReflect() protoreflect.Message

func (*StateRef) Reset

func (x *StateRef) Reset()

func (*StateRef) String

func (x *StateRef) String() string

Jump to

Keyboard shortcuts

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