2020-08-05 21:52:40 +00:00
# Protocol Documentation
< a name = "top" > < / a >
## Table of Contents
2024-03-05 09:36:58 +00:00
- [netmap/service.proto ](#netmap/service.proto )
2024-04-03 08:21:40 +00:00
- Services
2024-11-05 13:52:48 +00:00
- [NetmapService ](#frost.fs.netmap.NetmapService )
2024-09-02 12:03:58 +00:00
2024-03-05 09:36:58 +00:00
- Messages
2024-11-05 13:52:48 +00:00
- [LocalNodeInfoRequest ](#frost.fs.netmap.LocalNodeInfoRequest )
- [LocalNodeInfoRequest.Body ](#frost.fs.netmap.LocalNodeInfoRequest.Body )
- [LocalNodeInfoResponse ](#frost.fs.netmap.LocalNodeInfoResponse )
- [LocalNodeInfoResponse.Body ](#frost.fs.netmap.LocalNodeInfoResponse.Body )
- [NetmapSnapshotRequest ](#frost.fs.netmap.NetmapSnapshotRequest )
- [NetmapSnapshotRequest.Body ](#frost.fs.netmap.NetmapSnapshotRequest.Body )
- [NetmapSnapshotResponse ](#frost.fs.netmap.NetmapSnapshotResponse )
- [NetmapSnapshotResponse.Body ](#frost.fs.netmap.NetmapSnapshotResponse.Body )
- [NetworkInfoRequest ](#frost.fs.netmap.NetworkInfoRequest )
- [NetworkInfoRequest.Body ](#frost.fs.netmap.NetworkInfoRequest.Body )
- [NetworkInfoResponse ](#frost.fs.netmap.NetworkInfoResponse )
- [NetworkInfoResponse.Body ](#frost.fs.netmap.NetworkInfoResponse.Body )
2024-09-02 12:03:58 +00:00
2024-03-05 09:36:58 +00:00
- [netmap/types.proto ](#netmap/types.proto )
- Messages
2024-11-05 13:52:48 +00:00
- [Filter ](#frost.fs.netmap.Filter )
- [Netmap ](#frost.fs.netmap.Netmap )
- [NetworkConfig ](#frost.fs.netmap.NetworkConfig )
- [NetworkConfig.Parameter ](#frost.fs.netmap.NetworkConfig.Parameter )
- [NetworkInfo ](#frost.fs.netmap.NetworkInfo )
- [NodeInfo ](#frost.fs.netmap.NodeInfo )
- [NodeInfo.Attribute ](#frost.fs.netmap.NodeInfo.Attribute )
- [PlacementPolicy ](#frost.fs.netmap.PlacementPolicy )
- [Replica ](#frost.fs.netmap.Replica )
- [Selector ](#frost.fs.netmap.Selector )
2024-09-02 12:03:58 +00:00
2024-03-05 09:36:58 +00:00
- [Scalar Value Types ](#scalar-value-types )
2020-08-05 21:52:40 +00:00
2020-09-03 09:19:02 +00:00
< a name = "netmap/service.proto" > < / a >
< p align = "right" > < a href = "#top" > Top< / a > < / p >
## netmap/service.proto
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetmapService" > < / a >
2020-09-03 09:19:02 +00:00
2024-11-05 13:52:48 +00:00
### Service "frost.fs.netmap.NetmapService"
2024-03-05 09:36:58 +00:00
`NetmapService` provides methods to work with `Network Map` and the
information required to build it. The resulting `Network Map` is stored in
sidechain `Netmap` smart contract, while related information can be obtained
2024-09-05 13:27:53 +00:00
from other FrostFS nodes.
2020-09-03 09:19:02 +00:00
```
rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse);
2021-02-26 07:53:47 +00:00
rpc NetworkInfo(NetworkInfoRequest) returns (NetworkInfoResponse);
2022-09-23 14:57:44 +00:00
rpc NetmapSnapshot(NetmapSnapshotRequest) returns (NetmapSnapshotResponse);
2020-09-03 09:19:02 +00:00
```
#### Method LocalNodeInfo
2024-03-05 09:36:58 +00:00
Get NodeInfo structure from the particular node directly.
Node information can be taken from `Netmap` smart contract. In some cases,
though, one may want to get recent information directly or to talk to the
node not yet present in the `Network Map` to find out what API version can
be used for further communication. This can be also used to check if a node
is up and running.
2020-09-03 09:19:02 +00:00
2021-11-12 16:10:39 +00:00
Statuses:
- **OK** (0, SECTION_SUCCESS):
information about the server has been successfully read;
- Common failures (SECTION_FAILURE_COMMON).
2020-09-03 09:19:02 +00:00
| Name | Input | Output |
| ---- | ----- | ------ |
2024-11-05 13:52:48 +00:00
| LocalNodeInfo | [LocalNodeInfoRequest ](#frost.fs.netmap.LocalNodeInfoRequest ) | [LocalNodeInfoResponse ](#frost.fs.netmap.LocalNodeInfoResponse ) |
2021-02-26 07:53:47 +00:00
#### Method NetworkInfo
2024-09-05 13:27:53 +00:00
Read recent information about the FrostFS network.
2021-02-26 07:53:47 +00:00
2021-11-12 16:10:39 +00:00
Statuses:
- **OK** (0, SECTION_SUCCESS):
information about the current network state has been successfully read;
- Common failures (SECTION_FAILURE_COMMON).
2021-02-26 07:53:47 +00:00
| Name | Input | Output |
| ---- | ----- | ------ |
2024-11-05 13:52:48 +00:00
| NetworkInfo | [NetworkInfoRequest ](#frost.fs.netmap.NetworkInfoRequest ) | [NetworkInfoResponse ](#frost.fs.netmap.NetworkInfoResponse ) |
2022-09-23 14:57:44 +00:00
#### Method NetmapSnapshot
2024-09-05 13:27:53 +00:00
Returns network map snapshot of the current FrostFS epoch.
2022-09-23 14:57:44 +00:00
Statuses:
- **OK** (0, SECTION_SUCCESS):
information about the current network map has been successfully read;
- Common failures (SECTION_FAILURE_COMMON).
| Name | Input | Output |
| ---- | ----- | ------ |
2024-11-05 13:52:48 +00:00
| NetmapSnapshot | [NetmapSnapshotRequest ](#frost.fs.netmap.NetmapSnapshotRequest ) | [NetmapSnapshotResponse ](#frost.fs.netmap.NetmapSnapshotResponse ) |
2020-09-03 09:19:02 +00:00
<!-- end services -->
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.LocalNodeInfoRequest" > < / a >
2020-09-03 09:19:02 +00:00
### Message LocalNodeInfoRequest
2022-06-21 11:32:14 +00:00
Get NodeInfo structure directly from a particular node
2020-09-03 09:19:02 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| body | [LocalNodeInfoRequest.Body ](#frost.fs.netmap.LocalNodeInfoRequest.Body ) | | Body of the LocalNodeInfo request message |
| meta_header | [frost.fs.session.RequestMetaHeader ](#frost.fs.session.RequestMetaHeader ) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [frost.fs.session.RequestVerificationHeader ](#frost.fs.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-09-03 09:19:02 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.LocalNodeInfoRequest.Body" > < / a >
2020-09-03 09:19:02 +00:00
### Message LocalNodeInfoRequest.Body
2020-10-16 11:40:12 +00:00
LocalNodeInfo request body is empty.
2020-09-03 09:19:02 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.LocalNodeInfoResponse" > < / a >
2020-09-03 09:19:02 +00:00
### Message LocalNodeInfoResponse
2020-10-16 11:40:12 +00:00
Local Node Info, including API Version in use
2020-09-03 09:19:02 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| body | [LocalNodeInfoResponse.Body ](#frost.fs.netmap.LocalNodeInfoResponse.Body ) | | Body of the balance response message. |
| meta_header | [frost.fs.session.ResponseMetaHeader ](#frost.fs.session.ResponseMetaHeader ) | | Carries response meta information. Header data is used only to regulate message transport and does not affect response execution. |
| verify_header | [frost.fs.session.ResponseVerificationHeader ](#frost.fs.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-09-03 09:19:02 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.LocalNodeInfoResponse.Body" > < / a >
2020-09-03 09:19:02 +00:00
### Message LocalNodeInfoResponse.Body
2020-10-16 11:40:12 +00:00
Local Node Info, including API Version in use.
2020-09-03 09:19:02 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| version | [frost.fs.refs.Version ](#frost.fs.refs.Version ) | | Latest FrostFS API version in use |
| node_info | [NodeInfo ](#frost.fs.netmap.NodeInfo ) | | NodeInfo structure with recent information from node itself |
2020-09-03 09:19:02 +00:00
2021-02-26 07:53:47 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetmapSnapshotRequest" > < / a >
2022-09-23 14:57:44 +00:00
### Message NetmapSnapshotRequest
Get netmap snapshot request
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| body | [NetmapSnapshotRequest.Body ](#frost.fs.netmap.NetmapSnapshotRequest.Body ) | | Body of get netmap snapshot request message. |
| meta_header | [frost.fs.session.RequestMetaHeader ](#frost.fs.session.RequestMetaHeader ) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [frost.fs.session.RequestVerificationHeader ](#frost.fs.session.RequestVerificationHeader ) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2022-09-23 14:57:44 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetmapSnapshotRequest.Body" > < / a >
2022-09-23 14:57:44 +00:00
### Message NetmapSnapshotRequest.Body
Get netmap snapshot request body.
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetmapSnapshotResponse" > < / a >
2022-09-23 14:57:44 +00:00
### Message NetmapSnapshotResponse
Response with current netmap snapshot
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| body | [NetmapSnapshotResponse.Body ](#frost.fs.netmap.NetmapSnapshotResponse.Body ) | | Body of get netmap snapshot response message. |
| meta_header | [frost.fs.session.ResponseMetaHeader ](#frost.fs.session.ResponseMetaHeader ) | | Carries response meta information. Header data is used only to regulate message transport and does not affect response execution. |
| verify_header | [frost.fs.session.ResponseVerificationHeader ](#frost.fs.session.ResponseVerificationHeader ) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2022-09-23 14:57:44 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetmapSnapshotResponse.Body" > < / a >
2022-09-23 14:57:44 +00:00
### Message NetmapSnapshotResponse.Body
Get netmap snapshot response body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| netmap | [Netmap ](#frost.fs.netmap.Netmap ) | | Structure of the requested network map. |
2022-09-23 14:57:44 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetworkInfoRequest" > < / a >
2021-02-26 07:53:47 +00:00
### Message NetworkInfoRequest
2022-06-21 11:32:14 +00:00
Get NetworkInfo structure with the network view from a particular node.
2021-02-26 07:53:47 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| body | [NetworkInfoRequest.Body ](#frost.fs.netmap.NetworkInfoRequest.Body ) | | Body of the NetworkInfo request message |
| meta_header | [frost.fs.session.RequestMetaHeader ](#frost.fs.session.RequestMetaHeader ) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
| verify_header | [frost.fs.session.RequestVerificationHeader ](#frost.fs.session.RequestVerificationHeader ) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2021-02-26 07:53:47 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetworkInfoRequest.Body" > < / a >
2021-02-26 07:53:47 +00:00
### Message NetworkInfoRequest.Body
NetworkInfo request body is empty.
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetworkInfoResponse" > < / a >
2021-02-26 07:53:47 +00:00
### Message NetworkInfoResponse
Response with NetworkInfo structure including current epoch and
sidechain magic number.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| body | [NetworkInfoResponse.Body ](#frost.fs.netmap.NetworkInfoResponse.Body ) | | Body of the NetworkInfo response message. |
| meta_header | [frost.fs.session.ResponseMetaHeader ](#frost.fs.session.ResponseMetaHeader ) | | Carries response meta information. Header data is used only to regulate message transport and does not affect response execution. |
| verify_header | [frost.fs.session.ResponseVerificationHeader ](#frost.fs.session.ResponseVerificationHeader ) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
2021-02-26 07:53:47 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetworkInfoResponse.Body" > < / a >
2021-02-26 07:53:47 +00:00
### Message NetworkInfoResponse.Body
Information about the network.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| network_info | [NetworkInfo ](#frost.fs.netmap.NetworkInfo ) | | NetworkInfo structure with recent information. |
2021-02-26 07:53:47 +00:00
2020-09-03 09:19:02 +00:00
<!-- end messages -->
<!-- end enums -->
2020-08-05 21:52:40 +00:00
< a name = "netmap/types.proto" > < / a >
< p align = "right" > < a href = "#top" > Top< / a > < / p >
## netmap/types.proto
<!-- end services -->
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.Filter" > < / a >
2020-08-23 11:42:01 +00:00
### Message Filter
2024-03-05 09:36:58 +00:00
This filter will return the subset of nodes from `NetworkMap` or another
filter's results that will satisfy filter's conditions.
2020-08-23 11:42:01 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2022-06-21 11:32:14 +00:00
| name | [string ](#string ) | | Name of the filter or a reference to a named filter. '*' means application to the whole unfiltered NetworkMap. At top level it's used as a filter name. At lower levels it's considered to be a reference to another named filter |
2020-08-23 11:42:01 +00:00
| key | [string ](#string ) | | Key to filter |
2024-11-05 13:52:48 +00:00
| op | [Operation ](#frost.fs.netmap.Operation ) | | Filtering operation |
2020-08-23 11:42:01 +00:00
| value | [string ](#string ) | | Value to match |
2024-11-05 13:52:48 +00:00
| filters | [Filter ](#frost.fs.netmap.Filter ) | repeated | List of inner filters. Top level operation will be applied to the whole list. |
2020-08-23 11:42:01 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.Netmap" > < / a >
2022-09-23 14:57:44 +00:00
### Message Netmap
Network map structure
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| epoch | [uint64 ](#uint64 ) | | Network map revision number. |
2024-11-05 13:52:48 +00:00
| nodes | [NodeInfo ](#frost.fs.netmap.NodeInfo ) | repeated | Nodes presented in network. |
2022-09-23 14:57:44 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetworkConfig" > < / a >
2021-10-14 15:27:45 +00:00
### Message NetworkConfig
2024-09-05 13:27:53 +00:00
FrostFS network configuration
2021-10-14 15:27:45 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| parameters | [NetworkConfig.Parameter ](#frost.fs.netmap.NetworkConfig.Parameter ) | repeated | List of parameter values |
2021-10-14 15:27:45 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetworkConfig.Parameter" > < / a >
2021-10-14 15:27:45 +00:00
### Message NetworkConfig.Parameter
2022-09-23 14:57:44 +00:00
Single configuration parameter. Key MUST be network-unique.
System parameters:
- **AuditFee** \
Fee paid by the storage group owner to the Inner Ring member.
Value: little-endian integer. Default: 0.
- **BasicIncomeRate** \
Cost of storing one gigabyte of data for a period of one epoch. Paid by
container owner to container nodes.
Value: little-endian integer. Default: 0.
- **ContainerAliasFee** \
Fee paid for named container's creation by the container owner.
Value: little-endian integer. Default: 0.
- **ContainerFee** \
Fee paid for container creation by the container owner.
Value: little-endian integer. Default: 0.
- **EpochDuration** \
2024-09-05 13:27:53 +00:00
FrostFS epoch duration measured in Sidechain blocks.
2022-09-23 14:57:44 +00:00
Value: little-endian integer. Default: 0.
- **HomomorphicHashingDisabled** \
Flag of disabling the homomorphic hashing of objects' payload.
Value: true if any byte != 0. Default: false.
- **InnerRingCandidateFee** \
Fee for entrance to the Inner Ring paid by the candidate.
Value: little-endian integer. Default: 0.
- **MaintenanceModeAllowed** \
Flag allowing setting the MAINTENANCE state to storage nodes.
Value: true if any byte != 0. Default: false.
- **MaxObjectSize** \
2024-09-05 13:27:53 +00:00
Maximum size of physically stored FrostFS object measured in bytes.
2022-09-23 14:57:44 +00:00
Value: little-endian integer. Default: 0.
2024-09-05 13:27:53 +00:00
This value refers to the maximum size of a **physically** stored object
in FrostFS. However, from a user's perspective, the **logical** size of a
stored object can be significantly larger. The relationship between the
physical and logical object sizes is governed by the following formula
```math
\mathrm{Stored\ Object\ Size} \le
\frac{
\left(\mathrm{Max\ Object\ Size}\right)^2
}{
\mathrm{Object\ ID\ Size}
}
```
This arises from the fact that a tombstone, also being an object, stores
the IDs of inhumed objects and cannot be divided into smaller objects,
thus having an upper limit for its size.
For example, if:
* Max Object Size Size = 64 MiB;
* Object ID Size = 32 B;
then:
```math
\mathrm{Stored\ Object\ Size} \le
\frac{\left(64\ \mathrm{MiB}\right)^2}{32\ \mathrm{B}} =
\frac{2^{52}}{2^5}\ \mathrm{B} =
2^{47}\ \mathrm{B} =
128\ \mathrm{TiB}
```
2022-09-23 14:57:44 +00:00
- **WithdrawFee** \
Fee paid for withdrawal of funds paid by the account owner.
Value: little-endian integer. Default: 0.
2024-03-05 09:36:58 +00:00
- **MaxECDataCount** \
Maximum number of data shards for EC placement policy.
Value: little-endian integer. Default: 0.
- **MaxECParityCount** \
Maximum number of parity shards for EC placement policy.
Value: little-endian integer. Default: 0.
2021-10-14 15:27:45 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2021-11-18 11:08:52 +00:00
| key | [bytes ](#bytes ) | | Parameter key. UTF-8 encoded string |
| value | [bytes ](#bytes ) | | Parameter value |
2021-10-14 15:27:45 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NetworkInfo" > < / a >
2021-02-26 07:53:47 +00:00
### Message NetworkInfo
2024-09-05 13:27:53 +00:00
Information about FrostFS network
2021-02-26 07:53:47 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-09-05 13:27:53 +00:00
| current_epoch | [uint64 ](#uint64 ) | | Number of the current epoch in the FrostFS network |
| magic_number | [uint64 ](#uint64 ) | | Magic number of the sidechain of the FrostFS network |
| ms_per_block | [int64 ](#int64 ) | | MillisecondsPerBlock network parameter of the sidechain of the FrostFS network |
2024-11-05 13:52:48 +00:00
| network_config | [NetworkConfig ](#frost.fs.netmap.NetworkConfig ) | | FrostFS network configuration |
2021-02-26 07:53:47 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NodeInfo" > < / a >
2020-08-05 21:58:09 +00:00
### Message NodeInfo
2024-09-05 13:27:53 +00:00
FrostFS node description
2020-08-05 21:58:09 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-09-05 13:27:53 +00:00
| public_key | [bytes ](#bytes ) | | Public key of the FrostFS node in a binary format |
2021-06-23 11:53:21 +00:00
| addresses | [string ](#string ) | repeated | Ways to connect to a node |
2024-11-05 13:52:48 +00:00
| attributes | [NodeInfo.Attribute ](#frost.fs.netmap.NodeInfo.Attribute ) | repeated | Carries list of the FrostFS node attributes in a key-value form. Key name must be a node-unique valid UTF-8 string. Value can't be empty. NodeInfo structures with duplicated attribute names or attributes with empty values will be considered invalid. |
| state | [NodeInfo.State ](#frost.fs.netmap.NodeInfo.State ) | | Carries state of the FrostFS node |
2020-08-05 21:58:09 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NodeInfo.Attribute" > < / a >
2020-08-05 21:58:09 +00:00
### Message NodeInfo.Attribute
2024-09-05 13:27:53 +00:00
Administrator-defined Attributes of the FrostFS Storage Node.
2020-10-16 11:40:12 +00:00
2020-12-11 07:20:21 +00:00
`Attribute` is a Key-Value metadata pair. Key name must be a valid UTF-8
string. Value can't be empty.
2021-08-16 09:02:46 +00:00
Attributes can be constructed into a chain of attributes: any attribute can
2024-03-05 09:36:58 +00:00
have a parent attribute and a child attribute (except the first and the
2024-09-05 13:27:53 +00:00
last one). A string representation of the chain of attributes in FrostFS
2024-03-05 09:36:58 +00:00
Storage Node configuration uses ":" and "/" symbols, e.g.:
2021-08-16 09:02:46 +00:00
2024-09-05 13:27:53 +00:00
`FrostFS_NODE_ATTRIBUTE_1=key1:val1/key2:val2`
2021-08-16 09:02:46 +00:00
2024-03-05 09:36:58 +00:00
Therefore the string attribute representation in the Node configuration
must use "\:", "\/" and "\\" escaped symbols if any of them appears in an
attribute's key or value.
2021-08-16 09:02:46 +00:00
2020-10-16 11:40:12 +00:00
Node's attributes are mostly used during Storage Policy evaluation to
calculate object's placement and find a set of nodes satisfying policy
requirements. There are some "well-known" node attributes common to all the
Storage Nodes in the network and used implicitly with default values if not
explicitly set:
* Capacity \
Total available disk space in Gigabytes.
* Price \
Price in GAS tokens for storing one GB of data during one Epoch. In node
attributes it's a string presenting floating point number with comma or
point delimiter for decimal part. In the Network Map it will be saved as
64-bit unsigned integer representing number of minimal token fractions.
2021-02-11 13:13:07 +00:00
* UN-LOCODE \
2020-10-16 11:40:12 +00:00
Node's geographic location in
[UN/LOCODE ](https://www.unece.org/cefact/codesfortrade/codes_index.html )
2021-02-11 13:13:07 +00:00
format approximated to the nearest point defined in the standard.
* CountryCode \
2020-10-16 11:40:12 +00:00
Country code in
[ISO 3166-1_alpha-2 ](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 )
2021-02-11 13:13:07 +00:00
format. Calculated automatically from `UN-LOCODE` attribute.
* Country \
Country short name in English, as defined in
[ISO-3166 ](https://www.iso.org/obp/ui/#search ). Calculated automatically
from `UN-LOCODE` attribute.
* Location \
Place names are given, whenever possible, in their national language
versions as expressed in the Roman alphabet using the 26 characters of
the character set adopted for international trade data interchange,
written without diacritics . Calculated automatically from `UN-LOCODE`
attribute.
* SubDivCode \
Country's administrative subdivision where node is located. Calculated
automatically from `UN-LOCODE` attribute based on `SubDiv` field.
Presented in [ISO 3166-2 ](https://en.wikipedia.org/wiki/ISO_3166-2 )
format.
* SubDiv \
Country's administrative subdivision name, as defined in
[ISO 3166-2 ](https://en.wikipedia.org/wiki/ISO_3166-2 ). Calculated
automatically from `UN-LOCODE` attribute.
* Continent \
2024-09-05 13:27:53 +00:00
Node's continent name according to the [Seven-Continent
model](https://en.wikipedia.org/wiki/Continent#Number). Calculated
2021-02-11 13:13:07 +00:00
automatically from `UN-LOCODE` attribute.
2022-09-23 14:57:44 +00:00
* ExternalAddr
Node's preferred way for communications with external clients.
Clients SHOULD use these addresses if possible.
Must contain a comma-separated list of multi-addresses.
2020-10-16 11:40:12 +00:00
For detailed description of each well-known attribute please see the
2024-09-05 13:27:53 +00:00
corresponding section in FrostFS Technical Specification.
2020-08-05 21:58:09 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2021-11-18 11:08:52 +00:00
| key | [string ](#string ) | | Key of the node attribute |
| value | [string ](#string ) | | Value of the node attribute |
2020-10-16 11:40:12 +00:00
| parents | [string ](#string ) | repeated | Parent keys, if any. For example for `City` it could be `Region` and `Country` . |
2020-08-05 21:58:09 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.PlacementPolicy" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
### Message PlacementPolicy
2020-10-16 11:40:12 +00:00
Set of rules to select a subset of nodes from `NetworkMap` able to store
container's objects. The format is simple enough to transpile from different
storage policy definition languages.
2020-08-05 21:52:40 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2024-11-05 13:52:48 +00:00
| replicas | [Replica ](#frost.fs.netmap.Replica ) | repeated | Rules to set number of object replicas and place each one into a named bucket |
2024-09-05 13:27:53 +00:00
| container_backup_factor | [uint32 ](#uint32 ) | | Container backup factor controls how deep FrostFS will search for nodes alternatives to include into container's nodes subset |
2024-11-05 13:52:48 +00:00
| selectors | [Selector ](#frost.fs.netmap.Selector ) | repeated | Set of Selectors to form the container's nodes subset |
| filters | [Filter ](#frost.fs.netmap.Filter ) | repeated | List of named filters to reference in selectors |
2024-03-05 09:36:58 +00:00
| unique | [bool ](#bool ) | | Unique flag defines non-overlapping application for replicas |
2020-08-05 21:52:40 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.Replica" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-23 11:42:01 +00:00
### Message Replica
2020-10-16 11:40:12 +00:00
Number of object replicas in a set of nodes from the defined selector. If no
2022-06-21 11:32:14 +00:00
selector set, the root bucket containing all possible nodes will be used by
2020-10-16 11:40:12 +00:00
default.
2020-08-05 21:52:40 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-23 11:42:01 +00:00
| count | [uint32 ](#uint32 ) | | How many object replicas to put |
2020-10-16 11:40:12 +00:00
| selector | [string ](#string ) | | Named selector bucket to put replicas |
2024-03-05 09:36:58 +00:00
| ec_data_count | [uint32 ](#uint32 ) | | Data shards count |
| ec_parity_count | [uint32 ](#uint32 ) | | Parity shards count |
2020-08-05 21:52:40 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.Selector" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-23 11:42:01 +00:00
### Message Selector
2020-10-16 11:40:12 +00:00
Selector chooses a number of nodes from the bucket taking the nearest nodes
to the provided `ContainerID` by hash distance.
2020-08-05 21:52:40 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-23 11:42:01 +00:00
| name | [string ](#string ) | | Selector name to reference in object placement section |
2020-10-16 11:40:12 +00:00
| count | [uint32 ](#uint32 ) | | How many nodes to select from the bucket |
2024-11-05 13:52:48 +00:00
| clause | [Clause ](#frost.fs.netmap.Clause ) | | Selector modifier showing how to form a bucket |
2022-06-21 11:32:14 +00:00
| attribute | [string ](#string ) | | Bucket attribute to select from |
2020-08-23 11:42:01 +00:00
| filter | [string ](#string ) | | Filter reference to select from |
2020-08-05 21:52:40 +00:00
<!-- end messages -->
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.Clause" > < / a >
2020-09-07 11:32:37 +00:00
### Clause
2020-10-16 11:40:12 +00:00
Selector modifier shows how the node set will be formed. By default selector
just groups nodes into a bucket by attribute, selecting nodes only by their
hash distance.
2020-09-07 11:32:37 +00:00
| Name | Number | Description |
| ---- | ------ | ----------- |
2022-06-21 11:32:14 +00:00
| CLAUSE_UNSPECIFIED | 0 | No modifier defined. Nodes will be selected from the bucket randomly |
2020-09-07 11:32:37 +00:00
| SAME | 1 | SAME will select only nodes having the same value of bucket attribute |
| DISTINCT | 2 | DISTINCT will select nodes having different values of bucket attribute |
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.NodeInfo.State" > < / a >
2020-08-05 21:58:09 +00:00
### NodeInfo.State
2024-09-05 13:27:53 +00:00
Represents the enumeration of various states of the FrostFS node.
2020-08-05 21:58:09 +00:00
| Name | Number | Description |
| ---- | ------ | ----------- |
2021-11-18 11:08:52 +00:00
| UNSPECIFIED | 0 | Unknown state |
| ONLINE | 1 | Active state in the network |
| OFFLINE | 2 | Network unavailable state |
2022-09-23 14:57:44 +00:00
| MAINTENANCE | 3 | Maintenance state |
2020-08-05 21:58:09 +00:00
2024-11-05 13:52:48 +00:00
< a name = "frost.fs.netmap.Operation" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-23 11:42:01 +00:00
### Operation
Operations on filters
2020-08-05 21:52:40 +00:00
| Name | Number | Description |
| ---- | ------ | ----------- |
2020-08-13 16:18:53 +00:00
| OPERATION_UNSPECIFIED | 0 | No Operation defined |
| EQ | 1 | Equal |
| NE | 2 | Not Equal |
| GT | 3 | Greater then |
| GE | 4 | Greater or equal |
| LT | 5 | Less then |
| LE | 6 | Less or equal |
| OR | 7 | Logical OR |
| AND | 8 | Logical AND |
2024-03-05 09:36:58 +00:00
| NOT | 9 | Logical negation |
2024-09-05 13:27:53 +00:00
| LIKE | 10 | Matches pattern |
2020-08-05 21:52:40 +00:00
<!-- 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 |