2020-01-30 11:41:24 +00:00
# Protocol Documentation
< a name = "top" > < / a >
## Table of Contents
2024-03-05 09:36:58 +00:00
- [container/service.proto ](#container/service.proto )
2024-04-03 08:21:40 +00:00
- Services
- [ContainerService ](#neo.fs.v2.container.ContainerService )
2024-09-02 12:03:58 +00:00
2024-03-05 09:36:58 +00:00
- Messages
2024-04-03 08:21:40 +00:00
- [AnnounceUsedSpaceRequest ](#neo.fs.v2.container.AnnounceUsedSpaceRequest )
- [AnnounceUsedSpaceRequest.Body ](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body )
- [AnnounceUsedSpaceRequest.Body.Announcement ](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body.Announcement )
- [AnnounceUsedSpaceResponse ](#neo.fs.v2.container.AnnounceUsedSpaceResponse )
- [AnnounceUsedSpaceResponse.Body ](#neo.fs.v2.container.AnnounceUsedSpaceResponse.Body )
- [DeleteRequest ](#neo.fs.v2.container.DeleteRequest )
- [DeleteRequest.Body ](#neo.fs.v2.container.DeleteRequest.Body )
- [DeleteResponse ](#neo.fs.v2.container.DeleteResponse )
- [DeleteResponse.Body ](#neo.fs.v2.container.DeleteResponse.Body )
- [GetExtendedACLRequest ](#neo.fs.v2.container.GetExtendedACLRequest )
- [GetExtendedACLRequest.Body ](#neo.fs.v2.container.GetExtendedACLRequest.Body )
- [GetExtendedACLResponse ](#neo.fs.v2.container.GetExtendedACLResponse )
- [GetExtendedACLResponse.Body ](#neo.fs.v2.container.GetExtendedACLResponse.Body )
- [GetRequest ](#neo.fs.v2.container.GetRequest )
- [GetRequest.Body ](#neo.fs.v2.container.GetRequest.Body )
- [GetResponse ](#neo.fs.v2.container.GetResponse )
- [GetResponse.Body ](#neo.fs.v2.container.GetResponse.Body )
- [ListRequest ](#neo.fs.v2.container.ListRequest )
- [ListRequest.Body ](#neo.fs.v2.container.ListRequest.Body )
- [ListResponse ](#neo.fs.v2.container.ListResponse )
- [ListResponse.Body ](#neo.fs.v2.container.ListResponse.Body )
- [PutRequest ](#neo.fs.v2.container.PutRequest )
- [PutRequest.Body ](#neo.fs.v2.container.PutRequest.Body )
- [PutResponse ](#neo.fs.v2.container.PutResponse )
- [PutResponse.Body ](#neo.fs.v2.container.PutResponse.Body )
- [SetExtendedACLRequest ](#neo.fs.v2.container.SetExtendedACLRequest )
- [SetExtendedACLRequest.Body ](#neo.fs.v2.container.SetExtendedACLRequest.Body )
- [SetExtendedACLResponse ](#neo.fs.v2.container.SetExtendedACLResponse )
- [SetExtendedACLResponse.Body ](#neo.fs.v2.container.SetExtendedACLResponse.Body )
2024-09-02 12:03:58 +00:00
2024-03-05 09:36:58 +00:00
- [container/types.proto ](#container/types.proto )
- Messages
2024-04-03 08:21:40 +00:00
- [Container ](#neo.fs.v2.container.Container )
- [Container.Attribute ](#neo.fs.v2.container.Container.Attribute )
2024-09-02 12:03:58 +00:00
2024-03-05 09:36:58 +00:00
- [Scalar Value Types ](#scalar-value-types )
2020-01-30 11:41:24 +00:00
< a name = "container/service.proto" > < / a >
< p align = "right" > < a href = "#top" > Top< / a > < / p >
## container/service.proto
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.ContainerService" > < / a >
2020-01-30 11:41:24 +00:00
2020-08-13 16:18:53 +00:00
### Service "neo.fs.v2.container.ContainerService"
2020-10-16 11:40:12 +00:00
`ContainerService` provides API to interact with `Container` smart contract
in NeoFS sidechain via other NeoFS nodes. All of those actions can be done
equivalently by directly issuing transactions and RPC calls to sidechain
nodes.
2020-01-30 11:41:24 +00:00
```
rpc Put(PutRequest) returns (PutResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc Get(GetRequest) returns (GetResponse);
rpc List(ListRequest) returns (ListResponse);
2020-06-18 07:40:35 +00:00
rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse);
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
2021-02-11 13:13:07 +00:00
rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) returns (AnnounceUsedSpaceResponse);
2020-01-30 11:41:24 +00:00
```
#### Method Put
2020-10-16 11:40:12 +00:00
`Put` invokes `Container` smart contract's `Put` method and returns
response immediately. After a new block is issued in sidechain, request is
2024-03-05 09:36:58 +00:00
verified by Inner Ring nodes. After one more block in sidechain, the
container is added into smart contract storage.
2020-01-30 11:41:24 +00:00
2021-11-12 16:10:39 +00:00
Statuses:
2022-02-21 16:00:08 +00:00
- **OK** (0, SECTION_SUCCESS): \
request to save the container has been sent to the sidechain;
2024-03-05 09:36:58 +00:00
- Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
container create access denied.
2021-11-12 16:10:39 +00:00
2020-01-30 11:41:24 +00:00
| Name | Input | Output |
| ---- | ----- | ------ |
2020-08-13 16:18:53 +00:00
| Put | [PutRequest ](#neo.fs.v2.container.PutRequest ) | [PutResponse ](#neo.fs.v2.container.PutResponse ) |
2020-01-30 11:41:24 +00:00
#### Method Delete
2020-10-16 11:40:12 +00:00
`Delete` invokes `Container` smart contract's `Delete` method and returns
response immediately. After a new block is issued in sidechain, request is
2024-03-05 09:36:58 +00:00
verified by Inner Ring nodes. After one more block in sidechain, the
container is added into smart contract storage.
2020-01-30 11:41:24 +00:00
2021-11-12 16:10:39 +00:00
Statuses:
2022-02-21 16:00:08 +00:00
- **OK** (0, SECTION_SUCCESS): \
request to remove the container has been sent to the sidechain;
2024-03-05 09:36:58 +00:00
- Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
container delete access denied.
2021-11-12 16:10:39 +00:00
2020-01-30 11:41:24 +00:00
| Name | Input | Output |
| ---- | ----- | ------ |
2020-08-13 16:18:53 +00:00
| Delete | [DeleteRequest ](#neo.fs.v2.container.DeleteRequest ) | [DeleteResponse ](#neo.fs.v2.container.DeleteResponse ) |
2020-01-30 11:41:24 +00:00
#### Method Get
2020-10-16 11:40:12 +00:00
Returns container structure from `Container` smart contract storage.
2020-01-30 11:41:24 +00:00
2021-11-12 16:10:39 +00:00
Statuses:
2022-02-21 16:00:08 +00:00
- **OK** (0, SECTION_SUCCESS): \
container has been successfully read;
- Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
2024-03-05 09:36:58 +00:00
requested container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied.
2021-11-12 16:10:39 +00:00
2020-01-30 11:41:24 +00:00
| Name | Input | Output |
| ---- | ----- | ------ |
2020-08-13 16:18:53 +00:00
| Get | [GetRequest ](#neo.fs.v2.container.GetRequest ) | [GetResponse ](#neo.fs.v2.container.GetResponse ) |
2020-01-30 11:41:24 +00:00
#### Method List
2020-10-16 11:40:12 +00:00
Returns all owner's containers from 'Container` smart contract' storage.
2020-01-30 11:41:24 +00:00
2021-11-12 16:10:39 +00:00
Statuses:
2022-02-21 16:00:08 +00:00
- **OK** (0, SECTION_SUCCESS): \
container list has been successfully read;
2024-03-05 09:36:58 +00:00
- Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
container list access denied.
2021-11-12 16:10:39 +00:00
2020-01-30 11:41:24 +00:00
| Name | Input | Output |
| ---- | ----- | ------ |
2020-08-13 16:18:53 +00:00
| List | [ListRequest ](#neo.fs.v2.container.ListRequest ) | [ListResponse ](#neo.fs.v2.container.ListResponse ) |
2020-06-18 07:40:35 +00:00
#### Method SetExtendedACL
2020-10-16 11:40:12 +00:00
Invokes 'SetEACL' method of 'Container` smart contract and returns response
2024-03-05 09:36:58 +00:00
immediately. After one more block in sidechain, changes in an Extended ACL
are added into smart contract storage.
2020-06-18 07:40:35 +00:00
2021-11-12 16:10:39 +00:00
Statuses:
2022-02-21 16:00:08 +00:00
- **OK** (0, SECTION_SUCCESS): \
request to save container eACL has been sent to the sidechain;
2024-03-05 09:36:58 +00:00
- Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
set container eACL access denied.
2021-11-12 16:10:39 +00:00
2020-06-18 07:40:35 +00:00
| Name | Input | Output |
| ---- | ----- | ------ |
2020-08-13 16:18:53 +00:00
| SetExtendedACL | [SetExtendedACLRequest ](#neo.fs.v2.container.SetExtendedACLRequest ) | [SetExtendedACLResponse ](#neo.fs.v2.container.SetExtendedACLResponse ) |
2020-06-18 07:40:35 +00:00
#### Method GetExtendedACL
2020-10-16 11:40:12 +00:00
Returns Extended ACL table and signature from `Container` smart contract
storage.
2020-06-18 07:40:35 +00:00
2021-11-12 16:10:39 +00:00
Statuses:
2022-02-21 16:00:08 +00:00
- **OK** (0, SECTION_SUCCESS): \
container eACL has been successfully read;
- Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
2022-07-29 17:16:16 +00:00
container not found;
- **EACL_NOT_FOUND** (3073, SECTION_CONTAINER): \
2024-03-05 09:36:58 +00:00
eACL table not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container eACL is denied.
2021-11-12 16:10:39 +00:00
2020-06-18 07:40:35 +00:00
| Name | Input | Output |
| ---- | ----- | ------ |
2020-08-13 16:18:53 +00:00
| GetExtendedACL | [GetExtendedACLRequest ](#neo.fs.v2.container.GetExtendedACLRequest ) | [GetExtendedACLResponse ](#neo.fs.v2.container.GetExtendedACLResponse ) |
2021-02-11 13:13:07 +00:00
#### Method AnnounceUsedSpace
2022-06-21 11:32:14 +00:00
Announces the space values used by the container for P2P synchronization.
2021-02-11 13:13:07 +00:00
2021-11-12 16:10:39 +00:00
Statuses:
2022-02-21 16:00:08 +00:00
- **OK** (0, SECTION_SUCCESS): \
estimation of used space has been successfully announced;
2021-11-12 16:10:39 +00:00
- Common failures (SECTION_FAILURE_COMMON).
2021-02-11 13:13:07 +00:00
| Name | Input | Output |
| ---- | ----- | ------ |
| AnnounceUsedSpace | [AnnounceUsedSpaceRequest ](#neo.fs.v2.container.AnnounceUsedSpaceRequest ) | [AnnounceUsedSpaceResponse ](#neo.fs.v2.container.AnnounceUsedSpaceResponse ) |
2020-01-30 11:41:24 +00:00
<!-- end services -->
2021-02-11 13:13:07 +00:00
< a name = "neo.fs.v2.container.AnnounceUsedSpaceRequest" > < / a >
### Message AnnounceUsedSpaceRequest
Announce container used space
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [AnnounceUsedSpaceRequest.Body ](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body ) | | Body of announce used space request message. |
| meta_header | [neo.fs.v2.session.RequestMetaHeader ](#neo.fs.v2.session.RequestMetaHeader ) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.RequestVerificationHeader ](#neo.fs.v2.session.RequestVerificationHeader ) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
< a name = "neo.fs.v2.container.AnnounceUsedSpaceRequest.Body" > < / a >
### Message AnnounceUsedSpaceRequest.Body
Container used space announcement body.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2022-06-21 11:32:14 +00:00
| announcements | [AnnounceUsedSpaceRequest.Body.Announcement ](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body.Announcement ) | repeated | List of announcements. If nodes share several containers, announcements are transferred in a batch. |
2021-02-11 13:13:07 +00:00
< a name = "neo.fs.v2.container.AnnounceUsedSpaceRequest.Body.Announcement" > < / a >
### Message AnnounceUsedSpaceRequest.Body.Announcement
2022-06-21 11:32:14 +00:00
Announcement contains used space information for a single container.
2021-02-11 13:13:07 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2022-06-21 11:32:14 +00:00
| epoch | [uint64 ](#uint64 ) | | Epoch number for which the container size estimation was produced. |
2021-02-11 13:13:07 +00:00
| container_id | [neo.fs.v2.refs.ContainerID ](#neo.fs.v2.refs.ContainerID ) | | Identifier of the container. |
2022-06-21 11:32:14 +00:00
| used_space | [uint64 ](#uint64 ) | | Used space is a sum of object payload sizes of a specified container, stored in the node. It must not include inhumed objects. |
2021-02-11 13:13:07 +00:00
< a name = "neo.fs.v2.container.AnnounceUsedSpaceResponse" > < / a >
### Message AnnounceUsedSpaceResponse
Announce container used space
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [AnnounceUsedSpaceResponse.Body ](#neo.fs.v2.container.AnnounceUsedSpaceResponse.Body ) | | Body of announce used space response message. |
| meta_header | [neo.fs.v2.session.ResponseMetaHeader ](#neo.fs.v2.session.ResponseMetaHeader ) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.ResponseVerificationHeader ](#neo.fs.v2.session.ResponseVerificationHeader ) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
< a name = "neo.fs.v2.container.AnnounceUsedSpaceResponse.Body" > < / a >
### Message AnnounceUsedSpaceResponse.Body
`AnnounceUsedSpaceResponse` has an empty body because announcements are
one way communication.
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.DeleteRequest" > < / a >
2020-01-30 11:41:24 +00:00
### Message DeleteRequest
2020-08-13 16:18:53 +00:00
Container removal request
2020-01-30 11:41:24 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [DeleteRequest.Body ](#neo.fs.v2.container.DeleteRequest.Body ) | | Body of container delete request message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.RequestMetaHeader ](#neo.fs.v2.session.RequestMetaHeader ) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.RequestVerificationHeader ](#neo.fs.v2.session.RequestVerificationHeader ) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.DeleteRequest.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message DeleteRequest.Body
2022-06-21 11:32:14 +00:00
Container removal request body has signed `ContainerID` as a proof of
the container owner's intent. The signature will be verified by `Container`
2020-10-16 11:40:12 +00:00
smart contract, so signing algorithm must be supported by NeoVM.
2020-08-11 15:49:56 +00:00
2020-01-30 11:41:24 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| container_id | [neo.fs.v2.refs.ContainerID ](#neo.fs.v2.refs.ContainerID ) | | Identifier of the container to delete from NeoFS |
2022-03-02 09:30:05 +00:00
| signature | [neo.fs.v2.refs.SignatureRFC6979 ](#neo.fs.v2.refs.SignatureRFC6979 ) | | `ContainerID` signed with the container owner's key according to RFC-6979. |
2020-01-30 11:41:24 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.DeleteResponse" > < / a >
2020-01-30 11:41:24 +00:00
### Message DeleteResponse
2020-10-16 11:40:12 +00:00
`DeleteResponse` has an empty body because delete operation is asynchronous
and done via consensus in Inner Ring nodes.
2020-01-30 11:41:24 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [DeleteResponse.Body ](#neo.fs.v2.container.DeleteResponse.Body ) | | Body of container delete response message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.ResponseMetaHeader ](#neo.fs.v2.session.ResponseMetaHeader ) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.ResponseVerificationHeader ](#neo.fs.v2.session.ResponseVerificationHeader ) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.DeleteResponse.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message DeleteResponse.Body
2020-10-16 11:40:12 +00:00
`DeleteResponse` has an empty body because delete operation is asynchronous
and done via consensus in Inner Ring nodes.
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.GetExtendedACLRequest" > < / a >
2020-06-18 07:40:35 +00:00
### Message GetExtendedACLRequest
2020-08-13 16:18:53 +00:00
Get Extended ACL
2020-06-18 07:40:35 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [GetExtendedACLRequest.Body ](#neo.fs.v2.container.GetExtendedACLRequest.Body ) | | Body of get extended acl request message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.RequestMetaHeader ](#neo.fs.v2.session.RequestMetaHeader ) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.RequestVerificationHeader ](#neo.fs.v2.session.RequestVerificationHeader ) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.GetExtendedACLRequest.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message GetExtendedACLRequest.Body
2020-10-16 11:40:12 +00:00
Get Extended ACL request body
2020-08-11 15:49:56 +00:00
2020-06-18 07:40:35 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| container_id | [neo.fs.v2.refs.ContainerID ](#neo.fs.v2.refs.ContainerID ) | | Identifier of the container having Extended ACL |
2020-06-18 07:40:35 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.GetExtendedACLResponse" > < / a >
2020-06-18 07:40:35 +00:00
### Message GetExtendedACLResponse
2020-08-13 16:18:53 +00:00
Get Extended ACL
2020-06-18 07:40:35 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [GetExtendedACLResponse.Body ](#neo.fs.v2.container.GetExtendedACLResponse.Body ) | | Body of get extended acl response message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.ResponseMetaHeader ](#neo.fs.v2.session.ResponseMetaHeader ) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.ResponseVerificationHeader ](#neo.fs.v2.session.ResponseVerificationHeader ) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.GetExtendedACLResponse.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message GetExtendedACLResponse.Body
2022-06-21 11:32:14 +00:00
Get Extended ACL Response body can be empty if the requested container does
2024-03-05 09:36:58 +00:00
not have Extended ACL Table attached or Extended ACL has not been allowed
at the time of container creation.
2020-08-11 15:49:56 +00:00
2020-06-18 07:40:35 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| eacl | [neo.fs.v2.acl.EACLTable ](#neo.fs.v2.acl.EACLTable ) | | Extended ACL requested, if available |
2022-03-02 09:30:05 +00:00
| signature | [neo.fs.v2.refs.SignatureRFC6979 ](#neo.fs.v2.refs.SignatureRFC6979 ) | | Signature of stable-marshalled Extended ACL according to RFC-6979. |
2021-06-03 12:34:19 +00:00
| session_token | [neo.fs.v2.session.SessionToken ](#neo.fs.v2.session.SessionToken ) | | Session token if Extended ACL was set within a session |
2020-06-18 07:40:35 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.GetRequest" > < / a >
2020-01-30 11:41:24 +00:00
### Message GetRequest
2020-08-13 16:18:53 +00:00
Get container structure
2020-01-30 11:41:24 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [GetRequest.Body ](#neo.fs.v2.container.GetRequest.Body ) | | Body of container get request message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.RequestMetaHeader ](#neo.fs.v2.session.RequestMetaHeader ) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.RequestVerificationHeader ](#neo.fs.v2.session.RequestVerificationHeader ) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.GetRequest.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message GetRequest.Body
2020-10-16 11:40:12 +00:00
Get container structure request body.
2020-08-11 15:49:56 +00:00
2020-01-30 11:41:24 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| container_id | [neo.fs.v2.refs.ContainerID ](#neo.fs.v2.refs.ContainerID ) | | Identifier of the container to get |
2020-01-30 11:41:24 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.GetResponse" > < / a >
2020-01-30 11:41:24 +00:00
### Message GetResponse
2020-08-13 16:18:53 +00:00
Get container structure
2020-01-30 11:41:24 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [GetResponse.Body ](#neo.fs.v2.container.GetResponse.Body ) | | Body of container get response message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.ResponseMetaHeader ](#neo.fs.v2.session.ResponseMetaHeader ) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.ResponseVerificationHeader ](#neo.fs.v2.session.ResponseVerificationHeader ) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.GetResponse.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message GetResponse.Body
2020-10-16 11:40:12 +00:00
Get container response body does not have container structure signature. It
2022-06-21 11:32:14 +00:00
has been already verified upon container creation.
2020-08-11 15:49:56 +00:00
2020-01-30 11:41:24 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| container | [Container ](#neo.fs.v2.container.Container ) | | Requested container structure |
2022-03-02 09:30:05 +00:00
| signature | [neo.fs.v2.refs.SignatureRFC6979 ](#neo.fs.v2.refs.SignatureRFC6979 ) | | Signature of a stable-marshalled container according to RFC-6979. |
2022-06-21 11:32:14 +00:00
| session_token | [neo.fs.v2.session.SessionToken ](#neo.fs.v2.session.SessionToken ) | | Session token if the container has been created within the session |
2020-01-30 11:41:24 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.ListRequest" > < / a >
2020-01-30 11:41:24 +00:00
### Message ListRequest
2020-08-13 16:18:53 +00:00
List containers
2020-01-30 11:41:24 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| body | [ListRequest.Body ](#neo.fs.v2.container.ListRequest.Body ) | | Body of list containers request message |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.RequestMetaHeader ](#neo.fs.v2.session.RequestMetaHeader ) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.RequestVerificationHeader ](#neo.fs.v2.session.RequestVerificationHeader ) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.ListRequest.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message ListRequest.Body
2020-10-16 11:40:12 +00:00
List containers request body.
2020-08-11 15:49:56 +00:00
2020-01-30 11:41:24 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| owner_id | [neo.fs.v2.refs.OwnerID ](#neo.fs.v2.refs.OwnerID ) | | Identifier of the container owner |
2020-01-30 11:41:24 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.ListResponse" > < / a >
2020-01-30 11:41:24 +00:00
### Message ListResponse
2020-08-13 16:18:53 +00:00
List containers
2020-01-30 11:41:24 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [ListResponse.Body ](#neo.fs.v2.container.ListResponse.Body ) | | Body of list containers response message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.ResponseMetaHeader ](#neo.fs.v2.session.ResponseMetaHeader ) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.ResponseVerificationHeader ](#neo.fs.v2.session.ResponseVerificationHeader ) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.ListResponse.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message ListResponse.Body
2020-10-16 11:40:12 +00:00
List containers response body.
2020-08-11 15:49:56 +00:00
2020-01-30 11:41:24 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| container_ids | [neo.fs.v2.refs.ContainerID ](#neo.fs.v2.refs.ContainerID ) | repeated | List of `ContainerID` s belonging to the requested `OwnerID` |
2020-01-30 11:41:24 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.PutRequest" > < / a >
2020-01-30 11:41:24 +00:00
### Message PutRequest
2020-08-13 16:18:53 +00:00
New NeoFS Container creation request
2020-01-30 11:41:24 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [PutRequest.Body ](#neo.fs.v2.container.PutRequest.Body ) | | Body of container put request message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.RequestMetaHeader ](#neo.fs.v2.session.RequestMetaHeader ) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.RequestVerificationHeader ](#neo.fs.v2.session.RequestVerificationHeader ) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.PutRequest.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message PutRequest.Body
2020-10-16 11:40:12 +00:00
Container creation request has container structure's signature as a
separate field. It's not stored in sidechain, just verified on container
creation by `Container` smart contract. `ContainerID` is a SHA256 hash of
the stable-marshalled container strucutre, hence there is no need for
additional signature checks.
2020-08-11 15:49:56 +00:00
2020-01-30 11:41:24 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| container | [Container ](#neo.fs.v2.container.Container ) | | Container structure to register in NeoFS |
2022-03-02 09:30:05 +00:00
| signature | [neo.fs.v2.refs.SignatureRFC6979 ](#neo.fs.v2.refs.SignatureRFC6979 ) | | Signature of a stable-marshalled container according to RFC-6979. |
2020-01-30 11:41:24 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.PutResponse" > < / a >
2020-01-30 11:41:24 +00:00
### Message PutResponse
2020-08-13 16:18:53 +00:00
New NeoFS Container creation response
2020-01-30 11:41:24 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [PutResponse.Body ](#neo.fs.v2.container.PutResponse.Body ) | | Body of container put response message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.ResponseMetaHeader ](#neo.fs.v2.session.ResponseMetaHeader ) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.ResponseVerificationHeader ](#neo.fs.v2.session.ResponseVerificationHeader ) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.PutResponse.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message PutResponse.Body
2020-10-16 11:40:12 +00:00
Container put response body contains information about the newly registered
container as seen by `Container` smart contract. `ContainerID` can be
calculated beforehand from the container structure and compared to the one
2022-06-21 11:32:14 +00:00
returned here to make sure everything has been done as expected.
2020-08-11 15:49:56 +00:00
2020-01-30 11:41:24 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| container_id | [neo.fs.v2.refs.ContainerID ](#neo.fs.v2.refs.ContainerID ) | | Unique identifier of the newly created container |
2020-01-30 11:41:24 +00:00
2020-06-18 07:40:35 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.SetExtendedACLRequest" > < / a >
2020-06-18 07:40:35 +00:00
### Message SetExtendedACLRequest
2020-08-13 16:18:53 +00:00
Set Extended ACL
2020-06-18 07:40:35 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [SetExtendedACLRequest.Body ](#neo.fs.v2.container.SetExtendedACLRequest.Body ) | | Body of set extended acl request message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.RequestMetaHeader ](#neo.fs.v2.session.RequestMetaHeader ) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.RequestVerificationHeader ](#neo.fs.v2.session.RequestVerificationHeader ) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.SetExtendedACLRequest.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message SetExtendedACLRequest.Body
2020-10-16 11:40:12 +00:00
Set Extended ACL request body does not have separate `ContainerID`
reference. It will be taken from `EACLTable.container_id` field.
2020-08-11 15:49:56 +00:00
2020-06-18 07:40:35 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2022-06-21 11:32:14 +00:00
| eacl | [neo.fs.v2.acl.EACLTable ](#neo.fs.v2.acl.EACLTable ) | | Extended ACL table to set for the container |
2022-03-02 09:30:05 +00:00
| signature | [neo.fs.v2.refs.SignatureRFC6979 ](#neo.fs.v2.refs.SignatureRFC6979 ) | | Signature of stable-marshalled Extended ACL table according to RFC-6979. |
2020-06-18 07:40:35 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.SetExtendedACLResponse" > < / a >
2020-06-18 07:40:35 +00:00
### Message SetExtendedACLResponse
2020-08-13 16:18:53 +00:00
Set Extended ACL
2020-06-18 07:40:35 +00:00
2020-08-11 15:49:56 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| body | [SetExtendedACLResponse.Body ](#neo.fs.v2.container.SetExtendedACLResponse.Body ) | | Body of set extended acl response message. |
2020-08-19 14:00:23 +00:00
| meta_header | [neo.fs.v2.session.ResponseMetaHeader ](#neo.fs.v2.session.ResponseMetaHeader ) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [neo.fs.v2.session.ResponseVerificationHeader ](#neo.fs.v2.session.ResponseVerificationHeader ) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2020-08-11 15:49:56 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.SetExtendedACLResponse.Body" > < / a >
2020-08-11 15:49:56 +00:00
### Message SetExtendedACLResponse.Body
2020-10-16 11:40:12 +00:00
`SetExtendedACLResponse` has an empty body because the operation is
2024-03-05 09:36:58 +00:00
asynchronous and the update should be reflected in `Container` smart
contract's storage after next block is issued in sidechain.
2020-08-11 15:49:56 +00:00
2020-01-30 11:41:24 +00:00
<!-- end messages -->
<!-- end enums -->
< a name = "container/types.proto" > < / a >
< p align = "right" > < a href = "#top" > Top< / a > < / p >
## container/types.proto
<!-- end services -->
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.Container" > < / a >
2020-01-30 11:41:24 +00:00
### Message Container
2020-10-16 11:40:12 +00:00
Container is a structure that defines object placement behaviour. Objects can
be stored only within containers. They define placement rule, attributes and
2024-03-05 09:36:58 +00:00
access control information. An ID of a container is a 32 byte long SHA256
hash of stable-marshalled container message.
2020-01-30 11:41:24 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2022-06-21 11:32:14 +00:00
| version | [neo.fs.v2.refs.Version ](#neo.fs.v2.refs.Version ) | | Container format version. Effectively, the version of API library used to create the container. |
2020-10-16 11:40:12 +00:00
| owner_id | [neo.fs.v2.refs.OwnerID ](#neo.fs.v2.refs.OwnerID ) | | Identifier of the container owner |
2020-12-11 07:20:21 +00:00
| nonce | [bytes ](#bytes ) | | Nonce is a 16 byte UUIDv4, used to avoid collisions of `ContainerID` s |
2022-06-21 11:32:14 +00:00
| basic_acl | [uint32 ](#uint32 ) | | `BasicACL` contains access control rules for the owner, system and others groups, as well as permission bits for `BearerToken` and `Extended ACL` |
2020-10-16 11:40:12 +00:00
| attributes | [Container.Attribute ](#neo.fs.v2.container.Container.Attribute ) | repeated | Attributes represent immutable container's meta data |
| placement_policy | [neo.fs.v2.netmap.PlacementPolicy ](#neo.fs.v2.netmap.PlacementPolicy ) | | Placement policy for the object inside the container |
2020-01-30 11:41:24 +00:00
2020-08-05 22:20:53 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.container.Container.Attribute" > < / a >
2020-08-05 22:20:53 +00:00
### Message Container.Attribute
2020-10-16 11:40:12 +00:00
`Attribute` is a user-defined Key-Value metadata pair attached to the
2024-03-05 09:36:58 +00:00
container. Container attributes are immutable. They are set at the moment
of container creation and can never be added or updated.
2020-12-11 07:20:21 +00:00
Key name must be a container-unique valid UTF-8 string. Value can't be
empty. Containers with duplicated attribute names or attributes with empty
values will be considered invalid.
2020-10-16 11:40:12 +00:00
There are some "well-known" attributes affecting system behaviour:
2023-03-14 07:24:35 +00:00
* [ __SYSTEM__NAME ] \
(`__NEOFS__NAME` is deprecated) \
2022-06-21 11:32:14 +00:00
String of a human-friendly container name registered as a domain in
2021-10-14 15:27:45 +00:00
NNS contract.
2023-03-14 07:24:35 +00:00
* [ __SYSTEM__ZONE ] \
(`__NEOFS__ZONE` is deprecated) \
2024-03-05 09:36:58 +00:00
String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated).
Used as a TLD of a domain name in NNS contract. If no zone is specified,
use default zone: `container` .
2023-03-14 07:24:35 +00:00
* [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \
(`__NEOFS__DISABLE_HOMOMORPHIC_HASHING` is deprecated) \
2024-03-05 09:36:58 +00:00
Disables homomorphic hashing for the container if the value equals "true"
string. Any other values are interpreted as missing attribute. Container
could be accepted in a NeoFS network only if the global network hashing
configuration value corresponds with that attribute's value. After
container inclusion, network setting is ignored.
2020-08-05 22:20:53 +00:00
2020-10-23 12:40:32 +00:00
And some well-known attributes used by applications only:
* Name \
Human-friendly name
* Timestamp \
User-defined local time of container creation in Unix Timestamp format
2020-08-05 22:20:53 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-10-16 11:40:12 +00:00
| key | [string ](#string ) | | Attribute name key |
| value | [string ](#string ) | | Attribute value |
2020-08-05 22:20:53 +00:00
2020-01-30 11:41:24 +00:00
<!-- end messages -->
<!-- end enums -->
## Scalar Value Types
| .proto Type | Notes | C++ Type | Java Type | Python Type |
| ----------- | ----- | -------- | --------- | ----------- |
| < a name = "double" / > double | | double | double | float |
| < a name = "float" / > float | | float | float | float |
| < a name = "int32" / > int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int |
| < a name = "int64" / > int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long |
| < a name = "uint32" / > uint32 | Uses variable-length encoding. | uint32 | int | int/long |
| < a name = "uint64" / > uint64 | Uses variable-length encoding. | uint64 | long | int/long |
| < a name = "sint32" / > sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int |
| < a name = "sint64" / > sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long |
| < a name = "fixed32" / > fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int |
| < a name = "fixed64" / > fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long |
| < a name = "sfixed32" / > sfixed32 | Always four bytes. | int32 | int | int |
| < a name = "sfixed64" / > sfixed64 | Always eight bytes. | int64 | long | int/long |
| < a name = "bool" / > bool | | bool | boolean | boolean |
| < a name = "string" / > string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode |
| < a name = "bytes" / > bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |