Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterDisperserServer(s grpc.ServiceRegistrar, srv DisperserServer)
- type BlobHeader
- func (*BlobHeader) Descriptor() ([]byte, []int)deprecated
- func (x *BlobHeader) GetDataRoot() []byte
- func (x *BlobHeader) GetEpoch() uint64
- func (x *BlobHeader) GetQuorumId() uint64
- func (*BlobHeader) ProtoMessage()
- func (x *BlobHeader) ProtoReflect() protoreflect.Message
- func (x *BlobHeader) Reset()
- func (x *BlobHeader) String() string
- type BlobInfo
- type BlobStatus
- type BlobStatusReply
- func (*BlobStatusReply) Descriptor() ([]byte, []int)deprecated
- func (x *BlobStatusReply) GetInfo() *BlobInfo
- func (x *BlobStatusReply) GetStatus() BlobStatus
- func (*BlobStatusReply) ProtoMessage()
- func (x *BlobStatusReply) ProtoReflect() protoreflect.Message
- func (x *BlobStatusReply) Reset()
- func (x *BlobStatusReply) String() string
- type BlobStatusRequest
- type DisperseBlobReply
- func (*DisperseBlobReply) Descriptor() ([]byte, []int)deprecated
- func (x *DisperseBlobReply) GetRequestId() []byte
- func (x *DisperseBlobReply) GetResult() BlobStatus
- func (*DisperseBlobReply) ProtoMessage()
- func (x *DisperseBlobReply) ProtoReflect() protoreflect.Message
- func (x *DisperseBlobReply) Reset()
- func (x *DisperseBlobReply) String() string
- type DisperseBlobRequest
- func (*DisperseBlobRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DisperseBlobRequest) GetData() []byte
- func (*DisperseBlobRequest) ProtoMessage()
- func (x *DisperseBlobRequest) ProtoReflect() protoreflect.Message
- func (x *DisperseBlobRequest) Reset()
- func (x *DisperseBlobRequest) String() string
- type DisperserClient
- type DisperserServer
- type Empty
- type GetStatusReply
- type RetrieveBlobReply
- type RetrieveBlobRequest
- func (*RetrieveBlobRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RetrieveBlobRequest) GetEpoch() uint64
- func (x *RetrieveBlobRequest) GetQuorumId() uint64
- func (x *RetrieveBlobRequest) GetStorageRoot() []byte
- func (*RetrieveBlobRequest) ProtoMessage()
- func (x *RetrieveBlobRequest) ProtoReflect() protoreflect.Message
- func (x *RetrieveBlobRequest) Reset()
- func (x *RetrieveBlobRequest) String() string
- type UnimplementedDisperserServer
- func (UnimplementedDisperserServer) DisperseBlob(context.Context, *DisperseBlobRequest) (*DisperseBlobReply, error)
- func (UnimplementedDisperserServer) GetBlobStatus(context.Context, *BlobStatusRequest) (*BlobStatusReply, error)
- func (UnimplementedDisperserServer) GetStatus(context.Context, *Empty) (*GetStatusReply, error)
- func (UnimplementedDisperserServer) RetrieveBlob(context.Context, *RetrieveBlobRequest) (*RetrieveBlobReply, error)
- type UnsafeDisperserServer
Constants ¶
const ( Disperser_DisperseBlob_FullMethodName = "/disperser.Disperser/DisperseBlob" Disperser_GetBlobStatus_FullMethodName = "/disperser.Disperser/GetBlobStatus" Disperser_RetrieveBlob_FullMethodName = "/disperser.Disperser/RetrieveBlob" Disperser_GetStatus_FullMethodName = "/disperser.Disperser/GetStatus" )
Variables ¶
var ( BlobStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "PROCESSING", 2: "CONFIRMED", 3: "FAILED", 4: "FINALIZED", 5: "INSUFFICIENT_SIGNATURES", } BlobStatus_value = map[string]int32{ "UNKNOWN": 0, "PROCESSING": 1, "CONFIRMED": 2, "FAILED": 3, "FINALIZED": 4, "INSUFFICIENT_SIGNATURES": 5, } )
Enum value maps for BlobStatus.
var Disperser_ServiceDesc = grpc.ServiceDesc{ ServiceName: "disperser.Disperser", HandlerType: (*DisperserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DisperseBlob", Handler: _Disperser_DisperseBlob_Handler, }, { MethodName: "GetBlobStatus", Handler: _Disperser_GetBlobStatus_Handler, }, { MethodName: "RetrieveBlob", Handler: _Disperser_RetrieveBlob_Handler, }, { MethodName: "GetStatus", Handler: _Disperser_GetStatus_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "da-client/disperser.proto", }
Disperser_ServiceDesc is the grpc.ServiceDesc for Disperser service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_da_client_disperser_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDisperserServer ¶
func RegisterDisperserServer(s grpc.ServiceRegistrar, srv DisperserServer)
Types ¶
type BlobHeader ¶
type BlobHeader struct { // The data merkle root DataRoot []byte `protobuf:"bytes,4,opt,name=data_root,json=dataRoot,proto3" json:"data_root,omitempty"` // Signers epoch Epoch uint64 `protobuf:"varint,5,opt,name=epoch,proto3" json:"epoch,omitempty"` // Signers quorum id QuorumId uint64 `protobuf:"varint,6,opt,name=quorum_id,json=quorumId,proto3" json:"quorum_id,omitempty"` // contains filtered or unexported fields }
func (*BlobHeader) Descriptor
deprecated
func (*BlobHeader) Descriptor() ([]byte, []int)
Deprecated: Use BlobHeader.ProtoReflect.Descriptor instead.
func (*BlobHeader) GetDataRoot ¶
func (x *BlobHeader) GetDataRoot() []byte
func (*BlobHeader) GetEpoch ¶
func (x *BlobHeader) GetEpoch() uint64
func (*BlobHeader) GetQuorumId ¶
func (x *BlobHeader) GetQuorumId() uint64
func (*BlobHeader) ProtoMessage ¶
func (*BlobHeader) ProtoMessage()
func (*BlobHeader) ProtoReflect ¶
func (x *BlobHeader) ProtoReflect() protoreflect.Message
func (*BlobHeader) Reset ¶
func (x *BlobHeader) Reset()
func (*BlobHeader) String ¶
func (x *BlobHeader) String() string
type BlobInfo ¶
type BlobInfo struct { BlobHeader *BlobHeader `protobuf:"bytes,1,opt,name=blob_header,json=blobHeader,proto3" json:"blob_header,omitempty"` // contains filtered or unexported fields }
BlobInfo contains information needed to confirm the blob against the ZGDA contracts
func (*BlobInfo) Descriptor
deprecated
func (*BlobInfo) GetBlobHeader ¶
func (x *BlobInfo) GetBlobHeader() *BlobHeader
func (*BlobInfo) ProtoMessage ¶
func (*BlobInfo) ProtoMessage()
func (*BlobInfo) ProtoReflect ¶
func (x *BlobInfo) ProtoReflect() protoreflect.Message
type BlobStatus ¶
type BlobStatus int32
const ( BlobStatus_UNKNOWN BlobStatus = 0 // PROCESSING means that the blob is currently being processed by the disperser BlobStatus_PROCESSING BlobStatus = 1 // CONFIRMED means that the blob has been dispersed to DA Nodes and the dispersed // batch containing the blob has been confirmed onchain BlobStatus_CONFIRMED BlobStatus = 2 // FAILED means that the blob has failed permanently (for reasons other than insufficient // signatures, which is a separate state) BlobStatus_FAILED BlobStatus = 3 // FINALIZED means that the block containing the blob's confirmation transaction has been finalized on Ethereum BlobStatus_FINALIZED BlobStatus = 4 // INSUFFICIENT_SIGNATURES means that the quorum threshold for the blob was not met // for at least one quorum. BlobStatus_INSUFFICIENT_SIGNATURES BlobStatus = 5 )
func (BlobStatus) Descriptor ¶
func (BlobStatus) Descriptor() protoreflect.EnumDescriptor
func (BlobStatus) Enum ¶
func (x BlobStatus) Enum() *BlobStatus
func (BlobStatus) EnumDescriptor
deprecated
func (BlobStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use BlobStatus.Descriptor instead.
func (BlobStatus) Number ¶
func (x BlobStatus) Number() protoreflect.EnumNumber
func (BlobStatus) String ¶
func (x BlobStatus) String() string
func (BlobStatus) Type ¶
func (BlobStatus) Type() protoreflect.EnumType
type BlobStatusReply ¶
type BlobStatusReply struct { // The status of the blob. Status BlobStatus `protobuf:"varint,1,opt,name=status,proto3,enum=disperser.BlobStatus" json:"status,omitempty"` // The blob info needed for clients to confirm the blob against the ZGDA contracts. Info *BlobInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*BlobStatusReply) Descriptor
deprecated
func (*BlobStatusReply) Descriptor() ([]byte, []int)
Deprecated: Use BlobStatusReply.ProtoReflect.Descriptor instead.
func (*BlobStatusReply) GetInfo ¶
func (x *BlobStatusReply) GetInfo() *BlobInfo
func (*BlobStatusReply) GetStatus ¶
func (x *BlobStatusReply) GetStatus() BlobStatus
func (*BlobStatusReply) ProtoMessage ¶
func (*BlobStatusReply) ProtoMessage()
func (*BlobStatusReply) ProtoReflect ¶
func (x *BlobStatusReply) ProtoReflect() protoreflect.Message
func (*BlobStatusReply) Reset ¶
func (x *BlobStatusReply) Reset()
func (*BlobStatusReply) String ¶
func (x *BlobStatusReply) String() string
type BlobStatusRequest ¶
type BlobStatusRequest struct { RequestId []byte `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // contains filtered or unexported fields }
BlobStatusRequest is used to query the status of a blob.
func (*BlobStatusRequest) Descriptor
deprecated
func (*BlobStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use BlobStatusRequest.ProtoReflect.Descriptor instead.
func (*BlobStatusRequest) GetRequestId ¶
func (x *BlobStatusRequest) GetRequestId() []byte
func (*BlobStatusRequest) ProtoMessage ¶
func (*BlobStatusRequest) ProtoMessage()
func (*BlobStatusRequest) ProtoReflect ¶
func (x *BlobStatusRequest) ProtoReflect() protoreflect.Message
func (*BlobStatusRequest) Reset ¶
func (x *BlobStatusRequest) Reset()
func (*BlobStatusRequest) String ¶
func (x *BlobStatusRequest) String() string
type DisperseBlobReply ¶
type DisperseBlobReply struct { // The status of the blob associated with the request_id. Result BlobStatus `protobuf:"varint,1,opt,name=result,proto3,enum=disperser.BlobStatus" json:"result,omitempty"` // The request ID generated by the disperser. // Once a request is accepted (although not processed), a unique request ID will be // generated. // Two different DisperseBlobRequests (determined by the hash of the DisperseBlobRequest) // will have different IDs, and the same DisperseBlobRequest sent repeatedly at different // times will also have different IDs. // The client should use this ID to query the processing status of the request (via // the GetBlobStatus API). RequestId []byte `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // contains filtered or unexported fields }
func (*DisperseBlobReply) Descriptor
deprecated
func (*DisperseBlobReply) Descriptor() ([]byte, []int)
Deprecated: Use DisperseBlobReply.ProtoReflect.Descriptor instead.
func (*DisperseBlobReply) GetRequestId ¶
func (x *DisperseBlobReply) GetRequestId() []byte
func (*DisperseBlobReply) GetResult ¶
func (x *DisperseBlobReply) GetResult() BlobStatus
func (*DisperseBlobReply) ProtoMessage ¶
func (*DisperseBlobReply) ProtoMessage()
func (*DisperseBlobReply) ProtoReflect ¶
func (x *DisperseBlobReply) ProtoReflect() protoreflect.Message
func (*DisperseBlobReply) Reset ¶
func (x *DisperseBlobReply) Reset()
func (*DisperseBlobReply) String ¶
func (x *DisperseBlobReply) String() string
type DisperseBlobRequest ¶
type DisperseBlobRequest struct { // The data to be dispersed. // The size of data must be <= 512KiB. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*DisperseBlobRequest) Descriptor
deprecated
func (*DisperseBlobRequest) Descriptor() ([]byte, []int)
Deprecated: Use DisperseBlobRequest.ProtoReflect.Descriptor instead.
func (*DisperseBlobRequest) GetData ¶
func (x *DisperseBlobRequest) GetData() []byte
func (*DisperseBlobRequest) ProtoMessage ¶
func (*DisperseBlobRequest) ProtoMessage()
func (*DisperseBlobRequest) ProtoReflect ¶
func (x *DisperseBlobRequest) ProtoReflect() protoreflect.Message
func (*DisperseBlobRequest) Reset ¶
func (x *DisperseBlobRequest) Reset()
func (*DisperseBlobRequest) String ¶
func (x *DisperseBlobRequest) String() string
type DisperserClient ¶
type DisperserClient interface { // This API accepts blob to disperse from clients. // This executes the dispersal async, i.e. it returns once the request // is accepted. The client could use GetBlobStatus() API to poll the the // processing status of the blob. DisperseBlob(ctx context.Context, in *DisperseBlobRequest, opts ...grpc.CallOption) (*DisperseBlobReply, error) // This API is meant to be polled for the blob status. GetBlobStatus(ctx context.Context, in *BlobStatusRequest, opts ...grpc.CallOption) (*BlobStatusReply, error) // This retrieves the requested blob from the Disperser's backend. // This is a more efficient way to retrieve blobs than directly retrieving // from the DA Nodes (see detail about this approach in // api/proto/retriever/retriever.proto). // The blob should have been initially dispersed via this Disperser service // for this API to work. RetrieveBlob(ctx context.Context, in *RetrieveBlobRequest, opts ...grpc.CallOption) (*RetrieveBlobReply, error) // This checks the disperser status GetStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetStatusReply, error) }
DisperserClient is the client API for Disperser 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.
Disperser defines the public APIs for dispersing blobs.
func NewDisperserClient ¶
func NewDisperserClient(cc grpc.ClientConnInterface) DisperserClient
type DisperserServer ¶
type DisperserServer interface { // This API accepts blob to disperse from clients. // This executes the dispersal async, i.e. it returns once the request // is accepted. The client could use GetBlobStatus() API to poll the the // processing status of the blob. DisperseBlob(context.Context, *DisperseBlobRequest) (*DisperseBlobReply, error) // This API is meant to be polled for the blob status. GetBlobStatus(context.Context, *BlobStatusRequest) (*BlobStatusReply, error) // This retrieves the requested blob from the Disperser's backend. // This is a more efficient way to retrieve blobs than directly retrieving // from the DA Nodes (see detail about this approach in // api/proto/retriever/retriever.proto). // The blob should have been initially dispersed via this Disperser service // for this API to work. RetrieveBlob(context.Context, *RetrieveBlobRequest) (*RetrieveBlobReply, error) // This checks the disperser status GetStatus(context.Context, *Empty) (*GetStatusReply, error) // contains filtered or unexported methods }
DisperserServer is the server API for Disperser service. All implementations must embed UnimplementedDisperserServer for forward compatibility
Disperser defines the public APIs for dispersing blobs.
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GetStatusReply ¶
type GetStatusReply struct { // The status code of the service // TODO: Add more useful information StatusCode uint64 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // contains filtered or unexported fields }
func (*GetStatusReply) Descriptor
deprecated
func (*GetStatusReply) Descriptor() ([]byte, []int)
Deprecated: Use GetStatusReply.ProtoReflect.Descriptor instead.
func (*GetStatusReply) GetStatusCode ¶
func (x *GetStatusReply) GetStatusCode() uint64
func (*GetStatusReply) ProtoMessage ¶
func (*GetStatusReply) ProtoMessage()
func (*GetStatusReply) ProtoReflect ¶
func (x *GetStatusReply) ProtoReflect() protoreflect.Message
func (*GetStatusReply) Reset ¶
func (x *GetStatusReply) Reset()
func (*GetStatusReply) String ¶
func (x *GetStatusReply) String() string
type RetrieveBlobReply ¶
type RetrieveBlobReply struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
RetrieveBlobReply contains the retrieved blob data
func (*RetrieveBlobReply) Descriptor
deprecated
func (*RetrieveBlobReply) Descriptor() ([]byte, []int)
Deprecated: Use RetrieveBlobReply.ProtoReflect.Descriptor instead.
func (*RetrieveBlobReply) GetData ¶
func (x *RetrieveBlobReply) GetData() []byte
func (*RetrieveBlobReply) ProtoMessage ¶
func (*RetrieveBlobReply) ProtoMessage()
func (*RetrieveBlobReply) ProtoReflect ¶
func (x *RetrieveBlobReply) ProtoReflect() protoreflect.Message
func (*RetrieveBlobReply) Reset ¶
func (x *RetrieveBlobReply) Reset()
func (*RetrieveBlobReply) String ¶
func (x *RetrieveBlobReply) String() string
type RetrieveBlobRequest ¶
type RetrieveBlobRequest struct { // The hash of data StorageRoot []byte `protobuf:"bytes,1,opt,name=storage_root,json=storageRoot,proto3" json:"storage_root,omitempty"` // This identifies the epoch that this blob belongs to. Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"` // Which quorum of the blob this is requesting for (note a blob can participate in // multiple quorums). QuorumId uint64 `protobuf:"varint,3,opt,name=quorum_id,json=quorumId,proto3" json:"quorum_id,omitempty"` // contains filtered or unexported fields }
RetrieveBlobRequest contains parameters to retrieve the blob.
func (*RetrieveBlobRequest) Descriptor
deprecated
func (*RetrieveBlobRequest) Descriptor() ([]byte, []int)
Deprecated: Use RetrieveBlobRequest.ProtoReflect.Descriptor instead.
func (*RetrieveBlobRequest) GetEpoch ¶
func (x *RetrieveBlobRequest) GetEpoch() uint64
func (*RetrieveBlobRequest) GetQuorumId ¶
func (x *RetrieveBlobRequest) GetQuorumId() uint64
func (*RetrieveBlobRequest) GetStorageRoot ¶
func (x *RetrieveBlobRequest) GetStorageRoot() []byte
func (*RetrieveBlobRequest) ProtoMessage ¶
func (*RetrieveBlobRequest) ProtoMessage()
func (*RetrieveBlobRequest) ProtoReflect ¶
func (x *RetrieveBlobRequest) ProtoReflect() protoreflect.Message
func (*RetrieveBlobRequest) Reset ¶
func (x *RetrieveBlobRequest) Reset()
func (*RetrieveBlobRequest) String ¶
func (x *RetrieveBlobRequest) String() string
type UnimplementedDisperserServer ¶
type UnimplementedDisperserServer struct { }
UnimplementedDisperserServer must be embedded to have forward compatible implementations.
func (UnimplementedDisperserServer) DisperseBlob ¶
func (UnimplementedDisperserServer) DisperseBlob(context.Context, *DisperseBlobRequest) (*DisperseBlobReply, error)
func (UnimplementedDisperserServer) GetBlobStatus ¶
func (UnimplementedDisperserServer) GetBlobStatus(context.Context, *BlobStatusRequest) (*BlobStatusReply, error)
func (UnimplementedDisperserServer) GetStatus ¶
func (UnimplementedDisperserServer) GetStatus(context.Context, *Empty) (*GetStatusReply, error)
func (UnimplementedDisperserServer) RetrieveBlob ¶
func (UnimplementedDisperserServer) RetrieveBlob(context.Context, *RetrieveBlobRequest) (*RetrieveBlobReply, error)
type UnsafeDisperserServer ¶
type UnsafeDisperserServer interface {
// contains filtered or unexported methods
}
UnsafeDisperserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DisperserServer will result in compilation errors.