Define `subnet.Info` structure of corresponding message from NeoFS API
protocol. Provide field getters and setters. Implement
`StableMarshal` / `StableSize` methods of binary encoding. Implement
`ToGRPCMessage` / `FromGRPCMessage` method for testing and
potential transport.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Implement `Fixed32Marshal` / `Fixed32Size` functions which allow to work
with protobuf fixed32 fields.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Define `SysAttributeZoneDefault` constant for default zone in V2 code. Add
`SetNativeName` function which sets name with default zone.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Implement `GetNativeNameWithZone` / `SetNativeNameWithZone` function which
gets / sets `__NEOFS_NAME` and `__NEOFS_ZONE` container attributes.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Recompile NeoFS API protobuf files. Implement `NetworkParameter` and
`NetworkConfig` types. Expand `NetworkInfo` type with MillisecondsPerBlock
and `NetworkConfig`.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
There is a need to analyze some response information in API client.
Define `ResponseMetaInfo` structure of response information. Add
`WithResponseInfoHandler` client option which allows to set the response
info callback. The callback is called right after any response is received.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Return `AnnounceIntermediateResultResponse` instead of
`AnnounceIntermediateResultRequest` from `rpc.AnnounceIntermediateResult`.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Copy `Curve` field of `ecdsa.PublicKey` arg to `keys.PublicKey` instance in
`NEO3WalletFromPublicKey` function.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
According to specification, well-known object related filter keys for
extended ACL do not include `$Object:split.parent`.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
In the well-known BasicACL constants we need to set the always toggled
bits for the system group. Otherwise it may be confusing for those who
read the specification and try to match it with the reference
implementation or the resulting BasicACL set in the container.
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
Create new `SessionTokenBody` instead of using one from the parameter in
order to prevent data corruption.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
There is a problem when containers with newer versions considered invalid by
Client. This does not allow receiving correct containers of new versions
through the client.
Fix the problem by turning off version check in `Client.GetContainer`.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>