drand

package
Version: v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0, MIT Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Control_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "drand.Control",
	HandlerType: (*ControlServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PingPong",
			Handler:    _Control_PingPong_Handler,
		},
		{
			MethodName: "InitDKG",
			Handler:    _Control_InitDKG_Handler,
		},
		{
			MethodName: "InitReshare",
			Handler:    _Control_InitReshare_Handler,
		},
		{
			MethodName: "Share",
			Handler:    _Control_Share_Handler,
		},
		{
			MethodName: "PublicKey",
			Handler:    _Control_PublicKey_Handler,
		},
		{
			MethodName: "PrivateKey",
			Handler:    _Control_PrivateKey_Handler,
		},
		{
			MethodName: "ChainInfo",
			Handler:    _Control_ChainInfo_Handler,
		},
		{
			MethodName: "GroupFile",
			Handler:    _Control_GroupFile_Handler,
		},
		{
			MethodName: "Shutdown",
			Handler:    _Control_Shutdown_Handler,
		},
		{
			MethodName: "BackupDatabase",
			Handler:    _Control_BackupDatabase_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StartFollowChain",
			Handler:       _Control_StartFollowChain_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "drand/control.proto",
}

Control_ServiceDesc is the grpc.ServiceDesc for Control service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_drand_api_proto protoreflect.FileDescriptor
View Source
var File_drand_common_proto protoreflect.FileDescriptor
View Source
var File_drand_control_proto protoreflect.FileDescriptor
View Source
var File_drand_protocol_proto protoreflect.FileDescriptor
View Source
var Protocol_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "drand.Protocol",
	HandlerType: (*ProtocolServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetIdentity",
			Handler:    _Protocol_GetIdentity_Handler,
		},
		{
			MethodName: "SignalDKGParticipant",
			Handler:    _Protocol_SignalDKGParticipant_Handler,
		},
		{
			MethodName: "PushDKGInfo",
			Handler:    _Protocol_PushDKGInfo_Handler,
		},
		{
			MethodName: "BroadcastDKG",
			Handler:    _Protocol_BroadcastDKG_Handler,
		},
		{
			MethodName: "PartialBeacon",
			Handler:    _Protocol_PartialBeacon_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SyncChain",
			Handler:       _Protocol_SyncChain_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "drand/protocol.proto",
}

Protocol_ServiceDesc is the grpc.ServiceDesc for Protocol service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Public_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "drand.Public",
	HandlerType: (*PublicServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PublicRand",
			Handler:    _Public_PublicRand_Handler,
		},
		{
			MethodName: "PrivateRand",
			Handler:    _Public_PrivateRand_Handler,
		},
		{
			MethodName: "ChainInfo",
			Handler:    _Public_ChainInfo_Handler,
		},
		{
			MethodName: "Home",
			Handler:    _Public_Home_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "PublicRandStream",
			Handler:       _Public_PublicRandStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "drand/api.proto",
}

Public_ServiceDesc is the grpc.ServiceDesc for Public service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterControlServer added in v0.5.2

func RegisterControlServer(s grpc.ServiceRegistrar, srv ControlServer)

func RegisterProtocolServer added in v0.5.2

func RegisterProtocolServer(s grpc.ServiceRegistrar, srv ProtocolServer)

func RegisterPublicServer added in v0.5.2

func RegisterPublicServer(s grpc.ServiceRegistrar, srv PublicServer)

Types

type BackupDBRequest added in v1.2.6

type BackupDBRequest struct {
	OutputFile string `protobuf:"bytes,1,opt,name=output_file,json=outputFile,proto3" json:"output_file,omitempty"`
	// contains filtered or unexported fields
}

func (*BackupDBRequest) Descriptor deprecated added in v1.2.6

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

Deprecated: Use BackupDBRequest.ProtoReflect.Descriptor instead.

func (*BackupDBRequest) GetOutputFile added in v1.2.6

func (x *BackupDBRequest) GetOutputFile() string

func (*BackupDBRequest) ProtoMessage added in v1.2.6

func (*BackupDBRequest) ProtoMessage()

func (*BackupDBRequest) ProtoReflect added in v1.2.6

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

func (*BackupDBRequest) Reset added in v1.2.6

func (x *BackupDBRequest) Reset()

func (*BackupDBRequest) String added in v1.2.6

func (x *BackupDBRequest) String() string

type BackupDBResponse added in v1.2.6

type BackupDBResponse struct {
	// contains filtered or unexported fields
}

func (*BackupDBResponse) Descriptor deprecated added in v1.2.6

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

Deprecated: Use BackupDBResponse.ProtoReflect.Descriptor instead.

func (*BackupDBResponse) ProtoMessage added in v1.2.6

func (*BackupDBResponse) ProtoMessage()

func (*BackupDBResponse) ProtoReflect added in v1.2.6

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

func (*BackupDBResponse) Reset added in v1.2.6

func (x *BackupDBResponse) Reset()

func (*BackupDBResponse) String added in v1.2.6

func (x *BackupDBResponse) String() string

type BeaconPacket added in v0.6.1

type BeaconPacket struct {
	PreviousSig []byte `protobuf:"bytes,1,opt,name=previous_sig,json=previousSig,proto3" json:"previous_sig,omitempty"`
	Round       uint64 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
	Signature   []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*BeaconPacket) Descriptor deprecated added in v0.6.1

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

Deprecated: Use BeaconPacket.ProtoReflect.Descriptor instead.

func (*BeaconPacket) GetPreviousSig added in v0.6.1

func (x *BeaconPacket) GetPreviousSig() []byte

func (*BeaconPacket) GetRound added in v0.6.1

func (x *BeaconPacket) GetRound() uint64

func (*BeaconPacket) GetSignature added in v0.7.5

func (x *BeaconPacket) GetSignature() []byte

func (*BeaconPacket) ProtoMessage added in v0.6.1

func (*BeaconPacket) ProtoMessage()

func (*BeaconPacket) ProtoReflect added in v1.0.0

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

func (*BeaconPacket) Reset added in v0.6.1

func (x *BeaconPacket) Reset()

func (*BeaconPacket) String added in v0.6.1

func (x *BeaconPacket) String() string

type ChainInfoPacket added in v1.0.0

type ChainInfoPacket struct {

	// marshalled public key
	PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// period in seconds
	Period uint32 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"`
	// genesis time of the chain
	GenesisTime int64 `protobuf:"varint,3,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"`
	// hash is included for ease of use - not needing to have a drand client to
	// compute its hash
	Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
	// hash of the genesis group
	GroupHash []byte `protobuf:"bytes,5,opt,name=groupHash,proto3" json:"groupHash,omitempty"`
	// contains filtered or unexported fields
}

func (*ChainInfoPacket) Descriptor deprecated added in v1.0.0

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

Deprecated: Use ChainInfoPacket.ProtoReflect.Descriptor instead.

func (*ChainInfoPacket) GetGenesisTime added in v1.0.0

func (x *ChainInfoPacket) GetGenesisTime() int64

func (*ChainInfoPacket) GetGroupHash added in v1.0.0

func (x *ChainInfoPacket) GetGroupHash() []byte

func (*ChainInfoPacket) GetHash added in v1.0.0

func (x *ChainInfoPacket) GetHash() []byte

func (*ChainInfoPacket) GetPeriod added in v1.0.0

func (x *ChainInfoPacket) GetPeriod() uint32

func (*ChainInfoPacket) GetPublicKey added in v1.0.0

func (x *ChainInfoPacket) GetPublicKey() []byte

func (*ChainInfoPacket) ProtoMessage added in v1.0.0

func (*ChainInfoPacket) ProtoMessage()

func (*ChainInfoPacket) ProtoReflect added in v1.0.0

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

func (*ChainInfoPacket) Reset added in v1.0.0

func (x *ChainInfoPacket) Reset()

func (*ChainInfoPacket) String added in v1.0.0

func (x *ChainInfoPacket) String() string

type ChainInfoRequest added in v1.0.0

type ChainInfoRequest struct {
	// contains filtered or unexported fields
}

