pb

package
v0.2.2-RC1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HashDBService_Set_FullMethodName            = "/hashdb.v1.HashDBService/Set"
	HashDBService_Get_FullMethodName            = "/hashdb.v1.HashDBService/Get"
	HashDBService_SetProgram_FullMethodName     = "/hashdb.v1.HashDBService/SetProgram"
	HashDBService_GetProgram_FullMethodName     = "/hashdb.v1.HashDBService/GetProgram"
	HashDBService_LoadDB_FullMethodName         = "/hashdb.v1.HashDBService/LoadDB"
	HashDBService_LoadProgramDB_FullMethodName  = "/hashdb.v1.HashDBService/LoadProgramDB"
	HashDBService_Flush_FullMethodName          = "/hashdb.v1.HashDBService/Flush"
	HashDBService_GetFlushStatus_FullMethodName = "/hashdb.v1.HashDBService/GetFlushStatus"
	HashDBService_GetFlushData_FullMethodName   = "/hashdb.v1.HashDBService/GetFlushData"
)

Variables

View Source
var (
	ResultCode_Code_name = map[int32]string{
		0:  "CODE_UNSPECIFIED",
		1:  "CODE_SUCCESS",
		2:  "CODE_DB_KEY_NOT_FOUND",
		3:  "CODE_DB_ERROR",
		4:  "CODE_INTERNAL_ERROR",
		14: "CODE_SMT_INVALID_DATA_SIZE",
	}
	ResultCode_Code_value = map[string]int32{
		"CODE_UNSPECIFIED":           0,
		"CODE_SUCCESS":               1,
		"CODE_DB_KEY_NOT_FOUND":      2,
		"CODE_DB_ERROR":              3,
		"CODE_INTERNAL_ERROR":        4,
		"CODE_SMT_INVALID_DATA_SIZE": 14,
	}
)

Enum value maps for ResultCode_Code.

View Source
var File_hashdb_proto protoreflect.FileDescriptor
View Source
var HashDBService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hashdb.v1.HashDBService",
	HandlerType: (*HashDBServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Set",
			Handler:    _HashDBService_Set_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _HashDBService_Get_Handler,
		},
		{
			MethodName: "SetProgram",
			Handler:    _HashDBService_SetProgram_Handler,
		},
		{
			MethodName: "GetProgram",
			Handler:    _HashDBService_GetProgram_Handler,
		},
		{
			MethodName: "LoadDB",
			Handler:    _HashDBService_LoadDB_Handler,
		},
		{
			MethodName: "LoadProgramDB",
			Handler:    _HashDBService_LoadProgramDB_Handler,
		},
		{
			MethodName: "Flush",
			Handler:    _HashDBService_Flush_Handler,
		},
		{
			MethodName: "GetFlushStatus",
			Handler:    _HashDBService_GetFlushStatus_Handler,
		},
		{
			MethodName: "GetFlushData",
			Handler:    _HashDBService_GetFlushData_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "hashdb.proto",
}

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

Functions

func RegisterHashDBServiceServer added in v0.2.0

func RegisterHashDBServiceServer(s grpc.ServiceRegistrar, srv HashDBServiceServer)

Types

type FeList

type FeList struct {
	Fe []uint64 `protobuf:"varint,1,rep,packed,name=fe,proto3" json:"fe,omitempty"`
	// contains filtered or unexported fields
}

* @dev FE (Field Element) List @param {fe} - list of Fe

func (*FeList) Descriptor deprecated

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

Deprecated: Use FeList.ProtoReflect.Descriptor instead.

func (*FeList) GetFe

func (x *FeList) GetFe() []uint64

func (*FeList) ProtoMessage

func (*FeList) ProtoMessage()

func (*FeList) ProtoReflect

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

func (*FeList) Reset

func (x *FeList) Reset()

func (*FeList) String

func (x *FeList) String() string

type Fea

type Fea struct {
	Fe0 uint64 `protobuf:"varint,1,opt,name=fe0,proto3" json:"fe0,omitempty"`
	Fe1 uint64 `protobuf:"varint,2,opt,name=fe1,proto3" json:"fe1,omitempty"`
	Fe2 uint64 `protobuf:"varint,3,opt,name=fe2,proto3" json:"fe2,omitempty"`
	Fe3 uint64 `protobuf:"varint,4,opt,name=fe3,proto3" json:"fe3,omitempty"`
	// contains filtered or unexported fields
}

