From 0366e2ca3a1956443a12d2f2a95f30c8da3355b7 Mon Sep 17 00:00:00 2001 From: Cody Littley Date: Wed, 15 Jan 2025 15:31:57 -0600 Subject: [PATCH] Made suggested changes. Signed-off-by: Cody Littley --- api/docs/disperser_v2.html | 3 +-- api/docs/disperser_v2.md | 2 +- api/docs/eigenda-protos.html | 9 ++++++--- api/docs/eigenda-protos.md | 4 ++-- api/docs/node_v2.html | 6 +++++- api/docs/node_v2.md | 2 +- api/grpc/disperser/v2/disperser_v2.pb.go | 1 - api/grpc/node/v2/node_v2_grpc.pb.go | 12 ++++++++++-- api/proto/disperser/v2/disperser_v2.proto | 1 - api/proto/node/v2/node_v2.proto | 6 +++++- 10 files changed, 31 insertions(+), 15 deletions(-) diff --git a/api/docs/disperser_v2.html b/api/docs/disperser_v2.html index ee1413ac3..cb18f5cd3 100644 --- a/api/docs/disperser_v2.html +++ b/api/docs/disperser_v2.html @@ -626,8 +626,7 @@

GetPaymentStateRequest

signature bytes -

Signature over the account ID -TODO: sign over a reservation period or a nonce to mitigate signature replay attacks

+

Signature over the account ID

