Add detail for `WRONG_MAGIC_NUMBER` status code which carries the
correct magic of the served network served. Clients will be able to fix
incorrect magic and re-send the request. ID is 0, binary format
is uint64 in big-endian.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
After the recent update of NeoFS V2 protocol all requests must carry
correct network magic.
Add `WRONG_MAGIC_NUMBER` code to `CommonFail` section.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
To prevent theoretical cross-network replay attack, we need to have
network magic in NeoFS requests.
Add `magic_number` numeric field to `session.RequestMetaHeader`
message.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Define `netmap.NetworkConfig` message which represents structure of
NeoFS network config stored in Netmap contract.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Service headers are ignored by NeoFS nodes but can be
used to save access-related information by services
built on top of NeoFS.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Default string presentations of enums in protobuf are the same
as definitions. In our case it is going to be UPPER_SNAKE_CASE
string constants. Default presentation is easier to maintain.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Container can be created within a session. The presence of a session token
in the GET response body allows you to reflect this fact.
Add `session_token` field of `session.SessionToken` type to
`container.GetResponse.Body` message.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Extended ACL can be set within a session. The presence of a session token in
the GET response body allows you to reflect this fact.
Add `session_token` field of `session.SessionToken` type to
`container.GetExtendedACLResponse.Body` message.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Extend `session.SessionToken.Body.context` oneof with `container` field of
type `ContainerServiceContext`. This field is going to be used for RPCs of
`container.ContainerService`.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
* Rename:
- SendLocalTrust → AnnounceLocalTrust
- SendIntermediateResult → AnnounceIntermediateResult
Those methods don't expect to Send anything, but to further announce
the trust information from the node.
* Change PeerID to explicitly use public key as a node identifier
* Minor comments reformat
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
Change `trust` field type of `SendIntermediateResultRequest.Body` message to
`PeerToPeerTrust` since `SendIntermediateResult` call transfers the node's
directed trust to the node.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Add `version` field as a first field of `GlobalTrust` message. This field
will allow you to quickly extract the version of the message from the binary
representation.
Additionally fix `signature` field's package format.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Add `SendIntermediateResult` RPC to `ReputationService`. Define structures
of request and response messages.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>