func (*ChainInfoRequest) Descriptor deprecated added in v1.0.0

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

Deprecated: Use ChainInfoRequest.ProtoReflect.Descriptor instead.

func (*ChainInfoRequest) ProtoMessage added in v1.0.0

func (*ChainInfoRequest) ProtoMessage()

func (*ChainInfoRequest) ProtoReflect added in v1.0.0

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

func (*ChainInfoRequest) Reset added in v1.0.0

func (x *ChainInfoRequest) Reset()

func (*ChainInfoRequest) String added in v1.0.0

func (x *ChainInfoRequest) String() string

type CokeyRequest added in v0.5.2

type CokeyRequest struct {
	// contains filtered or unexported fields
}

CokeyRequest requests the collective key of a drand node

func (*CokeyRequest) Descriptor deprecated added in v0.5.2

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

Deprecated: Use CokeyRequest.ProtoReflect.Descriptor instead.

func (*CokeyRequest) ProtoMessage added in v0.5.2

func (*CokeyRequest) ProtoMessage()

func (*CokeyRequest) ProtoReflect added in v1.0.0

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

func (*CokeyRequest) Reset added in v0.5.2

func (x *CokeyRequest) Reset()

func (*CokeyRequest) String added in v0.5.2

func (x *CokeyRequest) String() string

type CokeyResponse added in v0.5.2

type CokeyResponse struct {
	CoKey []byte `protobuf:"bytes,2,opt,name=coKey,proto3" json:"coKey,omitempty"`
	// contains filtered or unexported fields
}

CokeyResponse holds the collective key of a drand node

func (*CokeyResponse) Descriptor deprecated added in v0.5.2

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

Deprecated: Use CokeyResponse.ProtoReflect.Descriptor instead.

func (*CokeyResponse) GetCoKey added in v0.5.2

func (x *CokeyResponse) GetCoKey() []byte

func (*CokeyResponse) ProtoMessage added in v0.5.2

func (*CokeyResponse) ProtoMessage()

func (*CokeyResponse) ProtoReflect added in v1.0.0

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

func (*CokeyResponse) Reset added in v0.5.2

func (x *CokeyResponse) Reset()

func (*CokeyResponse) String added in v0.5.2

func (x *CokeyResponse) String() string

type ControlClient added in v0.5.2

type ControlClient interface {
	// PingPong returns an empty message. Purpose is to test the control port.
	PingPong(ctx context.Context, in *Ping, opts ...grpc.CallOption) (*Pong, error)
	// InitDKG sends information to daemon to start a fresh DKG protocol
	InitDKG(ctx context.Context, in *InitDKGPacket, opts ...grpc.CallOption) (*GroupPacket, error)
	// InitReshares sends all informations so that the drand node knows how to
	// proceeed during the next resharing protocol.
	InitReshare(ctx context.Context, in *InitResharePacket, opts ...grpc.CallOption) (*GroupPacket, error)
	// Share returns the current private share used by the node
	Share(ctx context.Context, in *ShareRequest, opts ...grpc.CallOption) (*ShareResponse, error)
	// PublicKey returns the longterm public key of the drand node
	PublicKey(ctx context.Context, in *PublicKeyRequest, opts ...grpc.CallOption) (*PublicKeyResponse, error)
	// PrivateKey returns the longterm private key of the drand node
	PrivateKey(ctx context.Context, in *PrivateKeyRequest, opts ...grpc.CallOption) (*PrivateKeyResponse, error)
	// CollectiveKey returns the distributed public key used by the node
	ChainInfo(ctx context.Context, in *ChainInfoRequest, opts ...grpc.CallOption) (*ChainInfoPacket, error)
	// GroupFile returns the TOML-encoded group file
	// similar to public.Group method but needed for ease of use of the
	// control functionalities
	GroupFile(ctx context.Context, in *GroupRequest, opts ...grpc.CallOption) (*GroupPacket, error)
	Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error)
	StartFollowChain(ctx context.Context, in *StartFollowRequest, opts ...grpc.CallOption) (Control_StartFollowChainClient, error)
	BackupDatabase(ctx context.Context, in *BackupDBRequest, opts ...grpc.CallOption) (*BackupDBResponse, error)
}

ControlClient is the client API for Control service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewControlClient added in v0.5.2

func NewControlClient(cc grpc.ClientConnInterface) ControlClient

type ControlServer added in v0.5.2

type ControlServer interface {
	// PingPong returns an empty message. Purpose is to test the control port.
	PingPong(context.Context, *Ping) (*Pong, error)
	// InitDKG sends information to daemon to start a fresh DKG protocol
	InitDKG(context.Context, *InitDKGPacket) (*GroupPacket, error)
	// InitReshares sends all informations so that the drand node knows how to
	// proceeed during the next resharing protocol.
	InitReshare(context.Context, *InitResharePacket) (*GroupPacket, error)
	// Share returns the current private share used by the node
	Share(context.Context, *ShareRequest) (*ShareResponse, error)
	// PublicKey returns the longterm public key of the drand node
	PublicKey(context.Context, *PublicKeyRequest) (*PublicKeyResponse, error)
	// PrivateKey returns the longterm private key of the drand node
	PrivateKey(context.Context, *PrivateKeyRequest) (*PrivateKeyResponse, error)
	// CollectiveKey returns the distributed public key used by the node
	ChainInfo(context.Context, *ChainInfoRequest) (*ChainInfoPacket, error)
	// GroupFile returns the TOML-encoded group file
	// similar to public.Group method but needed for ease of use of the
	// control functionalities
	GroupFile(context.Context, *GroupRequest) (*GroupPacket, error)
	Shutdown(context.Context, *ShutdownRequest) (*ShutdownResponse, error)
	StartFollowChain(*StartFollowRequest, Control_StartFollowChainServer) error
	BackupDatabase(context.Context, *BackupDBRequest) (*BackupDBResponse, error)
}

ControlServer is the server API for Control service. All implementations should embed UnimplementedControlServer for forward compatibility

type Control_StartFollowChainClient added in v1.0.2

type Control_StartFollowChainClient interface {
	Recv() (*FollowProgress, error)
	grpc.ClientStream
}

type Control_StartFollowChainServer added in v1.0.2

type Control_StartFollowChainServer interface {
	Send(*FollowProgress) error
	grpc.ServerStream
}

type DKGInfoPacket added in v0.9.0