diff --git a/api/docs/disperser_v2.md b/api/docs/disperser_v2.md index ff9bb6325..8de1248c8 100644 --- a/api/docs/disperser_v2.md +++ b/api/docs/disperser_v2.md @@ -204,7 +204,7 @@ GetPaymentStateRequest contains parameters to query the payment state of an acco | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | account_id | [string](#string) | | The ID of the account being queried. This account ID is an eth wallet address of the user. | -| signature | [bytes](#bytes) | | Signature over the account ID TODO: sign over a reservation period or a nonce to mitigate signature replay attacks | +| signature | [bytes](#bytes) | | Signature over the account ID | diff --git a/api/docs/eigenda-protos.html b/api/docs/eigenda-protos.html index e9f01c30b..e060c639e 100644 --- a/api/docs/eigenda-protos.html +++ b/api/docs/eigenda-protos.html @@ -2333,8 +2333,7 @@

GetPaymentStateRequest

signature bytes -

Signature over the account ID -TODO: sign over a reservation period or a nonce to mitigate signature replay attacks

+

Signature over the account ID

@@ -3640,7 +3639,11 @@

Dispersal

StoreChunks StoreChunksRequest StoreChunksReply -

StoreChunks stores a batch of chunks on the Node.

+

StoreChunks instructs the validator to store a batch of chunks. This call blocks until the validator +either acquires the chunks or the validator determines that it is unable to acquire the chunks. If +the validator is able to acquire and validate the chunks, it returns a signature over the batch header. +This RPC describes which chunks the validator should store but does not contain that chunk data. The validator +is expected to fetch the chunk data from one of the relays that is in possession of the chunk.

diff --git a/api/docs/eigenda-protos.md b/api/docs/eigenda-protos.md index bde47c2b8..53d2d31c4 100644 --- a/api/docs/eigenda-protos.md +++ b/api/docs/eigenda-protos.md @@ -915,7 +915,7 @@ GetPaymentStateRequest contains parameters to query the payment state of an acco | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | account_id | [string](#string) | | The ID of the account being queried. This account ID is an eth wallet address of the user. | -| signature | [bytes](#bytes) | | Signature over the account ID TODO: sign over a reservation period or a nonce to mitigate signature replay attacks | +| signature | [bytes](#bytes) | | Signature over the account ID | @@ -1535,7 +1535,7 @@ Dispersal is utilized to disperse chunk data. | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| StoreChunks | [StoreChunksRequest](#node-v2-StoreChunksRequest) | [StoreChunksReply](#node-v2-StoreChunksReply) | StoreChunks stores a batch of chunks on the Node. | +| StoreChunks | [StoreChunksRequest](#node-v2-StoreChunksRequest) | [StoreChunksReply](#node-v2-StoreChunksReply) | StoreChunks instructs the validator to store a batch of chunks. This call blocks until the validator either acquires the chunks or the validator determines that it is unable to acquire the chunks. If the validator is able to acquire and validate the chunks, it returns a signature over the batch header. This RPC describes which chunks the validator should store but does not contain that chunk data. The validator is expected to fetch the chunk data from one of the relays that is in possession of the chunk. | | GetNodeInfo | [GetNodeInfoRequest](#node-v2-GetNodeInfoRequest) | [GetNodeInfoReply](#node-v2-GetNodeInfoReply) | GetNodeInfo fetches metadata about the node. | diff --git a/api/docs/node_v2.html b/api/docs/node_v2.html index de11080f6..df42f7c12 100644 --- a/api/docs/node_v2.html +++ b/api/docs/node_v2.html @@ -452,7 +452,11 @@

Dispersal

StoreChunks StoreChunksRequest StoreChunksReply -

StoreChunks stores a batch of chunks on the Node.

+

StoreChunks instructs the validator to store a batch of chunks. This call blocks until the validator +either acquires the chunks or the validator determines that it is unable to acquire the chunks. If +the validator is able to acquire and validate the chunks, it returns a signature over the batch header. +This RPC describes which chunks the validator should store but does not contain that chunk data. The validator +is expected to fetch the chunk data from one of the relays that is in possession of the chunk.

diff --git a/api/docs/node_v2.md b/api/docs/node_v2.md index f5c914bdc..c0ea85a1e 100644 --- a/api/docs/node_v2.md +++ b/api/docs/node_v2.md @@ -136,7 +136,7 @@ Dispersal is utilized to disperse chunk data. | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| StoreChunks | [StoreChunksRequest](#node-v2-StoreChunksRequest) | [StoreChunksReply](#node-v2-StoreChunksReply) | StoreChunks stores a batch of chunks on the Node. | +| StoreChunks | [StoreChunksRequest](#node-v2-StoreChunksRequest) | [StoreChunksReply](#node-v2-StoreChunksReply) | StoreChunks instructs the validator to store a batch of chunks. This call blocks until the validator either acquires the chunks or the validator determines that it is unable to acquire the chunks. If the validator is able to acquire and validate the chunks, it returns a signature over the batch header. This RPC describes which chunks the validator should store but does not contain that chunk data. The validator is expected to fetch the chunk data from one of the relays that is in possession of the chunk. | | GetNodeInfo | [GetNodeInfoRequest](#node-v2-GetNodeInfoRequest) | [GetNodeInfoReply](#node-v2-GetNodeInfoReply) | GetNodeInfo fetches metadata about the node. | diff --git a/api/grpc/disperser/v2/disperser_v2.pb.go b/api/grpc/disperser/v2/disperser_v2.pb.go index 31b8263a8..fc1f7a6d9 100644 --- a/api/grpc/disperser/v2/disperser_v2.pb.go +++ b/api/grpc/disperser/v2/disperser_v2.pb.go @@ -469,7 +469,6 @@ type GetPaymentStateRequest struct { // The ID of the account being queried. This account ID is an eth wallet address of the user. AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Signature over the account ID - // TODO: sign over a reservation period or a nonce to mitigate signature replay attacks Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` } diff --git a/api/grpc/node/v2/node_v2_grpc.pb.go b/api/grpc/node/v2/node_v2_grpc.pb.go index addb23892..d42ed1e69 100644 --- a/api/grpc/node/v2/node_v2_grpc.pb.go +++ b/api/grpc/node/v2/node_v2_grpc.pb.go @@ -27,7 +27,11 @@ const ( // // 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. type DispersalClient interface { - // StoreChunks stores a batch of chunks on the Node. + // StoreChunks instructs the validator to store a batch of chunks. This call blocks until the validator + // either acquires the chunks or the validator determines that it is unable to acquire the chunks. If + // the validator is able to acquire and validate the chunks, it returns a signature over the batch header. + // This RPC describes which chunks the validator should store but does not contain that chunk data. The validator + // is expected to fetch the chunk data from one of the relays that is in possession of the chunk. StoreChunks(ctx context.Context, in *StoreChunksRequest, opts ...grpc.CallOption) (*StoreChunksReply, error) // GetNodeInfo fetches metadata about the node. GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoReply, error) @@ -63,7 +67,11 @@ func (c *dispersalClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoReques // All implementations must embed UnimplementedDispersalServer // for forward compatibility type DispersalServer interface { - // StoreChunks stores a batch of chunks on the Node. + // StoreChunks instructs the validator to store a batch of chunks. This call blocks until the validator + // either acquires the chunks or the validator determines that it is unable to acquire the chunks. If + // the validator is able to acquire and validate the chunks, it returns a signature over the batch header. + // This RPC describes which chunks the validator should store but does not contain that chunk data. The validator + // is expected to fetch the chunk data from one of the relays that is in possession of the chunk. StoreChunks(context.Context, *StoreChunksRequest) (*StoreChunksReply, error) // GetNodeInfo fetches metadata about the node. GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoReply, error) diff --git a/api/proto/disperser/v2/disperser_v2.proto b/api/proto/disperser/v2/disperser_v2.proto index 771d6eafe..8d5689fad 100644 --- a/api/proto/disperser/v2/disperser_v2.proto +++ b/api/proto/disperser/v2/disperser_v2.proto @@ -96,7 +96,6 @@ message GetPaymentStateRequest { // The ID of the account being queried. This account ID is an eth wallet address of the user. string account_id = 1; // Signature over the account ID - // TODO: sign over a reservation period or a nonce to mitigate signature replay attacks bytes signature = 2; } diff --git a/api/proto/node/v2/node_v2.proto b/api/proto/node/v2/node_v2.proto index 723808942..0f7352c37 100644 --- a/api/proto/node/v2/node_v2.proto +++ b/api/proto/node/v2/node_v2.proto @@ -8,7 +8,11 @@ option go_package = "github.com/Layr-Labs/eigenda/api/grpc/node/v2"; // Dispersal is utilized to disperse chunk data. service Dispersal { - // StoreChunks stores a batch of chunks on the Node. + // StoreChunks instructs the validator to store a batch of chunks. This call blocks until the validator + // either acquires the chunks or the validator determines that it is unable to acquire the chunks. If + // the validator is able to acquire and validate the chunks, it returns a signature over the batch header. + // This RPC describes which chunks the validator should store but does not contain that chunk data. The validator + // is expected to fetch the chunk data from one of the relays that is in possession of the chunk. rpc StoreChunks(StoreChunksRequest) returns (StoreChunksReply) {} // GetNodeInfo fetches metadata about the node. rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoReply) {}