-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DAS protobuffs #710
DAS protobuffs #710
Changes from 11 commits
91feb28
fe9abf1
4f5aaf4
3fd77c7
4a1a1ac
135bae7
b8795c0
31610fb
dce9903
808311c
204949a
0dad952
45bb359
d8e15e8
cc291e4
60c0390
0a29fb2
06005c7
0d88c86
3659a68
28f3e20
bcf4718
a82c869
267b0c6
e8fec17
ad6c587
a524c0b
d3a9be4
ad0a710
9f44421
9ac3965
4be81a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,47 @@ package common; | |
option go_package = "github.com/Layr-Labs/eigenda/api/grpc/common"; | ||
|
||
message G1Commitment { | ||
// The X coordinate of the KZG commitment. This is the raw byte representation of the field element. | ||
bytes x = 1; | ||
// The Y coordinate of the KZG commitment. This is the raw byte representation of the field element. | ||
bytes y = 2; | ||
// The X coordinate of the KZG commitment. This is the raw byte representation of the field element. | ||
bytes x = 1; | ||
// The Y coordinate of the KZG commitment. This is the raw byte representation of the field element. | ||
bytes y = 2; | ||
} | ||
|
||
///////////////////////////////////////////////////////////////////////////////////////////////// | ||
// Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could usually call such work "Experimental". E.g. // # Experimental There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed to the following comment:
|
||
///////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
// A unique identifier for a blob. | ||
message BlobKey { | ||
oneof key { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have to support both? It makes the golang code more verbose and less easy to work with (have to check which field is set each time) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is probably a good discussion topic with @mooselumph, the plan for how to address a blob is something he's been working on. |
||
AuthHeaderBlobKey auth_header_blob_key = 1; | ||
cody-littley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
BatchHeaderBlobKey batch_header_blob_key = 2; | ||
} | ||
} | ||
|
||
// Uniquely identifies a blob based on its auth header hash. | ||
message AuthHeaderBlobKey { | ||
bytes auth_header_hash = 1; | ||
} | ||
|
||
// Uniquely identifies a blob based on its batch header hash and blob index. | ||
message BatchHeaderBlobKey { | ||
bytes batch_header_hash = 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'd be more readable if we make the wording consistent with comment: either it's batch_header_hash, or certificate_hash There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment fixed. This was leftover cruft from a previous iteration where we were calling it something different. |
||
uint32 blob_index = 2; | ||
} | ||
cody-littley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// A unique identifier for a chunk. | ||
message ChunkKey { | ||
cody-littley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
BlobKey blob_key = 1; | ||
uint32 chunk_index = 2; | ||
} | ||
|
||
// A blob. | ||
message BlobData { | ||
bytes data = 1; | ||
} | ||
|
||
// A chunk of a blob. | ||
message ChunkData { | ||
bytes data = 1; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
syntax = "proto3"; | ||
package lightnode; | ||
import "common/common.proto"; | ||
option go_package = "github.com/Layr-Labs/eigenda/api/grpc/lightnode"; | ||
|
||
/////////////////////////////////////////////////////////////////////////////////// | ||
// Warning: light node APIs are currently in flux. This is not yet a stable API. // | ||
/////////////////////////////////////////////////////////////////////////////////// | ||
|
||
service LightNode { | ||
// GetChunk retrieves a specific chunk held by the light node. | ||
rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} | ||
|
||
// StreamAvailabilityStatus streams the availability status of all chunks assigned to the light node. | ||
// For use by a DA node for monitoring the availability of chunks through its constellation of agent light nodes. | ||
rpc StreamAvailabilityStatus(StreamAvailabilityStatusRequest) returns (stream common.ChunkKey) {} | ||
} | ||
|
||
// A request from a DA node to an agent light node to stream the availability status of all chunks | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this API specific to agent light node? Should it applicable to all light nodes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All light nodes will expose this API. Non-agents will return an error if it is called. Agents will return an error if the proper authentication token is not provided, and that error will look identical to if a non-agent is called. It's important for the public interface of an agent light node to be indistinguishable from the public interface of an agent light node. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good to know this, it may be worth documenting the difference of behavior between agent vs. non-agent LNs. |
||
// assigned to the light node. | ||
message StreamAvailabilityStatusRequest { | ||
// TODO describe protocol for authentication | ||
bytes authentication_token = 1; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,24 @@ service Retrieval { | |
rpc GetBlobHeader(GetBlobHeaderRequest) returns (GetBlobHeaderReply) {} | ||
// Retrieve node info metadata | ||
rpc NodeInfo(NodeInfoRequest) returns (NodeInfoReply) {} | ||
|
||
//////////////////////////////////////////////////////////////////////////////////////////////// | ||
// These RPCs are a work in progress and are not yet fully functional. API may not be stable. // | ||
//////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
// GetChunks retrieves all of the chunks for a blob held by the node. Eventually this will replace RetrieveChunks. | ||
rpc GetChunks(common.BlobKey) returns (GetChunksReply) {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's some ambiguity here, since the quorum ID isn't specified in the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^^Just one idea There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ended up just calling the argument |
||
// GetChunk retrieves a specific chunk for a blob custodied at the Node. | ||
rpc GetChunk(common.ChunkKey) returns (common.ChunkData) {} | ||
// StreamChunks requests a stream of chunks with a specific index. | ||
rpc StreamChunks(stream StreamChunksRequest) returns (stream common.ChunkData) {} | ||
cody-littley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// GetHeader is similar to RetrieveChunks, this just returns the header of the blob. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You may not want to refer to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed the reference to |
||
// Eventually this will replace GetBlobHeader. | ||
rpc GetHeader(common.BlobKey) returns (GetBlobHeaderReply) {} | ||
// StreamHeaders requests a stream all new headers. | ||
rpc StreamHeaders(stream StreamHeadersRequest) returns (stream GetBlobHeaderReply) {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should discuss whether we also want to have a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Repeating result of discussion here. It was decided that having a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove it for now if we plan to revisit/decide later There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mooselumph's prior comment was about adding an additional RPC. The |
||
// Retrieve node info metadata. Eventually this will replace NodeInfo. | ||
rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoReply) {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need a new node info API? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main goal is to have better uniformity in the names of the RPCs. This does the same thing as the RPC |
||
} | ||
|
||
// Requests and replies | ||
|
@@ -216,3 +234,40 @@ message NodeInfoReply { | |
uint32 num_cpu = 4; | ||
uint64 mem_bytes = 5; | ||
} | ||
|
||
///////////////////////////////////////////////////////////////////////////////////////////////// | ||
// Messages for WIP RPCs. These are subject to change, do not consider these to be stable API. // | ||
///////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
// Reply to GetChunksRequest. | ||
message GetChunksReply { | ||
// The indices of the chunks sent. Each index corresponds to the chunk at the same position in the chunks field. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "indices of the chunks custodied" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change made |
||
repeated uint32 chunk_indices = 1; | ||
// The chunks this node has. | ||
repeated common.ChunkData chunks = 2; | ||
} | ||
|
||
// Request that all new chunks with a particular index be sent to the client. | ||
message StreamChunksRequest { | ||
// The quorum ID of the chunks to stream. | ||
uint32 quorum_id = 1; | ||
// The chunk index to start streaming from. | ||
uint32 chunk_index = 2; | ||
} | ||
|
||
// Request that all new headers be sent. | ||
message StreamHeadersRequest { | ||
} | ||
|
||
// Node info request. | ||
message GetNodeInfoRequest { | ||
} | ||
|
||
// Node info reply. | ||
message GetNodeInfoReply { | ||
string semver = 1; | ||
string arch = 2; | ||
string os = 3; | ||
uint32 num_cpu = 4; | ||
uint64 mem_bytes = 5; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This existing indent was compatible with other protos. Let's make them consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace changed back to tabs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a search of this directory tree and found a few places that used spaces instead of tabs in proto files. I also updated those places to use tabs.