type DKGInfoPacket struct {
	NewGroup    *GroupPacket `protobuf:"bytes,1,opt,name=new_group,json=newGroup,proto3" json:"new_group,omitempty"`
	SecretProof []byte       `protobuf:"bytes,2,opt,name=secret_proof,json=secretProof,proto3" json:"secret_proof,omitempty"`
	// timeout in seconds
	DkgTimeout uint32 `protobuf:"varint,3,opt,name=dkg_timeout,json=dkgTimeout,proto3" json:"dkg_timeout,omitempty"`
	// signature from the coordinator to prove he is the one sending that group
	// file.
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

PushDKGInfor is the packet the coordinator sends that contains the group over which to run the DKG on, the secret proof (to prove it's he's part of the expected group, and it's not a random packet) and as well the time at which every node should start the DKG.

func (*DKGInfoPacket) Descriptor deprecated added in v0.9.0

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

Deprecated: Use DKGInfoPacket.ProtoReflect.Descriptor instead.

func (*DKGInfoPacket) GetDkgTimeout added in v1.0.0

func (x *DKGInfoPacket) GetDkgTimeout() uint32

func (*DKGInfoPacket) GetNewGroup added in v0.9.0

func (x *DKGInfoPacket) GetNewGroup() *GroupPacket

func (*DKGInfoPacket) GetSecretProof added in v0.9.0

func (x *DKGInfoPacket) GetSecretProof() []byte

func (*DKGInfoPacket) GetSignature added in v1.0.0

func (x *DKGInfoPacket) GetSignature() []byte

func (*DKGInfoPacket) ProtoMessage added in v0.9.0

func (*DKGInfoPacket) ProtoMessage()

func (*DKGInfoPacket) ProtoReflect added in v1.0.0

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

func (*DKGInfoPacket) Reset added in v0.9.0

func (x *DKGInfoPacket) Reset()

func (*DKGInfoPacket) String added in v0.9.0

func (x *DKGInfoPacket) String() string

type DKGPacket added in v0.7.1

type DKGPacket struct {
	Dkg *dkg.Packet `protobuf:"bytes,1,opt,name=dkg,proto3" json:"dkg,omitempty"`
	// contains filtered or unexported fields
}

DKGPacket is the packet that nodes send to others nodes as part of the broadcasting protocol.

func (*DKGPacket) Descriptor deprecated added in v0.7.1

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

Deprecated: Use DKGPacket.ProtoReflect.Descriptor instead.

func (*DKGPacket) GetDkg added in v0.7.1

func (x *DKGPacket) GetDkg() *dkg.Packet

func (*DKGPacket) ProtoMessage added in v0.7.1

func (*DKGPacket) ProtoMessage()

func (*DKGPacket) ProtoReflect added in v1.0.0

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

func (*DKGPacket) Reset added in v0.7.1

func (x *DKGPacket) Reset()

func (*DKGPacket) String added in v0.7.1

func (x *DKGPacket) String() string

type Empty added in v0.5.2

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated added in v0.5.2

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage added in v0.5.2

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v1.0.0

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

func (*Empty) Reset added in v0.5.2

func (x *Empty) Reset()

func (*Empty) String added in v0.5.2

func (x *Empty) String() string

type EntropyInfo added in v0.5.4

type EntropyInfo struct {

	// the path to the script to run that returns random bytes when called
	Script string `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"`
	// do we only take this entropy source or mix it with /dev/urandom
	UserOnly bool `protobuf:"varint,10,opt,name=userOnly,proto3" json:"userOnly,omitempty"`
	// contains filtered or unexported fields
}

EntropyInfo contains information about external entropy sources can be optional

func (*EntropyInfo) Descriptor deprecated added in v0.5.4

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

Deprecated: Use EntropyInfo.ProtoReflect.Descriptor instead.

func (*EntropyInfo) GetScript added in v0.5.4

func (x *EntropyInfo) GetScript() string

func (*EntropyInfo) GetUserOnly added in v0.5.4

func (x *EntropyInfo) GetUserOnly() bool

func (*EntropyInfo) ProtoMessage added in v0.5.4

func (*EntropyInfo) ProtoMessage()

func (*EntropyInfo) ProtoReflect added in v1.0.0

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

func (*EntropyInfo) Reset added in v0.5.4

func (x *EntropyInfo) Reset()

func (*EntropyInfo) String added in v0.5.4

func (x *EntropyInfo) String() string

type FollowProgress added in v1.0.2

type FollowProgress struct {
	Current uint64 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"`
	Target  uint64 `protobuf:"varint,2,opt,name=target,proto3" json:"target,omitempty"`
	// contains filtered or unexported fields
}

func (*FollowProgress) Descriptor deprecated added in v1.0.2

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

Deprecated: Use FollowProgress.ProtoReflect.Descriptor instead.

func (*FollowProgress) GetCurrent added in v1.0.2

func (x *FollowProgress) GetCurrent() uint64

func (*FollowProgress) GetTarget added in v1.0.2

func (x *FollowProgress) GetTarget() uint64

func (*FollowProgress) ProtoMessage added in v1.0.2

func (*FollowProgress) ProtoMessage()

func (*FollowProgress) ProtoReflect added in v1.0.2

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

func (*FollowProgress) Reset added in v1.0.2

func (x *FollowProgress) Reset()

func (*FollowProgress) String added in v1.0.2

func (x *FollowProgress) String() string

type GroupInfo added in v0.5.2

type GroupInfo struct {

	// Types that are assignable to Location:
	//	*GroupInfo_Path
	//	*GroupInfo_Url
	Location isGroupInfo_Location `protobuf_oneof:"location"`
	// contains filtered or unexported fields
}

GroupInfo holds the information to load a group information such as the nodes and the genesis etc. Currently only the loading of a group via filesystem is supported although the basis to support loading a group from a URI is setup. For example, for new nodes that wants to join a network, they could point to the URL that returns a group definition, for example at one of the currently running node.

func (*GroupInfo) Descriptor deprecated added in v0.5.2

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

Deprecated: Use GroupInfo.ProtoReflect.Descriptor instead.

func (*GroupInfo) GetLocation added in v0.5.2

func (m *GroupInfo) GetLocation() isGroupInfo_Location

func (*GroupInfo) GetPath added in v0.5.2

func (x *GroupInfo) GetPath() string

func (*GroupInfo) GetUrl added in v0.5.2

func (x *GroupInfo) GetUrl() string

func (*GroupInfo) ProtoMessage added in v0.5.2

func (*GroupInfo) ProtoMessage()

func (*GroupInfo) ProtoReflect added in v1.0.0

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

func (*GroupInfo) Reset added in v0.5.2

func (x *GroupInfo) Reset()

func (*GroupInfo) String added in v0.5.2

func (x *GroupInfo) String() string

type GroupInfo_Path added in v0.5.2

type GroupInfo_Path struct {
	Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"`
}

type GroupInfo_Url added in v0.5.2

type GroupInfo_Url struct {
	// XXX not implemented
	Url string `protobuf:"bytes,2,opt,name=url,proto3,oneof"`
}

type GroupPacket added in v0.7.1

type GroupPacket struct {
	Nodes     []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	Threshold uint32  `protobuf:"varint,2,opt,name=threshold,proto3" json:"threshold,omitempty"`
	// period in seconds
	Period         uint32   `protobuf:"varint,3,opt,name=period,proto3" json:"period,omitempty"`
	GenesisTime    uint64   `protobuf:"varint,4,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"`
	TransitionTime uint64   `protobuf:"varint,5,opt,name=transition_time,json=transitionTime,proto3" json:"transition_time,omitempty"`
	GenesisSeed    []byte   `protobuf:"bytes,6,opt,name=genesis_seed,json=genesisSeed,proto3" json:"genesis_seed,omitempty"`
	DistKey        [][]byte `protobuf:"bytes,7,rep,name=dist_key,json=distKey,proto3" json:"dist_key,omitempty"`
	// catchup_period in seconds
	CatchupPeriod uint32 `protobuf:"varint,8,opt,name=catchup_period,json=catchupPeriod,proto3" json:"catchup_period,omitempty"`
	// contains filtered or unexported fields
}

GroupPacket represents a group that is running a drand network (or is in the process of creating one or performing a resharing).

func (*GroupPacket) Descriptor deprecated added in v0.7.1

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

Deprecated: Use GroupPacket.ProtoReflect.Descriptor instead.

func (*GroupPacket) GetCatchupPeriod added in v1.1.0

func (x *GroupPacket) GetCatchupPeriod() uint32

func (*GroupPacket) GetDistKey added in v0.7.1

func (x *GroupPacket) GetDistKey() [][]byte

func (*GroupPacket) GetGenesisSeed added in v0.7.1

func (x *GroupPacket) GetGenesisSeed() []byte

func (*GroupPacket) GetGenesisTime added in v0.7.1

func (x *GroupPacket) GetGenesisTime() uint64

func (*GroupPacket) GetNodes added in v0.7.1

func (x *GroupPacket) GetNodes() []*Node

func (*GroupPacket) GetPeriod added in v0.7.1

func (x *GroupPacket) GetPeriod() uint32

func (*GroupPacket) GetThreshold added in v0.7.1

func (x *GroupPacket) GetThreshold() uint32

func (*GroupPacket) GetTransitionTime added in v0.7.1

func (x *GroupPacket) GetTransitionTime() uint64

func (*GroupPacket) ProtoMessage added in v0.7.1

func (*GroupPacket) ProtoMessage()

func (*GroupPacket) ProtoReflect added in v1.0.0

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

func (*GroupPacket) Reset added in v0.7.1

func (x *GroupPacket) Reset()

func (*GroupPacket) String added in v0.7.1

func (x *GroupPacket) String() string

type GroupRequest added in v0.5.2

type GroupRequest struct {
	// contains filtered or unexported fields
}

func (*GroupRequest) Descriptor deprecated added in v0.5.2

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

Deprecated: Use GroupRequest.ProtoReflect.Descriptor instead.

func (*GroupRequest) ProtoMessage added in v0.5.2

func (*GroupRequest) ProtoMessage()

func (*GroupRequest) ProtoReflect added in v1.0.0

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

func (*GroupRequest) Reset added in v0.5.2

func (x *GroupRequest) Reset()

func (*GroupRequest) String added in v0.5.2

func (x *GroupRequest) String() string

type GroupTOMLResponse added in v0.5.2

type GroupTOMLResponse struct {

	// TOML-encoded group file
	GroupToml string `protobuf:"bytes,1,opt,name=group_toml,json=groupToml,proto3" json:"group_toml,omitempty"`
	// contains filtered or unexported fields
}

func (*GroupTOMLResponse) Descriptor deprecated added in v0.5.2

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

Deprecated: Use GroupTOMLResponse.ProtoReflect.Descriptor instead.

func (*GroupTOMLResponse) GetGroupToml added in v0.5.2

func (x *GroupTOMLResponse) GetGroupToml() string

func (*GroupTOMLResponse) ProtoMessage added in v0.5.2

func (*GroupTOMLResponse) ProtoMessage()

func (*GroupTOMLResponse) ProtoReflect added in v1.0.0

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

func (*GroupTOMLResponse) Reset added in v0.5.2

func (x *GroupTOMLResponse) Reset()

func (*GroupTOMLResponse) String added in v0.5.2

func (x *GroupTOMLResponse) String() string

type HomeRequest added in v0.4.1

type HomeRequest struct {
	// contains filtered or unexported fields
}

func (*HomeRequest) Descriptor deprecated added in v0.4.1

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

Deprecated: Use HomeRequest.ProtoReflect.Descriptor instead.

func (*HomeRequest) ProtoMessage added in v0.4.1

func (*HomeRequest) ProtoMessage()

func (*HomeRequest) ProtoReflect added in v1.0.0

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

func (*HomeRequest) Reset added in v0.4.1

func (x *HomeRequest) Reset()

func (*HomeRequest) String added in v0.4.1

func (x *HomeRequest) String() string

type HomeResponse added in v0.4.1

type HomeResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HomeResponse) Descriptor deprecated added in v0.4.1

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

Deprecated: Use HomeResponse.ProtoReflect.Descriptor instead.

func (*HomeResponse) GetStatus added in v0.4.1

func (x *HomeResponse) GetStatus() string

func (*HomeResponse) ProtoMessage added in v0.4.1

func (*HomeResponse) ProtoMessage()

func (*HomeResponse) ProtoReflect added in v1.0.0

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

func (*HomeResponse) Reset added in v0.4.1

func (x *HomeResponse) Reset()

func (*HomeResponse) String added in v0.4.1

func (x *HomeResponse) String() string

type Identity added in v0.7.1

type Identity struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Key     []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Tls     bool   `protobuf:"varint,3,opt,name=tls,proto3" json:"tls,omitempty"`
	// BLS signature over the identity to prove possession of the private key
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*Identity) Descriptor deprecated added in v0.7.1

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