* @dev Array of 4 FE @param {fe0} - Field Element value for pos 0 @param {fe1} - Field Element value for pos 1 @param {fe2} - Field Element value for pos 2 @param {fe3} - Field Element value for pos 3

func (*Fea) Descriptor deprecated

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

Deprecated: Use Fea.ProtoReflect.Descriptor instead.

func (*Fea) GetFe0

func (x *Fea) GetFe0() uint64

func (*Fea) GetFe1

func (x *Fea) GetFe1() uint64

func (*Fea) GetFe2

func (x *Fea) GetFe2() uint64

func (*Fea) GetFe3

func (x *Fea) GetFe3() uint64

func (*Fea) ProtoMessage

func (*Fea) ProtoMessage()

func (*Fea) ProtoReflect

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

func (*Fea) Reset

func (x *Fea) Reset()

func (*Fea) String

func (x *Fea) String() string

type FlushData added in v0.2.0

type FlushData struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

* @dev Flush Data @param {key} - hash key @param {value} - string value

func (*FlushData) Descriptor deprecated added in v0.2.0

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

Deprecated: Use FlushData.ProtoReflect.Descriptor instead.

func (*FlushData) GetKey added in v0.2.0

func (x *FlushData) GetKey() string

func (*FlushData) GetValue added in v0.2.0

func (x *FlushData) GetValue() string

func (*FlushData) ProtoMessage added in v0.2.0

func (*FlushData) ProtoMessage()

func (*FlushData) ProtoReflect added in v0.2.0

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

func (*FlushData) Reset added in v0.2.0

func (x *FlushData) Reset()

func (*FlushData) String added in v0.2.0

func (x *FlushData) String() string

type FlushResponse

