Compare commits

...

40 commits

Author SHA1 Message Date
4c51a9b9d6 [#71] Stop using obsolete .github directory
This commit is a part of multi-repo cleanup effort:
TrueCloudLab/frostfs-infra#136

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-11-06 15:10:17 +03:00
5bfbd249bc [#67] container: Remove unused import
Fix warning from protoc:
`container/grpc/service.proto:8:1: warning: Import acl/grpc/types.proto
is unused.`

Refs #60

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-01 14:15:39 +03:00
b2f5205976
[#66] .forgejo: Make 'fmt' job fail on changed files
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-13 15:09:12 +03:00
83f2fc5944 [#65] Remove reference to NeoFS spec
Can't update it anymore.
Will eventually be superseded by docsite <https://frostfs.info>

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-09-11 15:59:11 +03:00
74bbc3a76b [#64] Update obsolete URLs
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-09-11 14:08:39 +03:00
2a46a9ea0a
[#50] *: Regenerate docs
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-05 16:27:53 +03:00
5602b8fa2a
[#50] *: Replace NeoFS with FrostFS in doc comments
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-05 16:27:09 +03:00
e8afd6e5f5
[#50] netmap: Clarify MaxObjectSize parameter implication on object size
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-05 14:54:28 +03:00
6b390035e7
[#50] netmap: Fix misformatted link in doc comment
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-05 14:24:44 +03:00
6bc2038f03
[#58] .forgejo: Add forgejo actions
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-03 15:11:29 +03:00
aaa922f600
[#58] *: Run pre-commit
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-02 15:03:58 +03:00
6b0f3b01e0
[#58] pre-commit: Add pre-commit and related Makefile targets
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-02 15:02:24 +03:00
54812ba857
[#58] Makefile: Remove lint target due to buf CLI being unavailable
The `buf` CLI is no longer available, so the related lint target has
been removed from Makefile.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-02 14:58:10 +03:00
8760caa093
[#60] container: Remove GetExtendedACL
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-02 00:13:20 +03:00
542d0d9ec2 [#55] netmap: Add LIKE operation for filter in policy
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-08-06 16:55:48 +03:00
Airat Arifullin
e5c976b557 [#59] session: Add Patch verb
* Regenerate docs.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-08-05 20:52:24 +03:00
Airat Arifullin
2efdc8fedb [#56] object: Introduce Patch method
* Introduce rpc `Patch` and corresponding types;
* Generate docs.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-07-29 13:37:38 +00:00
8dd63c451c [#57] container: Remove deprecated methods
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-07-26 10:12:27 +03:00
4a4a7612f6 [#57] *: Format with clang-format
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-07-26 10:12:27 +03:00
Airat Arifullin
0916cb5398 [#49] status: Introduce new common status code
* Introduce `INVALID_ARGUMENT` for common status section;
* Regenerate docs.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-06-17 15:30:06 +00:00
Airat Arifullin
c7473ed98c [#52] object: Add parent_attributes field to EC-header
Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-05-30 11:16:15 +03:00
Airat Arifullin
4c2193443e [#54] acl: Add APE chains to Bearer token
Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-05-30 08:09:00 +00:00
Airat Arifullin
393c95899f [#54] apemanager: Move APE specific types to separate package
* Introduce `ape` package and move `apemanager/types.proto`
  to `ape/`;
* Fix `apemanager/service.proto`.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-05-30 08:09:00 +00:00
e199ad2914 [#53] proto-docs: Regenerate docs
Also, remove obsolete ones.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-05-28 16:26:54 +03:00
Airat Arifullin
fd316479e2 [#51] object: Introduce parentSplitParentID field in EC
* Replace `parentSplitIndex` by `parentSplitParentID` as the first
  one is inappropriate;
* Regenerate docs.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-05-16 16:22:58 +03:00
Airat Arifullin
cfb148ea0c [#48] object: Introduce parent_split_id and parent_index for EC
* Introduce new fields for `EC`-header for `Object` service;
* Regenerate docs.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-05-08 15:02:23 +03:00
Airat Arifullin
b182533828 [#47] object: Specify ec_parent attribute for Object.Search
* Add $Object:ec.parent attribute to Object.Search specification.
* Update docs for Object.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-05-03 10:07:33 +00:00
Airat Arifullin
c94b8ab6ae [#46] apemanager: Introduce proto-s for apemanager service
* Introduce proto-s for `APEManagerService` and related types.
* Introduce a new status section related to `APEManagerService`.
* Generate proto-docs.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-04-27 13:48:04 +00:00
9802fd23ae audit: Remove deprecated service
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-04-20 13:42:24 +03:00
4bae9dd78a [#43] Improve table of contents in proto documentation template
Signed-off-by: Artem Tataurov <a.tataurov@yadro.com>
2024-04-03 11:21:40 +03:00
Airat Arifullin
433b2e6a47 [#42] netmap: Renumerate Replica message fields
* Reassign ec_data_count and ec_parity_count to 3 and 4.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-03-27 10:17:28 +03:00
Airat Arifullin
07eb6a438c [#40] status: Introduce CONTAINER_ACCESS_DENIED status
* Add a new status CONTAINER_ACCESS_DENIED.
* Fix descriptions for methods of container and object services.
* Also regenerate md docs.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
2024-03-20 12:24:51 +03:00
46dd3885d2 [#41] netmap: Add well-known EC-related network settings
Because big number of chunks can lead to excessive CPU/RAM usage, we
restrict EC policies via network settings.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-18 15:41:02 +03:00
063d236c87 [#41] netmap: Support EC policy
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-18 15:41:02 +03:00
f56ccf36b1 [#41] object: Support erasure codes
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-18 15:41:01 +03:00
4c68d92468 [#39] Makefile: Add fmt target
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-02-28 18:54:53 +03:00
188f580e46 [#2] object: Clarify locked object expiration
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-09-05 09:56:11 +03:00
51d330b06a [#19] Remove storage groups
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-17 11:04:47 +03:00
f2a60016ab [#9] object service: Add PutSingle RPC
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-07-04 11:08:35 +03:00
b471eaaba9 [#29] object: Extend Delete rpc specification
* Add OBJECT_NOT_FOUND status specification

Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-06-28 13:30:49 +03:00
55 changed files with 2187 additions and 1686 deletions

View file

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

@ -0,0 +1,19 @@
name: DCO action
on: [pull_request]
jobs:
dco:
name: DCO
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22'
- name: Run commit format checker
uses: https://git.frostfs.info/TrueCloudLab/dco-go@v3
with:
from: 'origin/${{ github.event.pull_request.base.ref }}'

View file

@ -0,0 +1,17 @@
name: Formatters
on: [pull_request]
jobs:
fmt:
name: Run fmt
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install deps
run: |
apt update
apt install -y clang-format
- name: Run fmt
run: |
make fmt
git diff --exit-code --quiet

View file

@ -0,0 +1,18 @@
name: Pre-commit hooks
on: [pull_request]
jobs:
pre-commit:
name: Pre-commit
env:
# Skip pre-commit hooks which are executed by other actions.
SKIP: make-fmt
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install deps
run: |
apt update
apt install -y pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --hook-stage manual --color=always

1
.github/CODEOWNERS vendored
View file

@ -1 +0,0 @@
* @alexvanin @realloc @fyrchik @anatoly-bogatyrev

View file

@ -1,36 +0,0 @@
name: Buf lint
on:
pull_request:
branches:
- master
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: wizhi/setup-buf@v1
with:
version: 0.20.5
- run: buf check lint
breaking:
runs-on: ubuntu-20.04
steps:
- name: Setup buf
uses: wizhi/setup-buf@v1
with:
version: 0.20.5
- name: Check out ref code
uses: actions/checkout@v2
with:
ref: ${{ github.base_ref }}
path: baseref
- run: cd baseref && buf image build -o image.bin
- name: Check out code
uses: actions/checkout@v2
with:
path: prclone
- run: cd prclone && buf check breaking --against-input ../baseref/image.bin

View file

@ -1,21 +0,0 @@
name: DCO check
on:
pull_request:
branches:
- master
jobs:
commits_check_job:
runs-on: ubuntu-latest
name: Commits Check
steps:
- name: Get PR Commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: DCO Check
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}

1
.gitignore vendored
View file

@ -1,2 +1 @@
.idea .idea

24
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,24 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-json
- id: check-xml
- id: check-yaml
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
exclude: ".svg$"
- repo: local
hooks:
- id: make-fmt
name: Run make fmt
entry: make fmt
language: system
pass_filenames: false

View file

@ -9,6 +9,7 @@
### Removed ### Removed
- Reputation system (#22) - Reputation system (#22)
- All `subnet` related fields and types (#25) - All `subnet` related fields and types (#25)
- Storage group (#19)
## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島) ## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島)

1
CODEOWNERS Normal file
View file

@ -0,0 +1 @@
.* @alexvanin @realloc @fyrchik @a.bogatyrev

View file

@ -3,8 +3,8 @@
First, thank you for contributing! We love and encourage pull requests from First, thank you for contributing! We love and encourage pull requests from
everyone. Please follow the guidelines: everyone. Please follow the guidelines:
- Check the open [issues](https://github.com/TrueCloudLab/frostfs-api/issues) and - Check the open [issues](https://git.frostfs.info/TrueCloudLab/frostfs-api/issues) and
[pull requests](https://github.com/TrueCloudLab/frostfs-api/pulls) for existing [pull requests](https://git.frostfs.info/TrueCloudLab/frostfs-api/pulls) for existing
discussions. discussions.
- Open an issue first, to discuss a new feature or enhancement. - Open an issue first, to discuss a new feature or enhancement.
@ -25,19 +25,20 @@ Start by forking the `frostfs-api` repository, make changes in a branch and then
send a pull request. We encourage pull requests to discuss code changes. Here send a pull request. We encourage pull requests to discuss code changes. Here
are the steps in details: are the steps in details:
### Set up your GitHub Repository ### Set up your repository
Fork [NeoFS node upstream](https://github.com/TrueCloudLab/frostfs-api/fork) source
Fork [FrostFS upstream](https://git.frostfs.info/TrueCloudLab/frostfs-api/fork) source
repository to your own personal repository. Copy the URL of your fork (you will repository to your own personal repository. Copy the URL of your fork (you will
need it for the `git clone` command below). need it for the `git clone` command below).
```sh ```sh
$ git clone https://github.com/TrueCloudLab/frostfs-api $ git clone https://git.frostfs.info/TrueCloudLab/frostfs-api
``` ```
### Set up git remote as ``upstream`` ### Set up git remote as ``upstream``
```sh ```sh
$ cd frostfs-api $ cd frostfs-api
$ git remote add upstream https://github.com/TrueCloudLab/frostfs-api $ git remote add upstream https://git.frostfs.info/TrueCloudLab/frostfs-api
$ git fetch upstream $ git fetch upstream
$ git merge upstream/master $ git merge upstream/master
... ...
@ -86,7 +87,7 @@ $ git push origin feature/123-something_awesome
``` ```
### Create a Pull Request ### Create a Pull Request
Pull requests can be created via GitHub. Refer to [this Pull requests can be created via git.frostfs.info. Refer to [this
document](https://help.github.com/articles/creating-a-pull-request/) for document](https://help.github.com/articles/creating-a-pull-request/) for
detailed steps on how to create a pull request. After a Pull Request gets peer detailed steps on how to create a pull request. After a Pull Request gets peer
reviewed and approved, it will be merged. reviewed and approved, it will be merged.

30
Makefile Normal file → Executable file
View file

@ -1,21 +1,35 @@
#!/usr/bin/make -f #!/usr/bin/make -f
SHELL=bash SHELL=bash
# BRanch to match for BReaking changes include help.mk
BRBR?=master
.PHONY: lint .PHONY: doc fmt pre-commit unpre-commit pre-commit-run
lint:
buf check lint
buf check breaking --against-input '.git#branch=$(BRBR)'
.PHONY: doc
# Regenerate documentation for proto files: # Regenerate documentation for proto files:
doc: doc:
@for f in `find . -type f -name '*.proto' -exec dirname {} \; | sort -u `; do \ @for f in `find . -type f -name '*.proto' -exec dirname {} \; | sort -u `; do \
echo "⇒ Documentation for $$(basename $$f)"; \ echo "⇒ Documentation for $$(basename $$f)"; \
protoc \ protoc \
--doc_opt=.github/markdown.tmpl,$${f}.md \ --doc_opt=.forgejo/markdown.tmpl,$${f}.md \
--proto_path=.:/usr/local/include \ --proto_path=.:/usr/local/include \
--doc_out=proto-docs/ $${f}/*.proto; \ --doc_out=proto-docs/ $${f}/*.proto; \
done done
# Run clang-format
fmt:
@for f in `ls **/*.proto`; do \
echo "⇒ Formatting $$f"; \
clang-format -i $$f; \
done
# Activate pre-commit hooks
pre-commit:
pre-commit install --hook-type pre-commit
# Deactivate pre-commit hooks
unpre-commit:
pre-commit uninstall --hook-type pre-commit
# Run pre-commit hooks
pre-commit-run:
@pre-commit run --all-files --hook-stage manual

View file

@ -1,19 +1,18 @@
<p align="center"> <p align="center">
<img src="./.github/logo.svg" width="500px" alt="FrostFS"> <img src="./.forgejo/logo.svg" width="500px" alt="FrostFS">
</p> </p>
<p align="center"> <p align="center">
<a href="https://objectstorage.info">FrostFS</a> API language-agnostic protocol definitions <a href="https://frostfs.info">FrostFS</a> API language-agnostic protocol definitions
</p> </p>
--- ---
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/TrueCloudLab/frostfs-api?sort=semver) ![Release](https://git.frostfs.info/TrueCloudLab/frostfs-api/badges/release.svg)
![License](https://img.shields.io/github/license/TrueCloudLab/frostfs-api.svg?style=popout)
## Overview ## Overview
FrostFS-API repository is the basis for language-specific libraries, e.g.: FrostFS-API repository is the basis for language-specific libraries, e.g.:
- [frostfs-api-go](https://github.com/TrueCloudLab/frostfs-api-go) - [frostfs-api-go](https://git.frostfs.info/TrueCloudLab/frostfs-api-go)
Those libraries contain compiled protocol buffers definitions, wrapped with Those libraries contain compiled protocol buffers definitions, wrapped with
language-specific code. Use them to integrate applications with FrostFS. language-specific code. Use them to integrate applications with FrostFS.

View file

@ -9,13 +9,13 @@ import "accounting/types.proto";
import "refs/types.proto"; import "refs/types.proto";
import "session/types.proto"; import "session/types.proto";
// Accounting service provides methods for interaction with NeoFS sidechain via // Accounting service provides methods for interaction with FrostFS sidechain
// other NeoFS nodes to get information about the account balance. Deposit and // via other FrostFS nodes to get information about the account balance. Deposit
// Withdraw operations can't be implemented here, as they require Mainnet NeoFS // and Withdraw operations can't be implemented here, as they require Mainnet
// smart contract invocation. Transfer operations between internal NeoFS // FrostFS smart contract invocation. Transfer operations between internal
// accounts are possible if both use the same token type. // FrostFS accounts are possible if both use the same token type.
service AccountingService { service AccountingService {
// Returns the amount of funds in GAS token for the requested NeoFS account. // Returns the amount of funds in GAS token for the requested FrostFS account.
// //
// Statuses: // Statuses:
// - **OK** (0, SECTION_SUCCESS): // - **OK** (0, SECTION_SUCCESS):
@ -27,9 +27,9 @@ service AccountingService {
// BalanceRequest message // BalanceRequest message
message BalanceRequest { message BalanceRequest {
// To indicate the account for which the balance is requested, its identifier // To indicate the account for which the balance is requested, its identifier
// is used. It can be any existing account in NeoFS sidechain `Balance` smart // is used. It can be any existing account in FrostFS sidechain `Balance`
// contract. If omitted, client implementation MUST set it to the request's // smart contract. If omitted, client implementation MUST set it to the
// signer `OwnerID`. // request's signer `OwnerID`.
message Body { message Body {
// Valid user identifier in `OwnerID` format for which the balance is // Valid user identifier in `OwnerID` format for which the balance is
// requested. Required field. // requested. Required field.
@ -51,7 +51,8 @@ message BalanceRequest {
// BalanceResponse message // BalanceResponse message
message BalanceResponse { message BalanceResponse {
// The amount of funds in GAS token for the `OwnerID`'s account requested. // The amount of funds in GAS token for the `OwnerID`'s account requested.
// Balance is given in the `Decimal` format to avoid precision issues with rounding. // Balance is given in the `Decimal` format to avoid precision issues with
// rounding.
message Body { message Body {
// Amount of funds in GAS token for the requested account. // Amount of funds in GAS token for the requested account.
Decimal balance = 1; Decimal balance = 1;

View file

@ -5,7 +5,7 @@ package neo.fs.v2.accounting;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/grpc;accounting"; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/grpc;accounting";
option csharp_namespace = "Neo.FileStorage.API.Accounting"; option csharp_namespace = "Neo.FileStorage.API.Accounting";
// Standard floating point data type can't be used in NeoFS due to inexactness // Standard floating point data type can't be used in FrostFS due to inexactness
// of the result when doing lots of small number operations. To solve the lost // of the result when doing lots of small number operations. To solve the lost
// precision issue, special `Decimal` format is used for monetary computations. // precision issue, special `Decimal` format is used for monetary computations.
// //

View file

@ -6,6 +6,7 @@ option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc;ac
option csharp_namespace = "Neo.FileStorage.API.Acl"; option csharp_namespace = "Neo.FileStorage.API.Acl";
import "refs/types.proto"; import "refs/types.proto";
import "ape/types.proto";
// Target role of the access control rule in access control list. // Target role of the access control rule in access control list.
enum Role { enum Role {
@ -19,7 +20,8 @@ enum Role {
// container or an inner ring node // container or an inner ring node
SYSTEM = 2; SYSTEM = 2;
// Others target rule is applied if sender is neither a user nor a system target // Others target rule is applied if sender is neither a user nor a system
// target
OTHERS = 3; OTHERS = 3;
} }
@ -87,14 +89,14 @@ enum HeaderType {
// Filter object headers // Filter object headers
OBJECT = 2; OBJECT = 2;
// Filter service headers. These are not processed by NeoFS nodes and // Filter service headers. These are not processed by FrostFS nodes and
// exist for service use only. // exist for service use only.
SERVICE = 3; SERVICE = 3;
} }
// Describes a single eACL rule. // Describes a single eACL rule.
message EACLRecord { message EACLRecord {
// NeoFS request Verb to match // FrostFS request Verb to match
Operation operation = 1 [ json_name = "operation" ]; Operation operation = 1 [ json_name = "operation" ];
// Rule execution result. Either allows or denies access if filters match. // Rule execution result. Either allows or denies access if filters match.
@ -163,7 +165,7 @@ message EACLRecord {
// Extended ACL rules table. A list of ACL rules defined additionally to Basic // Extended ACL rules table. A list of ACL rules defined additionally to Basic
// ACL. Extended ACL rules can be attached to a container and can be updated // ACL. Extended ACL rules can be attached to a container and can be updated
// or may be defined in `BearerToken` structure. Please see the corresponding // or may be defined in `BearerToken` structure. Please see the corresponding
// NeoFS Technical Specification section for detailed description. // FrostFS Technical Specification section for detailed description.
message EACLTable { message EACLTable {
// eACL format version. Effectively, the version of API library used to create // eACL format version. Effectively, the version of API library used to create
// eACL Table. // eACL Table.
@ -183,16 +185,19 @@ message EACLTable {
// used in the similar use cases, like providing authorisation to externally // used in the similar use cases, like providing authorisation to externally
// authenticated party. // authenticated party.
// //
// BearerToken can be issued only by the container's owner and must be signed using // BearerToken can be issued only by the container's owner and must be signed
// the key associated with the container's `OwnerID`. // using the key associated with the container's `OwnerID`.
message BearerToken { message BearerToken {
// Bearer Token body structure contains Extended ACL table issued by the container // Bearer Token body structure contains Extended ACL table issued by the
// owner with additional information preventing token abuse. // container owner with additional information preventing token abuse.
message Body { message Body {
// Table of Extended ACL rules to use instead of the ones attached to the // Table of Extended ACL rules to use instead of the ones attached to the
// container. If it contains `container_id` field, bearer token is only // container. If it contains `container_id` field, bearer token is only
// valid for this specific container. Otherwise, any container of the same owner // valid for this specific container. Otherwise, any container of the same
// is allowed. // owner is allowed.
//
// Deprecated: eACL tables are no longer relevant - `APEOverrides` should be
// used instead.
EACLTable eacl_table = 1 [ json_name = "eaclTable" ]; EACLTable eacl_table = 1 [ json_name = "eaclTable" ];
// `OwnerID` defines to whom the token was issued. It must match the request // `OwnerID` defines to whom the token was issued. It must match the request
@ -217,6 +222,24 @@ message BearerToken {
// AllowImpersonate flag to consider token signer as request owner. // AllowImpersonate flag to consider token signer as request owner.
// If this field is true extended ACL table in token body isn't processed. // If this field is true extended ACL table in token body isn't processed.
bool allow_impersonate = 4 [ json_name = "allowImpersonate" ]; bool allow_impersonate = 4 [ json_name = "allowImpersonate" ];
// APEOverride is the list of APE chains defined for a target.
// These chains are meant to serve as overrides to the already defined (or
// even undefined) APE chains for the target (see contract `Policy`).
//
// The server-side processing of the bearer token with set APE overrides
// must verify if a client is permitted to override chains for the target,
// preventing unauthorized access through the APE mechanism.
message APEOverride {
// Target for which chains are applied.
frostfs.v2.ape.ChainTarget target = 1 [ json_name = "target" ];
// The list of APE chains.
repeated frostfs.v2.ape.Chain chains = 2 [ json_name = "chains" ];
}
// APE override for the target.
APEOverride ape_override = 5 [ json_name = "apeOverride" ];
} }
// Bearer Token body // Bearer Token body
Body body = 1 [ json_name = "body" ]; Body body = 1 [ json_name = "body" ];

33
ape/types.proto Normal file
View file

@ -0,0 +1,33 @@
syntax = "proto3";
package frostfs.v2.ape;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc;ape";
// TargetType is a type target to which a rule chain is defined.
enum TargetType {
UNDEFINED = 0;
NAMESPACE = 1;
CONTAINER = 2;
USER = 3;
GROUP = 4;
}
// ChainTarget is an object to which a rule chain is defined.
message ChainTarget {
TargetType type = 1;
string name = 2;
}
// Chain is a chain of rules defined for a specific target.
message Chain {
oneof kind {
// Raw representation of a serizalized rule chain.
bytes raw = 1;
}
}

171
apemanager/service.proto Normal file
View file

@ -0,0 +1,171 @@
syntax = "proto3";
package frostfs.v2.apemanager;
import "ape/types.proto";
import "session/types.proto";
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc;apemanager";
// `APEManagerService` provides API to manage rule chains within sidechain's
// `Policy` smart contract.
service APEManagerService {
// Add a rule chain for a specific target to `Policy` smart contract.
//
// Statuses:
// - **OK** (0, SECTION_SUCCESS): \
// the chain has been successfully added;
// - Common failures (SECTION_FAILURE_COMMON);
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// container (as target) not found;
// - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
// the operation is denied by the service.
rpc AddChain(AddChainRequest) returns (AddChainResponse);
// Remove a rule chain for a specific target from `Policy` smart contract.
// RemoveChain is an idempotent operation: removal of non-existing rule chain
// also means success.
//
// Statuses:
// - **OK** (0, SECTION_SUCCESS): \
// the chain has been successfully removed;
// - Common failures (SECTION_FAILURE_COMMON);
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// container (as target) not found;
// - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
// the operation is denied by the service.
rpc RemoveChain(RemoveChainRequest) returns (RemoveChainResponse);
// List chains defined for a specific target from `Policy` smart contract.
//
// Statuses:
// - **OK** (0, SECTION_SUCCESS): \
// chains have been successfully listed;
// - Common failures (SECTION_FAILURE_COMMON);
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// container (as target) not found;
// - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
// the operation is denied by the service.
rpc ListChains(ListChainsRequest) returns (ListChainsResponse);
}
message AddChainRequest {
message Body {
// A target for which a rule chain is added.
frostfs.v2.ape.ChainTarget target = 1;
// The chain to set for the target.
frostfs.v2.ape.Chain chain = 2;
}
// The request's body.
Body body = 1;
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
message AddChainResponse {
message Body {
// Chain ID assigned for the added rule chain.
// If chain ID is left empty in the request, then
// it will be generated.
bytes chain_id = 1;
}
// The response's body.
Body body = 1;
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
message RemoveChainRequest {
message Body {
// Target for which a rule chain is removed.
frostfs.v2.ape.ChainTarget target = 1;
// Chain ID assigned for the rule chain.
bytes chain_id = 2;
}
// The request's body.
Body body = 1;
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
message RemoveChainResponse {
// Since RemoveChain is an idempotent operation, then the only indicator that
// operation could not be performed is an error returning to a client.
message Body {}
// The response's body.
Body body = 1;
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
message ListChainsRequest {
message Body {
// Target for which rule chains are listed.
frostfs.v2.ape.ChainTarget target = 1;
}
// The request's body.
Body body = 1;
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
message ListChainsResponse {
message Body {
// The list of chains defined for the reqeusted target.
repeated frostfs.v2.ape.Chain chains = 1;
}
// The response's body.
Body body = 1;
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}

View file

@ -1,59 +0,0 @@
syntax = "proto3";
package neo.fs.v2.audit;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/audit/grpc;audit";
option csharp_namespace = "Neo.FileStorage.API.Audit";
import "refs/types.proto";
// DataAuditResult keeps record of conducted Data Audits. The detailed report is
// generated separately.
message DataAuditResult {
// Data Audit Result format version. Effectively, the version of API library
// used to report DataAuditResult structure.
neo.fs.v2.refs.Version version = 1 [json_name = "version"];
// Epoch number when the Data Audit was conducted
fixed64 audit_epoch = 2 [json_name = "auditEpoch"];
// Container under audit
neo.fs.v2.refs.ContainerID container_id = 3 [json_name = "containerID"];
// Public key of the auditing InnerRing node in a binary format
bytes public_key = 4 [json_name = "publicKey"];
// Shows if Data Audit process was complete in time or if it was cancelled
bool complete = 5 [json_name = "complete"];
// Number of request done at PoR stage
uint32 requests = 6 [json_name = "requests"];
// Number of retries done at PoR stage
uint32 retries = 7 [json_name = "retries"];
// List of Storage Groups that passed audit PoR stage
repeated neo.fs.v2.refs.ObjectID pass_sg = 8 [json_name = "passSG"];
// List of Storage Groups that failed audit PoR stage
repeated neo.fs.v2.refs.ObjectID fail_sg = 9 [json_name = "failSG"];
// Number of sampled objects under the audit placed in an optimal way according to
// the containers placement policy when checking PoP
uint32 hit = 10 [json_name = "hit"];
// Number of sampled objects under the audit placed in suboptimal way according to
// the containers placement policy, but still at a satisfactory level when
// checking PoP
uint32 miss = 11 [json_name = "miss"];
// Number of sampled objects under the audit stored inconsistently with the
// placement policy or not found at all when checking PoP
uint32 fail = 12 [json_name = "fail"];
// List of storage node public keys that passed at least one PDP
repeated bytes pass_nodes = 13 [json_name = "passNodes"];
// List of storage node public keys that failed at least one PDP
repeated bytes fail_nodes = 14 [json_name = "failNodes"];
}

View file

@ -1,10 +0,0 @@
lint:
use:
- DEFAULT
- COMMENTS
- ENUM_FIRST_VALUE_ZERO
except:
- PACKAGE_DIRECTORY_MATCH
- PACKAGE_VERSION_SUFFIX
- ENUM_VALUE_PREFIX
- ENUM_ZERO_VALUE_SUFFIX

View file

@ -5,36 +5,39 @@ package neo.fs.v2.container;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc;container"; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc;container";
option csharp_namespace = "Neo.FileStorage.API.Container"; option csharp_namespace = "Neo.FileStorage.API.Container";
import "acl/types.proto";
import "container/types.proto"; import "container/types.proto";
import "refs/types.proto"; import "refs/types.proto";
import "session/types.proto"; import "session/types.proto";
// `ContainerService` provides API to interact with `Container` smart contract // `ContainerService` provides API to interact with `Container` smart contract
// in NeoFS sidechain via other NeoFS nodes. All of those actions can be done // in FrostFS sidechain via other FrostFS nodes. All of those actions can be
// equivalently by directly issuing transactions and RPC calls to sidechain // done equivalently by directly issuing transactions and RPC calls to sidechain
// nodes. // nodes.
service ContainerService { service ContainerService {
// `Put` invokes `Container` smart contract's `Put` method and returns // `Put` invokes `Container` smart contract's `Put` method and returns
// response immediately. After a new block is issued in sidechain, request is // response immediately. After a new block is issued in sidechain, request is
// verified by Inner Ring nodes. After one more block in sidechain, the container // verified by Inner Ring nodes. After one more block in sidechain, the
// is added into smart contract storage. // container is added into smart contract storage.
// //
// Statuses: // Statuses:
// - **OK** (0, SECTION_SUCCESS): \ // - **OK** (0, SECTION_SUCCESS): \
// request to save the container has been sent to the sidechain; // request to save the container has been sent to the sidechain;
// - Common failures (SECTION_FAILURE_COMMON). // - Common failures (SECTION_FAILURE_COMMON);
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// container create access denied.
rpc Put(PutRequest) returns (PutResponse); rpc Put(PutRequest) returns (PutResponse);
// `Delete` invokes `Container` smart contract's `Delete` method and returns // `Delete` invokes `Container` smart contract's `Delete` method and returns
// response immediately. After a new block is issued in sidechain, request is // response immediately. After a new block is issued in sidechain, request is
// verified by Inner Ring nodes. After one more block in sidechain, the container // verified by Inner Ring nodes. After one more block in sidechain, the
// is added into smart contract storage. // container is added into smart contract storage.
// //
// Statuses: // Statuses:
// - **OK** (0, SECTION_SUCCESS): \ // - **OK** (0, SECTION_SUCCESS): \
// request to remove the container has been sent to the sidechain; // request to remove the container has been sent to the sidechain;
// - Common failures (SECTION_FAILURE_COMMON). // - Common failures (SECTION_FAILURE_COMMON);
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// container delete access denied.
rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Delete(DeleteRequest) returns (DeleteResponse);
// Returns container structure from `Container` smart contract storage. // Returns container structure from `Container` smart contract storage.
@ -44,7 +47,9 @@ service ContainerService {
// container has been successfully read; // container has been successfully read;
// - Common failures (SECTION_FAILURE_COMMON); // - Common failures (SECTION_FAILURE_COMMON);
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// requested container not found. // requested container not found;
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// access to container is denied.
rpc Get(GetRequest) returns (GetResponse); rpc Get(GetRequest) returns (GetResponse);
// Returns all owner's containers from 'Container` smart contract' storage. // Returns all owner's containers from 'Container` smart contract' storage.
@ -52,42 +57,13 @@ service ContainerService {
// Statuses: // Statuses:
// - **OK** (0, SECTION_SUCCESS): \ // - **OK** (0, SECTION_SUCCESS): \
// container list has been successfully read; // container list has been successfully read;
// - Common failures (SECTION_FAILURE_COMMON).
rpc List(ListRequest) returns (ListResponse);
// Invokes 'SetEACL' method of 'Container` smart contract and returns response
// immediately. After one more block in sidechain, changes in an Extended ACL are
// added into smart contract storage.
//
// Statuses:
// - **OK** (0, SECTION_SUCCESS): \
// request to save container eACL has been sent to the sidechain;
// - Common failures (SECTION_FAILURE_COMMON).
rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse);
// Returns Extended ACL table and signature from `Container` smart contract
// storage.
//
// Statuses:
// - **OK** (0, SECTION_SUCCESS): \
// container eACL has been successfully read;
// - Common failures (SECTION_FAILURE_COMMON); // - Common failures (SECTION_FAILURE_COMMON);
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// container not found; // container list access denied.
// - **EACL_NOT_FOUND** (3073, SECTION_CONTAINER): \ rpc List(ListRequest) returns (ListResponse);
// eACL table not found.
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
// Announces the space values used by the container for P2P synchronization.
//
// Statuses:
// - **OK** (0, SECTION_SUCCESS): \
// estimation of used space has been successfully announced;
// - Common failures (SECTION_FAILURE_COMMON).
rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) returns (AnnounceUsedSpaceResponse);
} }
// New NeoFS Container creation request // New FrostFS Container creation request
message PutRequest { message PutRequest {
// Container creation request has container structure's signature as a // Container creation request has container structure's signature as a
// separate field. It's not stored in sidechain, just verified on container // separate field. It's not stored in sidechain, just verified on container
@ -95,7 +71,7 @@ message PutRequest {
// the stable-marshalled container strucutre, hence there is no need for // the stable-marshalled container strucutre, hence there is no need for
// additional signature checks. // additional signature checks.
message Body { message Body {
// Container structure to register in NeoFS // Container structure to register in FrostFS
container.Container container = 1; container.Container container = 1;
// Signature of a stable-marshalled container according to RFC-6979. // Signature of a stable-marshalled container according to RFC-6979.
@ -114,7 +90,7 @@ message PutRequest {
neo.fs.v2.session.RequestVerificationHeader verify_header = 3; neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
} }
// New NeoFS Container creation response // New FrostFS Container creation response
message PutResponse { message PutResponse {
// Container put response body contains information about the newly registered // Container put response body contains information about the newly registered
// container as seen by `Container` smart contract. `ContainerID` can be // container as seen by `Container` smart contract. `ContainerID` can be
@ -143,10 +119,11 @@ message DeleteRequest {
// the container owner's intent. The signature will be verified by `Container` // the container owner's intent. The signature will be verified by `Container`
// smart contract, so signing algorithm must be supported by NeoVM. // smart contract, so signing algorithm must be supported by NeoVM.
message Body { message Body {
// Identifier of the container to delete from NeoFS // Identifier of the container to delete from FrostFS
neo.fs.v2.refs.ContainerID container_id = 1; neo.fs.v2.refs.ContainerID container_id = 1;
// `ContainerID` signed with the container owner's key according to RFC-6979. // `ContainerID` signed with the container owner's key according to
// RFC-6979.
neo.fs.v2.refs.SignatureRFC6979 signature = 2; neo.fs.v2.refs.SignatureRFC6979 signature = 2;
} }
// Body of container delete request message. // Body of container delete request message.
@ -268,150 +245,3 @@ message ListResponse {
// transmission. // transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
} }
// Set Extended ACL
message SetExtendedACLRequest {
// Set Extended ACL request body does not have separate `ContainerID`
// reference. It will be taken from `EACLTable.container_id` field.
message Body {
// Extended ACL table to set for the container
neo.fs.v2.acl.EACLTable eacl = 1;
// Signature of stable-marshalled Extended ACL table according to RFC-6979.
neo.fs.v2.refs.SignatureRFC6979 signature = 2;
}
// Body of set extended acl request message.
Body body = 1;
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
// Set Extended ACL
message SetExtendedACLResponse {
// `SetExtendedACLResponse` has an empty body because the operation is
// asynchronous and the update should be reflected in `Container` smart contract's
// storage after next block is issued in sidechain.
message Body { }
// Body of set extended acl response message.
Body body = 1;
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
// Get Extended ACL
message GetExtendedACLRequest {
// Get Extended ACL request body
message Body {
// Identifier of the container having Extended ACL
neo.fs.v2.refs.ContainerID container_id = 1;
}
// Body of get extended acl request message.
Body body = 1;
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
// Get Extended ACL
message GetExtendedACLResponse {
// Get Extended ACL Response body can be empty if the requested container does
// not have Extended ACL Table attached or Extended ACL has not been allowed at
// the time of container creation.
message Body {
// Extended ACL requested, if available
neo.fs.v2.acl.EACLTable eacl = 1;
// Signature of stable-marshalled Extended ACL according to RFC-6979.
neo.fs.v2.refs.SignatureRFC6979 signature = 2;
// Session token if Extended ACL was set within a session
neo.fs.v2.session.SessionToken session_token = 3;
}
// Body of get extended acl response message.
Body body = 1;
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
// Announce container used space
message AnnounceUsedSpaceRequest {
// Container used space announcement body.
message Body {
// Announcement contains used space information for a single container.
message Announcement {
// Epoch number for which the container size estimation was produced.
uint64 epoch = 1;
// Identifier of the container.
neo.fs.v2.refs.ContainerID container_id = 2;
// Used space is a sum of object payload sizes of a specified
// container, stored in the node. It must not include inhumed objects.
uint64 used_space = 3;
}
// List of announcements. If nodes share several containers,
// announcements are transferred in a batch.
repeated Announcement announcements = 1;
}
// Body of announce used space request message.
Body body = 1;
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
// Announce container used space
message AnnounceUsedSpaceResponse {
// `AnnounceUsedSpaceResponse` has an empty body because announcements are
// one way communication.
message Body { }
// Body of announce used space response message.
Body body = 1;
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}

View file

@ -10,8 +10,8 @@ import "refs/types.proto";
// Container is a structure that defines object placement behaviour. Objects can // Container is a structure that defines object placement behaviour. Objects can
// be stored only within containers. They define placement rule, attributes and // be stored only within containers. They define placement rule, attributes and
// access control information. An ID of a container is a 32 byte long SHA256 hash // access control information. An ID of a container is a 32 byte long SHA256
// of stable-marshalled container message. // hash of stable-marshalled container message.
message Container { message Container {
// Container format version. Effectively, the version of API library used to // Container format version. Effectively, the version of API library used to
// create the container. // create the container.
@ -23,13 +23,13 @@ message Container {
// Nonce is a 16 byte UUIDv4, used to avoid collisions of `ContainerID`s // Nonce is a 16 byte UUIDv4, used to avoid collisions of `ContainerID`s
bytes nonce = 3 [ json_name = "nonce" ]; bytes nonce = 3 [ json_name = "nonce" ];
// `BasicACL` contains access control rules for the owner, system and others groups, // `BasicACL` contains access control rules for the owner, system and others
// as well as permission bits for `BearerToken` and `Extended ACL` // groups, as well as permission bits for `BearerToken` and `Extended ACL`
uint32 basic_acl = 4 [ json_name = "basicACL" ]; uint32 basic_acl = 4 [ json_name = "basicACL" ];
// `Attribute` is a user-defined Key-Value metadata pair attached to the // `Attribute` is a user-defined Key-Value metadata pair attached to the
// container. Container attributes are immutable. They are set at the moment of // container. Container attributes are immutable. They are set at the moment
// container creation and can never be added or updated. // of container creation and can never be added or updated.
// //
// Key name must be a container-unique valid UTF-8 string. Value can't be // 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 // empty. Containers with duplicated attribute names or attributes with empty
@ -43,15 +43,16 @@ message Container {
// NNS contract. // NNS contract.
// * [ __SYSTEM__ZONE ] \ // * [ __SYSTEM__ZONE ] \
// (`__NEOFS__ZONE` is deprecated) \ // (`__NEOFS__ZONE` is deprecated) \
// String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated). Used as a TLD of a domain name in NNS // String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated).
// contract. If no zone is specified, use default zone: `container`. // Used as a TLD of a domain name in NNS contract. If no zone is specified,
// use default zone: `container`.
// * [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \ // * [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \
// (`__NEOFS__DISABLE_HOMOMORPHIC_HASHING` is deprecated) \ // (`__NEOFS__DISABLE_HOMOMORPHIC_HASHING` is deprecated) \
// Disables homomorphic hashing for the container if the value equals "true" string. // Disables homomorphic hashing for the container if the value equals "true"
// Any other values are interpreted as missing attribute. Container could be // string. Any other values are interpreted as missing attribute. Container
// accepted in a NeoFS network only if the global network hashing configuration // could be accepted in a FrostFS network only if the global network hashing
// value corresponds with that attribute's value. After container inclusion, network // configuration value corresponds with that attribute's value. After
// setting is ignored. // container inclusion, network setting is ignored.
// //
// And some well-known attributes used by applications only: // And some well-known attributes used by applications only:
// //
@ -70,5 +71,6 @@ message Container {
repeated Attribute attributes = 5 [ json_name = "attributes" ]; repeated Attribute attributes = 5 [ json_name = "attributes" ];
// Placement policy for the object inside the container // Placement policy for the object inside the container
neo.fs.v2.netmap.PlacementPolicy placement_policy = 6 [json_name = "placementPolicy"]; neo.fs.v2.netmap.PlacementPolicy placement_policy = 6
[ json_name = "placementPolicy" ];
} }

View file

@ -1,6 +1,6 @@
# Release instructions # Release instructions
This documents outlines the neofs-api release process and can be used as a TODO This documents outlines the frostfs-api release process and can be used as a TODO
list for a new release. list for a new release.
## Pre-release checks ## Pre-release checks
@ -20,7 +20,7 @@ Add an entry to the CHANGELOG.md following the style established there.
Add a codename for releases with the new major version, version and release date in Add a codename for releases with the new major version, version and release date in
the heading. Write a paragraph describing the most significant changes done in the heading. Write a paragraph describing the most significant changes done in
this release. Then add sections with what has been added, changed and removed, this release. Then add sections with what has been added, changed and removed,
describing each change briefly with a reference to GitHub issues, where describing each change briefly with a reference to issues, where
available. available.
## Release commit ## Release commit
@ -38,7 +38,7 @@ Release v2.9.0 - Anmyeondo (안면도, 安眠島)
Use `vX.Y.Z` tag following the semantic versioning standard. For pre-release Use `vX.Y.Z` tag following the semantic versioning standard. For pre-release
versions use `vX.Y.Z-rc.N` scheme. versions use `vX.Y.Z-rc.N` scheme.
## Push changes and release tag to Github ## Push changes and release tag to repository
This step should bypass the default PR mechanism to get a correct result (so This step should bypass the default PR mechanism to get a correct result (so
that releasing requires admin privileges for the project), both the `master` that releasing requires admin privileges for the project), both the `master`
@ -48,9 +48,9 @@ branch update and tag must be pushed simultaneously like this:
$ git push origin master v2.7.0 $ git push origin master v2.7.0
``` ```
## Make a proper Github release ## Make a proper release
Edit an automatically-created release on Github. Edit an automatically-created release on git.frostfs.info
Release title has to follow `<version> <Romanized codename> (<Hangeul, Hanja Release title has to follow `<version> <Romanized codename> (<Hangeul, Hanja
codename> )` scheme for major releases and just `<version>` for regular point codename> )` scheme for major releases and just `<version>` for regular point
@ -58,6 +58,5 @@ releases.
## Post-release actions ## Post-release actions
* Close corresponding X.Y.Z Github milestone * Close corresponding X.Y.Z milestone
* Make announcements in Matrix and Discord channels * Make announcements in Matrix and Discord channels
* Update [NeoFS Technical Specification](https://github.com/nspcc-dev/neofs-spec)

11
help.mk Normal file
View file

@ -0,0 +1,11 @@
.PHONY: help
# Show this help prompt
help:
@echo ' Usage:'
@echo ''
@echo ' make <target>'
@echo ''
@echo ' Targets:'
@echo ''
@awk '/^#/{ comment = substr($$0,3) } /^[a-zA-Z][a-zA-Z0-9_-]+:/{ print " ", $$1, comment; comment = "" }' $(MAKEFILE_LIST) | column -t -s ':' | grep -v 'IGNORE' | sort | uniq

View file

@ -9,8 +9,9 @@ import "refs/types.proto";
// Lock objects protects a list of objects from being deleted. The lifetime of a // Lock objects protects a list of objects from being deleted. The lifetime of a
// lock object is limited similar to regular objects in // lock object is limited similar to regular objects in
// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) attribute. Lock object MUST have expiration epoch. // `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated)
// It is impossible to delete a lock object via ObjectService.Delete RPC call. // attribute. Lock object MUST have expiration epoch. It is impossible to delete
// a lock object via ObjectService.Delete RPC call.
message Lock { message Lock {
// List of objects to lock. Must not be empty or carry empty IDs. // List of objects to lock. Must not be empty or carry empty IDs.
// All members must be of the `REGULAR` type. // All members must be of the `REGULAR` type.

View file

@ -9,16 +9,17 @@ import "netmap/types.proto";
import "refs/types.proto"; import "refs/types.proto";
import "session/types.proto"; import "session/types.proto";
// `NetmapService` provides methods to work with `Network Map` and the information // `NetmapService` provides methods to work with `Network Map` and the
// required to build it. The resulting `Network Map` is stored in sidechain // information required to build it. The resulting `Network Map` is stored in
// `Netmap` smart contract, while related information can be obtained from other // sidechain `Netmap` smart contract, while related information can be obtained
// NeoFS nodes. // from other FrostFS nodes.
service NetmapService { service NetmapService {
// Get NodeInfo structure from the particular node directly. // Get NodeInfo structure from the particular node directly.
// Node information can be taken from `Netmap` smart contract. In some cases, though, // Node information can be taken from `Netmap` smart contract. In some cases,
// one may want to get recent information directly or to talk to the node not yet // though, one may want to get recent information directly or to talk to the
// present in the `Network Map` to find out what API version can be used for // node not yet present in the `Network Map` to find out what API version can
// further communication. This can be also used to check if a node is up and running. // be used for further communication. This can be also used to check if a node
// is up and running.
// //
// Statuses: // Statuses:
// - **OK** (0, SECTION_SUCCESS): // - **OK** (0, SECTION_SUCCESS):
@ -26,7 +27,7 @@ service NetmapService {
// - Common failures (SECTION_FAILURE_COMMON). // - Common failures (SECTION_FAILURE_COMMON).
rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse); rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse);
// Read recent information about the NeoFS network. // Read recent information about the FrostFS network.
// //
// Statuses: // Statuses:
// - **OK** (0, SECTION_SUCCESS): // - **OK** (0, SECTION_SUCCESS):
@ -34,7 +35,7 @@ service NetmapService {
// - Common failures (SECTION_FAILURE_COMMON). // - Common failures (SECTION_FAILURE_COMMON).
rpc NetworkInfo(NetworkInfoRequest) returns (NetworkInfoResponse); rpc NetworkInfo(NetworkInfoRequest) returns (NetworkInfoResponse);
// Returns network map snapshot of the current NeoFS epoch. // Returns network map snapshot of the current FrostFS epoch.
// //
// Statuses: // Statuses:
// - **OK** (0, SECTION_SUCCESS): // - **OK** (0, SECTION_SUCCESS):
@ -46,8 +47,7 @@ service NetmapService {
// Get NodeInfo structure directly from a particular node // Get NodeInfo structure directly from a particular node
message LocalNodeInfoRequest { message LocalNodeInfoRequest {
// LocalNodeInfo request body is empty. // LocalNodeInfo request body is empty.
message Body { message Body {}
}
// Body of the LocalNodeInfo request message // Body of the LocalNodeInfo request message
Body body = 1; Body body = 1;
@ -65,7 +65,7 @@ message LocalNodeInfoRequest {
message LocalNodeInfoResponse { message LocalNodeInfoResponse {
// Local Node Info, including API Version in use. // Local Node Info, including API Version in use.
message Body { message Body {
// Latest NeoFS API version in use // Latest FrostFS API version in use
neo.fs.v2.refs.Version version = 1; neo.fs.v2.refs.Version version = 1;
// NodeInfo structure with recent information from node itself // NodeInfo structure with recent information from node itself
@ -87,8 +87,7 @@ message LocalNodeInfoResponse {
// Get NetworkInfo structure with the network view from a particular node. // Get NetworkInfo structure with the network view from a particular node.
message NetworkInfoRequest { message NetworkInfoRequest {
// NetworkInfo request body is empty. // NetworkInfo request body is empty.
message Body { message Body {}
}
// Body of the NetworkInfo request message // Body of the NetworkInfo request message
Body body = 1; Body body = 1;
@ -126,8 +125,7 @@ message NetworkInfoResponse {
// Get netmap snapshot request // Get netmap snapshot request
message NetmapSnapshotRequest { message NetmapSnapshotRequest {
// Get netmap snapshot request body. // Get netmap snapshot request body.
message Body { message Body {}
}
// Body of get netmap snapshot request message. // Body of get netmap snapshot request message.
Body body = 1; Body body = 1;
@ -140,7 +138,6 @@ message NetmapSnapshotRequest {
// authenticate the nodes of the message route and check the correctness of // authenticate the nodes of the message route and check the correctness of
// transmission. // transmission.
neo.fs.v2.session.RequestVerificationHeader verify_header = 3; neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
} }
// Response with current netmap snapshot // Response with current netmap snapshot
@ -162,5 +159,4 @@ message NetmapSnapshotResponse {
// authenticate the nodes of the message route and check the correctness of // authenticate the nodes of the message route and check the correctness of
// transmission. // transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
} }

View file

@ -36,6 +36,9 @@ enum Operation {
// Logical negation // Logical negation
NOT = 9; NOT = 9;
// Matches pattern
LIKE = 10;
} }
// Selector modifier shows how the node set will be formed. By default selector // Selector modifier shows how the node set will be formed. By default selector
@ -52,8 +55,8 @@ enum Clause {
DISTINCT = 2; DISTINCT = 2;
} }
// This filter will return the subset of nodes from `NetworkMap` or another filter's // This filter will return the subset of nodes from `NetworkMap` or another
// results that will satisfy filter's conditions. // filter's results that will satisfy filter's conditions.
message Filter { message Filter {
// Name of the filter or a reference to a named filter. '*' means // 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 // application to the whole unfiltered NetworkMap. At top level it's used as a
@ -103,6 +106,12 @@ message Replica {
// Named selector bucket to put replicas // Named selector bucket to put replicas
string selector = 2 [ json_name = "selector" ]; string selector = 2 [ json_name = "selector" ];
// Data shards count
uint32 ec_data_count = 3 [ json_name = "ecDataCount" ];
// Parity shards count
uint32 ec_parity_count = 4 [ json_name = "ecParityCount" ];
} }
// Set of rules to select a subset of nodes from `NetworkMap` able to store // Set of rules to select a subset of nodes from `NetworkMap` able to store
@ -113,7 +122,7 @@ message PlacementPolicy {
// bucket // bucket
repeated Replica replicas = 1 [ json_name = "replicas" ]; repeated Replica replicas = 1 [ json_name = "replicas" ];
// Container backup factor controls how deep NeoFS will search for nodes // Container backup factor controls how deep FrostFS will search for nodes
// alternatives to include into container's nodes subset // alternatives to include into container's nodes subset
uint32 container_backup_factor = 2 [ json_name = "containerBackupFactor" ]; uint32 container_backup_factor = 2 [ json_name = "containerBackupFactor" ];
@ -127,29 +136,29 @@ message PlacementPolicy {
bool unique = 5 [ json_name = "unique" ]; bool unique = 5 [ json_name = "unique" ];
} }
// NeoFS node description // FrostFS node description
message NodeInfo { message NodeInfo {
// Public key of the NeoFS node in a binary format // Public key of the FrostFS node in a binary format
bytes public_key = 1 [ json_name = "publicKey" ]; bytes public_key = 1 [ json_name = "publicKey" ];
// Ways to connect to a node // Ways to connect to a node
repeated string addresses = 2 [ json_name = "addresses" ]; repeated string addresses = 2 [ json_name = "addresses" ];
// Administrator-defined Attributes of the NeoFS Storage Node. // Administrator-defined Attributes of the FrostFS Storage Node.
// //
// `Attribute` is a Key-Value metadata pair. Key name must be a valid UTF-8 // `Attribute` is a Key-Value metadata pair. Key name must be a valid UTF-8
// string. Value can't be empty. // string. Value can't be empty.
// //
// Attributes can be constructed into a chain of attributes: any attribute can // Attributes can be constructed into a chain of attributes: any attribute can
// have a parent attribute and a child attribute (except the first and the last // have a parent attribute and a child attribute (except the first and the
// one). A string representation of the chain of attributes in NeoFS Storage // last one). A string representation of the chain of attributes in FrostFS
// Node configuration uses ":" and "/" symbols, e.g.: // Storage Node configuration uses ":" and "/" symbols, e.g.:
// //
// `NEOFS_NODE_ATTRIBUTE_1=key1:val1/key2:val2` // `FrostFS_NODE_ATTRIBUTE_1=key1:val1/key2:val2`
// //
// Therefore the string attribute representation in the Node configuration must // Therefore the string attribute representation in the Node configuration
// use "\:", "\/" and "\\" escaped symbols if any of them appears in an attribute's // must use "\:", "\/" and "\\" escaped symbols if any of them appears in an
// key or value. // attribute's key or value.
// //
// Node's attributes are mostly used during Storage Policy evaluation to // Node's attributes are mostly used during Storage Policy evaluation to
// calculate object's placement and find a set of nodes satisfying policy // calculate object's placement and find a set of nodes satisfying policy
@ -192,8 +201,8 @@ message NodeInfo {
// [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). Calculated // [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). Calculated
// automatically from `UN-LOCODE` attribute. // automatically from `UN-LOCODE` attribute.
// * Continent \ // * Continent \
// Node's continent name according to the [Seven-Continent model] // Node's continent name according to the [Seven-Continent
// (https://en.wikipedia.org/wiki/Continent#Number). Calculated // model](https://en.wikipedia.org/wiki/Continent#Number). Calculated
// automatically from `UN-LOCODE` attribute. // automatically from `UN-LOCODE` attribute.
// * ExternalAddr // * ExternalAddr
// Node's preferred way for communications with external clients. // Node's preferred way for communications with external clients.
@ -201,7 +210,7 @@ message NodeInfo {
// Must contain a comma-separated list of multi-addresses. // Must contain a comma-separated list of multi-addresses.
// //
// For detailed description of each well-known attribute please see the // For detailed description of each well-known attribute please see the
// corresponding section in NeoFS Technical Specification. // corresponding section in FrostFS Technical Specification.
message Attribute { message Attribute {
// Key of the node attribute // Key of the node attribute
string key = 1 [ json_name = "key" ]; string key = 1 [ json_name = "key" ];
@ -213,13 +222,13 @@ message NodeInfo {
// `Country`. // `Country`.
repeated string parents = 3 [ json_name = "parents" ]; repeated string parents = 3 [ json_name = "parents" ];
} }
// Carries list of the NeoFS node attributes in a key-value form. Key name // 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 // 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 // structures with duplicated attribute names or attributes with empty values
// will be considered invalid. // will be considered invalid.
repeated Attribute attributes = 3 [ json_name = "attributes" ]; repeated Attribute attributes = 3 [ json_name = "attributes" ];
// Represents the enumeration of various states of the NeoFS node. // Represents the enumeration of various states of the FrostFS node.
enum State { enum State {
// Unknown state // Unknown state
UNSPECIFIED = 0; UNSPECIFIED = 0;
@ -234,7 +243,7 @@ message NodeInfo {
MAINTENANCE = 3; MAINTENANCE = 3;
} }
// Carries state of the NeoFS node // Carries state of the FrostFS node
State state = 4 [ json_name = "state" ]; State state = 4 [ json_name = "state" ];
} }
@ -247,7 +256,7 @@ message Netmap {
repeated NodeInfo nodes = 2 [ json_name = "nodes" ]; repeated NodeInfo nodes = 2 [ json_name = "nodes" ];
} }
// NeoFS network configuration // FrostFS network configuration
message NetworkConfig { message NetworkConfig {
// Single configuration parameter. Key MUST be network-unique. // Single configuration parameter. Key MUST be network-unique.
// //
@ -266,7 +275,7 @@ message NetworkConfig {
// Fee paid for container creation by the container owner. // Fee paid for container creation by the container owner.
// Value: little-endian integer. Default: 0. // Value: little-endian integer. Default: 0.
// - **EpochDuration** \ // - **EpochDuration** \
// NeoFS epoch duration measured in Sidechain blocks. // FrostFS epoch duration measured in Sidechain blocks.
// Value: little-endian integer. Default: 0. // Value: little-endian integer. Default: 0.
// - **HomomorphicHashingDisabled** \ // - **HomomorphicHashingDisabled** \
// Flag of disabling the homomorphic hashing of objects' payload. // Flag of disabling the homomorphic hashing of objects' payload.
@ -278,11 +287,48 @@ message NetworkConfig {
// Flag allowing setting the MAINTENANCE state to storage nodes. // Flag allowing setting the MAINTENANCE state to storage nodes.
// Value: true if any byte != 0. Default: false. // Value: true if any byte != 0. Default: false.
// - **MaxObjectSize** \ // - **MaxObjectSize** \
// Maximum size of physically stored NeoFS object measured in bytes. // Maximum size of physically stored FrostFS object measured in bytes.
// Value: little-endian integer. Default: 0. // Value: little-endian integer. Default: 0.
//
// 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}
// ```
// - **WithdrawFee** \ // - **WithdrawFee** \
// Fee paid for withdrawal of funds paid by the account owner. // Fee paid for withdrawal of funds paid by the account owner.
// Value: little-endian integer. Default: 0. // Value: little-endian integer. Default: 0.
// - **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.
message Parameter { message Parameter {
// Parameter key. UTF-8 encoded string // Parameter key. UTF-8 encoded string
bytes key = 1 [ json_name = "key" ]; bytes key = 1 [ json_name = "key" ];
@ -294,17 +340,18 @@ message NetworkConfig {
repeated Parameter parameters = 1 [ json_name = "parameters" ]; repeated Parameter parameters = 1 [ json_name = "parameters" ];
} }
// Information about NeoFS network // Information about FrostFS network
message NetworkInfo { message NetworkInfo {
// Number of the current epoch in the NeoFS network // Number of the current epoch in the FrostFS network
uint64 current_epoch = 1 [ json_name = "currentEpoch" ]; uint64 current_epoch = 1 [ json_name = "currentEpoch" ];
// Magic number of the sidechain of the NeoFS network // Magic number of the sidechain of the FrostFS network
uint64 magic_number = 2 [ json_name = "magicNumber" ]; uint64 magic_number = 2 [ json_name = "magicNumber" ];
// MillisecondsPerBlock network parameter of the sidechain of the NeoFS network // MillisecondsPerBlock network parameter of the sidechain of the FrostFS
// network
int64 ms_per_block = 3 [ json_name = "msPerBlock" ]; int64 ms_per_block = 3 [ json_name = "msPerBlock" ];
// NeoFS network configuration // FrostFS network configuration
NetworkConfig network_config = 4 [ json_name = "networkConfig" ]; NetworkConfig network_config = 4 [ json_name = "networkConfig" ];
} }

View file

@ -13,11 +13,11 @@ import "session/types.proto";
// not affect the sidechain and are only served by nodes in p2p style. // not affect the sidechain and are only served by nodes in p2p style.
service ObjectService { service ObjectService {
// Receive full object structure, including Headers and payload. Response uses // Receive full object structure, including Headers and payload. Response uses
// gRPC stream. First response message carries the object with the requested address. // gRPC stream. First response message carries the object with the requested
// Chunk messages are parts of the object's payload if it is needed. All // address. Chunk messages are parts of the object's payload if it is needed.
// messages, except the first one, carry payload chunks. The requested object can // All messages, except the first one, carry payload chunks. The requested
// be restored by concatenation of object message payload and all chunks // object can be restored by concatenation of object message payload and all
// keeping the receiving order. // chunks keeping the receiving order.
// //
// Extended headers can change `Get` behaviour: // Extended headers can change `Get` behaviour:
// * [ __SYSTEM__NETMAP_EPOCH ] \ // * [ __SYSTEM__NETMAP_EPOCH ] \
@ -26,9 +26,10 @@ service ObjectService {
// calculation. // calculation.
// * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ // * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \
// (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ // (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \
// Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or // Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH`
// the latest one otherwise) of Network Map to find an object until the depth // (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or the latest one
// limit is reached. // otherwise) of Network Map to find an object until the depth limit is
// reached.
// //
// Please refer to detailed `XHeader` description. // Please refer to detailed `XHeader` description.
// //
@ -44,6 +45,8 @@ service ObjectService {
// the requested object has been marked as deleted; // the requested object has been marked as deleted;
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// object container not found; // object container not found;
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// access to container is denied;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
// provided session token has expired. // provided session token has expired.
rpc Get(GetRequest) returns (stream GetResponse); rpc Get(GetRequest) returns (stream GetResponse);
@ -70,15 +73,18 @@ service ObjectService {
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
// write access to the container is denied; // write access to the container is denied;
// - **LOCKED** (2050, SECTION_OBJECT): \ // - **LOCKED** (2050, SECTION_OBJECT): \
// placement of an object of type TOMBSTONE that includes at least one locked // placement of an object of type TOMBSTONE that includes at least one
// object is prohibited; // locked object is prohibited;
// - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \ // - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
// placement of an object of type LOCK that includes at least one object of // placement of an object of type LOCK that includes at least one object of
// type other than REGULAR is prohibited; // type other than REGULAR is prohibited;
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// object storage container not found; // object storage container not found;
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// access to container is denied;
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
// (for trusted object preparation) session private key does not exist or has // (for trusted object preparation) session private key does not exist or
// has
// been deleted; // been deleted;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
// provided session token has expired. // provided session token has expired.
@ -101,10 +107,15 @@ service ObjectService {
// - Common failures (SECTION_FAILURE_COMMON); // - Common failures (SECTION_FAILURE_COMMON);
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
// delete access to the object is denied; // delete access to the object is denied;
// - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \
// the object could not be deleted because it has not been \
// found within the container;
// - **LOCKED** (2050, SECTION_OBJECT): \ // - **LOCKED** (2050, SECTION_OBJECT): \
// deleting a locked object is prohibited; // deleting a locked object is prohibited;
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// object container not found; // object container not found;
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// access to container is denied;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
// provided session token has expired. // provided session token has expired.
rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Delete(DeleteRequest) returns (DeleteResponse);
@ -133,12 +144,14 @@ service ObjectService {
// the requested object has been marked as deleted; // the requested object has been marked as deleted;
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// object container not found; // object container not found;
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// access to container is denied;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
// provided session token has expired. // provided session token has expired.
rpc Head(HeadRequest) returns (HeadResponse); rpc Head(HeadRequest) returns (HeadResponse);
// Search objects in container. Search query allows to match by Object // Search objects in container. Search query allows to match by Object
// Header's filed values. Please see the corresponding NeoFS Technical // Header's filed values. Please see the corresponding FrostFS Technical
// Specification section for more details. // Specification section for more details.
// //
// Extended headers can change `Search` behaviour: // Extended headers can change `Search` behaviour:
@ -157,14 +170,16 @@ service ObjectService {
// access to operation SEARCH of the object is denied; // access to operation SEARCH of the object is denied;
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// search container not found; // search container not found;
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// access to container is denied;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
// provided session token has expired. // provided session token has expired.
rpc Search(SearchRequest) returns (stream SearchResponse); rpc Search(SearchRequest) returns (stream SearchResponse);
// Get byte range of data payload. Range is set as an (offset, length) tuple. // Get byte range of data payload. Range is set as an (offset, length) tuple.
// Like in `Get` method, the response uses gRPC stream. Requested range can be // Like in `Get` method, the response uses gRPC stream. Requested range can be
// restored by concatenation of all received payload chunks keeping the receiving // restored by concatenation of all received payload chunks keeping the
// order. // receiving order.
// //
// Extended headers can change `GetRange` behaviour: // Extended headers can change `GetRange` behaviour:
// * [ __SYSTEM__NETMAP_EPOCH ] \ // * [ __SYSTEM__NETMAP_EPOCH ] \
@ -192,6 +207,8 @@ service ObjectService {
// the requested range is out of bounds; // the requested range is out of bounds;
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// object container not found; // object container not found;
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// access to container is denied;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
// provided session token has expired. // provided session token has expired.
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse); rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
@ -225,9 +242,96 @@ service ObjectService {
// the requested range is out of bounds; // the requested range is out of bounds;
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// object container not found; // object container not found;
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// access to container is denied;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
// provided session token has expired. // provided session token has expired.
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
// Put the prepared object into container.
// `ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` and `PayloadLength` of
// an object MUST be set.
//
// Extended headers can change `Put` behaviour:
// * [ __SYSTEM__NETMAP_EPOCH \
// (`__NEOFS__NETMAP_EPOCH` is deprecated) \
// Will use the requested version of Network Map for object placement
// calculation.
//
// Please refer to detailed `XHeader` description.
//
// Statuses:
// - **OK** (0, SECTION_SUCCESS): \
// object has been successfully saved in the container;
// - Common failures (SECTION_FAILURE_COMMON);
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
// write access to the container is denied;
// - **LOCKED** (2050, SECTION_OBJECT): \
// placement of an object of type TOMBSTONE that includes at least one
// locked object is prohibited;
// - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
// placement of an object of type LOCK that includes at least one object of
// type other than REGULAR is prohibited;
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// object storage container not found;
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// access to container is denied;
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
// (for trusted object preparation) session private key does not exist or
// has
// been deleted;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
// provided session token has expired.
rpc PutSingle(PutSingleRequest) returns (PutSingleResponse);
// Patch the object. Request uses gRPC stream. First message must set
// the address of the object that is going to get patched. If the object's
// attributes are patched, then these attrubutes must be set only within the
// first stream message.
//
// If the patch request is performed by NOT the object's owner but if the
// actor has the permission to perform the patch, then `OwnerID` of the object
// is changed. In this case the object's owner loses the object's ownership
// after the patch request is successfully done.
//
// As objects are content-addressable the patching causes new object ID
// generation for the patched object. This object id is set witihn
// `PatchResponse`. But the object id may remain unchanged in such cases:
// 1. The chunk of the applying patch contains the same value as the object's
// payload within the same range;
// 2. The patch that reverts the changes applied by preceding patch;
// 3. The application of the same patches for the object a few times.
//
// Extended headers can change `Patch` behaviour:
// * [ __SYSTEM__NETMAP_EPOCH \
// (`__NEOFS__NETMAP_EPOCH` is deprecated) \
// Will use the requsted version of Network Map for object placement
// calculation.
//
// Please refer to detailed `XHeader` description.
//
// Statuses:
// - **OK** (0, SECTION_SUCCESS): \
// object has been successfully patched and saved in the container;
// - Common failures (SECTION_FAILURE_COMMON);
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
// write access to the container is denied;
// - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \
// object not found in container;
// - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): \
// the requested object has been marked as deleted.
// - **OUT_OF_RANGE** (2053, SECTION_OBJECT): \
// the requested range is out of bounds;
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// object storage container not found;
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
// access to container is denied;
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
// (for trusted object preparation) session private key does not exist or
// has been deleted;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
// provided session token has expired.
rpc Patch(stream PatchRequest) returns (PatchResponse);
} }
// GET object request // GET object request
@ -280,6 +384,9 @@ message GetResponse {
// Meta information of split hierarchy for object assembly. // Meta information of split hierarchy for object assembly.
SplitInfo split_info = 3; SplitInfo split_info = 3;
// Meta information for EC object assembly.
ECInfo ec_info = 4;
} }
} }
// Body of get object response message. // Body of get object response message.
@ -311,16 +418,16 @@ message PutRequest {
// Object's Header // Object's Header
Header header = 3; Header header = 3;
// Number of copies of the object to store within the RPC call. By default, // Number of copies of the object to store within the RPC call. By
// object is processed according to the container's placement policy. // default, object is processed according to the container's placement
// Can be one of: // policy. Can be one of:
// 1. A single number; applied to the whole request and is treated as // 1. A single number; applied to the whole request and is treated as
// a minimal number of nodes that must store an object to complete the // a minimal number of nodes that must store an object to complete the
// request successfully. // request successfully.
// 2. An ordered array; every number is treated as a minimal number of // 2. An ordered array; every number is treated as a minimal number of
// nodes in a corresponding placement vector that must store an object // nodes in a corresponding placement vector that must store an object
// to complete the request successfully. The length MUST equal the placement // to complete the request successfully. The length MUST equal the
// vectors number, otherwise request is considered malformed. // placement vectors number, otherwise request is considered malformed.
repeated uint32 copies_number = 4; repeated uint32 copies_number = 4;
} }
// Single message in the request stream. // Single message in the request stream.
@ -464,6 +571,9 @@ message HeadResponse {
// Meta information of split hierarchy. // Meta information of split hierarchy.
SplitInfo split_info = 3; SplitInfo split_info = 3;
// Meta information for EC object assembly.
ECInfo ec_info = 4;
} }
} }
// Body of head object response message. // Body of head object response message.
@ -488,11 +598,11 @@ message SearchRequest {
// Version of the Query Language used // Version of the Query Language used
uint32 version = 2; uint32 version = 2;
// Filter structure checks if the object header field or the attribute content // Filter structure checks if the object header field or the attribute
// matches a value. // content matches a value.
// //
// If no filters are set, search request will return all objects of the // If no filters are set, search request will return all objects of the
// container, including Regular object, Tombstones and Storage Group // container, including Regular object and Tombstone
// objects. Most human users expect to get only object they can directly // objects. Most human users expect to get only object they can directly
// work with. In that case, `$Object:ROOT` filter should be used. // work with. In that case, `$Object:ROOT` filter should be used.
// //
@ -522,16 +632,19 @@ message SearchRequest {
// object_id of parent // object_id of parent
// * $Object:split.splitID \ // * $Object:split.splitID \
// 16 byte UUIDv4 used to identify the split object hierarchy parts // 16 byte UUIDv4 used to identify the split object hierarchy parts
// * $Object:ec.parent \
// If the object is stored according to EC policy, then ec_parent
// attribute is set to return an id list of all related EC chunks.
// //
// There are some well-known filter aliases to match objects by certain // There are some well-known filter aliases to match objects by certain
// properties: // properties:
// //
// * $Object:ROOT \ // * $Object:ROOT \
// Returns only `REGULAR` type objects that are not split or that are the top // Returns only `REGULAR` type objects that are not split or that are the
// level root objects in a split hierarchy. This includes objects not // top level root objects in a split hierarchy. This includes objects not
// present physically, like large objects split into smaller objects // present physically, like large objects split into smaller objects
// without a separate top-level root object. Objects of other types like // without a separate top-level root object. Objects of other types like
// StorageGroups and Tombstones will not be shown. This filter may be // Locks and Tombstones will not be shown. This filter may be
// useful for listing objects like `ls` command of some virtual file // useful for listing objects like `ls` command of some virtual file
// system. This filter is activated if the `key` exists, disregarding the // system. This filter is activated if the `key` exists, disregarding the
// value and matcher type. // value and matcher type.
@ -540,8 +653,8 @@ message SearchRequest {
// activated if the `key` exists, disregarding the value and matcher type. // activated if the `key` exists, disregarding the value and matcher type.
// //
// Note: using filters with a key with prefix `$Object:` and match type // Note: using filters with a key with prefix `$Object:` and match type
// `NOT_PRESENT `is not recommended since this is not a cross-version approach. // `NOT_PRESENT `is not recommended since this is not a cross-version
// Behavior when processing this kind of filters is undefined. // approach. Behavior when processing this kind of filters is undefined.
message Filter { message Filter {
// Match type to use // Match type to use
MatchType match_type = 1 [ json_name = "matchType" ]; MatchType match_type = 1 [ json_name = "matchType" ];
@ -639,6 +752,9 @@ message GetRangeResponse {
// Meta information of split hierarchy. // Meta information of split hierarchy.
SplitInfo split_info = 2; SplitInfo split_info = 2;
// Meta information for EC object assembly.
ECInfo ec_info = 3;
} }
} }
@ -706,3 +822,118 @@ message GetRangeHashResponse {
// transmission. // transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
} }
// Object PUT Single request
message PutSingleRequest {
// PUT Single request body
message Body {
// Prepared object with payload.
Object object = 1;
// Number of copies of the object to store within the RPC call. By default,
// object is processed according to the container's placement policy.
// Every number is treated as a minimal number of
// nodes in a corresponding placement vector that must store an object
// to complete the request successfully. The length MUST equal the placement
// vectors number, otherwise request is considered malformed.
repeated uint32 copies_number = 2;
}
// Body of put single object request message.
Body body = 1;
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
// Object PUT Single response
message PutSingleResponse {
// PUT Single Object response body
message Body {}
// Body of put single object response message.
Body body = 1;
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}
// Object PATCH request
message PatchRequest {
// PATCH request body
message Body {
// The address of the object that is requested to get patched.
neo.fs.v2.refs.Address address = 1;
// New attributes for the object. See `replace_attributes` flag usage to
// define how new attributes should be set.
repeated neo.fs.v2.object.Header.Attribute new_attributes = 2;
// If this flag is set, then the object's attributes will be entirely
// replaced by `new_attributes` list. The empty `new_attributes` list with
// `replace_attributes = true` just resets attributes list for the object.
//
// Default `false` value for this flag means the attributes will be just
// merged. If the incoming `new_attributes` list contains already existing
// key, then it just replaces it while merging the lists.
bool replace_attributes = 3;
// The patch for the object's payload.
message Patch {
// The range of the source object for which the payload is replaced by the
// patch's chunk. If the range's `length = 0`, then the patch's chunk is
// just appended to the original payload starting from the `offest`
// without any replace.
Range source_range = 1;
// The chunk that is being appended to or that replaces the original
// payload on the given range.
bytes chunk = 2;
}
// The patch that is applied for the object.
Patch patch = 4;
}
// Body for patch request message.
Body body = 1;
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
// Carries request verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
}
// Object PATCH response
message PatchResponse {
// PATCH response body
message Body {
// The object ID of the saved patched object.
neo.fs.v2.refs.ObjectID object_id = 1;
}
// Body for patch response message.
Body body = 1;
// Carries response meta information. Header data is used only to regulate
// message transport and does not affect request execution.
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
// Carries response verification information. This header is used to
// authenticate the nodes of the message route and check the correctness of
// transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}

View file

@ -9,13 +9,12 @@ import "refs/types.proto";
import "session/types.proto"; import "session/types.proto";
// Type of the object payload content. Only `REGULAR` type objects can be split, // Type of the object payload content. Only `REGULAR` type objects can be split,
// hence `TOMBSTONE`, `STORAGE_GROUP` and `LOCK` payload is limited by the maximum // hence `TOMBSTONE` and `LOCK` payload is limited by the
// object size. // maximum object size.
// //
// String presentation of object type is the same as definition: // String presentation of object type is the same as definition:
// * REGULAR // * REGULAR
// * TOMBSTONE // * TOMBSTONE
// * STORAGE_GROUP
// * LOCK // * LOCK
enum ObjectType { enum ObjectType {
// Just a normal object // Just a normal object
@ -24,8 +23,8 @@ enum ObjectType {
// Used internally to identify deleted objects // Used internally to identify deleted objects
TOMBSTONE = 1; TOMBSTONE = 1;
// StorageGroup information // Unused (previously storageGroup information)
STORAGE_GROUP = 2; // _ = 2;
// Object lock // Object lock
LOCK = 3; LOCK = 3;
@ -72,7 +71,8 @@ message ShortHeader {
neo.fs.v2.refs.Checksum payload_hash = 6 [ json_name = "payloadHash" ]; neo.fs.v2.refs.Checksum payload_hash = 6 [ json_name = "payloadHash" ];
// Homomorphic hash of the object payload // Homomorphic hash of the object payload
neo.fs.v2.refs.Checksum homomorphic_hash = 7 [json_name = "homomorphicHash"]; neo.fs.v2.refs.Checksum homomorphic_hash = 7
[ json_name = "homomorphicHash" ];
} }
// Object Header // Object Header
@ -101,11 +101,13 @@ message Header {
ObjectType object_type = 7 [ json_name = "objectType" ]; ObjectType object_type = 7 [ json_name = "objectType" ];
// Homomorphic hash of the object payload // Homomorphic hash of the object payload
neo.fs.v2.refs.Checksum homomorphic_hash = 8 [json_name = "homomorphicHash"]; neo.fs.v2.refs.Checksum homomorphic_hash = 8
[ json_name = "homomorphicHash" ];
// Session token, if it was used during Object creation. Need it to verify // Session token, if it was used during Object creation. Need it to verify
// integrity and authenticity out of Request scope. // integrity and authenticity out of Request scope.
neo.fs.v2.session.SessionToken session_token = 9 [json_name = "sessionToken"]; neo.fs.v2.session.SessionToken session_token = 9
[ json_name = "sessionToken" ];
// `Attribute` is a user-defined Key-Value metadata pair attached to an // `Attribute` is a user-defined Key-Value metadata pair attached to an
// object. // object.
@ -114,15 +116,16 @@ message Header {
// Objects with duplicated attribute names or attributes with empty values // Objects with duplicated attribute names or attributes with empty values
// will be considered invalid. // will be considered invalid.
// //
// There are some "well-known" attributes starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix // There are some "well-known" attributes starting with `__SYSTEM__`
// that affect system behaviour: // (`__NEOFS__` is deprecated) prefix that affect system behaviour:
// //
// * [ __SYSTEM__UPLOAD_ID ] \ // * [ __SYSTEM__UPLOAD_ID ] \
// (`__NEOFS__UPLOAD_ID` is deprecated) \ // (`__NEOFS__UPLOAD_ID` is deprecated) \
// Marks smaller parts of a split bigger object // Marks smaller parts of a split bigger object
// * [ __SYSTEM__EXPIRATION_EPOCH ] \ // * [ __SYSTEM__EXPIRATION_EPOCH ] \
// (`__NEOFS__EXPIRATION_EPOCH` is deprecated) \ // (`__NEOFS__EXPIRATION_EPOCH` is deprecated) \
// Tells GC to delete object after that epoch // The epoch after which object with no LOCKs on it becomes unavailable.
// Locked object continues to be available until each of the LOCKs expire.
// * [ __SYSTEM__TICK_EPOCH ] \ // * [ __SYSTEM__TICK_EPOCH ] \
// (`__NEOFS__TICK_EPOCH` is deprecated) \ // (`__NEOFS__TICK_EPOCH` is deprecated) \
// Decimal number that defines what epoch must produce // Decimal number that defines what epoch must produce
@ -152,7 +155,7 @@ message Header {
// MIME Content Type of object's payload // MIME Content Type of object's payload
// //
// For detailed description of each well-known attribute please see the // For detailed description of each well-known attribute please see the
// corresponding section in NeoFS Technical Specification. // corresponding section in FrostFS Technical Specification.
message Attribute { message Attribute {
// string key to the object attribute // string key to the object attribute
string key = 1 [ json_name = "key" ]; string key = 1 [ json_name = "key" ];
@ -174,7 +177,8 @@ message Header {
neo.fs.v2.refs.ObjectID previous = 2 [ json_name = "previous" ]; neo.fs.v2.refs.ObjectID previous = 2 [ json_name = "previous" ];
// `signature` field of the parent object. Used to reconstruct parent. // `signature` field of the parent object. Used to reconstruct parent.
neo.fs.v2.refs.Signature parent_signature = 3 [json_name = "parentSignature"]; neo.fs.v2.refs.Signature parent_signature = 3
[ json_name = "parentSignature" ];
// `header` field of the parent object. Used to reconstruct parent. // `header` field of the parent object. Used to reconstruct parent.
Header parent_header = 4 [ json_name = "parentHeader" ]; Header parent_header = 4 [ json_name = "parentHeader" ];
@ -186,15 +190,44 @@ message Header {
// unique inside container. All objects participating in the split must have // unique inside container. All objects participating in the split must have
// the same `split_id` value. // the same `split_id` value.
bytes split_id = 6 [ json_name = "splitID" ]; bytes split_id = 6 [ json_name = "splitID" ];
} }
// Position of the object in the split hierarchy // Position of the object in the split hierarchy
Split split = 11 [ json_name = "split" ]; Split split = 11 [ json_name = "split" ];
// Erasure code can be applied to any object.
// Information about encoded object structure is stored in `EC` header.
// All objects belonging to a single EC group have the same `parent` field.
message EC {
// Identifier of the origin object. Known to all chunks.
neo.fs.v2.refs.ObjectID parent = 1 [ json_name = "parent" ];
// Index of this chunk.
uint32 index = 2 [ json_name = "index" ];
// Total number of chunks in this split.
uint32 total = 3 [ json_name = "total" ];
// Total length of a parent header. Used to trim padding zeroes.
uint32 header_length = 4 [ json_name = "headerLength" ];
// Chunk of a parent header.
bytes header = 5 [ json_name = "header" ];
// As the origin object is EC-splitted its identifier is known to all
// chunks as parent. But parent itself can be a part of Split (does not
// relate to EC-split). In this case parent_split_id should be set.
bytes parent_split_id = 6 [ json_name = "parentSplitID" ];
// EC-parent's parent ID. parent_split_parent_id is set if EC-parent,
// itself, is a part of Split and if an object ID of its parent is
// presented. The field allows to determine how EC-chunk is placed in Split
// hierarchy.
neo.fs.v2.refs.ObjectID parent_split_parent_id = 7
[ json_name = "parentSplitParentID" ];
// EC parent's attributes.
repeated Attribute parent_attributes = 8 [ json_name = "parentAttributes" ];
}
// Erasure code chunk information.
EC ec = 12 [ json_name = "ec" ];
} }
// Object structure. Object is immutable and content-addressed. It means // Object structure. Object is immutable and content-addressed. It means
// `ObjectID` will change if the header or the payload changes. It's calculated as a // `ObjectID` will change if the header or the payload changes. It's calculated
// hash of header field which contains hash of the object's payload. // as a hash of header field which contains hash of the object's payload.
// //
// For non-regular object types payload format depends on object type specified // For non-regular object types payload format depends on object type specified
// in the header. // in the header.
@ -214,8 +247,8 @@ message Object {
// Meta information of split hierarchy for object assembly. With the last part // Meta information of split hierarchy for object assembly. With the last part
// one can traverse linked list of split hierarchy back to the first part and // one can traverse linked list of split hierarchy back to the first part and
// assemble the original object. With a linking object one can assemble an object // assemble the original object. With a linking object one can assemble an
// right from the object parts. // object right from the object parts.
message SplitInfo { message SplitInfo {
// 16 byte UUID used to identify the split object hierarchy parts. // 16 byte UUID used to identify the split object hierarchy parts.
bytes split_id = 1; bytes split_id = 1;
@ -229,3 +262,17 @@ message SplitInfo {
// object parts. // object parts.
neo.fs.v2.refs.ObjectID link = 3; neo.fs.v2.refs.ObjectID link = 3;
} }
// Meta information for the erasure-encoded object.
message ECInfo {
message Chunk {
// Object ID of the chunk.
neo.fs.v2.refs.ObjectID id = 1;
// Index of the chunk.
uint32 index = 2;
// Total number of chunks in this split.
uint32 total = 3;
}
// Chunk stored on the node.
repeated Chunk chunks = 1;
}

View file

@ -35,11 +35,11 @@
<a name="neo.fs.v2.accounting.AccountingService"></a> <a name="neo.fs.v2.accounting.AccountingService"></a>
### Service "neo.fs.v2.accounting.AccountingService" ### Service "neo.fs.v2.accounting.AccountingService"
Accounting service provides methods for interaction with NeoFS sidechain via Accounting service provides methods for interaction with FrostFS sidechain
other NeoFS nodes to get information about the account balance. Deposit and via other FrostFS nodes to get information about the account balance. Deposit
Withdraw operations can't be implemented here, as they require Mainnet NeoFS and Withdraw operations can't be implemented here, as they require Mainnet
smart contract invocation. Transfer operations between internal NeoFS FrostFS smart contract invocation. Transfer operations between internal
accounts are possible if both use the same token type. FrostFS accounts are possible if both use the same token type.
``` ```
rpc Balance(BalanceRequest) returns (BalanceResponse); rpc Balance(BalanceRequest) returns (BalanceResponse);
@ -48,7 +48,7 @@ rpc Balance(BalanceRequest) returns (BalanceResponse);
#### Method Balance #### Method Balance
Returns the amount of funds in GAS token for the requested NeoFS account. Returns the amount of funds in GAS token for the requested FrostFS account.
Statuses: Statuses:
- **OK** (0, SECTION_SUCCESS): - **OK** (0, SECTION_SUCCESS):
@ -78,9 +78,9 @@ BalanceRequest message
### Message BalanceRequest.Body ### Message BalanceRequest.Body
To indicate the account for which the balance is requested, its identifier To indicate the account for which the balance is requested, its identifier
is used. It can be any existing account in NeoFS sidechain `Balance` smart is used. It can be any existing account in FrostFS sidechain `Balance`
contract. If omitted, client implementation MUST set it to the request's smart contract. If omitted, client implementation MUST set it to the
signer `OwnerID`. request's signer `OwnerID`.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -105,7 +105,8 @@ BalanceResponse message
### Message BalanceResponse.Body ### Message BalanceResponse.Body
The amount of funds in GAS token for the `OwnerID`'s account requested. The amount of funds in GAS token for the `OwnerID`'s account requested.
Balance is given in the `Decimal` format to avoid precision issues with rounding. Balance is given in the `Decimal` format to avoid precision issues with
rounding.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -130,7 +131,7 @@ Balance is given in the `Decimal` format to avoid precision issues with rounding
<a name="neo.fs.v2.accounting.Decimal"></a> <a name="neo.fs.v2.accounting.Decimal"></a>
### Message Decimal ### Message Decimal
Standard floating point data type can't be used in NeoFS due to inexactness Standard floating point data type can't be used in FrostFS due to inexactness
of the result when doing lots of small number operations. To solve the lost of the result when doing lots of small number operations. To solve the lost
precision issue, special `Decimal` format is used for monetary computations. precision issue, special `Decimal` format is used for monetary computations.
@ -169,4 +170,3 @@ description.
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -8,6 +8,7 @@
- Messages - Messages
- [BearerToken](#neo.fs.v2.acl.BearerToken) - [BearerToken](#neo.fs.v2.acl.BearerToken)
- [BearerToken.Body](#neo.fs.v2.acl.BearerToken.Body) - [BearerToken.Body](#neo.fs.v2.acl.BearerToken.Body)
- [BearerToken.Body.APEOverride](#neo.fs.v2.acl.BearerToken.Body.APEOverride)
- [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime) - [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime)
- [EACLRecord](#neo.fs.v2.acl.EACLRecord) - [EACLRecord](#neo.fs.v2.acl.EACLRecord)
- [EACLRecord.Filter](#neo.fs.v2.acl.EACLRecord.Filter) - [EACLRecord.Filter](#neo.fs.v2.acl.EACLRecord.Filter)
@ -38,8 +39,8 @@ like [JWT](https://jwt.io), it has a limited lifetime and scope, hence can be
used in the similar use cases, like providing authorisation to externally used in the similar use cases, like providing authorisation to externally
authenticated party. authenticated party.
BearerToken can be issued only by the container's owner and must be signed using BearerToken can be issued only by the container's owner and must be signed
the key associated with the container's `OwnerID`. using the key associated with the container's `OwnerID`.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -51,16 +52,37 @@ the key associated with the container's `OwnerID`.
<a name="neo.fs.v2.acl.BearerToken.Body"></a> <a name="neo.fs.v2.acl.BearerToken.Body"></a>
### Message BearerToken.Body ### Message BearerToken.Body
Bearer Token body structure contains Extended ACL table issued by the container Bearer Token body structure contains Extended ACL table issued by the
owner with additional information preventing token abuse. container owner with additional information preventing token abuse.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| eacl_table | [EACLTable](#neo.fs.v2.acl.EACLTable) | | Table of Extended ACL rules to use instead of the ones attached to the container. If it contains `container_id` field, bearer token is only valid for this specific container. Otherwise, any container of the same owner is allowed. | | eacl_table | [EACLTable](#neo.fs.v2.acl.EACLTable) | | Table of Extended ACL rules to use instead of the ones attached to the container. If it contains `container_id` field, bearer token is only valid for this specific container. Otherwise, any container of the same owner is allowed.
Deprecated: eACL tables are no longer relevant - `APEOverrides` should be used instead. |
| owner_id | [neo.fs.v2.refs.OwnerID](#neo.fs.v2.refs.OwnerID) | | `OwnerID` defines to whom the token was issued. It must match the request originator's `OwnerID`. If empty, any token bearer will be accepted. | | owner_id | [neo.fs.v2.refs.OwnerID](#neo.fs.v2.refs.OwnerID) | | `OwnerID` defines to whom the token was issued. It must match the request originator's `OwnerID`. If empty, any token bearer will be accepted. |
| lifetime | [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime) | | Token expiration and valid time period parameters | | lifetime | [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime) | | Token expiration and valid time period parameters |
| allow_impersonate | [bool](#bool) | | AllowImpersonate flag to consider token signer as request owner. If this field is true extended ACL table in token body isn't processed. | | allow_impersonate | [bool](#bool) | | AllowImpersonate flag to consider token signer as request owner. If this field is true extended ACL table in token body isn't processed. |
| ape_override | [BearerToken.Body.APEOverride](#neo.fs.v2.acl.BearerToken.Body.APEOverride) | | APE override for the target. |
<a name="neo.fs.v2.acl.BearerToken.Body.APEOverride"></a>
### Message BearerToken.Body.APEOverride
APEOverride is the list of APE chains defined for a target.
These chains are meant to serve as overrides to the already defined (or
even undefined) APE chains for the target (see contract `Policy`).
The server-side processing of the bearer token with set APE overrides
must verify if a client is permitted to override chains for the target,
preventing unauthorized access through the APE mechanism.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target | [frostfs.v2.ape.ChainTarget](#frostfs.v2.ape.ChainTarget) | | Target for which chains are applied. |
| chains | [frostfs.v2.ape.Chain](#frostfs.v2.ape.Chain) | repeated | The list of APE chains. |
<a name="neo.fs.v2.acl.BearerToken.Body.TokenLifetime"></a> <a name="neo.fs.v2.acl.BearerToken.Body.TokenLifetime"></a>
@ -85,7 +107,7 @@ Describes a single eACL rule.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| operation | [Operation](#neo.fs.v2.acl.Operation) | | NeoFS request Verb to match | | operation | [Operation](#neo.fs.v2.acl.Operation) | | FrostFS request Verb to match |
| action | [Action](#neo.fs.v2.acl.Action) | | Rule execution result. Either allows or denies access if filters match. | | action | [Action](#neo.fs.v2.acl.Action) | | Rule execution result. Either allows or denies access if filters match. |
| filters | [EACLRecord.Filter](#neo.fs.v2.acl.EACLRecord.Filter) | repeated | List of filters to match and see if rule is applicable | | filters | [EACLRecord.Filter](#neo.fs.v2.acl.EACLRecord.Filter) | repeated | List of filters to match and see if rule is applicable |
| targets | [EACLRecord.Target](#neo.fs.v2.acl.EACLRecord.Target) | repeated | List of target subjects to apply ACL rule to | | targets | [EACLRecord.Target](#neo.fs.v2.acl.EACLRecord.Target) | repeated | List of target subjects to apply ACL rule to |
@ -153,7 +175,7 @@ keys to match.
Extended ACL rules table. A list of ACL rules defined additionally to Basic Extended ACL rules table. A list of ACL rules defined additionally to Basic
ACL. Extended ACL rules can be attached to a container and can be updated ACL. Extended ACL rules can be attached to a container and can be updated
or may be defined in `BearerToken` structure. Please see the corresponding or may be defined in `BearerToken` structure. Please see the corresponding
NeoFS Technical Specification section for detailed description. FrostFS Technical Specification section for detailed description.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -189,7 +211,7 @@ Enumeration of possible sources of Headers to apply filters.
| HEADER_UNSPECIFIED | 0 | Unspecified header, default value. | | HEADER_UNSPECIFIED | 0 | Unspecified header, default value. |
| REQUEST | 1 | Filter request headers | | REQUEST | 1 | Filter request headers |
| OBJECT | 2 | Filter object headers | | OBJECT | 2 | Filter object headers |
| SERVICE | 3 | Filter service headers. These are not processed by NeoFS nodes and exist for service use only. | | SERVICE | 3 | Filter service headers. These are not processed by FrostFS nodes and exist for service use only. |
@ -261,4 +283,3 @@ Target role of the access control rule in access control list.
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -3,64 +3,63 @@
## Table of Contents ## Table of Contents
- [bootstrap/types.proto](#bootstrap/types.proto) - [ape/types.proto](#ape/types.proto)
- Messages - Messages
- [NodeInfo](#bootstrap.NodeInfo) - [Chain](#frostfs.v2.ape.Chain)
- [NodeInfo.Attribute](#bootstrap.NodeInfo.Attribute) - [ChainTarget](#frostfs.v2.ape.ChainTarget)
- [Scalar Value Types](#scalar-value-types) - [Scalar Value Types](#scalar-value-types)
<a name="bootstrap/types.proto"></a> <a name="ape/types.proto"></a>
<p align="right"><a href="#top">Top</a></p> <p align="right"><a href="#top">Top</a></p>
## bootstrap/types.proto ## ape/types.proto
<!-- end services --> <!-- end services -->
<a name="bootstrap.NodeInfo"></a> <a name="frostfs.v2.ape.Chain"></a>
### Message NodeInfo ### Message Chain
Groups the information about the NeoFS node. Chain is a chain of rules defined for a specific target.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| Address | [string](#string) | | Carries network address of the NeoFS node. | | raw | [bytes](#bytes) | | Raw representation of a serizalized rule chain. |
| PublicKey | [bytes](#bytes) | | Carries public key of the NeoFS node in a binary format. |
| Attributes | [NodeInfo.Attribute](#bootstrap.NodeInfo.Attribute) | repeated | Carries list of the NeoFS node attributes in a string key-value format. |
| state | [NodeInfo.State](#bootstrap.NodeInfo.State) | | Carries state of the NeoFS node. |
<a name="bootstrap.NodeInfo.Attribute"></a> <a name="frostfs.v2.ape.ChainTarget"></a>
### Message NodeInfo.Attribute ### Message ChainTarget
Groups attributes of the NeoFS node. ChainTarget is an object to which a rule chain is defined.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| Key | [string](#string) | | Carries string key to the node attribute. | | type | [TargetType](#frostfs.v2.ape.TargetType) | | |
| Value | [string](#string) | | Carries string value of the node attribute. | | name | [string](#string) | | |
<!-- end messages --> <!-- end messages -->
<a name="bootstrap.NodeInfo.State"></a> <a name="frostfs.v2.ape.TargetType"></a>
### NodeInfo.State ### TargetType
Represents the enumeration of various states of the NeoFS node. TargetType is a type target to which a rule chain is defined.
| Name | Number | Description | | Name | Number | Description |
| ---- | ------ | ----------- | | ---- | ------ | ----------- |
| Unknown | 0 | Undefined state. | | UNDEFINED | 0 | |
| Online | 1 | Active state on the network. | | NAMESPACE | 1 | |
| Offline | 2 | Network unavailable state. | | CONTAINER | 2 | |
| USER | 3 | |
| GROUP | 4 | |
<!-- end enums --> <!-- end enums -->
@ -86,4 +85,3 @@ Represents the enumeration of various states of the NeoFS node.
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

269
proto-docs/apemanager.md Normal file
View file

@ -0,0 +1,269 @@
# Protocol Documentation
<a name="top"></a>
## Table of Contents
- [apemanager/service.proto](#apemanager/service.proto)
- Services
- [APEManagerService](#frostfs.v2.apemanager.APEManagerService)
- Messages
- [AddChainRequest](#frostfs.v2.apemanager.AddChainRequest)
- [AddChainRequest.Body](#frostfs.v2.apemanager.AddChainRequest.Body)
- [AddChainResponse](#frostfs.v2.apemanager.AddChainResponse)
- [AddChainResponse.Body](#frostfs.v2.apemanager.AddChainResponse.Body)
- [ListChainsRequest](#frostfs.v2.apemanager.ListChainsRequest)
- [ListChainsRequest.Body](#frostfs.v2.apemanager.ListChainsRequest.Body)
- [ListChainsResponse](#frostfs.v2.apemanager.ListChainsResponse)
- [ListChainsResponse.Body](#frostfs.v2.apemanager.ListChainsResponse.Body)
- [RemoveChainRequest](#frostfs.v2.apemanager.RemoveChainRequest)
- [RemoveChainRequest.Body](#frostfs.v2.apemanager.RemoveChainRequest.Body)
- [RemoveChainResponse](#frostfs.v2.apemanager.RemoveChainResponse)
- [RemoveChainResponse.Body](#frostfs.v2.apemanager.RemoveChainResponse.Body)
- [Scalar Value Types](#scalar-value-types)
<a name="apemanager/service.proto"></a>
<p align="right"><a href="#top">Top</a></p>
## apemanager/service.proto
<a name="frostfs.v2.apemanager.APEManagerService"></a>
### Service "frostfs.v2.apemanager.APEManagerService"
`APEManagerService` provides API to manage rule chains within sidechain's
`Policy` smart contract.
```
rpc AddChain(AddChainRequest) returns (AddChainResponse);
rpc RemoveChain(RemoveChainRequest) returns (RemoveChainResponse);
rpc ListChains(ListChainsRequest) returns (ListChainsResponse);
```
#### Method AddChain
Add a rule chain for a specific target to `Policy` smart contract.
Statuses:
- **OK** (0, SECTION_SUCCESS): \
the chain has been successfully added;
- Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
container (as target) not found;
- **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
the operation is denied by the service.
| Name | Input | Output |
| ---- | ----- | ------ |
| AddChain | [AddChainRequest](#frostfs.v2.apemanager.AddChainRequest) | [AddChainResponse](#frostfs.v2.apemanager.AddChainResponse) |
#### Method RemoveChain
Remove a rule chain for a specific target from `Policy` smart contract.
RemoveChain is an idempotent operation: removal of non-existing rule chain
also means success.
Statuses:
- **OK** (0, SECTION_SUCCESS): \
the chain has been successfully removed;
- Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
container (as target) not found;
- **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
the operation is denied by the service.
| Name | Input | Output |
| ---- | ----- | ------ |
| RemoveChain | [RemoveChainRequest](#frostfs.v2.apemanager.RemoveChainRequest) | [RemoveChainResponse](#frostfs.v2.apemanager.RemoveChainResponse) |
#### Method ListChains
List chains defined for a specific target from `Policy` smart contract.
Statuses:
- **OK** (0, SECTION_SUCCESS): \
chains have been successfully listed;
- Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
container (as target) not found;
- **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
the operation is denied by the service.
| Name | Input | Output |
| ---- | ----- | ------ |
| ListChains | [ListChainsRequest](#frostfs.v2.apemanager.ListChainsRequest) | [ListChainsResponse](#frostfs.v2.apemanager.ListChainsResponse) |
<!-- end services -->
<a name="frostfs.v2.apemanager.AddChainRequest"></a>
### Message AddChainRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [AddChainRequest.Body](#frostfs.v2.apemanager.AddChainRequest.Body) | | The request's body. |
| 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="frostfs.v2.apemanager.AddChainRequest.Body"></a>
### Message AddChainRequest.Body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target | [frostfs.v2.ape.ChainTarget](#frostfs.v2.ape.ChainTarget) | | A target for which a rule chain is added. |
| chain | [frostfs.v2.ape.Chain](#frostfs.v2.ape.Chain) | | The chain to set for the target. |
<a name="frostfs.v2.apemanager.AddChainResponse"></a>
### Message AddChainResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [AddChainResponse.Body](#frostfs.v2.apemanager.AddChainResponse.Body) | | The response's body. |
| 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="frostfs.v2.apemanager.AddChainResponse.Body"></a>
### Message AddChainResponse.Body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| chain_id | [bytes](#bytes) | | Chain ID assigned for the added rule chain. If chain ID is left empty in the request, then it will be generated. |
<a name="frostfs.v2.apemanager.ListChainsRequest"></a>
### Message ListChainsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [ListChainsRequest.Body](#frostfs.v2.apemanager.ListChainsRequest.Body) | | The request's body. |
| 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="frostfs.v2.apemanager.ListChainsRequest.Body"></a>
### Message ListChainsRequest.Body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target | [frostfs.v2.ape.ChainTarget](#frostfs.v2.ape.ChainTarget) | | Target for which rule chains are listed. |
<a name="frostfs.v2.apemanager.ListChainsResponse"></a>
### Message ListChainsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [ListChainsResponse.Body](#frostfs.v2.apemanager.ListChainsResponse.Body) | | The response's body. |
| 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="frostfs.v2.apemanager.ListChainsResponse.Body"></a>
### Message ListChainsResponse.Body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| chains | [frostfs.v2.ape.Chain](#frostfs.v2.ape.Chain) | repeated | The list of chains defined for the reqeusted target. |
<a name="frostfs.v2.apemanager.RemoveChainRequest"></a>
### Message RemoveChainRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [RemoveChainRequest.Body](#frostfs.v2.apemanager.RemoveChainRequest.Body) | | The request's body. |
| 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="frostfs.v2.apemanager.RemoveChainRequest.Body"></a>
### Message RemoveChainRequest.Body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target | [frostfs.v2.ape.ChainTarget](#frostfs.v2.ape.ChainTarget) | | Target for which a rule chain is removed. |
| chain_id | [bytes](#bytes) | | Chain ID assigned for the rule chain. |
<a name="frostfs.v2.apemanager.RemoveChainResponse"></a>
### Message RemoveChainResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [RemoveChainResponse.Body](#frostfs.v2.apemanager.RemoveChainResponse.Body) | | The response's body. |
| 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="frostfs.v2.apemanager.RemoveChainResponse.Body"></a>
### Message RemoveChainResponse.Body
Since RemoveChain is an idempotent operation, then the only indicator that
operation could not be performed is an error returning to a client.
<!-- 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 |

View file

@ -1,74 +0,0 @@
# Protocol Documentation
<a name="top"></a>
## Table of Contents
- [audit/types.proto](#audit/types.proto)
- Messages
- [DataAuditResult](#neo.fs.v2.audit.DataAuditResult)
- [Scalar Value Types](#scalar-value-types)
<a name="audit/types.proto"></a>
<p align="right"><a href="#top">Top</a></p>
## audit/types.proto
<!-- end services -->
<a name="neo.fs.v2.audit.DataAuditResult"></a>
### Message DataAuditResult
DataAuditResult keeps record of conducted Data Audits. The detailed report is
generated separately.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Data Audit Result format version. Effectively, the version of API library used to report DataAuditResult structure. |
| audit_epoch | [fixed64](#fixed64) | | Epoch number when the Data Audit was conducted |
| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Container under audit |
| public_key | [bytes](#bytes) | | Public key of the auditing InnerRing node in a binary format |
| complete | [bool](#bool) | | Shows if Data Audit process was complete in time or if it was cancelled |
| requests | [uint32](#uint32) | | Number of request done at PoR stage |
| retries | [uint32](#uint32) | | Number of retries done at PoR stage |
| pass_sg | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of Storage Groups that passed audit PoR stage |
| fail_sg | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of Storage Groups that failed audit PoR stage |
| hit | [uint32](#uint32) | | Number of sampled objects under the audit placed in an optimal way according to the containers placement policy when checking PoP |
| miss | [uint32](#uint32) | | Number of sampled objects under the audit placed in suboptimal way according to the containers placement policy, but still at a satisfactory level when checking PoP |
| fail | [uint32](#uint32) | | Number of sampled objects under the audit stored inconsistently with the placement policy or not found at all when checking PoP |
| pass_nodes | [bytes](#bytes) | repeated | List of storage node public keys that passed at least one PDP |
| fail_nodes | [bytes](#bytes) | repeated | List of storage node public keys that failed at least one PDP |
<!-- 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 |

View file

@ -3,49 +3,36 @@
## Table of Contents ## Table of Contents
- [Protocol Documentation](#protocol-documentation) - [container/service.proto](#container/service.proto)
- [Table of Contents](#table-of-contents) - Services
- [container/service.proto](#containerserviceproto) - [ContainerService](#neo.fs.v2.container.ContainerService)
- [Service "neo.fs.v2.container.ContainerService"](#service-neofsv2containercontainerservice)
- [Method Put](#method-put) - Messages
- [Method Delete](#method-delete) - [DeleteRequest](#neo.fs.v2.container.DeleteRequest)
- [Method Get](#method-get) - [DeleteRequest.Body](#neo.fs.v2.container.DeleteRequest.Body)
- [Method List](#method-list) - [DeleteResponse](#neo.fs.v2.container.DeleteResponse)
- [Method SetExtendedACL](#method-setextendedacl) - [DeleteResponse.Body](#neo.fs.v2.container.DeleteResponse.Body)
- [Method GetExtendedACL](#method-getextendedacl) - [GetRequest](#neo.fs.v2.container.GetRequest)
- [Method AnnounceUsedSpace](#method-announceusedspace) - [GetRequest.Body](#neo.fs.v2.container.GetRequest.Body)
- [Message AnnounceUsedSpaceRequest](#message-announceusedspacerequest) - [GetResponse](#neo.fs.v2.container.GetResponse)
- [Message AnnounceUsedSpaceRequest.Body](#message-announceusedspacerequestbody) - [GetResponse.Body](#neo.fs.v2.container.GetResponse.Body)
- [Message AnnounceUsedSpaceRequest.Body.Announcement](#message-announceusedspacerequestbodyannouncement) - [ListRequest](#neo.fs.v2.container.ListRequest)
- [Message AnnounceUsedSpaceResponse](#message-announceusedspaceresponse) - [ListRequest.Body](#neo.fs.v2.container.ListRequest.Body)
- [Message AnnounceUsedSpaceResponse.Body](#message-announceusedspaceresponsebody) - [ListResponse](#neo.fs.v2.container.ListResponse)
- [Message DeleteRequest](#message-deleterequest) - [ListResponse.Body](#neo.fs.v2.container.ListResponse.Body)
- [Message DeleteRequest.Body](#message-deleterequestbody) - [PutRequest](#neo.fs.v2.container.PutRequest)
- [Message DeleteResponse](#message-deleteresponse) - [PutRequest.Body](#neo.fs.v2.container.PutRequest.Body)
- [Message DeleteResponse.Body](#message-deleteresponsebody) - [PutResponse](#neo.fs.v2.container.PutResponse)
- [Message GetExtendedACLRequest](#message-getextendedaclrequest) - [PutResponse.Body](#neo.fs.v2.container.PutResponse.Body)
- [Message GetExtendedACLRequest.Body](#message-getextendedaclrequestbody)
- [Message GetExtendedACLResponse](#message-getextendedaclresponse)
- [Message GetExtendedACLResponse.Body](#message-getextendedaclresponsebody) - [container/types.proto](#container/types.proto)
- [Message GetRequest](#message-getrequest)
- [Message GetRequest.Body](#message-getrequestbody) - Messages
- [Message GetResponse](#message-getresponse) - [Container](#neo.fs.v2.container.Container)
- [Message GetResponse.Body](#message-getresponsebody) - [Container.Attribute](#neo.fs.v2.container.Container.Attribute)
- [Message ListRequest](#message-listrequest)
- [Message ListRequest.Body](#message-listrequestbody)
- [Message ListResponse](#message-listresponse)
- [Message ListResponse.Body](#message-listresponsebody)
- [Message PutRequest](#message-putrequest)
- [Message PutRequest.Body](#message-putrequestbody)
- [Message PutResponse](#message-putresponse)
- [Message PutResponse.Body](#message-putresponsebody)
- [Message SetExtendedACLRequest](#message-setextendedaclrequest)
- [Message SetExtendedACLRequest.Body](#message-setextendedaclrequestbody)
- [Message SetExtendedACLResponse](#message-setextendedaclresponse)
- [Message SetExtendedACLResponse.Body](#message-setextendedaclresponsebody)
- [container/types.proto](#containertypesproto)
- [Message Container](#message-container)
- [Message Container.Attribute](#message-containerattribute)
- [Scalar Value Types](#scalar-value-types) - [Scalar Value Types](#scalar-value-types)
@ -62,8 +49,8 @@
### Service "neo.fs.v2.container.ContainerService" ### Service "neo.fs.v2.container.ContainerService"
`ContainerService` provides API to interact with `Container` smart contract `ContainerService` provides API to interact with `Container` smart contract
in NeoFS sidechain via other NeoFS nodes. All of those actions can be done in FrostFS sidechain via other FrostFS nodes. All of those actions can be
equivalently by directly issuing transactions and RPC calls to sidechain done equivalently by directly issuing transactions and RPC calls to sidechain
nodes. nodes.
``` ```
@ -71,9 +58,6 @@ rpc Put(PutRequest) returns (PutResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc Get(GetRequest) returns (GetResponse); rpc Get(GetRequest) returns (GetResponse);
rpc List(ListRequest) returns (ListResponse); rpc List(ListRequest) returns (ListResponse);
rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse);
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) returns (AnnounceUsedSpaceResponse);
``` ```
@ -81,13 +65,15 @@ rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) returns (AnnounceUsedSpaceRespon
`Put` invokes `Container` smart contract's `Put` method and returns `Put` invokes `Container` smart contract's `Put` method and returns
response immediately. After a new block is issued in sidechain, request is response immediately. After a new block is issued in sidechain, request is
verified by Inner Ring nodes. After one more block in sidechain, the container verified by Inner Ring nodes. After one more block in sidechain, the
is added into smart contract storage. container is added into smart contract storage.
Statuses: Statuses:
- **OK** (0, SECTION_SUCCESS): \ - **OK** (0, SECTION_SUCCESS): \
request to save the container has been sent to the sidechain; request to save the container has been sent to the sidechain;
- Common failures (SECTION_FAILURE_COMMON). - Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
container create access denied.
| Name | Input | Output | | Name | Input | Output |
| ---- | ----- | ------ | | ---- | ----- | ------ |
@ -96,13 +82,15 @@ Statuses:
`Delete` invokes `Container` smart contract's `Delete` method and returns `Delete` invokes `Container` smart contract's `Delete` method and returns
response immediately. After a new block is issued in sidechain, request is response immediately. After a new block is issued in sidechain, request is
verified by Inner Ring nodes. After one more block in sidechain, the container verified by Inner Ring nodes. After one more block in sidechain, the
is added into smart contract storage. container is added into smart contract storage.
Statuses: Statuses:
- **OK** (0, SECTION_SUCCESS): \ - **OK** (0, SECTION_SUCCESS): \
request to remove the container has been sent to the sidechain; request to remove the container has been sent to the sidechain;
- Common failures (SECTION_FAILURE_COMMON). - Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
container delete access denied.
| Name | Input | Output | | Name | Input | Output |
| ---- | ----- | ------ | | ---- | ----- | ------ |
@ -116,7 +104,9 @@ Statuses:
container has been successfully read; container has been successfully read;
- Common failures (SECTION_FAILURE_COMMON); - Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
requested container not found. requested container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied.
| Name | Input | Output | | Name | Input | Output |
| ---- | ----- | ------ | | ---- | ----- | ------ |
@ -128,115 +118,16 @@ Returns all owner's containers from 'Container` smart contract' storage.
Statuses: Statuses:
- **OK** (0, SECTION_SUCCESS): \ - **OK** (0, SECTION_SUCCESS): \
container list has been successfully read; container list has been successfully read;
- Common failures (SECTION_FAILURE_COMMON). - Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
container list access denied.
| Name | Input | Output | | Name | Input | Output |
| ---- | ----- | ------ | | ---- | ----- | ------ |
| List | [ListRequest](#neo.fs.v2.container.ListRequest) | [ListResponse](#neo.fs.v2.container.ListResponse) | | List | [ListRequest](#neo.fs.v2.container.ListRequest) | [ListResponse](#neo.fs.v2.container.ListResponse) |
#### Method SetExtendedACL
Invokes 'SetEACL' method of 'Container` smart contract and returns response
immediately. After one more block in sidechain, changes in an Extended ACL are
added into smart contract storage.
Statuses:
- **OK** (0, SECTION_SUCCESS): \
request to save container eACL has been sent to the sidechain;
- Common failures (SECTION_FAILURE_COMMON).
| Name | Input | Output |
| ---- | ----- | ------ |
| SetExtendedACL | [SetExtendedACLRequest](#neo.fs.v2.container.SetExtendedACLRequest) | [SetExtendedACLResponse](#neo.fs.v2.container.SetExtendedACLResponse) |
#### Method GetExtendedACL
Returns Extended ACL table and signature from `Container` smart contract
storage.
Statuses:
- **OK** (0, SECTION_SUCCESS): \
container eACL has been successfully read;
- Common failures (SECTION_FAILURE_COMMON);
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
container not found;
- **EACL_NOT_FOUND** (3073, SECTION_CONTAINER): \
eACL table not found.
| Name | Input | Output |
| ---- | ----- | ------ |
| GetExtendedACL | [GetExtendedACLRequest](#neo.fs.v2.container.GetExtendedACLRequest) | [GetExtendedACLResponse](#neo.fs.v2.container.GetExtendedACLResponse) |
#### Method AnnounceUsedSpace
Announces the space values used by the container for P2P synchronization.
Statuses:
- **OK** (0, SECTION_SUCCESS): \
estimation of used space has been successfully announced;
- Common failures (SECTION_FAILURE_COMMON).
| Name | Input | Output |
| ---- | ----- | ------ |
| AnnounceUsedSpace | [AnnounceUsedSpaceRequest](#neo.fs.v2.container.AnnounceUsedSpaceRequest) | [AnnounceUsedSpaceResponse](#neo.fs.v2.container.AnnounceUsedSpaceResponse) |
<!-- end services --> <!-- end services -->
<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 |
| ----- | ---- | ----- | ----------- |
| 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. |
<a name="neo.fs.v2.container.AnnounceUsedSpaceRequest.Body.Announcement"></a>
### Message AnnounceUsedSpaceRequest.Body.Announcement
Announcement contains used space information for a single container.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| epoch | [uint64](#uint64) | | Epoch number for which the container size estimation was produced. |
| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Identifier of the container. |
| 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. |
<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.
<a name="neo.fs.v2.container.DeleteRequest"></a> <a name="neo.fs.v2.container.DeleteRequest"></a>
### Message DeleteRequest ### Message DeleteRequest
@ -260,7 +151,7 @@ smart contract, so signing algorithm must be supported by NeoVM.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Identifier of the container to delete from NeoFS | | container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Identifier of the container to delete from FrostFS |
| signature | [neo.fs.v2.refs.SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) | | `ContainerID` signed with the container owner's key according to RFC-6979. | | signature | [neo.fs.v2.refs.SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) | | `ContainerID` signed with the container owner's key according to RFC-6979. |
@ -286,58 +177,6 @@ and done via consensus in Inner Ring nodes.
<a name="neo.fs.v2.container.GetExtendedACLRequest"></a>
### Message GetExtendedACLRequest
Get Extended ACL
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [GetExtendedACLRequest.Body](#neo.fs.v2.container.GetExtendedACLRequest.Body) | | Body of get extended acl 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.GetExtendedACLRequest.Body"></a>
### Message GetExtendedACLRequest.Body
Get Extended ACL request body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Identifier of the container having Extended ACL |
<a name="neo.fs.v2.container.GetExtendedACLResponse"></a>
### Message GetExtendedACLResponse
Get Extended ACL
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [GetExtendedACLResponse.Body](#neo.fs.v2.container.GetExtendedACLResponse.Body) | | Body of get extended acl 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.GetExtendedACLResponse.Body"></a>
### Message GetExtendedACLResponse.Body
Get Extended ACL Response body can be empty if the requested container does
not have Extended ACL Table attached or Extended ACL has not been allowed at
the time of container creation.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| eacl | [neo.fs.v2.acl.EACLTable](#neo.fs.v2.acl.EACLTable) | | Extended ACL requested, if available |
| signature | [neo.fs.v2.refs.SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) | | Signature of stable-marshalled Extended ACL according to RFC-6979. |
| session_token | [neo.fs.v2.session.SessionToken](#neo.fs.v2.session.SessionToken) | | Session token if Extended ACL was set within a session |
<a name="neo.fs.v2.container.GetRequest"></a> <a name="neo.fs.v2.container.GetRequest"></a>
### Message GetRequest ### Message GetRequest
@ -440,7 +279,7 @@ List containers response body.
<a name="neo.fs.v2.container.PutRequest"></a> <a name="neo.fs.v2.container.PutRequest"></a>
### Message PutRequest ### Message PutRequest
New NeoFS Container creation request New FrostFS Container creation request
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -462,14 +301,14 @@ additional signature checks.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| container | [Container](#neo.fs.v2.container.Container) | | Container structure to register in NeoFS | | container | [Container](#neo.fs.v2.container.Container) | | Container structure to register in FrostFS |
| signature | [neo.fs.v2.refs.SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) | | Signature of a stable-marshalled container according to RFC-6979. | | signature | [neo.fs.v2.refs.SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) | | Signature of a stable-marshalled container according to RFC-6979. |
<a name="neo.fs.v2.container.PutResponse"></a> <a name="neo.fs.v2.container.PutResponse"></a>
### Message PutResponse ### Message PutResponse
New NeoFS Container creation response New FrostFS Container creation response
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -492,54 +331,6 @@ returned here to make sure everything has been done as expected.
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Unique identifier of the newly created container | | container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Unique identifier of the newly created container |
<a name="neo.fs.v2.container.SetExtendedACLRequest"></a>
### Message SetExtendedACLRequest
Set Extended ACL
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [SetExtendedACLRequest.Body](#neo.fs.v2.container.SetExtendedACLRequest.Body) | | Body of set extended acl 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.SetExtendedACLRequest.Body"></a>
### Message SetExtendedACLRequest.Body
Set Extended ACL request body does not have separate `ContainerID`
reference. It will be taken from `EACLTable.container_id` field.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| eacl | [neo.fs.v2.acl.EACLTable](#neo.fs.v2.acl.EACLTable) | | Extended ACL table to set for the container |
| signature | [neo.fs.v2.refs.SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) | | Signature of stable-marshalled Extended ACL table according to RFC-6979. |
<a name="neo.fs.v2.container.SetExtendedACLResponse"></a>
### Message SetExtendedACLResponse
Set Extended ACL
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [SetExtendedACLResponse.Body](#neo.fs.v2.container.SetExtendedACLResponse.Body) | | Body of set extended acl 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.SetExtendedACLResponse.Body"></a>
### Message SetExtendedACLResponse.Body
`SetExtendedACLResponse` has an empty body because the operation is
asynchronous and the update should be reflected in `Container` smart contract's
storage after next block is issued in sidechain.
<!-- end messages --> <!-- end messages -->
<!-- end enums --> <!-- end enums -->
@ -560,8 +351,8 @@ storage after next block is issued in sidechain.
### Message Container ### Message Container
Container is a structure that defines object placement behaviour. Objects can Container is a structure that defines object placement behaviour. Objects can
be stored only within containers. They define placement rule, attributes and be stored only within containers. They define placement rule, attributes and
access control information. An ID of a container is a 32 byte long SHA256 hash access control information. An ID of a container is a 32 byte long SHA256
of stable-marshalled container message. hash of stable-marshalled container message.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -578,8 +369,8 @@ of stable-marshalled container message.
### Message Container.Attribute ### Message Container.Attribute
`Attribute` is a user-defined Key-Value metadata pair attached to the `Attribute` is a user-defined Key-Value metadata pair attached to the
container. Container attributes are immutable. They are set at the moment of container. Container attributes are immutable. They are set at the moment
container creation and can never be added or updated. of container creation and can never be added or updated.
Key name must be a container-unique valid UTF-8 string. Value can't be 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 empty. Containers with duplicated attribute names or attributes with empty
@ -593,15 +384,16 @@ There are some "well-known" attributes affecting system behaviour:
NNS contract. NNS contract.
* [ __SYSTEM__ZONE ] \ * [ __SYSTEM__ZONE ] \
(`__NEOFS__ZONE` is deprecated) \ (`__NEOFS__ZONE` is deprecated) \
String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated). Used as a TLD of a domain name in NNS String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated).
contract. If no zone is specified, use default zone: `container`. Used as a TLD of a domain name in NNS contract. If no zone is specified,
use default zone: `container`.
* [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \ * [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \
(`__NEOFS__DISABLE_HOMOMORPHIC_HASHING` is deprecated) \ (`__NEOFS__DISABLE_HOMOMORPHIC_HASHING` is deprecated) \
Disables homomorphic hashing for the container if the value equals "true" string. Disables homomorphic hashing for the container if the value equals "true"
Any other values are interpreted as missing attribute. Container could be string. Any other values are interpreted as missing attribute. Container
accepted in a NeoFS network only if the global network hashing configuration could be accepted in a FrostFS network only if the global network hashing
value corresponds with that attribute's value. After container inclusion, network configuration value corresponds with that attribute's value. After
setting is ignored. container inclusion, network setting is ignored.
And some well-known attributes used by applications only: And some well-known attributes used by applications only:
@ -641,4 +433,3 @@ And some well-known attributes used by applications only:
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -27,8 +27,9 @@
### Message Lock ### Message Lock
Lock objects protects a list of objects from being deleted. The lifetime of a Lock objects protects a list of objects from being deleted. The lifetime of a
lock object is limited similar to regular objects in lock object is limited similar to regular objects in
`__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) attribute. Lock object MUST have expiration epoch. `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated)
It is impossible to delete a lock object via ObjectService.Delete RPC call. attribute. Lock object MUST have expiration epoch. It is impossible to delete
a lock object via ObjectService.Delete RPC call.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -60,4 +61,3 @@ It is impossible to delete a lock object via ObjectService.Delete RPC call.
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -3,39 +3,40 @@
## Table of Contents ## Table of Contents
- [Protocol Documentation](#protocol-documentation) - [netmap/service.proto](#netmap/service.proto)
- [Table of Contents](#table-of-contents) - Services
- [netmap/service.proto](#netmapserviceproto) - [NetmapService](#neo.fs.v2.netmap.NetmapService)
- [Service "neo.fs.v2.netmap.NetmapService"](#service-neofsv2netmapnetmapservice)
- [Method LocalNodeInfo](#method-localnodeinfo) - Messages
- [Method NetworkInfo](#method-networkinfo) - [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest)
- [Method NetmapSnapshot](#method-netmapsnapshot) - [LocalNodeInfoRequest.Body](#neo.fs.v2.netmap.LocalNodeInfoRequest.Body)
- [Message LocalNodeInfoRequest](#message-localnodeinforequest) - [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse)
- [Message LocalNodeInfoRequest.Body](#message-localnodeinforequestbody) - [LocalNodeInfoResponse.Body](#neo.fs.v2.netmap.LocalNodeInfoResponse.Body)
- [Message LocalNodeInfoResponse](#message-localnodeinforesponse) - [NetmapSnapshotRequest](#neo.fs.v2.netmap.NetmapSnapshotRequest)
- [Message LocalNodeInfoResponse.Body](#message-localnodeinforesponsebody) - [NetmapSnapshotRequest.Body](#neo.fs.v2.netmap.NetmapSnapshotRequest.Body)
- [Message NetmapSnapshotRequest](#message-netmapsnapshotrequest) - [NetmapSnapshotResponse](#neo.fs.v2.netmap.NetmapSnapshotResponse)
- [Message NetmapSnapshotRequest.Body](#message-netmapsnapshotrequestbody) - [NetmapSnapshotResponse.Body](#neo.fs.v2.netmap.NetmapSnapshotResponse.Body)
- [Message NetmapSnapshotResponse](#message-netmapsnapshotresponse) - [NetworkInfoRequest](#neo.fs.v2.netmap.NetworkInfoRequest)
- [Message NetmapSnapshotResponse.Body](#message-netmapsnapshotresponsebody) - [NetworkInfoRequest.Body](#neo.fs.v2.netmap.NetworkInfoRequest.Body)
- [Message NetworkInfoRequest](#message-networkinforequest) - [NetworkInfoResponse](#neo.fs.v2.netmap.NetworkInfoResponse)
- [Message NetworkInfoRequest.Body](#message-networkinforequestbody) - [NetworkInfoResponse.Body](#neo.fs.v2.netmap.NetworkInfoResponse.Body)
- [Message NetworkInfoResponse](#message-networkinforesponse)
- [Message NetworkInfoResponse.Body](#message-networkinforesponsebody)
- [netmap/types.proto](#netmaptypesproto) - [netmap/types.proto](#netmap/types.proto)
- [Message Filter](#message-filter)
- [Message Netmap](#message-netmap) - Messages
- [Message NetworkConfig](#message-networkconfig) - [Filter](#neo.fs.v2.netmap.Filter)
- [Message NetworkConfig.Parameter](#message-networkconfigparameter) - [Netmap](#neo.fs.v2.netmap.Netmap)
- [Message NetworkInfo](#message-networkinfo) - [NetworkConfig](#neo.fs.v2.netmap.NetworkConfig)
- [Message NodeInfo](#message-nodeinfo) - [NetworkConfig.Parameter](#neo.fs.v2.netmap.NetworkConfig.Parameter)
- [Message NodeInfo.Attribute](#message-nodeinfoattribute) - [NetworkInfo](#neo.fs.v2.netmap.NetworkInfo)
- [Message PlacementPolicy](#message-placementpolicy) - [NodeInfo](#neo.fs.v2.netmap.NodeInfo)
- [Message Replica](#message-replica) - [NodeInfo.Attribute](#neo.fs.v2.netmap.NodeInfo.Attribute)
- [Message Selector](#message-selector) - [PlacementPolicy](#neo.fs.v2.netmap.PlacementPolicy)
- [Clause](#clause) - [Replica](#neo.fs.v2.netmap.Replica)
- [NodeInfo.State](#nodeinfostate) - [Selector](#neo.fs.v2.netmap.Selector)
- [Operation](#operation)
- [Scalar Value Types](#scalar-value-types) - [Scalar Value Types](#scalar-value-types)
@ -51,10 +52,10 @@
<a name="neo.fs.v2.netmap.NetmapService"></a> <a name="neo.fs.v2.netmap.NetmapService"></a>
### Service "neo.fs.v2.netmap.NetmapService" ### Service "neo.fs.v2.netmap.NetmapService"
`NetmapService` provides methods to work with `Network Map` and the information `NetmapService` provides methods to work with `Network Map` and the
required to build it. The resulting `Network Map` is stored in sidechain information required to build it. The resulting `Network Map` is stored in
`Netmap` smart contract, while related information can be obtained from other sidechain `Netmap` smart contract, while related information can be obtained
NeoFS nodes. from other FrostFS nodes.
``` ```
rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse); rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse);
@ -66,10 +67,11 @@ rpc NetmapSnapshot(NetmapSnapshotRequest) returns (NetmapSnapshotResponse);
#### Method LocalNodeInfo #### Method LocalNodeInfo
Get NodeInfo structure from the particular node directly. Get NodeInfo structure from the particular node directly.
Node information can be taken from `Netmap` smart contract. In some cases, though, Node information can be taken from `Netmap` smart contract. In some cases,
one may want to get recent information directly or to talk to the node not yet though, one may want to get recent information directly or to talk to the
present in the `Network Map` to find out what API version can be used for node not yet present in the `Network Map` to find out what API version can
further communication. This can be also used to check if a node is up and running. be used for further communication. This can be also used to check if a node
is up and running.
Statuses: Statuses:
- **OK** (0, SECTION_SUCCESS): - **OK** (0, SECTION_SUCCESS):
@ -81,7 +83,7 @@ information about the server has been successfully read;
| LocalNodeInfo | [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest) | [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) | | LocalNodeInfo | [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest) | [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) |
#### Method NetworkInfo #### Method NetworkInfo
Read recent information about the NeoFS network. Read recent information about the FrostFS network.
Statuses: Statuses:
- **OK** (0, SECTION_SUCCESS): - **OK** (0, SECTION_SUCCESS):
@ -93,7 +95,7 @@ information about the current network state has been successfully read;
| NetworkInfo | [NetworkInfoRequest](#neo.fs.v2.netmap.NetworkInfoRequest) | [NetworkInfoResponse](#neo.fs.v2.netmap.NetworkInfoResponse) | | NetworkInfo | [NetworkInfoRequest](#neo.fs.v2.netmap.NetworkInfoRequest) | [NetworkInfoResponse](#neo.fs.v2.netmap.NetworkInfoResponse) |
#### Method NetmapSnapshot #### Method NetmapSnapshot
Returns network map snapshot of the current NeoFS epoch. Returns network map snapshot of the current FrostFS epoch.
Statuses: Statuses:
- **OK** (0, SECTION_SUCCESS): - **OK** (0, SECTION_SUCCESS):
@ -147,7 +149,7 @@ Local Node Info, including API Version in use.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Latest NeoFS API version in use | | version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Latest FrostFS API version in use |
| node_info | [NodeInfo](#neo.fs.v2.netmap.NodeInfo) | | NodeInfo structure with recent information from node itself | | node_info | [NodeInfo](#neo.fs.v2.netmap.NodeInfo) | | NodeInfo structure with recent information from node itself |
@ -257,8 +259,8 @@ Information about the network.
<a name="neo.fs.v2.netmap.Filter"></a> <a name="neo.fs.v2.netmap.Filter"></a>
### Message Filter ### Message Filter
This filter will return the subset of nodes from `NetworkMap` or another filter's This filter will return the subset of nodes from `NetworkMap` or another
results that will satisfy filter's conditions. filter's results that will satisfy filter's conditions.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -285,7 +287,7 @@ Network map structure
<a name="neo.fs.v2.netmap.NetworkConfig"></a> <a name="neo.fs.v2.netmap.NetworkConfig"></a>
### Message NetworkConfig ### Message NetworkConfig
NeoFS network configuration FrostFS network configuration
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -313,7 +315,7 @@ System parameters:
Fee paid for container creation by the container owner. Fee paid for container creation by the container owner.
Value: little-endian integer. Default: 0. Value: little-endian integer. Default: 0.
- **EpochDuration** \ - **EpochDuration** \
NeoFS epoch duration measured in Sidechain blocks. FrostFS epoch duration measured in Sidechain blocks.
Value: little-endian integer. Default: 0. Value: little-endian integer. Default: 0.
- **HomomorphicHashingDisabled** \ - **HomomorphicHashingDisabled** \
Flag of disabling the homomorphic hashing of objects' payload. Flag of disabling the homomorphic hashing of objects' payload.
@ -325,11 +327,48 @@ System parameters:
Flag allowing setting the MAINTENANCE state to storage nodes. Flag allowing setting the MAINTENANCE state to storage nodes.
Value: true if any byte != 0. Default: false. Value: true if any byte != 0. Default: false.
- **MaxObjectSize** \ - **MaxObjectSize** \
Maximum size of physically stored NeoFS object measured in bytes. Maximum size of physically stored FrostFS object measured in bytes.
Value: little-endian integer. Default: 0. Value: little-endian integer. Default: 0.
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}
```
- **WithdrawFee** \ - **WithdrawFee** \
Fee paid for withdrawal of funds paid by the account owner. Fee paid for withdrawal of funds paid by the account owner.
Value: little-endian integer. Default: 0. Value: little-endian integer. Default: 0.
- **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.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -341,49 +380,49 @@ System parameters:
<a name="neo.fs.v2.netmap.NetworkInfo"></a> <a name="neo.fs.v2.netmap.NetworkInfo"></a>
### Message NetworkInfo ### Message NetworkInfo
Information about NeoFS network Information about FrostFS network
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| current_epoch | [uint64](#uint64) | | Number of the current epoch in the NeoFS network | | current_epoch | [uint64](#uint64) | | Number of the current epoch in the FrostFS network |
| magic_number | [uint64](#uint64) | | Magic number of the sidechain of the NeoFS 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 NeoFS network | | ms_per_block | [int64](#int64) | | MillisecondsPerBlock network parameter of the sidechain of the FrostFS network |
| network_config | [NetworkConfig](#neo.fs.v2.netmap.NetworkConfig) | | NeoFS network configuration | | network_config | [NetworkConfig](#neo.fs.v2.netmap.NetworkConfig) | | FrostFS network configuration |
<a name="neo.fs.v2.netmap.NodeInfo"></a> <a name="neo.fs.v2.netmap.NodeInfo"></a>
### Message NodeInfo ### Message NodeInfo
NeoFS node description FrostFS node description
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| public_key | [bytes](#bytes) | | Public key of the NeoFS node in a binary format | | public_key | [bytes](#bytes) | | Public key of the FrostFS node in a binary format |
| addresses | [string](#string) | repeated | Ways to connect to a node | | addresses | [string](#string) | repeated | Ways to connect to a node |
| attributes | [NodeInfo.Attribute](#neo.fs.v2.netmap.NodeInfo.Attribute) | repeated | Carries list of the NeoFS 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. | | attributes | [NodeInfo.Attribute](#neo.fs.v2.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](#neo.fs.v2.netmap.NodeInfo.State) | | Carries state of the NeoFS node | | state | [NodeInfo.State](#neo.fs.v2.netmap.NodeInfo.State) | | Carries state of the FrostFS node |
<a name="neo.fs.v2.netmap.NodeInfo.Attribute"></a> <a name="neo.fs.v2.netmap.NodeInfo.Attribute"></a>
### Message NodeInfo.Attribute ### Message NodeInfo.Attribute
Administrator-defined Attributes of the NeoFS Storage Node. Administrator-defined Attributes of the FrostFS Storage Node.
`Attribute` is a Key-Value metadata pair. Key name must be a valid UTF-8 `Attribute` is a Key-Value metadata pair. Key name must be a valid UTF-8
string. Value can't be empty. string. Value can't be empty.
Attributes can be constructed into a chain of attributes: any attribute can Attributes can be constructed into a chain of attributes: any attribute can
have a parent attribute and a child attribute (except the first and the last have a parent attribute and a child attribute (except the first and the
one). A string representation of the chain of attributes in NeoFS Storage last one). A string representation of the chain of attributes in FrostFS
Node configuration uses ":" and "/" symbols, e.g.: Storage Node configuration uses ":" and "/" symbols, e.g.:
`NEOFS_NODE_ATTRIBUTE_1=key1:val1/key2:val2` `FrostFS_NODE_ATTRIBUTE_1=key1:val1/key2:val2`
Therefore the string attribute representation in the Node configuration must Therefore the string attribute representation in the Node configuration
use "\:", "\/" and "\\" escaped symbols if any of them appears in an attribute's must use "\:", "\/" and "\\" escaped symbols if any of them appears in an
key or value. attribute's key or value.
Node's attributes are mostly used during Storage Policy evaluation to Node's attributes are mostly used during Storage Policy evaluation to
calculate object's placement and find a set of nodes satisfying policy calculate object's placement and find a set of nodes satisfying policy
@ -426,8 +465,8 @@ explicitly set:
[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). Calculated [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). Calculated
automatically from `UN-LOCODE` attribute. automatically from `UN-LOCODE` attribute.
* Continent \ * Continent \
Node's continent name according to the [Seven-Continent model] Node's continent name according to the [Seven-Continent
(https://en.wikipedia.org/wiki/Continent#Number). Calculated model](https://en.wikipedia.org/wiki/Continent#Number). Calculated
automatically from `UN-LOCODE` attribute. automatically from `UN-LOCODE` attribute.
* ExternalAddr * ExternalAddr
Node's preferred way for communications with external clients. Node's preferred way for communications with external clients.
@ -435,7 +474,7 @@ explicitly set:
Must contain a comma-separated list of multi-addresses. Must contain a comma-separated list of multi-addresses.
For detailed description of each well-known attribute please see the For detailed description of each well-known attribute please see the
corresponding section in NeoFS Technical Specification. corresponding section in FrostFS Technical Specification.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -456,9 +495,10 @@ storage policy definition languages.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| replicas | [Replica](#neo.fs.v2.netmap.Replica) | repeated | Rules to set number of object replicas and place each one into a named bucket | | replicas | [Replica](#neo.fs.v2.netmap.Replica) | repeated | Rules to set number of object replicas and place each one into a named bucket |
| container_backup_factor | [uint32](#uint32) | | Container backup factor controls how deep NeoFS will search for nodes alternatives to include into container's nodes subset | | container_backup_factor | [uint32](#uint32) | | Container backup factor controls how deep FrostFS will search for nodes alternatives to include into container's nodes subset |
| selectors | [Selector](#neo.fs.v2.netmap.Selector) | repeated | Set of Selectors to form the container's nodes subset | | selectors | [Selector](#neo.fs.v2.netmap.Selector) | repeated | Set of Selectors to form the container's nodes subset |
| filters | [Filter](#neo.fs.v2.netmap.Filter) | repeated | List of named filters to reference in selectors | | filters | [Filter](#neo.fs.v2.netmap.Filter) | repeated | List of named filters to reference in selectors |
| unique | [bool](#bool) | | Unique flag defines non-overlapping application for replicas |
<a name="neo.fs.v2.netmap.Replica"></a> <a name="neo.fs.v2.netmap.Replica"></a>
@ -473,6 +513,8 @@ default.
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| count | [uint32](#uint32) | | How many object replicas to put | | count | [uint32](#uint32) | | How many object replicas to put |
| selector | [string](#string) | | Named selector bucket to put replicas | | selector | [string](#string) | | Named selector bucket to put replicas |
| ec_data_count | [uint32](#uint32) | | Data shards count |
| ec_parity_count | [uint32](#uint32) | | Parity shards count |
<a name="neo.fs.v2.netmap.Selector"></a> <a name="neo.fs.v2.netmap.Selector"></a>
@ -511,7 +553,7 @@ hash distance.
<a name="neo.fs.v2.netmap.NodeInfo.State"></a> <a name="neo.fs.v2.netmap.NodeInfo.State"></a>
### NodeInfo.State ### NodeInfo.State
Represents the enumeration of various states of the NeoFS node. Represents the enumeration of various states of the FrostFS node.
| Name | Number | Description | | Name | Number | Description |
| ---- | ------ | ----------- | | ---- | ------ | ----------- |
@ -538,6 +580,8 @@ Operations on filters
| LE | 6 | Less or equal | | LE | 6 | Less or equal |
| OR | 7 | Logical OR | | OR | 7 | Logical OR |
| AND | 8 | Logical AND | | AND | 8 | Logical AND |
| NOT | 9 | Logical negation |
| LIKE | 10 | Matches pattern |
<!-- end enums --> <!-- end enums -->
@ -563,4 +607,3 @@ Operations on filters
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -30,11 +30,20 @@
- [HeadResponse](#neo.fs.v2.object.HeadResponse) - [HeadResponse](#neo.fs.v2.object.HeadResponse)
- [HeadResponse.Body](#neo.fs.v2.object.HeadResponse.Body) - [HeadResponse.Body](#neo.fs.v2.object.HeadResponse.Body)
- [HeaderWithSignature](#neo.fs.v2.object.HeaderWithSignature) - [HeaderWithSignature](#neo.fs.v2.object.HeaderWithSignature)
- [PatchRequest](#neo.fs.v2.object.PatchRequest)
- [PatchRequest.Body](#neo.fs.v2.object.PatchRequest.Body)
- [PatchRequest.Body.Patch](#neo.fs.v2.object.PatchRequest.Body.Patch)
- [PatchResponse](#neo.fs.v2.object.PatchResponse)
- [PatchResponse.Body](#neo.fs.v2.object.PatchResponse.Body)
- [PutRequest](#neo.fs.v2.object.PutRequest) - [PutRequest](#neo.fs.v2.object.PutRequest)
- [PutRequest.Body](#neo.fs.v2.object.PutRequest.Body) - [PutRequest.Body](#neo.fs.v2.object.PutRequest.Body)
- [PutRequest.Body.Init](#neo.fs.v2.object.PutRequest.Body.Init) - [PutRequest.Body.Init](#neo.fs.v2.object.PutRequest.Body.Init)
- [PutResponse](#neo.fs.v2.object.PutResponse) - [PutResponse](#neo.fs.v2.object.PutResponse)
- [PutResponse.Body](#neo.fs.v2.object.PutResponse.Body) - [PutResponse.Body](#neo.fs.v2.object.PutResponse.Body)
- [PutSingleRequest](#neo.fs.v2.object.PutSingleRequest)
- [PutSingleRequest.Body](#neo.fs.v2.object.PutSingleRequest.Body)
- [PutSingleResponse](#neo.fs.v2.object.PutSingleResponse)
- [PutSingleResponse.Body](#neo.fs.v2.object.PutSingleResponse.Body)
- [Range](#neo.fs.v2.object.Range) - [Range](#neo.fs.v2.object.Range)
- [SearchRequest](#neo.fs.v2.object.SearchRequest) - [SearchRequest](#neo.fs.v2.object.SearchRequest)
- [SearchRequest.Body](#neo.fs.v2.object.SearchRequest.Body) - [SearchRequest.Body](#neo.fs.v2.object.SearchRequest.Body)
@ -46,8 +55,11 @@
- [object/types.proto](#object/types.proto) - [object/types.proto](#object/types.proto)
- Messages - Messages
- [ECInfo](#neo.fs.v2.object.ECInfo)
- [ECInfo.Chunk](#neo.fs.v2.object.ECInfo.Chunk)
- [Header](#neo.fs.v2.object.Header) - [Header](#neo.fs.v2.object.Header)
- [Header.Attribute](#neo.fs.v2.object.Header.Attribute) - [Header.Attribute](#neo.fs.v2.object.Header.Attribute)
- [Header.EC](#neo.fs.v2.object.Header.EC)
- [Header.Split](#neo.fs.v2.object.Header.Split) - [Header.Split](#neo.fs.v2.object.Header.Split)
- [Object](#neo.fs.v2.object.Object) - [Object](#neo.fs.v2.object.Object)
- [ShortHeader](#neo.fs.v2.object.ShortHeader) - [ShortHeader](#neo.fs.v2.object.ShortHeader)
@ -80,17 +92,19 @@ rpc Head(HeadRequest) returns (HeadResponse);
rpc Search(SearchRequest) returns (stream SearchResponse); rpc Search(SearchRequest) returns (stream SearchResponse);
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse); rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
rpc PutSingle(PutSingleRequest) returns (PutSingleResponse);
rpc Patch(stream PatchRequest) returns (PatchResponse);
``` ```
#### Method Get #### Method Get
Receive full object structure, including Headers and payload. Response uses Receive full object structure, including Headers and payload. Response uses
gRPC stream. First response message carries the object with the requested address. gRPC stream. First response message carries the object with the requested
Chunk messages are parts of the object's payload if it is needed. All address. Chunk messages are parts of the object's payload if it is needed.
messages, except the first one, carry payload chunks. The requested object can All messages, except the first one, carry payload chunks. The requested
be restored by concatenation of object message payload and all chunks object can be restored by concatenation of object message payload and all
keeping the receiving order. chunks keeping the receiving order.
Extended headers can change `Get` behaviour: Extended headers can change `Get` behaviour:
* [ __SYSTEM__NETMAP_EPOCH ] \ * [ __SYSTEM__NETMAP_EPOCH ] \
@ -99,9 +113,10 @@ Extended headers can change `Get` behaviour:
calculation. calculation.
* [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \
(`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \
Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH`
the latest one otherwise) of Network Map to find an object until the depth (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or the latest one
limit is reached. otherwise) of Network Map to find an object until the depth limit is
reached.
Please refer to detailed `XHeader` description. Please refer to detailed `XHeader` description.
@ -117,6 +132,8 @@ Statuses:
the requested object has been marked as deleted; the requested object has been marked as deleted;
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
object container not found; object container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied;
- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
provided session token has expired. provided session token has expired.
@ -147,15 +164,18 @@ Statuses:
- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
write access to the container is denied; write access to the container is denied;
- **LOCKED** (2050, SECTION_OBJECT): \ - **LOCKED** (2050, SECTION_OBJECT): \
placement of an object of type TOMBSTONE that includes at least one locked placement of an object of type TOMBSTONE that includes at least one
object is prohibited; locked object is prohibited;
- **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \ - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
placement of an object of type LOCK that includes at least one object of placement of an object of type LOCK that includes at least one object of
type other than REGULAR is prohibited; type other than REGULAR is prohibited;
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
object storage container not found; object storage container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied;
- **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
(for trusted object preparation) session private key does not exist or has (for trusted object preparation) session private key does not exist or
has
been deleted; been deleted;
- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
provided session token has expired. provided session token has expired.
@ -182,10 +202,15 @@ Statuses:
- Common failures (SECTION_FAILURE_COMMON); - Common failures (SECTION_FAILURE_COMMON);
- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
delete access to the object is denied; delete access to the object is denied;
- **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \
the object could not be deleted because it has not been \
found within the container;
- **LOCKED** (2050, SECTION_OBJECT): \ - **LOCKED** (2050, SECTION_OBJECT): \
deleting a locked object is prohibited; deleting a locked object is prohibited;
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
object container not found; object container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied;
- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
provided session token has expired. provided session token has expired.
@ -218,6 +243,8 @@ Statuses:
the requested object has been marked as deleted; the requested object has been marked as deleted;
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
object container not found; object container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied;
- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
provided session token has expired. provided session token has expired.
@ -227,7 +254,7 @@ Statuses:
#### Method Search #### Method Search
Search objects in container. Search query allows to match by Object Search objects in container. Search query allows to match by Object
Header's filed values. Please see the corresponding NeoFS Technical Header's filed values. Please see the corresponding FrostFS Technical
Specification section for more details. Specification section for more details.
Extended headers can change `Search` behaviour: Extended headers can change `Search` behaviour:
@ -246,6 +273,8 @@ Statuses:
access to operation SEARCH of the object is denied; access to operation SEARCH of the object is denied;
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
search container not found; search container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied;
- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
provided session token has expired. provided session token has expired.
@ -256,8 +285,8 @@ Statuses:
Get byte range of data payload. Range is set as an (offset, length) tuple. Get byte range of data payload. Range is set as an (offset, length) tuple.
Like in `Get` method, the response uses gRPC stream. Requested range can be Like in `Get` method, the response uses gRPC stream. Requested range can be
restored by concatenation of all received payload chunks keeping the receiving restored by concatenation of all received payload chunks keeping the
order. receiving order.
Extended headers can change `GetRange` behaviour: Extended headers can change `GetRange` behaviour:
* [ __SYSTEM__NETMAP_EPOCH ] \ * [ __SYSTEM__NETMAP_EPOCH ] \
@ -285,6 +314,8 @@ Statuses:
the requested range is out of bounds; the requested range is out of bounds;
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
object container not found; object container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied;
- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
provided session token has expired. provided session token has expired.
@ -322,12 +353,107 @@ Statuses:
the requested range is out of bounds; the requested range is out of bounds;
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
object container not found; object container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied;
- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
provided session token has expired. provided session token has expired.
| Name | Input | Output | | Name | Input | Output |
| ---- | ----- | ------ | | ---- | ----- | ------ |
| GetRangeHash | [GetRangeHashRequest](#neo.fs.v2.object.GetRangeHashRequest) | [GetRangeHashResponse](#neo.fs.v2.object.GetRangeHashResponse) | | GetRangeHash | [GetRangeHashRequest](#neo.fs.v2.object.GetRangeHashRequest) | [GetRangeHashResponse](#neo.fs.v2.object.GetRangeHashResponse) |
#### Method PutSingle
Put the prepared object into container.
`ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` and `PayloadLength` of
an object MUST be set.
Extended headers can change `Put` behaviour:
* [ __SYSTEM__NETMAP_EPOCH \
(`__NEOFS__NETMAP_EPOCH` is deprecated) \
Will use the requested version of Network Map for object placement
calculation.
Please refer to detailed `XHeader` description.
Statuses:
- **OK** (0, SECTION_SUCCESS): \
object has been successfully saved in the container;
- Common failures (SECTION_FAILURE_COMMON);
- **ACCESS_DENIED** (2048, SECTION_OBJECT): \
write access to the container is denied;
- **LOCKED** (2050, SECTION_OBJECT): \
placement of an object of type TOMBSTONE that includes at least one
locked object is prohibited;
- **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
placement of an object of type LOCK that includes at least one object of
type other than REGULAR is prohibited;
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
object storage container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied;
- **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
(for trusted object preparation) session private key does not exist or
has
been deleted;
- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
provided session token has expired.
| Name | Input | Output |
| ---- | ----- | ------ |
| PutSingle | [PutSingleRequest](#neo.fs.v2.object.PutSingleRequest) | [PutSingleResponse](#neo.fs.v2.object.PutSingleResponse) |
#### Method Patch
Patch the object. Request uses gRPC stream. First message must set
the address of the object that is going to get patched. If the object's
attributes are patched, then these attrubutes must be set only within the
first stream message.
If the patch request is performed by NOT the object's owner but if the
actor has the permission to perform the patch, then `OwnerID` of the object
is changed. In this case the object's owner loses the object's ownership
after the patch request is successfully done.
As objects are content-addressable the patching causes new object ID
generation for the patched object. This object id is set witihn
`PatchResponse`. But the object id may remain unchanged in such cases:
1. The chunk of the applying patch contains the same value as the object's
payload within the same range;
2. The patch that reverts the changes applied by preceding patch;
3. The application of the same patches for the object a few times.
Extended headers can change `Patch` behaviour:
* [ __SYSTEM__NETMAP_EPOCH \
(`__NEOFS__NETMAP_EPOCH` is deprecated) \
Will use the requsted version of Network Map for object placement
calculation.
Please refer to detailed `XHeader` description.
Statuses:
- **OK** (0, SECTION_SUCCESS): \
object has been successfully patched and saved in the container;
- Common failures (SECTION_FAILURE_COMMON);
- **ACCESS_DENIED** (2048, SECTION_OBJECT): \
write access to the container is denied;
- **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \
object not found in container;
- **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): \
the requested object has been marked as deleted.
- **OUT_OF_RANGE** (2053, SECTION_OBJECT): \
the requested range is out of bounds;
- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
object storage container not found;
- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
access to container is denied;
- **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
(for trusted object preparation) session private key does not exist or
has been deleted;
- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
provided session token has expired.
| Name | Input | Output |
| ---- | ----- | ------ |
| Patch | [PatchRequest](#neo.fs.v2.object.PatchRequest) | [PatchResponse](#neo.fs.v2.object.PatchResponse) |
<!-- end services --> <!-- end services -->
@ -484,6 +610,7 @@ chunks.
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| chunk | [bytes](#bytes) | | Chunked object payload's range. | | chunk | [bytes](#bytes) | | Chunked object payload's range. |
| split_info | [SplitInfo](#neo.fs.v2.object.SplitInfo) | | Meta information of split hierarchy. | | split_info | [SplitInfo](#neo.fs.v2.object.SplitInfo) | | Meta information of split hierarchy. |
| ec_info | [ECInfo](#neo.fs.v2.object.ECInfo) | | Meta information for EC object assembly. |
<a name="neo.fs.v2.object.GetRequest"></a> <a name="neo.fs.v2.object.GetRequest"></a>
@ -535,6 +662,7 @@ GET Object Response body
| init | [GetResponse.Body.Init](#neo.fs.v2.object.GetResponse.Body.Init) | | Initial part of the object stream | | init | [GetResponse.Body.Init](#neo.fs.v2.object.GetResponse.Body.Init) | | Initial part of the object stream |
| chunk | [bytes](#bytes) | | Chunked object payload | | chunk | [bytes](#bytes) | | Chunked object payload |
| split_info | [SplitInfo](#neo.fs.v2.object.SplitInfo) | | Meta information of split hierarchy for object assembly. | | split_info | [SplitInfo](#neo.fs.v2.object.SplitInfo) | | Meta information of split hierarchy for object assembly. |
| ec_info | [ECInfo](#neo.fs.v2.object.ECInfo) | | Meta information for EC object assembly. |
<a name="neo.fs.v2.object.GetResponse.Body.Init"></a> <a name="neo.fs.v2.object.GetResponse.Body.Init"></a>
@ -601,6 +729,7 @@ Object HEAD response body
| header | [HeaderWithSignature](#neo.fs.v2.object.HeaderWithSignature) | | Full object's `Header` with `ObjectID` signature | | header | [HeaderWithSignature](#neo.fs.v2.object.HeaderWithSignature) | | Full object's `Header` with `ObjectID` signature |
| short_header | [ShortHeader](#neo.fs.v2.object.ShortHeader) | | Short object header | | short_header | [ShortHeader](#neo.fs.v2.object.ShortHeader) | | Short object header |
| split_info | [SplitInfo](#neo.fs.v2.object.SplitInfo) | | Meta information of split hierarchy. | | split_info | [SplitInfo](#neo.fs.v2.object.SplitInfo) | | Meta information of split hierarchy. |
| ec_info | [ECInfo](#neo.fs.v2.object.ECInfo) | | Meta information for EC object assembly. |
<a name="neo.fs.v2.object.HeaderWithSignature"></a> <a name="neo.fs.v2.object.HeaderWithSignature"></a>
@ -621,6 +750,71 @@ following steps:
| signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signed `ObjectID` to verify full header's authenticity | | signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signed `ObjectID` to verify full header's authenticity |
<a name="neo.fs.v2.object.PatchRequest"></a>
### Message PatchRequest
Object PATCH request
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [PatchRequest.Body](#neo.fs.v2.object.PatchRequest.Body) | | Body for patch 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.object.PatchRequest.Body"></a>
### Message PatchRequest.Body
PATCH request body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| address | [neo.fs.v2.refs.Address](#neo.fs.v2.refs.Address) | | The address of the object that is requested to get patched. |
| new_attributes | [Header.Attribute](#neo.fs.v2.object.Header.Attribute) | repeated | New attributes for the object. See `replace_attributes` flag usage to define how new attributes should be set. |
| replace_attributes | [bool](#bool) | | If this flag is set, then the object's attributes will be entirely replaced by `new_attributes` list. The empty `new_attributes` list with `replace_attributes = true` just resets attributes list for the object.
Default `false` value for this flag means the attributes will be just merged. If the incoming `new_attributes` list contains already existing key, then it just replaces it while merging the lists. |
| patch | [PatchRequest.Body.Patch](#neo.fs.v2.object.PatchRequest.Body.Patch) | | The patch that is applied for the object. |
<a name="neo.fs.v2.object.PatchRequest.Body.Patch"></a>
### Message PatchRequest.Body.Patch
The patch for the object's payload.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| source_range | [Range](#neo.fs.v2.object.Range) | | The range of the source object for which the payload is replaced by the patch's chunk. If the range's `length = 0`, then the patch's chunk is just appended to the original payload starting from the `offest` without any replace. |
| chunk | [bytes](#bytes) | | The chunk that is being appended to or that replaces the original payload on the given range. |
<a name="neo.fs.v2.object.PatchResponse"></a>
### Message PatchResponse
Object PATCH response
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [PatchResponse.Body](#neo.fs.v2.object.PatchResponse.Body) | | Body for patch 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.object.PatchResponse.Body"></a>
### Message PatchResponse.Body
PATCH response body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| object_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | The object ID of the saved patched object. |
<a name="neo.fs.v2.object.PutRequest"></a> <a name="neo.fs.v2.object.PutRequest"></a>
### Message PutRequest ### Message PutRequest
@ -685,6 +879,51 @@ PUT Object response body
| object_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | Identifier of the saved object | | object_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | Identifier of the saved object |
<a name="neo.fs.v2.object.PutSingleRequest"></a>
### Message PutSingleRequest
Object PUT Single request
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [PutSingleRequest.Body](#neo.fs.v2.object.PutSingleRequest.Body) | | Body of put single object 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.object.PutSingleRequest.Body"></a>
### Message PutSingleRequest.Body
PUT Single request body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| object | [Object](#neo.fs.v2.object.Object) | | Prepared object with payload. |
| copies_number | [uint32](#uint32) | repeated | Number of copies of the object to store within the RPC call. By default, object is processed according to the container's placement policy. Every number is treated as a minimal number of nodes in a corresponding placement vector that must store an object to complete the request successfully. The length MUST equal the placement vectors number, otherwise request is considered malformed. |
<a name="neo.fs.v2.object.PutSingleResponse"></a>
### Message PutSingleResponse
Object PUT Single response
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body | [PutSingleResponse.Body](#neo.fs.v2.object.PutSingleResponse.Body) | | Body of put single object 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.object.PutSingleResponse.Body"></a>
### Message PutSingleResponse.Body
PUT Single Object response body
<a name="neo.fs.v2.object.Range"></a> <a name="neo.fs.v2.object.Range"></a>
### Message Range ### Message Range
@ -726,11 +965,11 @@ Object Search request body
<a name="neo.fs.v2.object.SearchRequest.Body.Filter"></a> <a name="neo.fs.v2.object.SearchRequest.Body.Filter"></a>
### Message SearchRequest.Body.Filter ### Message SearchRequest.Body.Filter
Filter structure checks if the object header field or the attribute content Filter structure checks if the object header field or the attribute
matches a value. content matches a value.
If no filters are set, search request will return all objects of the If no filters are set, search request will return all objects of the
container, including Regular object, Tombstones and Storage Group container, including Regular object and Tombstone
objects. Most human users expect to get only object they can directly objects. Most human users expect to get only object they can directly
work with. In that case, `$Object:ROOT` filter should be used. work with. In that case, `$Object:ROOT` filter should be used.
@ -760,16 +999,19 @@ prefix to the name. Here is the list of fields available via this prefix:
object_id of parent object_id of parent
* $Object:split.splitID \ * $Object:split.splitID \
16 byte UUIDv4 used to identify the split object hierarchy parts 16 byte UUIDv4 used to identify the split object hierarchy parts
* $Object:ec.parent \
If the object is stored according to EC policy, then ec_parent
attribute is set to return an id list of all related EC chunks.
There are some well-known filter aliases to match objects by certain There are some well-known filter aliases to match objects by certain
properties: properties:
* $Object:ROOT \ * $Object:ROOT \
Returns only `REGULAR` type objects that are not split or that are the top Returns only `REGULAR` type objects that are not split or that are the
level root objects in a split hierarchy. This includes objects not top level root objects in a split hierarchy. This includes objects not
present physically, like large objects split into smaller objects present physically, like large objects split into smaller objects
without a separate top-level root object. Objects of other types like without a separate top-level root object. Objects of other types like
StorageGroups and Tombstones will not be shown. This filter may be Locks and Tombstones will not be shown. This filter may be
useful for listing objects like `ls` command of some virtual file useful for listing objects like `ls` command of some virtual file
system. This filter is activated if the `key` exists, disregarding the system. This filter is activated if the `key` exists, disregarding the
value and matcher type. value and matcher type.
@ -778,8 +1020,8 @@ properties:
activated if the `key` exists, disregarding the value and matcher type. activated if the `key` exists, disregarding the value and matcher type.
Note: using filters with a key with prefix `$Object:` and match type Note: using filters with a key with prefix `$Object:` and match type
`NOT_PRESENT `is not recommended since this is not a cross-version approach. `NOT_PRESENT `is not recommended since this is not a cross-version
Behavior when processing this kind of filters is undefined. approach. Behavior when processing this kind of filters is undefined.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -827,6 +1069,30 @@ Object Search response body
<!-- end services --> <!-- end services -->
<a name="neo.fs.v2.object.ECInfo"></a>
### Message ECInfo
Meta information for the erasure-encoded object.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| chunks | [ECInfo.Chunk](#neo.fs.v2.object.ECInfo.Chunk) | repeated | Chunk stored on the node. |
<a name="neo.fs.v2.object.ECInfo.Chunk"></a>
### Message ECInfo.Chunk
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | Object ID of the chunk. |
| index | [uint32](#uint32) | | Index of the chunk. |
| total | [uint32](#uint32) | | Total number of chunks in this split. |
<a name="neo.fs.v2.object.Header"></a> <a name="neo.fs.v2.object.Header"></a>
### Message Header ### Message Header
@ -846,6 +1112,7 @@ Object Header
| session_token | [neo.fs.v2.session.SessionToken](#neo.fs.v2.session.SessionToken) | | Session token, if it was used during Object creation. Need it to verify integrity and authenticity out of Request scope. | | session_token | [neo.fs.v2.session.SessionToken](#neo.fs.v2.session.SessionToken) | | Session token, if it was used during Object creation. Need it to verify integrity and authenticity out of Request scope. |
| attributes | [Header.Attribute](#neo.fs.v2.object.Header.Attribute) | repeated | User-defined object attributes | | attributes | [Header.Attribute](#neo.fs.v2.object.Header.Attribute) | repeated | User-defined object attributes |
| split | [Header.Split](#neo.fs.v2.object.Header.Split) | | Position of the object in the split hierarchy | | split | [Header.Split](#neo.fs.v2.object.Header.Split) | | Position of the object in the split hierarchy |
| ec | [Header.EC](#neo.fs.v2.object.Header.EC) | | Erasure code chunk information. |
<a name="neo.fs.v2.object.Header.Attribute"></a> <a name="neo.fs.v2.object.Header.Attribute"></a>
@ -858,15 +1125,16 @@ Key name must be an object-unique valid UTF-8 string. Value can't be empty.
Objects with duplicated attribute names or attributes with empty values Objects with duplicated attribute names or attributes with empty values
will be considered invalid. will be considered invalid.
There are some "well-known" attributes starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix There are some "well-known" attributes starting with `__SYSTEM__`
that affect system behaviour: (`__NEOFS__` is deprecated) prefix that affect system behaviour:
* [ __SYSTEM__UPLOAD_ID ] \ * [ __SYSTEM__UPLOAD_ID ] \
(`__NEOFS__UPLOAD_ID` is deprecated) \ (`__NEOFS__UPLOAD_ID` is deprecated) \
Marks smaller parts of a split bigger object Marks smaller parts of a split bigger object
* [ __SYSTEM__EXPIRATION_EPOCH ] \ * [ __SYSTEM__EXPIRATION_EPOCH ] \
(`__NEOFS__EXPIRATION_EPOCH` is deprecated) \ (`__NEOFS__EXPIRATION_EPOCH` is deprecated) \
Tells GC to delete object after that epoch The epoch after which object with no LOCKs on it becomes unavailable.
Locked object continues to be available until each of the LOCKs expire.
* [ __SYSTEM__TICK_EPOCH ] \ * [ __SYSTEM__TICK_EPOCH ] \
(`__NEOFS__TICK_EPOCH` is deprecated) \ (`__NEOFS__TICK_EPOCH` is deprecated) \
Decimal number that defines what epoch must produce Decimal number that defines what epoch must produce
@ -896,7 +1164,7 @@ And some well-known attributes used by applications only:
MIME Content Type of object's payload MIME Content Type of object's payload
For detailed description of each well-known attribute please see the For detailed description of each well-known attribute please see the
corresponding section in NeoFS Technical Specification. corresponding section in FrostFS Technical Specification.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -905,6 +1173,26 @@ corresponding section in NeoFS Technical Specification.
| value | [string](#string) | | string value of the object attribute | | value | [string](#string) | | string value of the object attribute |
<a name="neo.fs.v2.object.Header.EC"></a>
### Message Header.EC
Erasure code can be applied to any object.
Information about encoded object structure is stored in `EC` header.
All objects belonging to a single EC group have the same `parent` field.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| parent | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | Identifier of the origin object. Known to all chunks. |
| index | [uint32](#uint32) | | Index of this chunk. |
| total | [uint32](#uint32) | | Total number of chunks in this split. |
| header_length | [uint32](#uint32) | | Total length of a parent header. Used to trim padding zeroes. |
| header | [bytes](#bytes) | | Chunk of a parent header. |
| parent_split_id | [bytes](#bytes) | | As the origin object is EC-splitted its identifier is known to all chunks as parent. But parent itself can be a part of Split (does not relate to EC-split). In this case parent_split_id should be set. |
| parent_split_parent_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | EC-parent's parent ID. parent_split_parent_id is set if EC-parent, itself, is a part of Split and if an object ID of its parent is presented. The field allows to determine how EC-chunk is placed in Split hierarchy. |
| parent_attributes | [Header.Attribute](#neo.fs.v2.object.Header.Attribute) | repeated | EC parent's attributes. |
<a name="neo.fs.v2.object.Header.Split"></a> <a name="neo.fs.v2.object.Header.Split"></a>
### Message Header.Split ### Message Header.Split
@ -928,8 +1216,8 @@ must be within the same container.
### Message Object ### Message Object
Object structure. Object is immutable and content-addressed. It means Object structure. Object is immutable and content-addressed. It means
`ObjectID` will change if the header or the payload changes. It's calculated as a `ObjectID` will change if the header or the payload changes. It's calculated
hash of header field which contains hash of the object's payload. as a hash of header field which contains hash of the object's payload.
For non-regular object types payload format depends on object type specified For non-regular object types payload format depends on object type specified
in the header. in the header.
@ -965,8 +1253,8 @@ Short header fields
### Message SplitInfo ### Message SplitInfo
Meta information of split hierarchy for object assembly. With the last part Meta information of split hierarchy for object assembly. With the last part
one can traverse linked list of split hierarchy back to the first part and one can traverse linked list of split hierarchy back to the first part and
assemble the original object. With a linking object one can assemble an object assemble the original object. With a linking object one can assemble an
right from the object parts. object right from the object parts.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -997,20 +1285,18 @@ Type of match expression
### ObjectType ### ObjectType
Type of the object payload content. Only `REGULAR` type objects can be split, Type of the object payload content. Only `REGULAR` type objects can be split,
hence `TOMBSTONE`, `STORAGE_GROUP` and `LOCK` payload is limited by the maximum hence `TOMBSTONE` and `LOCK` payload is limited by the
object size. maximum object size.
String presentation of object type is the same as definition: String presentation of object type is the same as definition:
* REGULAR * REGULAR
* TOMBSTONE * TOMBSTONE
* STORAGE_GROUP
* LOCK * LOCK
| Name | Number | Description | | Name | Number | Description |
| ---- | ------ | ----------- | | ---- | ------ | ----------- |
| REGULAR | 0 | Just a normal object | | REGULAR | 0 | Just a normal object |
| TOMBSTONE | 1 | Used internally to identify deleted objects | | TOMBSTONE | 1 | Used internally to identify deleted objects |
| STORAGE_GROUP | 2 | StorageGroup information |
| LOCK | 3 | Object lock | | LOCK | 3 | Object lock |
@ -1037,4 +1323,3 @@ String presentation of object type is the same as definition:
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -3,19 +3,19 @@
## Table of Contents ## Table of Contents
- [Protocol Documentation](#protocol-documentation) - [refs/types.proto](#refs/types.proto)
- [Table of Contents](#table-of-contents)
- [refs/types.proto](#refstypesproto) - Messages
- [Message Address](#message-address) - [Address](#neo.fs.v2.refs.Address)
- [Message Checksum](#message-checksum) - [Checksum](#neo.fs.v2.refs.Checksum)
- [Message ContainerID](#message-containerid) - [ContainerID](#neo.fs.v2.refs.ContainerID)
- [Message ObjectID](#message-objectid) - [ObjectID](#neo.fs.v2.refs.ObjectID)
- [Message OwnerID](#message-ownerid) - [OwnerID](#neo.fs.v2.refs.OwnerID)
- [Message Signature](#message-signature) - [Signature](#neo.fs.v2.refs.Signature)
- [Message SignatureRFC6979](#message-signaturerfc6979) - [SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979)
- [Message Version](#message-version) - [Version](#neo.fs.v2.refs.Version)
- [ChecksumType](#checksumtype)
- [SignatureScheme](#signaturescheme)
- [Scalar Value Types](#scalar-value-types) - [Scalar Value Types](#scalar-value-types)
@ -32,7 +32,7 @@
<a name="neo.fs.v2.refs.Address"></a> <a name="neo.fs.v2.refs.Address"></a>
### Message Address ### Message Address
Objects in NeoFS are addressed by their ContainerID and ObjectID. Objects in FrostFS are addressed by their ContainerID and ObjectID.
String presentation of `Address` is a concatenation of string encoded String presentation of `Address` is a concatenation of string encoded
`ContainerID` and `ObjectID` delimited by '/' character. `ContainerID` and `ObjectID` delimited by '/' character.
@ -65,7 +65,7 @@ Depending on checksum algorithm type, the string presentation may vary:
<a name="neo.fs.v2.refs.ContainerID"></a> <a name="neo.fs.v2.refs.ContainerID"></a>
### Message ContainerID ### Message ContainerID
NeoFS container identifier. Container structures are immutable and FrostFS container identifier. Container structures are immutable and
content-addressed. content-addressed.
`ContainerID` is a 32 byte long `ContainerID` is a 32 byte long
@ -90,13 +90,14 @@ with/without paddings are accepted.
<a name="neo.fs.v2.refs.ObjectID"></a> <a name="neo.fs.v2.refs.ObjectID"></a>
### Message ObjectID ### Message ObjectID
NeoFS Object unique identifier. Objects are immutable and content-addressed. FrostFS Object unique identifier. Objects are immutable and
It means `ObjectID` will change if the `header` or the `payload` changes. content-addressed. It means `ObjectID` will change if the `header` or the
`payload` changes.
`ObjectID` is a 32 byte long `ObjectID` is a 32 byte long
[SHA256](https://csrc.nist.gov/publications/detail/fips/180/4/final) hash of [SHA256](https://csrc.nist.gov/publications/detail/fips/180/4/final) hash of
the object's `header` field, which, in it's turn, contains the hash of the object's the object's `header` field, which, in it's turn, contains the hash of the
payload. object's payload.
String presentation is a String presentation is a
[base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string. [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string.
@ -141,7 +142,7 @@ with/without paddings are accepted.
<a name="neo.fs.v2.refs.Signature"></a> <a name="neo.fs.v2.refs.Signature"></a>
### Message Signature ### Message Signature
Signature of something in NeoFS. Signature of something in FrostFS.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -169,7 +170,8 @@ RFC 6979 signature.
API version used by a node. API version used by a node.
String presentation is a Semantic Versioning 2.0.0 compatible version string String presentation is a Semantic Versioning 2.0.0 compatible version string
with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor number. with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor
number.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -196,7 +198,8 @@ Checksum algorithm type.
<a name="neo.fs.v2.refs.SignatureScheme"></a> <a name="neo.fs.v2.refs.SignatureScheme"></a>
### SignatureScheme ### SignatureScheme
Signature scheme describes digital signing scheme used for (key, signature) pair. Signature scheme describes digital signing scheme used for (key, signature)
pair.
| Name | Number | Description | | Name | Number | Description |
| ---- | ------ | ----------- | | ---- | ------ | ----------- |
@ -228,4 +231,3 @@ Signature scheme describes digital signing scheme used for (key, signature) pair
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -1,125 +0,0 @@
# Protocol Documentation
<a name="top"></a>
## Table of Contents
- [service/types.proto](#service/types.proto)
- Messages
- [RequestMetaHeader](#neo.fs.v2.service.RequestMetaHeader)
- [RequestVerificationHeader](#neo.fs.v2.service.RequestVerificationHeader)
- [ResponseMetaHeader](#neo.fs.v2.service.ResponseMetaHeader)
- [ResponseVerificationHeader](#neo.fs.v2.service.ResponseVerificationHeader)
- [XHeader](#neo.fs.v2.service.XHeader)
- [Scalar Value Types](#scalar-value-types)
<a name="service/types.proto"></a>
<p align="right"><a href="#top">Top</a></p>
## service/types.proto
<!-- end services -->
<a name="neo.fs.v2.service.RequestMetaHeader"></a>
### Message RequestMetaHeader
Information about the request
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Client API version. |
| epoch | [uint64](#uint64) | | Client local epoch number. Set to 0 if unknown. |
| ttl | [uint32](#uint32) | | Maximum number of nodes in the request route. |
| x_headers | [XHeader](#neo.fs.v2.service.XHeader) | repeated | Request X-Headers. |
| session_token | [neo.fs.v2.session.SessionToken](#neo.fs.v2.session.SessionToken) | | Token is a token of the session within which the request is sent |
| bearer_token | [neo.fs.v2.acl.BearerToken](#neo.fs.v2.acl.BearerToken) | | Bearer is a Bearer token of the request |
| origin | [RequestMetaHeader](#neo.fs.v2.service.RequestMetaHeader) | | RequestMetaHeader of the origin request. |
<a name="neo.fs.v2.service.RequestVerificationHeader"></a>
### Message RequestVerificationHeader
Verification info for request signed by all intermediate nodes
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Request Body signature. Should be generated once by request initiator. |
| meta_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Request Meta signature is added and signed by any intermediate node |
| origin_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Sign previous hops |
| origin | [RequestVerificationHeader](#neo.fs.v2.service.RequestVerificationHeader) | | Chain of previous hops signatures |
<a name="neo.fs.v2.service.ResponseMetaHeader"></a>
### Message ResponseMetaHeader
Information about the response
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Server API version. |
| epoch | [uint64](#uint64) | | Server local epoch number. |
| ttl | [uint32](#uint32) | | Maximum number of nodes in the response route. |
| x_headers | [XHeader](#neo.fs.v2.service.XHeader) | repeated | Response X-Headers. |
| origin | [ResponseMetaHeader](#neo.fs.v2.service.ResponseMetaHeader) | | Carries response meta header of the origin response. |
<a name="neo.fs.v2.service.ResponseVerificationHeader"></a>
### Message ResponseVerificationHeader
Verification info for response signed by all intermediate nodes
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| body_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Response Body signature. Should be generated once by answering node. |
| meta_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Response Meta signature is added and signed by any intermediate node |
| origin_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Sign previous hops |
| origin | [ResponseVerificationHeader](#neo.fs.v2.service.ResponseVerificationHeader) | | Chain of previous hops signatures |
<a name="neo.fs.v2.service.XHeader"></a>
### Message XHeader
Extended headers for Request/Response
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | Key of the X-Header. |
| value | [string](#string) | | Value of the X-Header. |
<!-- 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 |

View file

@ -48,7 +48,7 @@
`SessionService` allows to establish a temporary trust relationship between `SessionService` allows to establish a temporary trust relationship between
two peer nodes and generate a `SessionToken` as the proof of trust to be two peer nodes and generate a `SessionToken` as the proof of trust to be
attached in requests for further verification. Please see corresponding attached in requests for further verification. Please see corresponding
section of NeoFS Technical Specification for details. section of FrostFS Technical Specification for details.
``` ```
rpc Create(CreateRequest) returns (CreateResponse); rpc Create(CreateRequest) returns (CreateResponse);
@ -168,7 +168,7 @@ Carries objects involved in the object session.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| container | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Indicates which container the session is spread to. Field MUST be set and correct. | | container | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Indicates which container the session is spread to. Field MUST be set and correct. |
| objects | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | Indicates which objects the session is spread to. Objects are expected to be stored in the NeoFS container referenced by `container` field. Each element MUST have correct format. | | objects | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | Indicates which objects the session is spread to. Objects are expected to be stored in the FrostFS container referenced by `container` field. Each element MUST have correct format. |
<a name="neo.fs.v2.session.RequestMetaHeader"></a> <a name="neo.fs.v2.session.RequestMetaHeader"></a>
@ -187,7 +187,7 @@ request meta headers are folded in matryoshka style.
| session_token | [SessionToken](#neo.fs.v2.session.SessionToken) | | Session token within which the request is sent | | session_token | [SessionToken](#neo.fs.v2.session.SessionToken) | | Session token within which the request is sent |
| bearer_token | [neo.fs.v2.acl.BearerToken](#neo.fs.v2.acl.BearerToken) | | `BearerToken` with eACL overrides for the request | | bearer_token | [neo.fs.v2.acl.BearerToken](#neo.fs.v2.acl.BearerToken) | | `BearerToken` with eACL overrides for the request |
| origin | [RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) | | `RequestMetaHeader` of the origin request | | origin | [RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) | | `RequestMetaHeader` of the origin request |
| magic_number | [uint64](#uint64) | | NeoFS network magic. Must match the value for the network that the server belongs to. | | magic_number | [uint64](#uint64) | | FrostFS network magic. Must match the value for the network that the server belongs to. |
<a name="neo.fs.v2.session.RequestVerificationHeader"></a> <a name="neo.fs.v2.session.RequestVerificationHeader"></a>
@ -237,12 +237,12 @@ Verification info for the response signed by all intermediate nodes
<a name="neo.fs.v2.session.SessionToken"></a> <a name="neo.fs.v2.session.SessionToken"></a>
### Message SessionToken ### Message SessionToken
NeoFS Session Token. FrostFS Session Token.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| body | [SessionToken.Body](#neo.fs.v2.session.SessionToken.Body) | | Session Token contains the proof of trust between peers to be attached in requests for further verification. Please see corresponding section of NeoFS Technical Specification for details. | | body | [SessionToken.Body](#neo.fs.v2.session.SessionToken.Body) | | Session Token contains the proof of trust between peers to be attached in requests for further verification. Please see corresponding section of FrostFS Technical Specification for details. |
| signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of `SessionToken` information | | signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of `SessionToken` information |
@ -278,15 +278,15 @@ Lifetime parameters of the token. Field names taken from rfc7519.
<a name="neo.fs.v2.session.XHeader"></a> <a name="neo.fs.v2.session.XHeader"></a>
### Message XHeader ### Message XHeader
Extended headers for Request/Response. They may contain any user-defined headers Extended headers for Request/Response. They may contain any user-defined
to be interpreted on application level. headers to be interpreted on application level.
Key name must be a unique valid UTF-8 string. Value can't be empty. Requests or Key name must be a unique valid UTF-8 string. Value can't be empty. Requests
Responses with duplicated header names or headers with empty values will be or Responses with duplicated header names or headers with empty values will
considered invalid. be considered invalid.
There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix that There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__`
affect system behaviour: is deprecated) prefix that affect system behaviour:
* [ __SYSTEM__NETMAP_EPOCH ] \ * [ __SYSTEM__NETMAP_EPOCH ] \
(`__NEOFS__NETMAP_EPOCH` is deprecated) \ (`__NEOFS__NETMAP_EPOCH` is deprecated) \
@ -297,8 +297,8 @@ affect system behaviour:
(`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \
If object can't be found using current epoch's netmap, this header limits If object can't be found using current epoch's netmap, this header limits
how many past epochs the node can look up through. The `value` is string how many past epochs the node can look up through. The `value` is string
encoded `uint64` in decimal presentation. If set to '0' or not set, only the encoded `uint64` in decimal presentation. If set to '0' or not set, only
current epoch will be used. the current epoch will be used.
| Field | Type | Label | Description | | Field | Type | Label | Description |
@ -338,6 +338,7 @@ Object request verbs
| DELETE | 5 | Refers to object.Delete RPC call | | DELETE | 5 | Refers to object.Delete RPC call |
| RANGE | 6 | Refers to object.GetRange RPC call | | RANGE | 6 | Refers to object.GetRange RPC call |
| RANGEHASH | 7 | Refers to object.GetRangeHash RPC call | | RANGEHASH | 7 | Refers to object.GetRangeHash RPC call |
| PATCH | 8 | Refers to object.Patch RPC call |
<!-- end enums --> <!-- end enums -->
@ -363,4 +364,3 @@ Object request verbs
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -26,12 +26,12 @@
<a name="neo.fs.v2.status.Status"></a> <a name="neo.fs.v2.status.Status"></a>
### Message Status ### Message Status
Declares the general format of the status returns of the NeoFS RPC protocol. Declares the general format of the status returns of the FrostFS RPC
Status is present in all response messages. Each RPC of NeoFS protocol protocol. Status is present in all response messages. Each RPC of FrostFS
describes the possible outcomes and details of the operation. protocol describes the possible outcomes and details of the operation.
Each status is assigned a one-to-one numeric code. Any unique result of an Each status is assigned a one-to-one numeric code. Any unique result of an
operation in NeoFS is unambiguously associated with the code value. operation in FrostFS is unambiguously associated with the code value.
Numerical set of codes is split into 1024-element sections. An enumeration Numerical set of codes is split into 1024-element sections. An enumeration
is defined for each section. Values can be referred to in the following ways: is defined for each section. Values can be referred to in the following ways:
@ -79,6 +79,17 @@ covered by the code.
<!-- end messages --> <!-- end messages -->
<a name="neo.fs.v2.status.APEManager"></a>
### APEManager
Section of status for APE manager related operations.
| Name | Number | Description |
| ---- | ------ | ----------- |
| APE_MANAGER_ACCESS_DENIED | 0 | [**5120**] The operation is denied by APE manager. |
<a name="neo.fs.v2.status.CommonFail"></a> <a name="neo.fs.v2.status.CommonFail"></a>
### CommonFail ### CommonFail
@ -87,9 +98,10 @@ Section of failed statuses independent of the operation.
| Name | Number | Description | | Name | Number | Description |
| ---- | ------ | ----------- | | ---- | ------ | ----------- |
| INTERNAL | 0 | [**1024**] Internal server error, default failure. Not detailed. If the server cannot match failed outcome to the code, it should use this code. | | INTERNAL | 0 | [**1024**] Internal server error, default failure. Not detailed. If the server cannot match failed outcome to the code, it should use this code. |
| WRONG_MAGIC_NUMBER | 1 | [**1025**] Wrong magic of the NeoFS network. Details: - [**0**] Magic number of the served NeoFS network (big-endian 64-bit unsigned integer). | | WRONG_MAGIC_NUMBER | 1 | [**1025**] Wrong magic of the FrostFS network. Details: - [**0**] Magic number of the served FrostFS network (big-endian 64-bit unsigned integer). |
| SIGNATURE_VERIFICATION_FAIL | 2 | [**1026**] Signature verification failure. | | SIGNATURE_VERIFICATION_FAIL | 2 | [**1026**] Signature verification failure. |
| NODE_UNDER_MAINTENANCE | 3 | [**1027**] Node is under maintenance. | | NODE_UNDER_MAINTENANCE | 3 | [**1027**] Node is under maintenance. |
| INVALID_ARGUMENT | 4 | [**1028**] Invalid argument error. If the server fails on validation of a request parameter as the client sent it incorrectly, then this code should be used. |
@ -102,6 +114,7 @@ Section of statuses for container-related operations.
| ---- | ------ | ----------- | | ---- | ------ | ----------- |
| CONTAINER_NOT_FOUND | 0 | [**3072**] Container not found. | | CONTAINER_NOT_FOUND | 0 | [**3072**] Container not found. |
| EACL_NOT_FOUND | 1 | [**3073**] eACL table not found. | | EACL_NOT_FOUND | 1 | [**3073**] eACL table not found. |
| CONTAINER_ACCESS_DENIED | 2 | [**3074**] Container access denied. |
@ -133,6 +146,7 @@ Section identifiers.
| SECTION_OBJECT | 2 | Object service-specific errors. | | SECTION_OBJECT | 2 | Object service-specific errors. |
| SECTION_CONTAINER | 3 | Container service-specific errors. | | SECTION_CONTAINER | 3 | Container service-specific errors. |
| SECTION_SESSION | 4 | Session service-specific errors. | | SECTION_SESSION | 4 | Session service-specific errors. |
| SECTION_APE_MANAGER | 5 | Session service-specific errors. |
@ -151,7 +165,7 @@ Section of statuses for session-related operations.
<a name="neo.fs.v2.status.Success"></a> <a name="neo.fs.v2.status.Success"></a>
### Success ### Success
Section of NeoFS successful return codes. Section of FrostFS successful return codes.
| Name | Number | Description | | Name | Number | Description |
| ---- | ------ | ----------- | | ---- | ------ | ----------- |
@ -181,4 +195,3 @@ Section of NeoFS successful return codes.
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -1,71 +0,0 @@
# Protocol Documentation
<a name="top"></a>
## Table of Contents
- [storagegroup/types.proto](#storagegroup/types.proto)
- Messages
- [StorageGroup](#neo.fs.v2.storagegroup.StorageGroup)
- [Scalar Value Types](#scalar-value-types)
<a name="storagegroup/types.proto"></a>
<p align="right"><a href="#top">Top</a></p>
## storagegroup/types.proto
<!-- end services -->
<a name="neo.fs.v2.storagegroup.StorageGroup"></a>
### Message StorageGroup
StorageGroup keeps verification information for Data Audit sessions. Objects
that require paid storage guarantees are gathered in `StorageGroups` with
additional information used for the proof of storage. `StorageGroup` only
contains objects from the same container.
Being an object payload, StorageGroup may have expiration Epoch set with
`__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) well-known attribute. When expired, StorageGroup
will be ignored by InnerRing nodes during Data Audit cycles and will be
deleted by Storage Nodes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| validation_data_size | [uint64](#uint64) | | Total size of the payloads of objects in the storage group |
| validation_hash | [neo.fs.v2.refs.Checksum](#neo.fs.v2.refs.Checksum) | | Homomorphic hash from the concatenation of the payloads of the storage group members. The order of concatenation is the same as the order of the members in the `members` field. |
| expiration_epoch | [uint64](#uint64) | | DEPRECATED. Last NeoFS epoch number of the storage group lifetime |
| members | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | Strictly ordered list of storage group member objects. Members MUST be unique |
<!-- 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 |

View file

@ -26,12 +26,12 @@
### Message Tombstone ### Message Tombstone
Tombstone keeps record of deleted objects for a few epochs until they are Tombstone keeps record of deleted objects for a few epochs until they are
purged from the NeoFS network. purged from the FrostFS network.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| expiration_epoch | [uint64](#uint64) | | Last NeoFS epoch number of the tombstone lifetime. It's set by the tombstone creator depending on the current NeoFS network settings. A tombstone object must have the same expiration epoch value in `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) attribute. Otherwise, the tombstone will be rejected by a storage node. | | expiration_epoch | [uint64](#uint64) | | Last FrostFS epoch number of the tombstone lifetime. It's set by the tombstone creator depending on the current FrostFS network settings. A tombstone object must have the same expiration epoch value in `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) attribute. Otherwise, the tombstone will be rejected by a storage node. |
| split_id | [bytes](#bytes) | | 16 byte UUID used to identify the split object hierarchy parts. Must be unique inside a container. All objects participating in the split must have the same `split_id` value. | | split_id | [bytes](#bytes) | | 16 byte UUID used to identify the split object hierarchy parts. Must be unique inside a container. All objects participating in the split must have the same `split_id` value. |
| members | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of objects to be deleted. | | members | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of objects to be deleted. |
@ -60,4 +60,3 @@ purged from the NeoFS network.
| <a name="bool" /> bool | | bool | boolean | boolean | | <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="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 | | <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -5,7 +5,7 @@ package neo.fs.v2.refs;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc;refs"; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc;refs";
option csharp_namespace = "Neo.FileStorage.API.Refs"; option csharp_namespace = "Neo.FileStorage.API.Refs";
// Objects in NeoFS are addressed by their ContainerID and ObjectID. // Objects in FrostFS are addressed by their ContainerID and ObjectID.
// //
// String presentation of `Address` is a concatenation of string encoded // String presentation of `Address` is a concatenation of string encoded
// `ContainerID` and `ObjectID` delimited by '/' character. // `ContainerID` and `ObjectID` delimited by '/' character.
@ -16,13 +16,14 @@ message Address {
ObjectID object_id = 2 [ json_name = "objectID" ]; ObjectID object_id = 2 [ json_name = "objectID" ];
} }
// NeoFS Object unique identifier. Objects are immutable and content-addressed. // FrostFS Object unique identifier. Objects are immutable and
// It means `ObjectID` will change if the `header` or the `payload` changes. // content-addressed. It means `ObjectID` will change if the `header` or the
// `payload` changes.
// //
// `ObjectID` is a 32 byte long // `ObjectID` is a 32 byte long
// [SHA256](https://csrc.nist.gov/publications/detail/fips/180/4/final) hash of // [SHA256](https://csrc.nist.gov/publications/detail/fips/180/4/final) hash of
// the object's `header` field, which, in it's turn, contains the hash of the object's // the object's `header` field, which, in it's turn, contains the hash of the
// payload. // object's payload.
// //
// String presentation is a // String presentation is a
// [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string. // [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string.
@ -37,7 +38,7 @@ message ObjectID {
bytes value = 1 [ json_name = "value" ]; bytes value = 1 [ json_name = "value" ];
} }
// NeoFS container identifier. Container structures are immutable and // FrostFS container identifier. Container structures are immutable and
// content-addressed. // content-addressed.
// //
// `ContainerID` is a 32 byte long // `ContainerID` is a 32 byte long
@ -80,7 +81,8 @@ message OwnerID {
// API version used by a node. // API version used by a node.
// //
// String presentation is a Semantic Versioning 2.0.0 compatible version string // String presentation is a Semantic Versioning 2.0.0 compatible version string
// with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor number. // with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor
// number.
message Version { message Version {
// Major API version // Major API version
uint32 major = 1 [ json_name = "major" ]; uint32 major = 1 [ json_name = "major" ];
@ -89,7 +91,7 @@ message Version {
uint32 minor = 2 [ json_name = "minor" ]; uint32 minor = 2 [ json_name = "minor" ];
} }
// Signature of something in NeoFS. // Signature of something in FrostFS.
message Signature { message Signature {
// Public key used for signing // Public key used for signing
bytes key = 1 [ json_name = "key" ]; bytes key = 1 [ json_name = "key" ];
@ -99,7 +101,8 @@ message Signature {
SignatureScheme scheme = 3 [ json_name = "scheme" ]; SignatureScheme scheme = 3 [ json_name = "scheme" ];
} }
// Signature scheme describes digital signing scheme used for (key, signature) pair. // Signature scheme describes digital signing scheme used for (key, signature)
// pair.
enum SignatureScheme { enum SignatureScheme {
// ECDSA with SHA-512 hashing (FIPS 186-3) // ECDSA with SHA-512 hashing (FIPS 186-3)
ECDSA_SHA512 = 0; ECDSA_SHA512 = 0;

View file

@ -11,7 +11,7 @@ import "session/types.proto";
// `SessionService` allows to establish a temporary trust relationship between // `SessionService` allows to establish a temporary trust relationship between
// two peer nodes and generate a `SessionToken` as the proof of trust to be // two peer nodes and generate a `SessionToken` as the proof of trust to be
// attached in requests for further verification. Please see corresponding // attached in requests for further verification. Please see corresponding
// section of NeoFS Technical Specification for details. // section of FrostFS Technical Specification for details.
service SessionService { service SessionService {
// Open a new session between two peers. // Open a new session between two peers.
// //

View file

@ -36,6 +36,9 @@ message ObjectSessionContext {
// Refers to object.GetRangeHash RPC call // Refers to object.GetRangeHash RPC call
RANGEHASH = 7; RANGEHASH = 7;
// Refers to object.Patch RPC call
PATCH = 8;
} }
// Type of request for which the token is issued // Type of request for which the token is issued
Verb verb = 1 [ json_name = "verb" ]; Verb verb = 1 [ json_name = "verb" ];
@ -47,7 +50,7 @@ message ObjectSessionContext {
refs.ContainerID container = 1 [ json_name = "container" ]; refs.ContainerID container = 1 [ json_name = "container" ];
// Indicates which objects the session is spread to. Objects are expected // Indicates which objects the session is spread to. Objects are expected
// to be stored in the NeoFS container referenced by `container` field. // to be stored in the FrostFS container referenced by `container` field.
// Each element MUST have correct format. // Each element MUST have correct format.
repeated refs.ObjectID objects = 2 [ json_name = "objects" ]; repeated refs.ObjectID objects = 2 [ json_name = "objects" ];
} }
@ -85,7 +88,7 @@ message ContainerSessionContext {
refs.ContainerID container_id = 3 [ json_name = "containerID" ]; refs.ContainerID container_id = 3 [ json_name = "containerID" ];
} }
// NeoFS Session Token. // FrostFS Session Token.
message SessionToken { message SessionToken {
// Session Token body // Session Token body
message Body { message Body {
@ -123,22 +126,22 @@ message SessionToken {
} }
// Session Token contains the proof of trust between peers to be attached in // Session Token contains the proof of trust between peers to be attached in
// requests for further verification. Please see corresponding section of // requests for further verification. Please see corresponding section of
// NeoFS Technical Specification for details. // FrostFS Technical Specification for details.
Body body = 1 [ json_name = "body" ]; Body body = 1 [ json_name = "body" ];
// Signature of `SessionToken` information // Signature of `SessionToken` information
neo.fs.v2.refs.Signature signature = 2 [ json_name = "signature" ]; neo.fs.v2.refs.Signature signature = 2 [ json_name = "signature" ];
} }
// Extended headers for Request/Response. They may contain any user-defined headers // Extended headers for Request/Response. They may contain any user-defined
// to be interpreted on application level. // headers to be interpreted on application level.
// //
// Key name must be a unique valid UTF-8 string. Value can't be empty. Requests or // Key name must be a unique valid UTF-8 string. Value can't be empty. Requests
// Responses with duplicated header names or headers with empty values will be // or Responses with duplicated header names or headers with empty values will
// considered invalid. // be considered invalid.
// //
// There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix that // There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__`
// affect system behaviour: // is deprecated) prefix that affect system behaviour:
// //
// * [ __SYSTEM__NETMAP_EPOCH ] \ // * [ __SYSTEM__NETMAP_EPOCH ] \
// (`__NEOFS__NETMAP_EPOCH` is deprecated) \ // (`__NEOFS__NETMAP_EPOCH` is deprecated) \
@ -149,8 +152,8 @@ message SessionToken {
// (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ // (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \
// If object can't be found using current epoch's netmap, this header limits // If object can't be found using current epoch's netmap, this header limits
// how many past epochs the node can look up through. The `value` is string // how many past epochs the node can look up through. The `value` is string
// encoded `uint64` in decimal presentation. If set to '0' or not set, only the // encoded `uint64` in decimal presentation. If set to '0' or not set, only
// current epoch will be used. // the current epoch will be used.
message XHeader { message XHeader {
// Key of the X-Header // Key of the X-Header
string key = 1 [ json_name = "key" ]; string key = 1 [ json_name = "key" ];
@ -183,7 +186,7 @@ message RequestMetaHeader {
// `RequestMetaHeader` of the origin request // `RequestMetaHeader` of the origin request
RequestMetaHeader origin = 7 [ json_name = "origin" ]; RequestMetaHeader origin = 7 [ json_name = "origin" ];
// NeoFS network magic. Must match the value for the network // FrostFS network magic. Must match the value for the network
// that the server belongs to. // that the server belongs to.
uint64 magic_number = 8 [ json_name = "magicNumber" ]; uint64 magic_number = 8 [ json_name = "magicNumber" ];
} }
@ -216,7 +219,8 @@ message RequestVerificationHeader {
// Request Meta signature is added and signed by each intermediate node // Request Meta signature is added and signed by each intermediate node
neo.fs.v2.refs.Signature meta_signature = 2 [ json_name = "metaSignature" ]; neo.fs.v2.refs.Signature meta_signature = 2 [ json_name = "metaSignature" ];
// Signature of previous hops // Signature of previous hops
neo.fs.v2.refs.Signature origin_signature = 3 [json_name = "originSignature"]; neo.fs.v2.refs.Signature origin_signature = 3
[ json_name = "originSignature" ];
// Chain of previous hops signatures // Chain of previous hops signatures
RequestVerificationHeader origin = 4 [ json_name = "origin" ]; RequestVerificationHeader origin = 4 [ json_name = "origin" ];
@ -229,7 +233,8 @@ message ResponseVerificationHeader {
// Response Meta signature is added and signed by each intermediate node // Response Meta signature is added and signed by each intermediate node
neo.fs.v2.refs.Signature meta_signature = 2 [ json_name = "metaSignature" ]; neo.fs.v2.refs.Signature meta_signature = 2 [ json_name = "metaSignature" ];
// Signature of previous hops // Signature of previous hops
neo.fs.v2.refs.Signature origin_signature = 3 [json_name = "originSignature"]; neo.fs.v2.refs.Signature origin_signature = 3
[ json_name = "originSignature" ];
// Chain of previous hops signatures // Chain of previous hops signatures
ResponseVerificationHeader origin = 4 [ json_name = "origin" ]; ResponseVerificationHeader origin = 4 [ json_name = "origin" ];

View file

@ -5,12 +5,12 @@ package neo.fs.v2.status;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/grpc;status"; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/grpc;status";
option csharp_namespace = "Neo.FileStorage.API.Status"; option csharp_namespace = "Neo.FileStorage.API.Status";
// Declares the general format of the status returns of the NeoFS RPC protocol. // Declares the general format of the status returns of the FrostFS RPC
// Status is present in all response messages. Each RPC of NeoFS protocol // protocol. Status is present in all response messages. Each RPC of FrostFS
// describes the possible outcomes and details of the operation. // protocol describes the possible outcomes and details of the operation.
// //
// Each status is assigned a one-to-one numeric code. Any unique result of an // Each status is assigned a one-to-one numeric code. Any unique result of an
// operation in NeoFS is unambiguously associated with the code value. // operation in FrostFS is unambiguously associated with the code value.
// //
// Numerical set of codes is split into 1024-element sections. An enumeration // Numerical set of codes is split into 1024-element sections. An enumeration
// is defined for each section. Values can be referred to in the following ways: // is defined for each section. Values can be referred to in the following ways:
@ -73,9 +73,12 @@ enum Section {
// Session service-specific errors. // Session service-specific errors.
SECTION_SESSION = 4; SECTION_SESSION = 4;
// Session service-specific errors.
SECTION_APE_MANAGER = 5;
} }
// Section of NeoFS successful return codes. // Section of FrostFS successful return codes.
enum Success { enum Success {
// [**0**] Default success. Not detailed. // [**0**] Default success. Not detailed.
// If the server cannot match successful outcome to the code, it should // If the server cannot match successful outcome to the code, it should
@ -90,9 +93,9 @@ enum CommonFail {
// use this code. // use this code.
INTERNAL = 0; INTERNAL = 0;
// [**1025**] Wrong magic of the NeoFS network. // [**1025**] Wrong magic of the FrostFS network.
// Details: // Details:
// - [**0**] Magic number of the served NeoFS network (big-endian 64-bit // - [**0**] Magic number of the served FrostFS network (big-endian 64-bit
// unsigned integer). // unsigned integer).
WRONG_MAGIC_NUMBER = 1; WRONG_MAGIC_NUMBER = 1;
@ -101,6 +104,11 @@ enum CommonFail {
// [**1027**] Node is under maintenance. // [**1027**] Node is under maintenance.
NODE_UNDER_MAINTENANCE = 3; NODE_UNDER_MAINTENANCE = 3;
// [**1028**] Invalid argument error. If the server fails on validation of a
// request parameter as the client sent it incorrectly, then this code should
// be used.
INVALID_ARGUMENT = 4;
} }
// Section of statuses for object-related operations. // Section of statuses for object-related operations.
@ -133,6 +141,9 @@ enum Container {
// [**3073**] eACL table not found. // [**3073**] eACL table not found.
EACL_NOT_FOUND = 1; EACL_NOT_FOUND = 1;
// [**3074**] Container access denied.
CONTAINER_ACCESS_DENIED = 2;
} }
// Section of statuses for session-related operations. // Section of statuses for session-related operations.
@ -143,3 +154,9 @@ enum Session {
// [**4097**] Token has expired. // [**4097**] Token has expired.
TOKEN_EXPIRED = 1; TOKEN_EXPIRED = 1;
} }
// Section of status for APE manager related operations.
enum APEManager {
// [**5120**] The operation is denied by APE manager.
APE_MANAGER_ACCESS_DENIED = 0;
}

View file

@ -1,34 +0,0 @@
syntax = "proto3";
package neo.fs.v2.storagegroup;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/storagegroup/grpc;storagegroup";
option csharp_namespace = "Neo.FileStorage.API.StorageGroup";
import "refs/types.proto";
// StorageGroup keeps verification information for Data Audit sessions. Objects
// that require paid storage guarantees are gathered in `StorageGroups` with
// additional information used for the proof of storage. `StorageGroup` only
// contains objects from the same container.
//
// Being an object payload, StorageGroup may have expiration Epoch set with
// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) well-known attribute. When expired, StorageGroup
// will be ignored by InnerRing nodes during Data Audit cycles and will be
// deleted by Storage Nodes.
//
message StorageGroup {
// Total size of the payloads of objects in the storage group
uint64 validation_data_size = 1 [json_name = "validationDataSize"];
// Homomorphic hash from the concatenation of the payloads of the storage
// group members. The order of concatenation is the same as the order of the
// members in the `members` field.
neo.fs.v2.refs.Checksum validation_hash = 2 [json_name = "validationHash"];
// DEPRECATED. Last NeoFS epoch number of the storage group lifetime
uint64 expiration_epoch = 3 [json_name = "expirationEpoch", deprecated = true];
// Strictly ordered list of storage group member objects. Members MUST be unique
repeated neo.fs.v2.refs.ObjectID members = 4 [json_name = "members"];
}

View file

@ -8,11 +8,12 @@ option csharp_namespace = "Neo.FileStorage.API.Tombstone";
import "refs/types.proto"; import "refs/types.proto";
// Tombstone keeps record of deleted objects for a few epochs until they are // Tombstone keeps record of deleted objects for a few epochs until they are
// purged from the NeoFS network. // purged from the FrostFS network.
message Tombstone { message Tombstone {
// Last NeoFS epoch number of the tombstone lifetime. It's set by the tombstone // Last FrostFS epoch number of the tombstone lifetime. It's set by the
// creator depending on the current NeoFS network settings. A tombstone object // tombstone creator depending on the current FrostFS network settings. A
// must have the same expiration epoch value in `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) // tombstone object must have the same expiration epoch value in
// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated)
// attribute. Otherwise, the tombstone will be rejected by a storage node. // attribute. Otherwise, the tombstone will be rejected by a storage node.
uint64 expiration_epoch = 1 [ json_name = "expirationEpoch" ]; uint64 expiration_epoch = 1 [ json_name = "expirationEpoch" ];