Deprecated: Use Identity.ProtoReflect.Descriptor instead.

func (*Identity) GetAddress added in v0.7.1

func (x *Identity) GetAddress() string

func (*Identity) GetKey added in v0.7.1

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

func (*Identity) GetSignature added in v1.0.0

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

func (*Identity) GetTls added in v0.7.1

func (x *Identity) GetTls() bool

func (*Identity) ProtoMessage added in v0.7.1

func (*Identity) ProtoMessage()

func (*Identity) ProtoReflect added in v1.0.0

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

func (*Identity) Reset added in v0.7.1

func (x *Identity) Reset()

func (*Identity) String added in v0.7.1

func (x *Identity) String() string

type IdentityRequest added in v1.0.0

type IdentityRequest struct {
	// contains filtered or unexported fields
}

func (*IdentityRequest) Descriptor deprecated added in v1.0.0

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

Deprecated: Use IdentityRequest.ProtoReflect.Descriptor instead.

func (*IdentityRequest) ProtoMessage added in v1.0.0

func (*IdentityRequest) ProtoMessage()

func (*IdentityRequest) ProtoReflect added in v1.0.0

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

func (*IdentityRequest) Reset added in v1.0.0

func (x *IdentityRequest) Reset()

func (*IdentityRequest) String added in v1.0.0

func (x *IdentityRequest) String() string

type InitDKGPacket added in v0.5.2

type InitDKGPacket struct {
	Info    *SetupInfoPacket `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	Entropy *EntropyInfo     `protobuf:"bytes,2,opt,name=entropy,proto3" json:"entropy,omitempty"`
	// the period time of the beacon in seconds.
	// used only in a fresh dkg
	BeaconPeriod uint32 `protobuf:"varint,3,opt,name=beacon_period,json=beaconPeriod,proto3" json:"beacon_period,omitempty"`
	// the minimum beacon period when in catchup.
	CatchupPeriod uint32 `protobuf:"varint,4,opt,name=catchup_period,json=catchupPeriod,proto3" json:"catchup_period,omitempty"`
	// contains filtered or unexported fields
}

func (*InitDKGPacket) Descriptor deprecated added in v0.5.2

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

Deprecated: Use InitDKGPacket.ProtoReflect.Descriptor instead.

func (*InitDKGPacket) GetBeaconPeriod added in v0.7.1

func (x *InitDKGPacket) GetBeaconPeriod() uint32

func (*InitDKGPacket) GetCatchupPeriod added in v1.1.0

func (x *InitDKGPacket) GetCatchupPeriod() uint32

func (*InitDKGPacket) GetEntropy added in v0.5.4

func (x *InitDKGPacket) GetEntropy() *EntropyInfo

func (*InitDKGPacket) GetInfo added in v0.7.1

func (x *InitDKGPacket) GetInfo() *SetupInfoPacket

func (*InitDKGPacket) ProtoMessage added in v0.5.2

func (*InitDKGPacket) ProtoMessage()

func (*InitDKGPacket) ProtoReflect added in v1.0.0

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

func (*InitDKGPacket) Reset added in v0.5.2

func (x *InitDKGPacket) Reset()

func (*InitDKGPacket) String added in v0.5.2

func (x *InitDKGPacket) String() string

type InitResharePacket added in v0.5.2

type InitResharePacket struct {

	// Old group that needs to issue the shares for the new group
	// NOTE: It can be empty / nil. In that case, the drand node will try to
	// load the group he belongs to at the moment, if any, and use it as the old
	// group.
	Old  *GroupInfo       `protobuf:"bytes,1,opt,name=old,proto3" json:"old,omitempty"`
	Info *SetupInfoPacket `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
	// the minimum beacon period when in catchup.
	CatchupPeriodChanged bool   `protobuf:"varint,3,opt,name=catchup_period_changed,json=catchupPeriodChanged,proto3" json:"catchup_period_changed,omitempty"`
	CatchupPeriod        uint32 `protobuf:"varint,4,opt,name=catchup_period,json=catchupPeriod,proto3" json:"catchup_period,omitempty"`
	// contains filtered or unexported fields
}

ReshareRequest contains references to the old and new group to perform the resharing protocol.

func (*InitResharePacket) Descriptor deprecated added in v0.5.2

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

Deprecated: Use InitResharePacket.ProtoReflect.Descriptor instead.

func (*InitResharePacket) GetCatchupPeriod added in v1.1.0

func (x *InitResharePacket) GetCatchupPeriod() uint32

func (*InitResharePacket) GetCatchupPeriodChanged added in v1.1.0

func (x *InitResharePacket) GetCatchupPeriodChanged() bool

func (*InitResharePacket) GetInfo added in v0.7.1

func (x *InitResharePacket) GetInfo() *SetupInfoPacket