type FlushResponse struct {
	FlushId       uint64      `protobuf:"varint,1,opt,name=flush_id,json=flushId,proto3" json:"flush_id,omitempty"`
	StoredFlushId uint64      `protobuf:"varint,2,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"`
	Result        *ResultCode `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

* @dev FlushResponse @param {flush_id} - id assigned to this flush data @param {stored_flush_id} - id of the last flush data sent to database @param {result} - result code

func (*FlushResponse) Descriptor deprecated

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

Deprecated: Use FlushResponse.ProtoReflect.Descriptor instead.

func (*FlushResponse) GetFlushId added in v0.2.0

func (x *FlushResponse) GetFlushId() uint64

func (*FlushResponse) GetResult

func (x *FlushResponse) GetResult() *ResultCode

func (*FlushResponse) GetStoredFlushId added in v0.2.0

func (x *FlushResponse) GetStoredFlushId() uint64

func (*FlushResponse) ProtoMessage

func (*FlushResponse) ProtoMessage()

func (*FlushResponse) ProtoReflect

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

func (*FlushResponse) Reset

func (x *FlushResponse) Reset()

func (*FlushResponse) String

func (x *FlushResponse) String() string

type GetFlushDataRequest added in v0.2.0

type GetFlushDataRequest struct {
	FlushId uint64 `protobuf:"varint,1,opt,name=flush_id,json=flushId,proto3" json:"flush_id,omitempty"`
	// contains filtered or unexported fields
}

* @dev GetFlushDataRequest @param {flush_id} - last stored flush ID got using this method, or 0 if it never was called before

func (*GetFlushDataRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use GetFlushDataRequest.ProtoReflect.Descriptor instead.

func (*GetFlushDataRequest) GetFlushId added in v0.2.0

func (x *GetFlushDataRequest) GetFlushId() uint64

func (*GetFlushDataRequest) ProtoMessage added in v0.2.0

func (*GetFlushDataRequest) ProtoMessage()

func (*GetFlushDataRequest) ProtoReflect added in v0.2.0

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

func (*GetFlushDataRequest) Reset added in v0.2.0

func (x *GetFlushDataRequest) Reset()

func (*GetFlushDataRequest) String added in v0.2.0

func (x *GetFlushDataRequest) String() string

type GetFlushDataResponse added in v0.2.0

type GetFlushDataResponse struct {
	StoredFlushId  uint64       `protobuf:"varint,1,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"`
	Nodes          []*FlushData `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
	NodesUpdate    []*FlushData `protobuf:"bytes,3,rep,name=nodes_update,json=nodesUpdate,proto3" json:"nodes_update,omitempty"`
	Program        []*FlushData `protobuf:"bytes,4,rep,name=program,proto3" json:"program,omitempty"`
	ProgramUpdate  []*FlushData `protobuf:"bytes,5,rep,name=program_update,json=programUpdate,proto3" json:"program_update,omitempty"`
	NodesStateRoot string       `protobuf:"bytes,6,opt,name=nodes_state_root,json=nodesStateRoot,proto3" json:"nodes_state_root,omitempty"`
	Result         *ResultCode  `protobuf:"bytes,7,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

* @dev GetFlushDataResponse @param {stored_flush_id} - id of the last flush data sent to database @param {nodes} - data to insert in the nodes table @param {nodes_update} - data to update in the nodes table @param {program} - data to insert in the program table @param {program_update} - data to update in the program table @param {nodes_state_root} - nodes state root to update in the nodes table @param {result} - result code

func (*GetFlushDataResponse) Descriptor deprecated added in v0.2.0

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

Deprecated: Use GetFlushDataResponse.ProtoReflect.Descriptor instead.

func (*GetFlushDataResponse) GetNodes added in v0.2.0

func (x *GetFlushDataResponse) GetNodes() []*FlushData

func (*GetFlushDataResponse) GetNodesStateRoot added in v0.2.0

func (x *GetFlushDataResponse) GetNodesStateRoot() string

func (*GetFlushDataResponse) GetNodesUpdate added in v0.2.0

func (x *GetFlushDataResponse) GetNodesUpdate() []*FlushData

func (*GetFlushDataResponse) GetProgram added in v0.2.0

func (x *GetFlushDataResponse) GetProgram() []*FlushData

func (*GetFlushDataResponse) GetProgramUpdate added in v0.2.0

func (x *GetFlushDataResponse) GetProgramUpdate() []*FlushData

func (*GetFlushDataResponse) GetResult added in v0.2.0

func (x *GetFlushDataResponse) GetResult() *ResultCode

func (*GetFlushDataResponse) GetStoredFlushId added in v0.2.0

func (x *GetFlushDataResponse) GetStoredFlushId() uint64

func (*GetFlushDataResponse) ProtoMessage added in v0.2.0

func (*GetFlushDataResponse) ProtoMessage()

func (*GetFlushDataResponse) ProtoReflect added in v0.2.0

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

func (*GetFlushDataResponse) Reset added in v0.2.0

func (x *GetFlushDataResponse) Reset()

func (*GetFlushDataResponse) String added in v0.2.0

func (x *GetFlushDataResponse) String() string

type GetFlushStatusResponse added in v0.2.0

type GetFlushStatusResponse struct {
	StoredFlushId         uint64 `protobuf:"varint,1,opt,name=stored_flush_id,json=storedFlushId,proto3" json:"stored_flush_id,omitempty"`
	StoringFlushId        uint64 `protobuf:"varint,2,opt,name=storing_flush_id,json=storingFlushId,proto3" json:"storing_flush_id,omitempty"`
	LastFlushId           uint64 `protobuf:"varint,3,opt,name=last_flush_id,json=lastFlushId,proto3" json:"last_flush_id,omitempty"`
	PendingToFlushNodes   uint64 `protobuf:"varint,4,opt,name=pending_to_flush_nodes,json=pendingToFlushNodes,proto3" json:"pending_to_flush_nodes,omitempty"`
	PendingToFlushProgram uint64 `` /* 129-byte string literal not displayed */
	StoringNodes          uint64 `protobuf:"varint,6,opt,name=storing_nodes,json=storingNodes,proto3" json:"storing_nodes,omitempty"`
	StoringProgram        uint64 `protobuf:"varint,7,opt,name=storing_program,json=storingProgram,proto3" json:"storing_program,omitempty"`
	ProverId              string `protobuf:"bytes,8,opt,name=prover_id,json=proverId,proto3" json:"prover_id,omitempty"`
	// contains filtered or unexported fields
}

* @dev GetFlushStatusResponse @param {stored_flush_id} - id of the last flush data sent to database @param {sending_flush_id} - id of the flush data being sent now to database @param {last_flush_id} - id assigned to the last call to flush @param {pending_to_flush_nodes} - number of SMT nodes pending to flush @param {pending_to_flush_program} - number of SC programs pending to flush @param {storing_nodes} - number of SMT nodes being stored in the hash database @param {storing_program} - number of SC programs being stored in the hash database @param {prover_id} - id assigned to this instance of the prover process

func (*GetFlushStatusResponse) Descriptor deprecated added in v0.2.0

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

Deprecated: Use GetFlushStatusResponse.ProtoReflect.Descriptor instead.

func (*GetFlushStatusResponse) GetLastFlushId added in v0.2.0

func (x *GetFlushStatusResponse) GetLastFlushId() uint64

func (*GetFlushStatusResponse) GetPendingToFlushNodes added in v0.2.0

func (x *GetFlushStatusResponse) GetPendingToFlushNodes() uint64

func (*GetFlushStatusResponse) GetPendingToFlushProgram added in v0.2.0

func (x *GetFlushStatusResponse) GetPendingToFlushProgram() uint64

func (*GetFlushStatusResponse) GetProverId added in v0.2.0

func (x *GetFlushStatusResponse) GetProverId() string

func (*GetFlushStatusResponse) GetStoredFlushId added in v0.2.0

func (x *GetFlushStatusResponse) GetStoredFlushId() uint64

func (*GetFlushStatusResponse) GetStoringFlushId added in v0.2.0

func (x *GetFlushStatusResponse) GetStoringFlushId() uint64

func (*GetFlushStatusResponse) GetStoringNodes added in v0.2.0

func (x *GetFlushStatusResponse) GetStoringNodes() uint64

func (*GetFlushStatusResponse) GetStoringProgram added in v0.2.0

func (x *GetFlushStatusResponse) GetStoringProgram() uint64

func (*GetFlushStatusResponse) ProtoMessage added in v0.2.0

func (*GetFlushStatusResponse) ProtoMessage()

func (*GetFlushStatusResponse) ProtoReflect added in v0.2.0

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

func (*GetFlushStatusResponse) Reset added in v0.2.0

func (x *GetFlushStatusResponse) Reset()

func (*GetFlushStatusResponse) String added in v0.2.0

func (x *GetFlushStatusResponse) String() string

type GetProgramRequest

type GetProgramRequest struct {
	Key *Fea `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

* @dev GetProgramRequest @param {key} - key to get program data

func (*GetProgramRequest) Descriptor deprecated

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

Deprecated: Use GetProgramRequest.ProtoReflect.Descriptor instead.

func (*GetProgramRequest) GetKey

func (x *GetProgramRequest) GetKey() *Fea

func (*GetProgramRequest) ProtoMessage

func (*GetProgramRequest) ProtoMessage()

func (*GetProgramRequest) ProtoReflect

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

func (*GetProgramRequest) Reset

func (x *GetProgramRequest) Reset()

func (*GetProgramRequest) String

func (x *GetProgramRequest) String() string

type GetProgramResponse

type GetProgramResponse struct {
	Data   []byte      `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Result *ResultCode `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

* @dev GetProgramResponse @param {data} - program data retrieved @param {result} - result code

func (*GetProgramResponse) Descriptor deprecated

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

Deprecated: Use GetProgramResponse.ProtoReflect.Descriptor instead.

func (*GetProgramResponse) GetData

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

func (*GetProgramResponse) GetResult

func (x *GetProgramResponse) GetResult() *ResultCode

func (*GetProgramResponse) ProtoMessage

func (*GetProgramResponse) ProtoMessage()

func (*GetProgramResponse) ProtoReflect

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

func (*GetProgramResponse) Reset

func (x *GetProgramResponse) Reset()

func (*GetProgramResponse) String

func (x *GetProgramResponse) String() string

type GetRequest

type GetRequest struct {
	Root         *Fea `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"`
	Key          *Fea `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Details      bool `protobuf:"varint,3,opt,name=details,proto3" json:"details,omitempty"`
	GetDbReadLog bool `protobuf:"varint,4,opt,name=get_db_read_log,json=getDbReadLog,proto3" json:"get_db_read_log,omitempty"`
	// contains filtered or unexported fields
}

* @dev GetRequest @param {root} - merkle-tree root @param {key} - key to look for @param {details} - indicates if it should return all response parameters (true) or just the new root (false) @param {get_db_read_log} - indicates if it should return the DB reads generated during the execution of the request

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetDetails

func (x *GetRequest) GetDetails() bool

func (*GetRequest) GetGetDbReadLog

func (x *GetRequest) GetGetDbReadLog() bool

func (*GetRequest) GetKey

func (x *GetRequest) GetKey() *Fea

func (*GetRequest) GetRoot

func (x *GetRequest) GetRoot() *Fea

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Root             *Fea                    `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"`
	Key              *Fea                    `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Siblings         map[uint64]*SiblingList `` /* 158-byte string literal not displayed */
	InsKey           *Fea                    `protobuf:"bytes,4,opt,name=ins_key,json=insKey,proto3" json:"ins_key,omitempty"`
	InsValue         string                  `protobuf:"bytes,5,opt,name=ins_value,json=insValue,proto3" json:"ins_value,omitempty"`
	IsOld0           bool                    `protobuf:"varint,6,opt,name=is_old0,json=isOld0,proto3" json:"is_old0,omitempty"`
	Value            string                  `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
	ProofHashCounter uint64                  `protobuf:"varint,8,opt,name=proof_hash_counter,json=proofHashCounter,proto3" json:"proof_hash_counter,omitempty"`
	DbReadLog        map[string]*FeList      `` /* 178-byte string literal not displayed */
	Result           *ResultCode             `protobuf:"bytes,10,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

* @dev GetResponse @param {root} - merkle-tree root @param {key} - key to look for @param {siblings} - array of siblings @param {ins_key} - key found @param {ins_value} - value found (HEX string format) @param {is_old0} - is new insert or delete @param {value} - value retrieved (HEX string format) @param {proof_hash_counter} @param {db_read_log} - list of db records read during the execution of the request @param {result} - result code

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetDbReadLog

func (x *GetResponse) GetDbReadLog() map[string]*FeList

func (*GetResponse) GetInsKey

func (x *GetResponse) GetInsKey() *Fea

func (*GetResponse) GetInsValue

func (x *GetResponse) GetInsValue() string

func (*GetResponse) GetIsOld0

func (x *GetResponse) GetIsOld0() bool

func (*GetResponse) GetKey

func (x *GetResponse) GetKey() *Fea

func (*GetResponse) GetProofHashCounter

func (x *GetResponse) GetProofHashCounter() uint64

func (*GetResponse) GetResult

func (x *GetResponse) GetResult() *ResultCode

func (*GetResponse) GetRoot

func (x *GetResponse) GetRoot() *Fea

func (*GetResponse) GetSiblings

func (x *GetResponse) GetSiblings() map[uint64]*SiblingList

func (*GetResponse) GetValue

func (x *GetResponse) GetValue() string

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type HashDBServiceClient added in v0.2.0

type HashDBServiceClient interface {
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	SetProgram(ctx context.Context, in *SetProgramRequest, opts ...grpc.CallOption) (*SetProgramResponse, error)
	GetProgram(ctx context.Context, in *GetProgramRequest, opts ...grpc.CallOption) (*GetProgramResponse, error)
	LoadDB(ctx context.Context, in *LoadDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	LoadProgramDB(ctx context.Context, in *LoadProgramDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Flush(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FlushResponse, error)
	GetFlushStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFlushStatusResponse, error)
	GetFlushData(ctx context.Context, in *GetFlushDataRequest, opts ...grpc.CallOption) (*GetFlushDataResponse, error)
}

HashDBServiceClient is the client API for HashDBService 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 NewHashDBServiceClient added in v0.2.0

func NewHashDBServiceClient(cc grpc.ClientConnInterface) HashDBServiceClient

type HashDBServiceServer added in v0.2.0

HashDBServiceServer is the server API for HashDBService service. All implementations must embed UnimplementedHashDBServiceServer for forward compatibility

type LoadDBRequest

type LoadDBRequest struct {
	InputDb    map[string]*FeList `` /* 170-byte string literal not displayed */
	Persistent bool               `protobuf:"varint,2,opt,name=persistent,proto3" json:"persistent,omitempty"`
	// contains filtered or unexported fields
}

* @dev LoadDBRequest @param {input_db} - list of db records (MT) to load in the database @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false)

func (*LoadDBRequest) Descriptor deprecated

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

Deprecated: Use LoadDBRequest.ProtoReflect.Descriptor instead.

func (*LoadDBRequest) GetInputDb

func (x *LoadDBRequest) GetInputDb() map[string]*FeList

func (*LoadDBRequest) GetPersistent

func (x *LoadDBRequest) GetPersistent() bool

func (*LoadDBRequest) ProtoMessage

func (*LoadDBRequest) ProtoMessage()

func (*LoadDBRequest) ProtoReflect

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

func (*LoadDBRequest) Reset

func (x *LoadDBRequest) Reset()

func (*LoadDBRequest) String

func (x *LoadDBRequest) String() string

type LoadProgramDBRequest

type LoadProgramDBRequest struct {
	InputProgramDb map[string][]byte `` /* 193-byte string literal not displayed */
	Persistent     bool              `protobuf:"varint,2,opt,name=persistent,proto3" json:"persistent,omitempty"`
	// contains filtered or unexported fields
}

* @dev LoadProgramDBRequest @param {input_program_db} - list of db records (program) to load in the database @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false)

func (*LoadProgramDBRequest) Descriptor deprecated

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

Deprecated: Use LoadProgramDBRequest.ProtoReflect.Descriptor instead.

func (*LoadProgramDBRequest) GetInputProgramDb

func (x *LoadProgramDBRequest) GetInputProgramDb() map[string][]byte

func (*LoadProgramDBRequest) GetPersistent

func (x *LoadProgramDBRequest) GetPersistent() bool

func (*LoadProgramDBRequest) ProtoMessage

func (*LoadProgramDBRequest) ProtoMessage()

func (*LoadProgramDBRequest) ProtoReflect

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

func (*LoadProgramDBRequest) Reset

func (x *LoadProgramDBRequest) Reset()

func (*LoadProgramDBRequest) String

func (x *LoadProgramDBRequest) String() string

type ResultCode

type ResultCode struct {
	Code ResultCode_Code `protobuf:"varint,1,opt,name=code,proto3,enum=hashdb.v1.ResultCode_Code" json:"code,omitempty"`
	// contains filtered or unexported fields
}

* @dev Result code @param {code} - result code

func (*ResultCode) Descriptor deprecated

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

Deprecated: Use ResultCode.ProtoReflect.Descriptor instead.

func (*ResultCode) GetCode

func (x *ResultCode) GetCode() ResultCode_Code

func (*ResultCode) ProtoMessage

func (*ResultCode) ProtoMessage()

func (*ResultCode) ProtoReflect

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

func (*ResultCode) Reset

func (x *ResultCode) Reset()

func (*ResultCode) String

func (x *ResultCode) String() string

type ResultCode_Code

type ResultCode_Code int32
const (
	ResultCode_CODE_UNSPECIFIED           ResultCode_Code = 0
	ResultCode_CODE_SUCCESS               ResultCode_Code = 1
	ResultCode_CODE_DB_KEY_NOT_FOUND      ResultCode_Code = 2 // Requested key was not found in database
	ResultCode_CODE_DB_ERROR              ResultCode_Code = 3 // Error connecting to database, or processing request
	ResultCode_CODE_INTERNAL_ERROR        ResultCode_Code = 4
	ResultCode_CODE_SMT_INVALID_DATA_SIZE ResultCode_Code = 14 // Invalid size for the data of MT node
)

func (ResultCode_Code) Descriptor

func (ResultCode_Code) Enum

func (x ResultCode_Code) Enum() *ResultCode_Code

func (ResultCode_Code) EnumDescriptor deprecated

func (ResultCode_Code) EnumDescriptor() ([]byte, []int)

Deprecated: Use ResultCode_Code.Descriptor instead.

func (ResultCode_Code) Number

func (ResultCode_Code) String

func (x ResultCode_Code) String() string

func (ResultCode_Code) Type

type SetProgramRequest

type SetProgramRequest struct {
	Key        *Fea   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Data       []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Persistent bool   `protobuf:"varint,3,opt,name=persistent,proto3" json:"persistent,omitempty"`
	// contains filtered or unexported fields
}

* @dev SetProgramRequest @param {key} - key to set @param {data} - Program data to store @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false)

func (*SetProgramRequest) Descriptor deprecated

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

Deprecated: Use SetProgramRequest.ProtoReflect.Descriptor instead.

func (*SetProgramRequest) GetData

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

func (*SetProgramRequest) GetKey

func (x *SetProgramRequest) GetKey() *Fea

func (*SetProgramRequest) GetPersistent

func (x *SetProgramRequest) GetPersistent() bool

func (*SetProgramRequest) ProtoMessage

func (*SetProgramRequest) ProtoMessage()

func (*SetProgramRequest) ProtoReflect

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

func (*SetProgramRequest) Reset

func (x *SetProgramRequest) Reset()

func (*SetProgramRequest) String

func (x *SetProgramRequest) String() string

type SetProgramResponse

type SetProgramResponse struct {
	Result *ResultCode `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

* @dev SetProgramResponse @param {result} - result code

func (*SetProgramResponse) Descriptor deprecated

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

Deprecated: Use SetProgramResponse.ProtoReflect.Descriptor instead.

func (*SetProgramResponse) GetResult

func (x *SetProgramResponse) GetResult() *ResultCode

func (*SetProgramResponse) ProtoMessage

func (*SetProgramResponse) ProtoMessage()

func (*SetProgramResponse) ProtoReflect

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

func (*SetProgramResponse) Reset

func (x *SetProgramResponse) Reset()

func (*SetProgramResponse) String

func (x *SetProgramResponse) String() string

type SetRequest

type SetRequest struct {
	OldRoot      *Fea   `protobuf:"bytes,1,opt,name=old_root,json=oldRoot,proto3" json:"old_root,omitempty"`
	Key          *Fea   `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Value        string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Persistent   bool   `protobuf:"varint,4,opt,name=persistent,proto3" json:"persistent,omitempty"`
	Details      bool   `protobuf:"varint,5,opt,name=details,proto3" json:"details,omitempty"`
	GetDbReadLog bool   `protobuf:"varint,6,opt,name=get_db_read_log,json=getDbReadLog,proto3" json:"get_db_read_log,omitempty"`
	// contains filtered or unexported fields
}

* @dev SetRequest @param {old_root} - merkle-tree root @param {key} - key to set @param {value} - scalar value to set (HEX string format) @param {persistent} - indicates if it should be stored in the SQL database (true) or only in the memory cache (false) @param {details} - indicates if it should return all response parameters (true) or just the new root (false) @param {get_db_read_log} - indicates if it should return the DB reads generated during the execution of the request

func (*SetRequest) Descriptor deprecated

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

Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.

func (*SetRequest) GetDetails

func (x *SetRequest) GetDetails() bool

func (*SetRequest) GetGetDbReadLog

func (x *SetRequest) GetGetDbReadLog() bool

func (*SetRequest) GetKey

func (x *SetRequest) GetKey() *Fea

func (*SetRequest) GetOldRoot

func (x *SetRequest) GetOldRoot() *Fea

func (*SetRequest) GetPersistent

func (x *SetRequest) GetPersistent() bool

func (*SetRequest) GetValue

func (x *SetRequest) GetValue() string

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) ProtoReflect

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

func (*SetRequest) Reset

func (x *SetRequest) Reset()

func (*SetRequest) String

func (x *SetRequest) String() string

type SetResponse

type SetResponse struct {
	OldRoot          *Fea                    `protobuf:"bytes,1,opt,name=old_root,json=oldRoot,proto3" json:"old_root,omitempty"`
	NewRoot          *Fea                    `protobuf:"bytes,2,opt,name=new_root,json=newRoot,proto3" json:"new_root,omitempty"`
	Key              *Fea                    `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	Siblings         map[uint64]*SiblingList `` /* 158-byte string literal not displayed */
	InsKey           *Fea                    `protobuf:"bytes,5,opt,name=ins_key,json=insKey,proto3" json:"ins_key,omitempty"`
	InsValue         string                  `protobuf:"bytes,6,opt,name=ins_value,json=insValue,proto3" json:"ins_value,omitempty"`
	IsOld0           bool                    `protobuf:"varint,7,opt,name=is_old0,json=isOld0,proto3" json:"is_old0,omitempty"`
	OldValue         string                  `protobuf:"bytes,8,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"`
	NewValue         string                  `protobuf:"bytes,9,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"`
	Mode             string                  `protobuf:"bytes,10,opt,name=mode,proto3" json:"mode,omitempty"`
	ProofHashCounter uint64                  `protobuf:"varint,11,opt,name=proof_hash_counter,json=proofHashCounter,proto3" json:"proof_hash_counter,omitempty"`
	DbReadLog        map[string]*FeList      `` /* 179-byte string literal not displayed */
	Result           *ResultCode             `protobuf:"bytes,13,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

* @dev SetResponse @param {old_root} - merkle-tree root @param {new_root} - merkle-tree new root @param {key} - key to look for @param {siblings} - array of siblings @param {ins_key} - key found @param {ins_value} - value found (HEX string format) @param {is_old0} - is new insert or delete @param {old_value} - old value (HEX string format) @param {new_value} - new value (HEX string format) @param {mode} @param {proof_hash_counter} @param {db_read_log} - list of db records read during the execution of the request @param {result} - result code

func (*SetResponse) Descriptor deprecated

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

Deprecated: Use SetResponse.ProtoReflect.Descriptor instead.

func (*SetResponse) GetDbReadLog

func (x *SetResponse) GetDbReadLog() map[string]*FeList

func (*SetResponse) GetInsKey

func (x *SetResponse) GetInsKey() *Fea

func (*SetResponse) GetInsValue

func (x *SetResponse) GetInsValue() string

func (*SetResponse) GetIsOld0

func (x *SetResponse) GetIsOld0() bool

func (*SetResponse) GetKey

func (x *SetResponse) GetKey() *Fea

func (*SetResponse) GetMode

func (x *SetResponse) GetMode() string

func (*SetResponse) GetNewRoot

func (x *SetResponse) GetNewRoot() *Fea

func (*SetResponse) GetNewValue

func (x *SetResponse) GetNewValue() string

func (*SetResponse) GetOldRoot

func (x *SetResponse) GetOldRoot() *Fea

func (*SetResponse) GetOldValue

func (x *SetResponse) GetOldValue() string

func (*SetResponse) GetProofHashCounter

func (x *SetResponse) GetProofHashCounter() uint64

func (*SetResponse) GetResult

func (x *SetResponse) GetResult() *ResultCode

func (*SetResponse) GetSiblings

func (x *SetResponse) GetSiblings() map[uint64]*SiblingList

func (*SetResponse) ProtoMessage

func (*SetResponse) ProtoMessage()

func (*SetResponse) ProtoReflect

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

func (*SetResponse) Reset

func (x *SetResponse) Reset()

func (*SetResponse) String

func (x *SetResponse) String() string

type SiblingList

type SiblingList struct {
	Sibling []uint64 `protobuf:"varint,1,rep,packed,name=sibling,proto3" json:"sibling,omitempty"`
	// contains filtered or unexported fields
}

* @dev Siblings List @param {sibling} - list of siblings

func (*SiblingList) Descriptor deprecated

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

Deprecated: Use SiblingList.ProtoReflect.Descriptor instead.

func (*SiblingList) GetSibling

func (x *SiblingList) GetSibling() []uint64

func (*SiblingList) ProtoMessage

func (*SiblingList) ProtoMessage()

func (*SiblingList) ProtoReflect

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

func (*SiblingList) Reset

func (x *SiblingList) Reset()

func (*SiblingList) String

func (x *SiblingList) String() string

type UnimplementedHashDBServiceServer added in v0.2.0

type UnimplementedHashDBServiceServer struct {
}

UnimplementedHashDBServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedHashDBServiceServer) Flush added in v0.2.0

func (UnimplementedHashDBServiceServer) Get added in v0.2.0

func (UnimplementedHashDBServiceServer) GetFlushData added in v0.2.0

func (UnimplementedHashDBServiceServer) GetFlushStatus added in v0.2.0

func (UnimplementedHashDBServiceServer) GetProgram added in v0.2.0

func (UnimplementedHashDBServiceServer) LoadDB added in v0.2.0

func (UnimplementedHashDBServiceServer) LoadProgramDB added in v0.2.0

func (UnimplementedHashDBServiceServer) Set added in v0.2.0

func (UnimplementedHashDBServiceServer) SetProgram added in v0.2.0

type UnsafeHashDBServiceServer added in v0.2.0

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

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

type Version

type Version struct {
	V0_0_1 string `protobuf:"bytes,1,opt,name=v0_0_1,json=v001,proto3" json:"v0_0_1,omitempty"`
	// contains filtered or unexported fields
}

func (*Version) Descriptor deprecated

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

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetV0_0_1

func (x *Version) GetV0_0_1() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) ProtoReflect

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

func (*Version) Reset

func (x *Version) Reset()

func (*Version) String

func (x *Version) String() string

Jump to

Keyboard shortcuts

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