Protocol Documentation

Table of Contents

Top

api/api.proto

GetLogAuditProofRequest

Get log audit proof for a given tree

FieldTypeLabelDescription
LogIDstringrequiredLog identifier
Indexuint64requiredTree node index
TreeSizeuint64requiredTree size (proof reference)

GetLogConsistencyProofRequest

Get a consistency proof between two given log sizes

FieldTypeLabelDescription
LogIDstringrequiredLog identifier
FirstSizeuint64requiredFrom tree size
SecondSizeuint64requiredTo tree size

GetLogEntriesRequest

FieldTypeLabelDescription
LogIDstringrequiredLog identifier
Startuint64requiredGet entries from
Finishuint64requiredGet entries to

GetMapValueRequest

FieldTypeLabelDescription
LogIDstringrequiredLog identifier
KeybytesrequiredMap key
MapRootbytesrequiredMap root hash to derive proof from

KeyValuePair

FieldTypeLabelDescription
KeybytesrequiredMap key
ValuebytesrequiredMap value

Log

FieldTypeLabelDescription
LogIDstringrequired
ModeLog.LogModesrequired
Protocolstringrequired
SignerLogSignerrequired
MetaLog.MetaEntryrepeated

Log.MetaEntry

FieldTypeLabelDescription
keystringoptional
valuestringoptional

LogEntriesResponse

FieldTypeLabelDescription
Leavestrustix_schema.v1.LogLeafrepeated

LogHeadRequest

Request a signed head for a given log

FieldTypeLabelDescription
LogIDstringrequiredLog identifier

LogSigner

FieldTypeLabelDescription
KeyTypeLogSigner.KeyTypesrequired
Publicstringrequired

LogsRequest

FieldTypeLabelDescription
ProtocolsstringrepeatedAllow to filter logs response based on the protocol identifier

LogsResponse

FieldTypeLabelDescription
LogsLogrepeated

MapValueResponse

FieldTypeLabelDescription
ValuebytesrequiredNote that the Value field is actually a MapEntry but we need to return the marshaled version as that's what the proof is created from
ProofSparseCompactMerkleProofrequired

ProofResponse

FieldTypeLabelDescription
Proofbytesrepeated

SparseCompactMerkleProof

Sparse merkle tree proof

FieldTypeLabelDescription
SideNodesbytesrepeated
NonMembershipLeafDatabytesoptional
BitMaskbytesrequired
NumSideNodesuint64required

ValueRequest

FieldTypeLabelDescription
Digestbytesrequired

ValueResponse

FieldTypeLabelDescription
Valuebytesrequired

Log.LogModes

NameNumberDescription
Log0

LogSigner.KeyTypes

NameNumberDescription
ed255190

LogAPI

LogAPI is a logical grouping for RPC methods that are specific to a given log.

NodeAPI

NodeAPI is a logical grouping for RPC methods that are for the entire node rather than individual logs.

Method NameRequest TypeResponse TypeDescription
LogsLogsRequestLogsResponseGet a list of all logs published by this node
GetValueValueRequestValueResponseGet values by their content-address

Top

rpc/rpc.proto

DecideRequest

FieldTypeLabelDescription
Keybytesrequired
Protocolstringrequired

DecisionResponse

FieldTypeLabelDescription
DecisionLogValueDecisionrequired
MismatchesLogValueResponserepeatedNon-matches (hash mismatch)
MissesstringrepeatedFull misses (log ids missing log entry entirely)

EntriesResponse

FieldTypeLabelDescription
Keybytesrequired
EntriesEntriesResponse.EntriesEntryrepeated

EntriesResponse.EntriesEntry

FieldTypeLabelDescription
keystringoptional
valuetrustix_schema.v1.MapEntryoptional

FlushRequest

FieldTypeLabelDescription
LogIDstringrequired

FlushResponse

LogValueDecision

FieldTypeLabelDescription
LogIDsstringrepeated
Digestbytesrequired
Confidenceint32required
Valuebytesrequired

LogValueResponse

FieldTypeLabelDescription
LogIDstringrequired
Digestbytesrequired

SubmitRequest

FieldTypeLabelDescription
LogIDstringrequired
Itemstrustix_api.v1.KeyValuePairrepeated

SubmitResponse

FieldTypeLabelDescription
statusSubmitResponse.Statusrequired

SubmitResponse.Status

NameNumberDescription
OK0

LogRPC

RPCApi are "private" rpc methods for an instance related to a specific log. This should only be available to trusted parties.

RPCApi

RPCApi are "private" rpc methods for an instance. This should only be available to trusted parties.

Method NameRequest TypeResponse TypeDescription
Logs.trustix_api.v1.LogsRequest.trustix_api.v1.LogsResponseGet a list of all logs published/subscribed by this node
DecideDecideRequestDecisionResponseDecide on an output for key based on the configured decision method
GetValue.trustix_api.v1.ValueRequest.trustix_api.v1.ValueResponseGet values by their content-address

Top

schema/loghead.proto

LogHead

Log

FieldTypeLabelDescription
LogRootbytesrequired
TreeSizeuint64required
MapRootbytesrequired
MHRootbytesrequired
MHTreeSizeuint64required
SignaturebytesrequiredAggregate signature

Top

schema/logleaf.proto

LogLeaf

Leaf value of a merkle tree

FieldTypeLabelDescription
Keybytesoptional
ValueDigestbytesoptional
LeafDigestbytesrequired

Top

schema/mapentry.proto

MapEntry

FieldTypeLabelDescription
DigestbytesrequiredValue digest of tree node
Indexuint64requiredIndex of value in log

Top

schema/queue.proto

SubmitQueue

This type is internal only and not guaranteed stable

FieldTypeLabelDescription
Minuint64requiredMin is the current (last popped) ID
Maxuint64requiredMax is the last written item

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)