func (*InitResharePacket) GetOld added in v0.5.2

func (x *InitResharePacket) GetOld() *GroupInfo

func (*InitResharePacket) ProtoMessage added in v0.5.2

func (*InitResharePacket) ProtoMessage()

func (*InitResharePacket) ProtoReflect added in v1.0.0

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

func (*InitResharePacket) Reset added in v0.5.2

func (x *InitResharePacket) Reset()

func (*InitResharePacket) String added in v0.5.2

func (x *InitResharePacket) String() string

type Node added in v0.5.2

type Node struct {
	Public *Identity `protobuf:"bytes,1,opt,name=public,proto3" json:"public,omitempty"`
	Index  uint32    `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

Node holds the information related to a server in a group that forms a drand network

func (*Node) Descriptor deprecated added in v0.5.2

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetIndex added in v0.9.0

func (x *Node) GetIndex() uint32

func (*Node) GetPublic added in v0.9.0

func (x *Node) GetPublic() *Identity

func (*Node) ProtoMessage added in v0.5.2

func (*Node) ProtoMessage()

func (*Node) ProtoReflect added in v1.0.0

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

func (*Node) Reset added in v0.5.2

func (x *Node) Reset()

func (*Node) String added in v0.5.2

func (x *Node) String() string

type PartialBeaconPacket added in v0.7.5

type PartialBeaconPacket struct {

	// Round is the round for which the beacon will be created from the partial
	// signatures
	Round uint64 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
	// signature of the previous round - could be removed at some point but now
	// is used to verify the signature even before accessing the store
	PreviousSig []byte `protobuf:"bytes,2,opt,name=previous_sig,json=previousSig,proto3" json:"previous_sig,omitempty"`
	// partial signature - a threshold of them needs to be aggregated to produce
	// the final beacon at the given round.
	PartialSig []byte `protobuf:"bytes,3,opt,name=partial_sig,json=partialSig,proto3" json:"partial_sig,omitempty"`
	// contains filtered or unexported fields
}

func (*PartialBeaconPacket) Descriptor deprecated added in v0.7.5

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

Deprecated: Use PartialBeaconPacket.ProtoReflect.Descriptor instead.

func (*PartialBeaconPacket) GetPartialSig added in v0.7.5

func (x *PartialBeaconPacket) GetPartialSig() []byte

func (*PartialBeaconPacket) GetPreviousSig added in v0.7.5

func (x *PartialBeaconPacket) GetPreviousSig() []byte

func (*PartialBeaconPacket) GetRound added in v0.7.5

func (x *PartialBeaconPacket) GetRound() uint64

func (*PartialBeaconPacket) ProtoMessage added in v0.7.5

func (*PartialBeaconPacket) ProtoMessage()

func (*PartialBeaconPacket) ProtoReflect added in v1.0.0

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

func (*PartialBeaconPacket) Reset added in v0.7.5

func (x *PartialBeaconPacket) Reset()

func (*PartialBeaconPacket) String added in v0.7.5

func (x *PartialBeaconPacket) String() string

type Ping added in v0.5.2

type Ping struct {
	// contains filtered or unexported fields
}

func (*Ping) Descriptor deprecated added in v0.5.2

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

Deprecated: Use Ping.ProtoReflect.Descriptor instead.

func (*Ping) ProtoMessage added in v0.5.2

func (*Ping) ProtoMessage()

func (*Ping) ProtoReflect added in v1.0.0

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

func (*Ping) Reset added in v0.5.2

func (x *Ping) Reset()

func (*Ping) String added in v0.5.2

func (x *Ping) String() string

type Pong added in v0.5.2

type Pong struct {
	// contains filtered or unexported fields
}

func (*Pong) Descriptor deprecated added in v0.5.2

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

Deprecated: Use Pong.ProtoReflect.Descriptor instead.

func (*Pong) ProtoMessage added in v0.5.2

func (*Pong) ProtoMessage()

func (*Pong) ProtoReflect added in v1.0.0

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

func (*Pong) Reset added in v0.5.2

func (x *Pong) Reset()

func (*Pong) String added in v0.5.2

func (x *Pong) String() string

type PrivateKeyRequest added in v0.5.2

type PrivateKeyRequest struct {
	// contains filtered or unexported fields
}

PrivateKeyRequest requests the private key of a drand node

func (*PrivateKeyRequest) Descriptor deprecated added in v0.5.2

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

Deprecated: Use PrivateKeyRequest.ProtoReflect.Descriptor instead.

func (*PrivateKeyRequest) ProtoMessage added in v0.5.2

func (*PrivateKeyRequest) ProtoMessage()

func (*PrivateKeyRequest) ProtoReflect added in v1.0.0

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

func (*PrivateKeyRequest) Reset added in v0.5.2

func (x *PrivateKeyRequest) Reset()

func (*PrivateKeyRequest) String added in v0.5.2

func (x *PrivateKeyRequest) String() string

type PrivateKeyResponse added in v0.5.2

type PrivateKeyResponse struct {
	PriKey []byte `protobuf:"bytes,2,opt,name=priKey,proto3" json:"priKey,omitempty"`
	// contains filtered or unexported fields
}

PrivateKeyResponse holds the private key of a drand node

func (*PrivateKeyResponse) Descriptor deprecated added in v0.5.2

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

Deprecated: Use PrivateKeyResponse.ProtoReflect.Descriptor instead.

func (*PrivateKeyResponse) GetPriKey added in v0.5.2

func (x *PrivateKeyResponse) GetPriKey() []byte

func (*PrivateKeyResponse) ProtoMessage added in v0.5.2

func (*PrivateKeyResponse) ProtoMessage()

func (*PrivateKeyResponse) ProtoReflect added in v1.0.0

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

func (*PrivateKeyResponse) Reset added in v0.5.2

func (x *PrivateKeyResponse) Reset()

func (*PrivateKeyResponse) String added in v0.5.2

func (x *PrivateKeyResponse) String() string

type PrivateRandRequest

type PrivateRandRequest struct {

	// Request is the ECIES encryption of an ephemereal public key towards which
	// to encrypt the private randomness. The format of the bytes is denoted by
	// the ECIES encryption used by drand.
	Request []byte `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

PrivateRandRequest is the message to send when requesting a private random value.

func (*PrivateRandRequest) Descriptor deprecated

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

Deprecated: Use PrivateRandRequest.ProtoReflect.Descriptor instead.

func (*PrivateRandRequest) GetRequest

func (x *PrivateRandRequest) GetRequest() []byte

func (*PrivateRandRequest) ProtoMessage

func (*PrivateRandRequest) ProtoMessage()

func (*PrivateRandRequest) ProtoReflect added in v1.0.0

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

func (*PrivateRandRequest) Reset

func (x *PrivateRandRequest) Reset()

func (*PrivateRandRequest) String

func (x *PrivateRandRequest) String() string

type PrivateRandResponse

type PrivateRandResponse struct {

	// Responses is the ECIES encryption of the private randomness using the
	// ephemereal public key sent in the request.  The format of the bytes is
	// denoted by the ECIES  encryption used by drand.
	Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*PrivateRandResponse) Descriptor deprecated

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

Deprecated: Use PrivateRandResponse.ProtoReflect.Descriptor instead.

func (*PrivateRandResponse) GetResponse

func (x *PrivateRandResponse) GetResponse() []byte

func (*PrivateRandResponse) ProtoMessage

func (*PrivateRandResponse) ProtoMessage()

func (*PrivateRandResponse) ProtoReflect added in v1.0.0

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

func (*PrivateRandResponse) Reset

func (x *PrivateRandResponse) Reset()

func (*PrivateRandResponse) String

func (x *PrivateRandResponse) String() string

type ProtocolClient added in v0.5.2

type ProtocolClient interface {
	// GetIdentity returns the identity of the drand node
	GetIdentity(ctx context.Context, in *IdentityRequest, opts ...grpc.CallOption) (*Identity, error)
	// SignalDKGParticipant is called by non-coordinators nodes that sends their
	// public keys and secret proof they have to the coordinator so that he can
	// create the group.
	SignalDKGParticipant(ctx context.Context, in *SignalDKGPacket, opts ...grpc.CallOption) (*Empty, error)
	// PushDKGInfo is called by the coordinator to push the group he created
	// from all received keys and as well other information such as the time of
	// starting the DKG.
	PushDKGInfo(ctx context.Context, in *DKGInfoPacket, opts ...grpc.CallOption) (*Empty, error)
	// BroadcastPacket is used during DKG phases
	BroadcastDKG(ctx context.Context, in *DKGPacket, opts ...grpc.CallOption) (*Empty, error)
	// PartialBeacon sends its partial beacon to another node
	PartialBeacon(ctx context.Context, in *PartialBeaconPacket, opts ...grpc.CallOption) (*Empty, error)
	// SyncRequest forces a daemon to sync up its chain with other nodes
	SyncChain(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (Protocol_SyncChainClient, error)
}

ProtocolClient is the client API for Protocol service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewProtocolClient added in v0.5.2

func NewProtocolClient(cc grpc.ClientConnInterface) ProtocolClient

type ProtocolServer added in v0.5.2

type ProtocolServer interface {
	// GetIdentity returns the identity of the drand node
	GetIdentity(context.Context, *IdentityRequest) (*Identity, error)
	// SignalDKGParticipant is called by non-coordinators nodes that sends their
	// public keys and secret proof they have to the coordinator so that he can
	// create the group.
	SignalDKGParticipant(context.Context, *SignalDKGPacket) (*Empty, error)
	// PushDKGInfo is called by the coordinator to push the group he created
	// from all received keys and as well other information such as the time of
	// starting the DKG.
	PushDKGInfo(context.Context, *DKGInfoPacket) (*Empty, error)
	// BroadcastPacket is used during DKG phases
	BroadcastDKG(context.Context, *DKGPacket) (*Empty, error)
	// PartialBeacon sends its partial beacon to another node
	PartialBeacon(context.Context, *PartialBeaconPacket) (*Empty, error)
	// SyncRequest forces a daemon to sync up its chain with other nodes
	SyncChain(*SyncRequest, Protocol_SyncChainServer) error
}

ProtocolServer is the server API for Protocol service. All implementations should embed UnimplementedProtocolServer for forward compatibility

type Protocol_SyncChainClient added in v0.6.1

type Protocol_SyncChainClient interface {
	Recv() (*BeaconPacket, error)
	grpc.ClientStream
}

type Protocol_SyncChainServer added in v0.6.1

type Protocol_SyncChainServer interface {
	Send(*BeaconPacket) error
	grpc.ServerStream
}

type PublicClient added in v0.5.2

type PublicClient interface {
	// PublicRand is the method that returns the publicly verifiable randomness
	// generated by the drand network.
	PublicRand(ctx context.Context, in *PublicRandRequest, opts ...grpc.CallOption) (*PublicRandResponse, error)
	PublicRandStream(ctx context.Context, in *PublicRandRequest, opts ...grpc.CallOption) (Public_PublicRandStreamClient, error)
	// PrivateRand is the method that returns the private randomness generated
	// by the drand node only.
	PrivateRand(ctx context.Context, in *PrivateRandRequest, opts ...grpc.CallOption) (*PrivateRandResponse, error)
	// ChainInfo returns the information related to the chain this node
	// participates to
	ChainInfo(ctx context.Context, in *ChainInfoRequest, opts ...grpc.CallOption) (*ChainInfoPacket, error)
	// Home is a simple endpoint
	Home(ctx context.Context, in *HomeRequest, opts ...grpc.CallOption) (*HomeResponse, error)
}

PublicClient is the client API for Public service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewPublicClient added in v0.5.2

func NewPublicClient(cc grpc.ClientConnInterface) PublicClient

type PublicKeyRequest added in v0.5.2

type PublicKeyRequest struct {
	// contains filtered or unexported fields
}

PublicKeyRequest requests the public key of a drand node

func (*PublicKeyRequest) Descriptor deprecated added in v0.5.2

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

Deprecated: Use PublicKeyRequest.ProtoReflect.Descriptor instead.

func (*PublicKeyRequest) ProtoMessage added in v0.5.2

func (*PublicKeyRequest) ProtoMessage()

func (*PublicKeyRequest) ProtoReflect added in v1.0.0

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

func (*PublicKeyRequest) Reset added in v0.5.2

func (x *PublicKeyRequest) Reset()

func (*PublicKeyRequest) String added in v0.5.2

func (x *PublicKeyRequest) String() string

type PublicKeyResponse added in v0.5.2

type PublicKeyResponse struct {
	PubKey []byte `protobuf:"bytes,2,opt,name=pubKey,proto3" json:"pubKey,omitempty"`
	// contains filtered or unexported fields
}

PublicKeyResponse holds the public key of a drand node

func (*PublicKeyResponse) Descriptor deprecated added in v0.5.2

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

Deprecated: Use PublicKeyResponse.ProtoReflect.Descriptor instead.

func (*PublicKeyResponse) GetPubKey added in v0.5.2

func (x *PublicKeyResponse) GetPubKey() []byte

func (*PublicKeyResponse) ProtoMessage added in v0.5.2

func (*PublicKeyResponse) ProtoMessage()

func (*PublicKeyResponse) ProtoReflect added in v1.0.0

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

func (*PublicKeyResponse) Reset added in v0.5.2

func (x *PublicKeyResponse) Reset()

func (*PublicKeyResponse) String added in v0.5.2

func (x *PublicKeyResponse) String() string

type PublicRandRequest

type PublicRandRequest struct {

	// round uniquely identifies a beacon. If round == 0 (or unspecified), then
	// the response will contain the last.
	Round uint64 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
	// contains filtered or unexported fields
}

PublicRandRequest requests a public random value that has been generated in a unbiasable way and verifiable.

func (*PublicRandRequest) Descriptor deprecated

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

Deprecated: Use PublicRandRequest.ProtoReflect.Descriptor instead.

func (*PublicRandRequest) GetRound

func (x *PublicRandRequest) GetRound() uint64

func (*PublicRandRequest) ProtoMessage

func (*PublicRandRequest) ProtoMessage()

func (*PublicRandRequest) ProtoReflect added in v1.0.0

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

func (*PublicRandRequest) Reset

func (x *PublicRandRequest) Reset()

func (*PublicRandRequest) String

func (x *PublicRandRequest) String() string

type PublicRandResponse

type PublicRandResponse struct {
	Round             uint64 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
	Signature         []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	PreviousSignature []byte `protobuf:"bytes,3,opt,name=previous_signature,json=previousSignature,proto3" json:"previous_signature,omitempty"`
	// randomness is simply there to demonstrate - it is the hash of the
	// signature. It should be computed locally.
	Randomness []byte `protobuf:"bytes,4,opt,name=randomness,proto3" json:"randomness,omitempty"`
	// contains filtered or unexported fields
}

PublicRandResponse holds a signature which is the random value. It can be verified thanks to the distributed public key of the nodes that have ran the DKG protocol and is unbiasable. The randomness can be verified using the BLS verification routine with the message "round || previous_rand".

func (*PublicRandResponse) Descriptor deprecated

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

Deprecated: Use PublicRandResponse.ProtoReflect.Descriptor instead.

func (*PublicRandResponse) GetPreviousSignature added in v0.6.1

func (x *PublicRandResponse) GetPreviousSignature() []byte

func (*PublicRandResponse) GetRandomness

func (x *PublicRandResponse) GetRandomness() []byte

func (*PublicRandResponse) GetRound

func (x *PublicRandResponse) GetRound() uint64

func (*PublicRandResponse) GetSignature added in v0.5.2

func (x *PublicRandResponse) GetSignature() []byte

func (*PublicRandResponse) ProtoMessage

func (*PublicRandResponse) ProtoMessage()

func (*PublicRandResponse) ProtoReflect added in v1.0.0

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

func (*PublicRandResponse) Reset

func (x *PublicRandResponse) Reset()

func (*PublicRandResponse) String

func (x *PublicRandResponse) String() string

type PublicServer added in v0.5.2

type PublicServer interface {
	// PublicRand is the method that returns the publicly verifiable randomness
	// generated by the drand network.
	PublicRand(context.Context, *PublicRandRequest) (*PublicRandResponse, error)
	PublicRandStream(*PublicRandRequest, Public_PublicRandStreamServer) error
	// PrivateRand is the method that returns the private randomness generated
	// by the drand node only.
	PrivateRand(context.Context, *PrivateRandRequest) (*PrivateRandResponse, error)
	// ChainInfo returns the information related to the chain this node
	// participates to
	ChainInfo(context.Context, *ChainInfoRequest) (*ChainInfoPacket, error)
	// Home is a simple endpoint
	Home(context.Context, *HomeRequest) (*HomeResponse, error)
}

PublicServer is the server API for Public service. All implementations should embed UnimplementedPublicServer for forward compatibility

type Public_PublicRandStreamClient added in v0.6.1

type Public_PublicRandStreamClient interface {
	Recv() (*PublicRandResponse, error)
	grpc.ClientStream
}

type Public_PublicRandStreamServer added in v0.6.1

type Public_PublicRandStreamServer interface {
	Send(*PublicRandResponse) error
	grpc.ServerStream
}

type SetupInfoPacket added in v0.7.1

type SetupInfoPacket struct {
	Leader bool `protobuf:"varint,1,opt,name=leader,proto3" json:"leader,omitempty"`
	// LeaderAddress is only used by non-leader
	LeaderAddress string `protobuf:"bytes,2,opt,name=leader_address,json=leaderAddress,proto3" json:"leader_address,omitempty"`
	// LeaderTls is only used by non-leader
	LeaderTls bool `protobuf:"varint,3,opt,name=leader_tls,json=leaderTls,proto3" json:"leader_tls,omitempty"`
	// the expected number of nodes the group must have
	Nodes uint32 `protobuf:"varint,4,opt,name=nodes,proto3" json:"nodes,omitempty"`
	// the threshold to set to the group
	Threshold uint32 `protobuf:"varint,5,opt,name=threshold,proto3" json:"threshold,omitempty"`
	// timeout of the dkg - it is used for transitioning to the different phases of
	// the dkg (deal, responses and justifications if needed). Unit is in seconds.
	Timeout uint32 `protobuf:"varint,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// This field is used by the coordinator to set a genesis time or transition
	// time for the beacon to start. It normally takes time.Now() +
	// beacon_offset.  This offset MUST be superior to the time it takes to
	// run the DKG, even under "malicious case" when the dkg takes longer.
	// In such cases, the dkg takes 3 * timeout time to finish because of the
	// three phases: deal, responses and justifications.
	// XXX: should find a way to designate the time *after* the DKG - beacon
	// generation and dkg should be more separated.
	BeaconOffset uint32 `protobuf:"varint,7,opt,name=beacon_offset,json=beaconOffset,proto3" json:"beacon_offset,omitempty"`
	// dkg_offset is used to set the time for which nodes should start the DKG.
	// To avoid any concurrency / networking effect where nodes start the DKG
	// while some others still haven't received the group configuration, the
	// coordinator do this in two steps: first, send the group configuration to
	// every node, and then every node start at the specified time. This offset
	// is set to be sufficiently large such that with high confidence all nodes
	// received the group file by then.
	DkgOffset uint32 `protobuf:"varint,8,opt,name=dkg_offset,json=dkgOffset,proto3" json:"dkg_offset,omitempty"`
	// the secret used to authentify group members
	Secret []byte `protobuf:"bytes,9,opt,name=secret,proto3" json:"secret,omitempty"`
	// indicating to the node that this (re)share operation should be started
	// even if there is already one in progress.
	Force bool `protobuf:"varint,10,opt,name=force,proto3" json:"force,omitempty"`
	// contains filtered or unexported fields
}

SetupInfoPacket contains all information necessary to run an "automatic" setup phase where the designated leader acts as a coordinator as to what is the group file and when does the chain starts.

func (*SetupInfoPacket) Descriptor deprecated added in v0.7.1

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

Deprecated: Use SetupInfoPacket.ProtoReflect.Descriptor instead.

func (*SetupInfoPacket) GetBeaconOffset added in v0.7.1

func (x *SetupInfoPacket) GetBeaconOffset() uint32

func (*SetupInfoPacket) GetDkgOffset added in v0.9.0

func (x *SetupInfoPacket) GetDkgOffset() uint32

func (*SetupInfoPacket) GetForce added in v1.0.3

func (x *SetupInfoPacket) GetForce() bool

func (*SetupInfoPacket) GetLeader added in v0.7.1

func (x *SetupInfoPacket) GetLeader() bool

func (*SetupInfoPacket) GetLeaderAddress added in v0.7.1

func (x *SetupInfoPacket) GetLeaderAddress() string

func (*SetupInfoPacket) GetLeaderTls added in v0.7.1

func (x *SetupInfoPacket) GetLeaderTls() bool

func (*SetupInfoPacket) GetNodes added in v0.7.1

func (x *SetupInfoPacket) GetNodes() uint32

func (*SetupInfoPacket) GetSecret added in v0.7.1

func (x *SetupInfoPacket) GetSecret() []byte

func (*SetupInfoPacket) GetThreshold added in v0.7.1

func (x *SetupInfoPacket) GetThreshold() uint32

func (*SetupInfoPacket) GetTimeout added in v0.7.1

func (x *SetupInfoPacket) GetTimeout() uint32

func (*SetupInfoPacket) ProtoMessage added in v0.7.1

func (*SetupInfoPacket) ProtoMessage()

func (*SetupInfoPacket) ProtoReflect added in v1.0.0

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

func (*SetupInfoPacket) Reset added in v0.7.1

func (x *SetupInfoPacket) Reset()

func (*SetupInfoPacket) String added in v0.7.1

func (x *SetupInfoPacket) String() string

type ShareRequest added in v0.5.2

type ShareRequest struct {
	// contains filtered or unexported fields
}

ShareRequest requests the private share of a drand node

func (*ShareRequest) Descriptor deprecated added in v0.5.2

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

Deprecated: Use ShareRequest.ProtoReflect.Descriptor instead.

func (*ShareRequest) ProtoMessage added in v0.5.2

func (*ShareRequest) ProtoMessage()

func (*ShareRequest) ProtoReflect added in v1.0.0

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

func (*ShareRequest) Reset added in v0.5.2

func (x *ShareRequest) Reset()

func (*ShareRequest) String added in v0.5.2

func (x *ShareRequest) String() string

type ShareResponse added in v0.5.2

type ShareResponse struct {
	Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	Share []byte `protobuf:"bytes,3,opt,name=share,proto3" json:"share,omitempty"`
	// contains filtered or unexported fields
}

ShareResponse holds the private share of a drand node

func (*ShareResponse) Descriptor deprecated added in v0.5.2

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

Deprecated: Use ShareResponse.ProtoReflect.Descriptor instead.

func (*ShareResponse) GetIndex added in v0.5.2

func (x *ShareResponse) GetIndex() uint32

func (*ShareResponse) GetShare added in v0.5.2

func (x *ShareResponse) GetShare() []byte

func (*ShareResponse) ProtoMessage added in v0.5.2

func (*ShareResponse) ProtoMessage()

func (*ShareResponse) ProtoReflect added in v1.0.0

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

func (*ShareResponse) Reset added in v0.5.2

func (x *ShareResponse) Reset()

func (*ShareResponse) String added in v0.5.2

func (x *ShareResponse) String() string

type ShutdownRequest added in v0.5.4

type ShutdownRequest struct {
	// contains filtered or unexported fields
}

func (*ShutdownRequest) Descriptor deprecated added in v0.5.4

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

Deprecated: Use ShutdownRequest.ProtoReflect.Descriptor instead.

func (*ShutdownRequest) ProtoMessage added in v0.5.4

func (*ShutdownRequest) ProtoMessage()

func (*ShutdownRequest) ProtoReflect added in v1.0.0

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

func (*ShutdownRequest) Reset added in v0.5.4

func (x *ShutdownRequest) Reset()

func (*ShutdownRequest) String added in v0.5.4

func (x *ShutdownRequest) String() string

type ShutdownResponse added in v0.5.4

type ShutdownResponse struct {
	// contains filtered or unexported fields
}

func (*ShutdownResponse) Descriptor deprecated added in v0.5.4

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

Deprecated: Use ShutdownResponse.ProtoReflect.Descriptor instead.

func (*ShutdownResponse) ProtoMessage added in v0.5.4

func (*ShutdownResponse) ProtoMessage()

func (*ShutdownResponse) ProtoReflect added in v1.0.0

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

func (*ShutdownResponse) Reset added in v0.5.4

func (x *ShutdownResponse) Reset()

func (*ShutdownResponse) String added in v0.5.4

func (x *ShutdownResponse) String() string

type SignalDKGPacket added in v0.9.0

type SignalDKGPacket struct {
	Node        *Identity `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	SecretProof []byte    `protobuf:"bytes,2,opt,name=secret_proof,json=secretProof,proto3" json:"secret_proof,omitempty"`
	// In resharing cases, previous_group_hash is the hash of the previous group.
	// It is to make sure the nodes build on top of the correct previous group.
	PreviousGroupHash []byte `protobuf:"bytes,3,opt,name=previous_group_hash,json=previousGroupHash,proto3" json:"previous_group_hash,omitempty"`
	// contains filtered or unexported fields
}

SignalDKGPacket is the packet nodes send to a coordinator that collects all keys and setups the group and sends them back to the nodes such that they can start the DKG automatically.

func (*SignalDKGPacket) Descriptor deprecated added in v0.9.0

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

Deprecated: Use SignalDKGPacket.ProtoReflect.Descriptor instead.

func (*SignalDKGPacket) GetNode added in v0.9.0

func (x *SignalDKGPacket) GetNode() *Identity

func (*SignalDKGPacket) GetPreviousGroupHash added in v0.9.0

func (x *SignalDKGPacket) GetPreviousGroupHash() []byte

func (*SignalDKGPacket) GetSecretProof added in v0.9.0

func (x *SignalDKGPacket) GetSecretProof() []byte

func (*SignalDKGPacket) ProtoMessage added in v0.9.0

func (*SignalDKGPacket) ProtoMessage()

func (*SignalDKGPacket) ProtoReflect added in v1.0.0

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

func (*SignalDKGPacket) Reset added in v0.9.0

func (x *SignalDKGPacket) Reset()

func (*SignalDKGPacket) String added in v0.9.0

func (x *SignalDKGPacket) String() string

type StartFollowRequest added in v1.0.2

type StartFollowRequest struct {

	// hex format
	InfoHash string `protobuf:"bytes,1,opt,name=info_hash,json=infoHash,proto3" json:"info_hash,omitempty"`
	// nodes to contact to
	Nodes []string `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// is TLS enabled on these nodes or not
	// NOTE currently drand either supports following from all TLS or all
	// non-tls nodes
	IsTls bool `protobuf:"varint,3,opt,name=is_tls,json=isTls,proto3" json:"is_tls,omitempty"`
	// up_to tells the drand daemon to not follow up after the given round.
	// if up_to is 0, the follow operation continues until it is cancelled.
	UpTo uint64 `protobuf:"varint,4,opt,name=up_to,json=upTo,proto3" json:"up_to,omitempty"`
	// contains filtered or unexported fields
}

func (*StartFollowRequest) Descriptor deprecated added in v1.0.2

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

Deprecated: Use StartFollowRequest.ProtoReflect.Descriptor instead.

func (*StartFollowRequest) GetInfoHash added in v1.0.2

func (x *StartFollowRequest) GetInfoHash() string

func (*StartFollowRequest) GetIsTls added in v1.0.2

func (x *StartFollowRequest) GetIsTls() bool

func (*StartFollowRequest) GetNodes added in v1.0.2

func (x *StartFollowRequest) GetNodes() []string

func (*StartFollowRequest) GetUpTo added in v1.0.3

func (x *StartFollowRequest) GetUpTo() uint64

func (*StartFollowRequest) ProtoMessage added in v1.0.2

func (*StartFollowRequest) ProtoMessage()

func (*StartFollowRequest) ProtoReflect added in v1.0.2

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

func (*StartFollowRequest) Reset added in v1.0.2

func (x *StartFollowRequest) Reset()

func (*StartFollowRequest) String added in v1.0.2

func (x *StartFollowRequest) String() string

type SyncRequest added in v0.6.1

type SyncRequest struct {
	FromRound uint64 `protobuf:"varint,1,opt,name=from_round,json=fromRound,proto3" json:"from_round,omitempty"`
	// contains filtered or unexported fields
}

SyncRequest is from a node that needs to sync up with the current head of the chain

func (*SyncRequest) Descriptor deprecated added in v0.6.1

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

Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.

func (*SyncRequest) GetFromRound added in v0.6.1

func (x *SyncRequest) GetFromRound() uint64

func (*SyncRequest) ProtoMessage added in v0.6.1

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) ProtoReflect added in v1.0.0

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

func (*SyncRequest) Reset added in v0.6.1

func (x *SyncRequest) Reset()

func (*SyncRequest) String added in v0.6.1

func (x *SyncRequest) String() string

type UnimplementedControlServer added in v0.6.1

type UnimplementedControlServer struct {
}

UnimplementedControlServer should be embedded to have forward compatible implementations.

func (UnimplementedControlServer) BackupDatabase added in v1.2.6

func (UnimplementedControlServer) ChainInfo added in v1.0.0

func (UnimplementedControlServer) GroupFile added in v0.6.1

func (UnimplementedControlServer) InitDKG added in v0.6.1

func (UnimplementedControlServer) InitReshare added in v0.6.1

func (UnimplementedControlServer) PingPong added in v0.6.1

func (UnimplementedControlServer) PrivateKey added in v0.6.1

func (UnimplementedControlServer) PublicKey added in v0.6.1

func (UnimplementedControlServer) Share added in v0.6.1

func (UnimplementedControlServer) Shutdown added in v0.6.1

func (UnimplementedControlServer) StartFollowChain added in v1.0.2

type UnimplementedProtocolServer added in v0.6.1

type UnimplementedProtocolServer struct {
}

UnimplementedProtocolServer should be embedded to have forward compatible implementations.

func (UnimplementedProtocolServer) BroadcastDKG added in v1.1.0

func (UnimplementedProtocolServer) GetIdentity added in v1.0.0

func (UnimplementedProtocolServer) PartialBeacon added in v0.7.5

func (UnimplementedProtocolServer) PushDKGInfo added in v0.9.0

func (UnimplementedProtocolServer) SignalDKGParticipant added in v0.9.0

func (UnimplementedProtocolServer) SyncChain added in v0.6.1

type UnimplementedPublicServer added in v0.6.1

type UnimplementedPublicServer struct {
}

UnimplementedPublicServer should be embedded to have forward compatible implementations.

func (UnimplementedPublicServer) ChainInfo added in v1.0.0

func (UnimplementedPublicServer) Home added in v0.6.1

func (UnimplementedPublicServer) PrivateRand added in v0.6.1

func (UnimplementedPublicServer) PublicRand added in v0.6.1

func (UnimplementedPublicServer) PublicRandStream added in v0.6.1

type UnsafeControlServer added in v1.2.6

type UnsafeControlServer interface {
	// contains filtered or unexported methods
}

UnsafeControlServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ControlServer will result in compilation errors.

type UnsafeProtocolServer added in v1.2.6

type UnsafeProtocolServer interface {
	// contains filtered or unexported methods
}

UnsafeProtocolServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProtocolServer will result in compilation errors.

type UnsafePublicServer added in v1.2.6

type UnsafePublicServer interface {
	// contains filtered or unexported methods
}

UnsafePublicServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PublicServer will result in compilation errors.

Jump to

Keyboard shortcuts

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