Skip to content
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

object/replicate: Add signature to the replication RPC #302

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions object/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,21 @@ message ReplicateRequest {

// Signature of `object.object_id.value` field.
neo.fs.v2.refs.Signature signature = 2;

// Optional flag that requires server side to attach signature of just
// replicated object to ensure it has been received correctly. Signature
// must be calculated with a key that corresponds to an exposed to the
// network map public key of the object receiver.
bool sign_object = 3;
}

// Replicate RPC response
message ReplicateResponse {
// Operation execution status with one of the enumerated codes.
neo.fs.v2.status.Status status = 1;

// Deterministic ECDSA with SHA-256 hashing (RFC 6979) signature of
// replicated object. Must be attached if request was made with
// `sign_object` flag set.
bytes object_signature = 2;
cthulhu-rider marked this conversation as resolved.
Show resolved Hide resolved
}
2 changes: 2 additions & 0 deletions proto-docs/object.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@ Replicate RPC request
| ----- | ---- | ----- | ----------- |
| object | [Object](#neo.fs.v2.object.Object) | | Object to be replicated. |
| signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of `object.object_id.value` field. |
| sign_object | [bool](#bool) | | Optional flag that requires server side to attach signature of just replicated object to ensure it has been received correctly. Signature must be calculated with a key that corresponds to an exposed to the network map public key of the object receiver. |


<a name="neo.fs.v2.object.ReplicateResponse"></a>
Expand All @@ -732,6 +733,7 @@ Replicate RPC response
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| status | [neo.fs.v2.status.Status](#neo.fs.v2.status.Status) | | Operation execution status with one of the enumerated codes. |
| object_signature | [bytes](#bytes) | | Deterministic ECDSA with SHA-256 hashing (RFC 6979) signature of replicated object. Must be attached if request was made with `sign_object` flag set. |


<a name="neo.fs.v2.object.SearchRequest"></a>
Expand Down
Loading