From 542d0d9ec2b09c08df915acef226463a7fcfacce Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Mon, 24 Jun 2024 09:35:29 +0300 Subject: [PATCH 01/24] [#55] netmap: Add `LIKE` operation for `filter` in `policy` Signed-off-by: Anton Nikiforov --- netmap/types.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netmap/types.proto b/netmap/types.proto index 2180869..055e838 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -36,6 +36,9 @@ enum Operation { // Logical negation NOT = 9; + + // Matches pattern + LIKE = 10; } // Selector modifier shows how the node set will be formed. By default selector From 8760caa093c9c0628faee1d9b6eb40d7de937bd8 Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Mon, 2 Sep 2024 00:13:20 +0300 Subject: [PATCH 02/24] [#60] container: Remove GetExtendedACL Signed-off-by: Aleksey Savchuk --- container/service.proto | 64 ----------------------------------------- 1 file changed, 64 deletions(-) diff --git a/container/service.proto b/container/service.proto index 66542aa..f5bebf0 100644 --- a/container/service.proto +++ b/container/service.proto @@ -62,21 +62,6 @@ service ContainerService { // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ // container list access denied. rpc List(ListRequest) returns (ListResponse); - - // 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; - // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - // access to container eACL is denied. - rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse); } // New NeoFS Container creation request @@ -261,52 +246,3 @@ message ListResponse { // 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; -} From 54812ba857025ea8e31a4e2559bb2d99bdff42d8 Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Mon, 2 Sep 2024 14:43:07 +0300 Subject: [PATCH 03/24] [#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 --- Makefile | 8 -------- buf.yaml | 10 ---------- 2 files changed, 18 deletions(-) mode change 100644 => 100755 Makefile delete mode 100644 buf.yaml diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index 532d8b0..21c354f --- a/Makefile +++ b/Makefile @@ -1,14 +1,6 @@ #!/usr/bin/make -f SHELL=bash -# BRanch to match for BReaking changes -BRBR?=master - -.PHONY: lint -lint: - buf check lint - buf check breaking --against-input '.git#branch=$(BRBR)' - .PHONY: doc # Regenerate documentation for proto files: doc: diff --git a/buf.yaml b/buf.yaml deleted file mode 100644 index 2006bea..0000000 --- a/buf.yaml +++ /dev/null @@ -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 From 6b0f3b01e0677e708487b2901d343ece55ae17db Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Mon, 2 Sep 2024 14:59:24 +0300 Subject: [PATCH 04/24] [#58] pre-commit: Add pre-commit and related Makefile targets Signed-off-by: Aleksey Savchuk --- .pre-commit-config.yaml | 24 ++++++++++++++++++++++++ Makefile | 18 +++++++++++++++++- help.mk | 11 +++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml create mode 100644 help.mk diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..96f3e27 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 diff --git a/Makefile b/Makefile index 21c354f..c08d609 100755 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ #!/usr/bin/make -f SHELL=bash -.PHONY: doc +include help.mk + +.PHONY: doc fmt pre-commit unpre-commit pre-commit-run + # Regenerate documentation for proto files: doc: @for f in `find . -type f -name '*.proto' -exec dirname {} \; | sort -u `; do \ @@ -12,8 +15,21 @@ doc: --doc_out=proto-docs/ $${f}/*.proto; \ 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 diff --git a/help.mk b/help.mk new file mode 100644 index 0000000..a2ac989 --- /dev/null +++ b/help.mk @@ -0,0 +1,11 @@ +.PHONY: help + +# Show this help prompt +help: + @echo ' Usage:' + @echo '' + @echo ' make ' + @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 From aaa922f600a1391b6dedf8c8da7ea6e38f05fcfd Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Mon, 2 Sep 2024 15:03:58 +0300 Subject: [PATCH 05/24] [#58] *: Run pre-commit Signed-off-by: Aleksey Savchuk --- .gitignore | 1 - CHANGELOG.md | 6 ++--- apemanager/service.proto | 2 +- object/service.proto | 55 +++++++++++++++++++++++----------------- object/types.proto | 2 +- proto-docs/accounting.md | 7 +++-- proto-docs/acl.md | 3 +-- proto-docs/ape.md | 3 +-- proto-docs/apemanager.md | 5 ++-- proto-docs/container.md | 7 +++-- proto-docs/lock.md | 3 +-- proto-docs/netmap.md | 7 +++-- proto-docs/object.md | 23 ++++++++--------- proto-docs/refs.md | 3 +-- proto-docs/session.md | 7 +++-- proto-docs/status.md | 3 +-- proto-docs/tombstone.md | 3 +-- status/types.proto | 2 +- 18 files changed, 69 insertions(+), 73 deletions(-) diff --git a/.gitignore b/.gitignore index c6ef218..485dee6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ .idea - diff --git a/CHANGELOG.md b/CHANGELOG.md index ee28fa6..70ceb4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,7 +61,7 @@ Network magic, main status codes, object locks and notifications. - `LOCK` value of `object.Type` enum (#194) - `Lock` message with payload content of `LOCK` objects (#194) - `LOCKED` and `LOCK_NON_REGULAR_OBJECT` status codes to `Object` section (#194) -- `scheme` field of type `SignatureScheme` to `Signature` message which determines +- `scheme` field of type `SignatureScheme` to `Signature` message which determines signature scheme (#55) - `SignatureRFC6979` message (#203) @@ -166,8 +166,8 @@ values in the objects. ### Changed -- Clarified processing of empty search query in `object.Search` RPC. -- Specified connection of tombstone expiration value with well-known +- Clarified processing of empty search query in `object.Search` RPC. +- Specified connection of tombstone expiration value with well-known `__NEOFS__EXPIRATION_EPOCH` object attribute. ## [2.3.0] - 2021-02-11 - Seonyudo (선유도, 仙遊島) diff --git a/apemanager/service.proto b/apemanager/service.proto index 7ff23a7..166ba4d 100644 --- a/apemanager/service.proto +++ b/apemanager/service.proto @@ -168,4 +168,4 @@ message ListChainsResponse { // authenticate the nodes of the message route and check the correctness of // transmission. neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; -} \ No newline at end of file +} diff --git a/object/service.proto b/object/service.proto index dc39c1c..2c53297 100644 --- a/object/service.proto +++ b/object/service.proto @@ -285,16 +285,20 @@ service ObjectService { 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. + // 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. + // 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; + // 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. // @@ -870,25 +874,29 @@ message PatchRequest { // 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. + // 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. + // 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. + // 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. + // 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. + // 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. + // The chunk that is being appended to or that replaces the original + // payload on the given range. bytes chunk = 2; } @@ -913,8 +921,8 @@ message PatchRequest { message PatchResponse { // PATCH response body message Body { - // The object ID of the saved patched object. - neo.fs.v2.refs.ObjectID object_id = 1; + // The object ID of the saved patched object. + neo.fs.v2.refs.ObjectID object_id = 1; } // Body for patch response message. @@ -924,7 +932,8 @@ message PatchResponse { // 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. + // 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; } diff --git a/object/types.proto b/object/types.proto index b25e792..be8f348 100644 --- a/object/types.proto +++ b/object/types.proto @@ -275,4 +275,4 @@ message ECInfo { } // Chunk stored on the node. repeated Chunk chunks = 1; -} \ No newline at end of file +} diff --git a/proto-docs/accounting.md b/proto-docs/accounting.md index a23a63c..cdc82a1 100644 --- a/proto-docs/accounting.md +++ b/proto-docs/accounting.md @@ -6,19 +6,19 @@ - [accounting/service.proto](#accounting/service.proto) - Services - [AccountingService](#neo.fs.v2.accounting.AccountingService) - + - Messages - [BalanceRequest](#neo.fs.v2.accounting.BalanceRequest) - [BalanceRequest.Body](#neo.fs.v2.accounting.BalanceRequest.Body) - [BalanceResponse](#neo.fs.v2.accounting.BalanceResponse) - [BalanceResponse.Body](#neo.fs.v2.accounting.BalanceResponse.Body) - + - [accounting/types.proto](#accounting/types.proto) - Messages - [Decimal](#neo.fs.v2.accounting.Decimal) - + - [Scalar Value Types](#scalar-value-types) @@ -170,4 +170,3 @@ description. | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/acl.md b/proto-docs/acl.md index 19c1a8d..bac7747 100644 --- a/proto-docs/acl.md +++ b/proto-docs/acl.md @@ -14,7 +14,7 @@ - [EACLRecord.Filter](#neo.fs.v2.acl.EACLRecord.Filter) - [EACLRecord.Target](#neo.fs.v2.acl.EACLRecord.Target) - [EACLTable](#neo.fs.v2.acl.EACLTable) - + - [Scalar Value Types](#scalar-value-types) @@ -282,4 +282,3 @@ Target role of the access control rule in access control list. | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/ape.md b/proto-docs/ape.md index b101c83..39bc946 100644 --- a/proto-docs/ape.md +++ b/proto-docs/ape.md @@ -8,7 +8,7 @@ - Messages - [Chain](#frostfs.v2.ape.Chain) - [ChainTarget](#frostfs.v2.ape.ChainTarget) - + - [Scalar Value Types](#scalar-value-types) @@ -85,4 +85,3 @@ TargetType is a type target to which a rule chain is defined. | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/apemanager.md b/proto-docs/apemanager.md index 5d0e2e6..c1cb682 100644 --- a/proto-docs/apemanager.md +++ b/proto-docs/apemanager.md @@ -6,7 +6,7 @@ - [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) @@ -20,7 +20,7 @@ - [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) @@ -267,4 +267,3 @@ operation could not be performed is an error returning to a client. | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/container.md b/proto-docs/container.md index b568eed..3df304f 100644 --- a/proto-docs/container.md +++ b/proto-docs/container.md @@ -6,7 +6,7 @@ - [container/service.proto](#container/service.proto) - Services - [ContainerService](#neo.fs.v2.container.ContainerService) - + - Messages - [AnnounceUsedSpaceRequest](#neo.fs.v2.container.AnnounceUsedSpaceRequest) - [AnnounceUsedSpaceRequest.Body](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body) @@ -37,14 +37,14 @@ - [SetExtendedACLRequest.Body](#neo.fs.v2.container.SetExtendedACLRequest.Body) - [SetExtendedACLResponse](#neo.fs.v2.container.SetExtendedACLResponse) - [SetExtendedACLResponse.Body](#neo.fs.v2.container.SetExtendedACLResponse.Body) - + - [container/types.proto](#container/types.proto) - Messages - [Container](#neo.fs.v2.container.Container) - [Container.Attribute](#neo.fs.v2.container.Container.Attribute) - + - [Scalar Value Types](#scalar-value-types) @@ -654,4 +654,3 @@ And some well-known attributes used by applications only: | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/lock.md b/proto-docs/lock.md index ae74c5b..ba23306 100644 --- a/proto-docs/lock.md +++ b/proto-docs/lock.md @@ -7,7 +7,7 @@ - Messages - [Lock](#neo.fs.v2.lock.Lock) - + - [Scalar Value Types](#scalar-value-types) @@ -61,4 +61,3 @@ a lock object via ObjectService.Delete RPC call. | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index fb4eccb..cbf5593 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -6,7 +6,7 @@ - [netmap/service.proto](#netmap/service.proto) - Services - [NetmapService](#neo.fs.v2.netmap.NetmapService) - + - Messages - [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest) - [LocalNodeInfoRequest.Body](#neo.fs.v2.netmap.LocalNodeInfoRequest.Body) @@ -20,7 +20,7 @@ - [NetworkInfoRequest.Body](#neo.fs.v2.netmap.NetworkInfoRequest.Body) - [NetworkInfoResponse](#neo.fs.v2.netmap.NetworkInfoResponse) - [NetworkInfoResponse.Body](#neo.fs.v2.netmap.NetworkInfoResponse.Body) - + - [netmap/types.proto](#netmap/types.proto) @@ -35,7 +35,7 @@ - [PlacementPolicy](#neo.fs.v2.netmap.PlacementPolicy) - [Replica](#neo.fs.v2.netmap.Replica) - [Selector](#neo.fs.v2.netmap.Selector) - + - [Scalar Value Types](#scalar-value-types) @@ -575,4 +575,3 @@ Operations on filters | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/object.md b/proto-docs/object.md index f353b3f..27981e5 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -6,7 +6,7 @@ - [object/service.proto](#object/service.proto) - Services - [ObjectService](#neo.fs.v2.object.ObjectService) - + - Messages - [DeleteRequest](#neo.fs.v2.object.DeleteRequest) - [DeleteRequest.Body](#neo.fs.v2.object.DeleteRequest.Body) @@ -50,7 +50,7 @@ - [SearchRequest.Body.Filter](#neo.fs.v2.object.SearchRequest.Body.Filter) - [SearchResponse](#neo.fs.v2.object.SearchResponse) - [SearchResponse.Body](#neo.fs.v2.object.SearchResponse.Body) - + - [object/types.proto](#object/types.proto) @@ -64,7 +64,7 @@ - [Object](#neo.fs.v2.object.Object) - [ShortHeader](#neo.fs.v2.object.ShortHeader) - [SplitInfo](#neo.fs.v2.object.SplitInfo) - + - [Scalar Value Types](#scalar-value-types) @@ -133,7 +133,7 @@ Statuses: - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object container not found; - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - access to container is denied; + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -210,7 +210,7 @@ Statuses: - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object container not found; - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - access to container is denied; + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -244,7 +244,7 @@ Statuses: - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object container not found; - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - access to container is denied; + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -274,7 +274,7 @@ Statuses: - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ search container not found; - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - access to container is denied; + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -315,7 +315,7 @@ Statuses: - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object container not found; - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - access to container is denied; + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -354,7 +354,7 @@ Statuses: - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object container not found; - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - access to container is denied; + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -390,7 +390,7 @@ Statuses: - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object storage container not found; - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - access to container is denied; + access to container is denied; - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ (for trusted object preparation) session private key does not exist or has @@ -412,7 +412,7 @@ to perform the patch, then `OwnerID` of the object is changed. In this case the 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: +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. @@ -1319,4 +1319,3 @@ String presentation of object type is the same as definition: | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/refs.md b/proto-docs/refs.md index e27d4ba..5b559d3 100644 --- a/proto-docs/refs.md +++ b/proto-docs/refs.md @@ -14,7 +14,7 @@ - [Signature](#neo.fs.v2.refs.Signature) - [SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) - [Version](#neo.fs.v2.refs.Version) - + - [Scalar Value Types](#scalar-value-types) @@ -230,4 +230,3 @@ pair. | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/session.md b/proto-docs/session.md index 699a907..36a73ea 100644 --- a/proto-docs/session.md +++ b/proto-docs/session.md @@ -6,13 +6,13 @@ - [session/service.proto](#session/service.proto) - Services - [SessionService](#neo.fs.v2.session.SessionService) - + - Messages - [CreateRequest](#neo.fs.v2.session.CreateRequest) - [CreateRequest.Body](#neo.fs.v2.session.CreateRequest.Body) - [CreateResponse](#neo.fs.v2.session.CreateResponse) - [CreateResponse.Body](#neo.fs.v2.session.CreateResponse.Body) - + - [session/types.proto](#session/types.proto) @@ -28,7 +28,7 @@ - [SessionToken.Body](#neo.fs.v2.session.SessionToken.Body) - [SessionToken.Body.TokenLifetime](#neo.fs.v2.session.SessionToken.Body.TokenLifetime) - [XHeader](#neo.fs.v2.session.XHeader) - + - [Scalar Value Types](#scalar-value-types) @@ -364,4 +364,3 @@ Object request verbs | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/status.md b/proto-docs/status.md index 6444072..373a7a7 100644 --- a/proto-docs/status.md +++ b/proto-docs/status.md @@ -8,7 +8,7 @@ - Messages - [Status](#neo.fs.v2.status.Status) - [Status.Detail](#neo.fs.v2.status.Status.Detail) - + - [Scalar Value Types](#scalar-value-types) @@ -195,4 +195,3 @@ Section of NeoFS successful return codes. | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/proto-docs/tombstone.md b/proto-docs/tombstone.md index 7a7761b..268e9a2 100644 --- a/proto-docs/tombstone.md +++ b/proto-docs/tombstone.md @@ -7,7 +7,7 @@ - Messages - [Tombstone](#neo.fs.v2.tombstone.Tombstone) - + - [Scalar Value Types](#scalar-value-types) @@ -60,4 +60,3 @@ purged from the NeoFS network. | bool | | bool | boolean | boolean | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/status/types.proto b/status/types.proto index 49c784f..302a11b 100644 --- a/status/types.proto +++ b/status/types.proto @@ -159,4 +159,4 @@ enum Session { enum APEManager { // [**5120**] The operation is denied by APE manager. APE_MANAGER_ACCESS_DENIED = 0; -} \ No newline at end of file +} From 6bc2038f035c7ccbe59feaccee3c75bce9c3b358 Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Mon, 2 Sep 2024 16:12:29 +0300 Subject: [PATCH 06/24] [#58] .forgejo: Add forgejo actions Signed-off-by: Aleksey Savchuk --- .forgejo/workflows/dco.yaml | 19 +++++++++++++++++++ .forgejo/workflows/fmt.yaml | 15 +++++++++++++++ .forgejo/workflows/pre-commit.yaml | 18 ++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 .forgejo/workflows/dco.yaml create mode 100644 .forgejo/workflows/fmt.yaml create mode 100644 .forgejo/workflows/pre-commit.yaml diff --git a/.forgejo/workflows/dco.yaml b/.forgejo/workflows/dco.yaml new file mode 100644 index 0000000..74fba6a --- /dev/null +++ b/.forgejo/workflows/dco.yaml @@ -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 }}' diff --git a/.forgejo/workflows/fmt.yaml b/.forgejo/workflows/fmt.yaml new file mode 100644 index 0000000..d56bcf1 --- /dev/null +++ b/.forgejo/workflows/fmt.yaml @@ -0,0 +1,15 @@ +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 diff --git a/.forgejo/workflows/pre-commit.yaml b/.forgejo/workflows/pre-commit.yaml new file mode 100644 index 0000000..5bf97eb --- /dev/null +++ b/.forgejo/workflows/pre-commit.yaml @@ -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 From 6b390035e7283f1797531bdabc5f0e6c815a4f02 Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Thu, 5 Sep 2024 12:11:00 +0300 Subject: [PATCH 07/24] [#50] netmap: Fix misformatted link in doc comment Signed-off-by: Aleksey Savchuk --- netmap/types.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netmap/types.proto b/netmap/types.proto index 055e838..99724c2 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -201,8 +201,8 @@ message NodeInfo { // [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). Calculated // automatically from `UN-LOCODE` attribute. // * Continent \ - // Node's continent name according to the [Seven-Continent model] - // (https://en.wikipedia.org/wiki/Continent#Number). Calculated + // Node's continent name according to the [Seven-Continent + // model](https://en.wikipedia.org/wiki/Continent#Number). Calculated // automatically from `UN-LOCODE` attribute. // * ExternalAddr // Node's preferred way for communications with external clients. From e8afd6e5f5c621b2ddf73a50da7223c57dd1a7a6 Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Thu, 5 Sep 2024 14:21:02 +0300 Subject: [PATCH 08/24] [#50] netmap: Clarify MaxObjectSize parameter implication on object size Signed-off-by: Aleksey Savchuk --- netmap/types.proto | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/netmap/types.proto b/netmap/types.proto index 99724c2..dfaac13 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -289,6 +289,37 @@ message NetworkConfig { // - **MaxObjectSize** \ // Maximum size of physically stored NeoFS object measured in bytes. // Value: little-endian integer. Default: 0. + // + // This value refers to the maximum size of a **physically** stored object + // in NeoFS. 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** \ // Fee paid for withdrawal of funds paid by the account owner. // Value: little-endian integer. Default: 0. From 5602b8fa2a47c0aea528276f5dce3124cf07542c Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Thu, 5 Sep 2024 16:24:35 +0300 Subject: [PATCH 09/24] [#50] *: Replace NeoFS with FrostFS in doc comments Signed-off-by: Aleksey Savchuk --- accounting/service.proto | 18 +++++++++--------- accounting/types.proto | 2 +- acl/types.proto | 6 +++--- container/service.proto | 12 ++++++------ container/types.proto | 2 +- netmap/service.proto | 8 ++++---- netmap/types.proto | 38 +++++++++++++++++++------------------- object/service.proto | 2 +- object/types.proto | 2 +- refs/types.proto | 11 ++++++----- session/service.proto | 2 +- session/types.proto | 8 ++++---- status/types.proto | 14 +++++++------- tombstone/types.proto | 6 +++--- 14 files changed, 66 insertions(+), 65 deletions(-) diff --git a/accounting/service.proto b/accounting/service.proto index ac988c9..eedd4ce 100644 --- a/accounting/service.proto +++ b/accounting/service.proto @@ -9,13 +9,13 @@ import "accounting/types.proto"; import "refs/types.proto"; import "session/types.proto"; -// Accounting service provides methods for interaction with NeoFS sidechain via -// other NeoFS nodes to get information about the account balance. Deposit and -// Withdraw operations can't be implemented here, as they require Mainnet NeoFS -// smart contract invocation. Transfer operations between internal NeoFS -// accounts are possible if both use the same token type. +// Accounting service provides methods for interaction with FrostFS sidechain +// via other FrostFS nodes to get information about the account balance. Deposit +// and Withdraw operations can't be implemented here, as they require Mainnet +// FrostFS smart contract invocation. Transfer operations between internal +// FrostFS accounts are possible if both use the same token type. 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: // - **OK** (0, SECTION_SUCCESS): @@ -27,9 +27,9 @@ service AccountingService { // BalanceRequest message message BalanceRequest { // 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 - // contract. If omitted, client implementation MUST set it to the request's - // signer `OwnerID`. + // is used. It can be any existing account in FrostFS sidechain `Balance` + // smart contract. If omitted, client implementation MUST set it to the + // request's signer `OwnerID`. message Body { // Valid user identifier in `OwnerID` format for which the balance is // requested. Required field. diff --git a/accounting/types.proto b/accounting/types.proto index eadf9a8..5dd9b50 100644 --- a/accounting/types.proto +++ b/accounting/types.proto @@ -5,7 +5,7 @@ package neo.fs.v2.accounting; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/grpc;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 // precision issue, special `Decimal` format is used for monetary computations. // diff --git a/acl/types.proto b/acl/types.proto index b36df14..fdaffd4 100644 --- a/acl/types.proto +++ b/acl/types.proto @@ -89,14 +89,14 @@ enum HeaderType { // Filter object headers 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. SERVICE = 3; } // Describes a single eACL rule. message EACLRecord { - // NeoFS request Verb to match + // FrostFS request Verb to match Operation operation = 1 [ json_name = "operation" ]; // Rule execution result. Either allows or denies access if filters match. @@ -165,7 +165,7 @@ message EACLRecord { // 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 // 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 { // eACL format version. Effectively, the version of API library used to create // eACL Table. diff --git a/container/service.proto b/container/service.proto index f5bebf0..f1f22de 100644 --- a/container/service.proto +++ b/container/service.proto @@ -11,8 +11,8 @@ import "refs/types.proto"; import "session/types.proto"; // `ContainerService` provides API to interact with `Container` smart contract -// in NeoFS sidechain via other NeoFS nodes. All of those actions can be done -// equivalently by directly issuing transactions and RPC calls to sidechain +// in FrostFS sidechain via other FrostFS nodes. All of those actions can be +// done equivalently by directly issuing transactions and RPC calls to sidechain // nodes. service ContainerService { // `Put` invokes `Container` smart contract's `Put` method and returns @@ -64,7 +64,7 @@ service ContainerService { rpc List(ListRequest) returns (ListResponse); } -// New NeoFS Container creation request +// New FrostFS Container creation request message PutRequest { // Container creation request has container structure's signature as a // separate field. It's not stored in sidechain, just verified on container @@ -72,7 +72,7 @@ message PutRequest { // the stable-marshalled container strucutre, hence there is no need for // additional signature checks. message Body { - // Container structure to register in NeoFS + // Container structure to register in FrostFS container.Container container = 1; // Signature of a stable-marshalled container according to RFC-6979. @@ -91,7 +91,7 @@ message PutRequest { neo.fs.v2.session.RequestVerificationHeader verify_header = 3; } -// New NeoFS Container creation response +// New FrostFS Container creation response message PutResponse { // Container put response body contains information about the newly registered // container as seen by `Container` smart contract. `ContainerID` can be @@ -120,7 +120,7 @@ message DeleteRequest { // the container owner's intent. The signature will be verified by `Container` // smart contract, so signing algorithm must be supported by NeoVM. 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; // `ContainerID` signed with the container owner's key according to diff --git a/container/types.proto b/container/types.proto index 8b4a8a9..d133a45 100644 --- a/container/types.proto +++ b/container/types.proto @@ -50,7 +50,7 @@ message Container { // (`__NEOFS__DISABLE_HOMOMORPHIC_HASHING` is deprecated) \ // Disables homomorphic hashing for the container if the value equals "true" // string. Any other values are interpreted as missing attribute. Container - // could be accepted in a NeoFS network only if the global network hashing + // could be accepted in a FrostFS network only if the global network hashing // configuration value corresponds with that attribute's value. After // container inclusion, network setting is ignored. // diff --git a/netmap/service.proto b/netmap/service.proto index f5e7d9f..dce43f4 100644 --- a/netmap/service.proto +++ b/netmap/service.proto @@ -12,7 +12,7 @@ import "session/types.proto"; // `NetmapService` provides methods to work with `Network Map` and the // information required to build it. The resulting `Network Map` is stored in // sidechain `Netmap` smart contract, while related information can be obtained -// from other NeoFS nodes. +// from other FrostFS nodes. service NetmapService { // Get NodeInfo structure from the particular node directly. // Node information can be taken from `Netmap` smart contract. In some cases, @@ -27,7 +27,7 @@ service NetmapService { // - Common failures (SECTION_FAILURE_COMMON). rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse); - // Read recent information about the NeoFS network. + // Read recent information about the FrostFS network. // // Statuses: // - **OK** (0, SECTION_SUCCESS): @@ -35,7 +35,7 @@ service NetmapService { // - Common failures (SECTION_FAILURE_COMMON). rpc NetworkInfo(NetworkInfoRequest) returns (NetworkInfoResponse); - // Returns network map snapshot of the current NeoFS epoch. + // Returns network map snapshot of the current FrostFS epoch. // // Statuses: // - **OK** (0, SECTION_SUCCESS): @@ -65,7 +65,7 @@ message LocalNodeInfoRequest { message LocalNodeInfoResponse { // Local Node Info, including API Version in use. message Body { - // Latest NeoFS API version in use + // Latest FrostFS API version in use neo.fs.v2.refs.Version version = 1; // NodeInfo structure with recent information from node itself diff --git a/netmap/types.proto b/netmap/types.proto index dfaac13..969790c 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -122,7 +122,7 @@ message PlacementPolicy { // bucket 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 uint32 container_backup_factor = 2 [ json_name = "containerBackupFactor" ]; @@ -136,25 +136,25 @@ message PlacementPolicy { bool unique = 5 [ json_name = "unique" ]; } -// NeoFS node description +// FrostFS node description 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" ]; // Ways to connect to a node 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 // string. Value can't be empty. // // 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 one). A string representation of the chain of attributes in NeoFS + // last one). A string representation of the chain of attributes in FrostFS // 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 use "\:", "\/" and "\\" escaped symbols if any of them appears in an @@ -210,7 +210,7 @@ message NodeInfo { // Must contain a comma-separated list of multi-addresses. // // 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 { // Key of the node attribute string key = 1 [ json_name = "key" ]; @@ -222,13 +222,13 @@ message NodeInfo { // `Country`. 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 // structures with duplicated attribute names or attributes with empty values // will be considered invalid. 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 { // Unknown state UNSPECIFIED = 0; @@ -243,7 +243,7 @@ message NodeInfo { MAINTENANCE = 3; } - // Carries state of the NeoFS node + // Carries state of the FrostFS node State state = 4 [ json_name = "state" ]; } @@ -256,7 +256,7 @@ message Netmap { repeated NodeInfo nodes = 2 [ json_name = "nodes" ]; } -// NeoFS network configuration +// FrostFS network configuration message NetworkConfig { // Single configuration parameter. Key MUST be network-unique. // @@ -275,7 +275,7 @@ message NetworkConfig { // Fee paid for container creation by the container owner. // Value: little-endian integer. Default: 0. // - **EpochDuration** \ - // NeoFS epoch duration measured in Sidechain blocks. + // FrostFS epoch duration measured in Sidechain blocks. // Value: little-endian integer. Default: 0. // - **HomomorphicHashingDisabled** \ // Flag of disabling the homomorphic hashing of objects' payload. @@ -287,11 +287,11 @@ message NetworkConfig { // Flag allowing setting the MAINTENANCE state to storage nodes. // Value: true if any byte != 0. Default: false. // - **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. // // This value refers to the maximum size of a **physically** stored object - // in NeoFS. However, from a user's perspective, the **logical** size of a + // 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 // @@ -340,18 +340,18 @@ message NetworkConfig { repeated Parameter parameters = 1 [ json_name = "parameters" ]; } -// Information about NeoFS network +// Information about FrostFS network 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" ]; - // 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" ]; - // MillisecondsPerBlock network parameter of the sidechain of the NeoFS + // MillisecondsPerBlock network parameter of the sidechain of the FrostFS // network int64 ms_per_block = 3 [ json_name = "msPerBlock" ]; - // NeoFS network configuration + // FrostFS network configuration NetworkConfig network_config = 4 [ json_name = "networkConfig" ]; } diff --git a/object/service.proto b/object/service.proto index 2c53297..e6ab5e0 100644 --- a/object/service.proto +++ b/object/service.proto @@ -151,7 +151,7 @@ service ObjectService { rpc Head(HeadRequest) returns (HeadResponse); // 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. // // Extended headers can change `Search` behaviour: diff --git a/object/types.proto b/object/types.proto index be8f348..6e9469b 100644 --- a/object/types.proto +++ b/object/types.proto @@ -155,7 +155,7 @@ message Header { // MIME Content Type of object's payload // // 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 { // string key to the object attribute string key = 1 [ json_name = "key" ]; diff --git a/refs/types.proto b/refs/types.proto index ebc076f..fe12ec6 100644 --- a/refs/types.proto +++ b/refs/types.proto @@ -5,7 +5,7 @@ package neo.fs.v2.refs; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc;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 // `ContainerID` and `ObjectID` delimited by '/' character. @@ -16,8 +16,9 @@ message Address { ObjectID object_id = 2 [ json_name = "objectID" ]; } -// NeoFS Object unique identifier. Objects are immutable and content-addressed. -// It means `ObjectID` will change if the `header` or the `payload` changes. +// FrostFS Object unique identifier. Objects are immutable and +// content-addressed. It means `ObjectID` will change if the `header` or the +// `payload` changes. // // `ObjectID` is a 32 byte long // [SHA256](https://csrc.nist.gov/publications/detail/fips/180/4/final) hash of @@ -37,7 +38,7 @@ message ObjectID { bytes value = 1 [ json_name = "value" ]; } -// NeoFS container identifier. Container structures are immutable and +// FrostFS container identifier. Container structures are immutable and // content-addressed. // // `ContainerID` is a 32 byte long @@ -90,7 +91,7 @@ message Version { uint32 minor = 2 [ json_name = "minor" ]; } -// Signature of something in NeoFS. +// Signature of something in FrostFS. message Signature { // Public key used for signing bytes key = 1 [ json_name = "key" ]; diff --git a/session/service.proto b/session/service.proto index 6e12147..544556b 100644 --- a/session/service.proto +++ b/session/service.proto @@ -11,7 +11,7 @@ import "session/types.proto"; // `SessionService` allows to establish a temporary trust relationship between // two peer nodes and generate a `SessionToken` as the proof of trust to be // 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 { // Open a new session between two peers. // diff --git a/session/types.proto b/session/types.proto index e039081..c5bb695 100644 --- a/session/types.proto +++ b/session/types.proto @@ -50,7 +50,7 @@ message ObjectSessionContext { refs.ContainerID container = 1 [ json_name = "container" ]; // 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. repeated refs.ObjectID objects = 2 [ json_name = "objects" ]; } @@ -88,7 +88,7 @@ message ContainerSessionContext { refs.ContainerID container_id = 3 [ json_name = "containerID" ]; } -// NeoFS Session Token. +// FrostFS Session Token. message SessionToken { // Session Token body message Body { @@ -126,7 +126,7 @@ message SessionToken { } // 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. + // FrostFS Technical Specification for details. Body body = 1 [ json_name = "body" ]; // Signature of `SessionToken` information @@ -186,7 +186,7 @@ message RequestMetaHeader { // `RequestMetaHeader` of the origin request 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. uint64 magic_number = 8 [ json_name = "magicNumber" ]; } diff --git a/status/types.proto b/status/types.proto index 302a11b..d3e09fd 100644 --- a/status/types.proto +++ b/status/types.proto @@ -5,12 +5,12 @@ package neo.fs.v2.status; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/grpc;status"; option csharp_namespace = "Neo.FileStorage.API.Status"; -// Declares the general format of the status returns of the NeoFS RPC protocol. -// Status is present in all response messages. Each RPC of NeoFS protocol -// describes the possible outcomes and details of the operation. +// Declares the general format of the status returns of the FrostFS RPC +// protocol. Status is present in all response messages. Each RPC of FrostFS +// 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 -// 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 // is defined for each section. Values can be referred to in the following ways: @@ -78,7 +78,7 @@ enum Section { SECTION_APE_MANAGER = 5; } -// Section of NeoFS successful return codes. +// Section of FrostFS successful return codes. enum Success { // [**0**] Default success. Not detailed. // If the server cannot match successful outcome to the code, it should @@ -93,9 +93,9 @@ enum CommonFail { // use this code. INTERNAL = 0; - // [**1025**] Wrong magic of the NeoFS network. + // [**1025**] Wrong magic of the FrostFS network. // 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). WRONG_MAGIC_NUMBER = 1; diff --git a/tombstone/types.proto b/tombstone/types.proto index 6547958..ccf1257 100644 --- a/tombstone/types.proto +++ b/tombstone/types.proto @@ -8,10 +8,10 @@ option csharp_namespace = "Neo.FileStorage.API.Tombstone"; import "refs/types.proto"; // 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 { - // Last NeoFS epoch number of the tombstone lifetime. It's set by the - // tombstone creator depending on the current NeoFS network settings. A + // 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. From 2a46a9ea0a9c51165d07c1e02b76e56408bdd12d Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Thu, 5 Sep 2024 16:27:53 +0300 Subject: [PATCH 10/24] [#50] *: Regenerate docs Signed-off-by: Aleksey Savchuk --- proto-docs/accounting.md | 20 ++-- proto-docs/acl.md | 15 +-- proto-docs/ape.md | 4 +- proto-docs/container.md | 235 ++------------------------------------- proto-docs/netmap.md | 80 +++++++++---- proto-docs/object.md | 28 +++-- proto-docs/refs.md | 11 +- proto-docs/session.md | 10 +- proto-docs/status.md | 12 +- proto-docs/tombstone.md | 4 +- 10 files changed, 118 insertions(+), 301 deletions(-) diff --git a/proto-docs/accounting.md b/proto-docs/accounting.md index cdc82a1..a8bfd16 100644 --- a/proto-docs/accounting.md +++ b/proto-docs/accounting.md @@ -35,11 +35,11 @@ ### Service "neo.fs.v2.accounting.AccountingService" -Accounting service provides methods for interaction with NeoFS sidechain via -other NeoFS nodes to get information about the account balance. Deposit and -Withdraw operations can't be implemented here, as they require Mainnet NeoFS -smart contract invocation. Transfer operations between internal NeoFS -accounts are possible if both use the same token type. +Accounting service provides methods for interaction with FrostFS sidechain +via other FrostFS nodes to get information about the account balance. Deposit +and Withdraw operations can't be implemented here, as they require Mainnet +FrostFS smart contract invocation. Transfer operations between internal +FrostFS accounts are possible if both use the same token type. ``` rpc Balance(BalanceRequest) returns (BalanceResponse); @@ -48,7 +48,7 @@ rpc Balance(BalanceRequest) returns (BalanceResponse); #### 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: - **OK** (0, SECTION_SUCCESS): @@ -78,9 +78,9 @@ BalanceRequest message ### Message BalanceRequest.Body 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 -contract. If omitted, client implementation MUST set it to the request's -signer `OwnerID`. +is used. It can be any existing account in FrostFS sidechain `Balance` +smart contract. If omitted, client implementation MUST set it to the +request's signer `OwnerID`. | Field | Type | Label | Description | @@ -131,7 +131,7 @@ rounding. ### 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 precision issue, special `Decimal` format is used for monetary computations. diff --git a/proto-docs/acl.md b/proto-docs/acl.md index bac7747..fdc7ade 100644 --- a/proto-docs/acl.md +++ b/proto-docs/acl.md @@ -71,11 +71,12 @@ Deprecated: eACL tables are no longer relevant - `APEOverrides` should be used i ### 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`). +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. +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 | @@ -106,7 +107,7 @@ Describes a single eACL rule. | 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. | | 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 | @@ -174,7 +175,7 @@ keys to match. 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 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 | @@ -210,7 +211,7 @@ Enumeration of possible sources of Headers to apply filters. | HEADER_UNSPECIFIED | 0 | Unspecified header, default value. | | REQUEST | 1 | Filter request 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. | diff --git a/proto-docs/ape.md b/proto-docs/ape.md index 39bc946..9795bc5 100644 --- a/proto-docs/ape.md +++ b/proto-docs/ape.md @@ -72,8 +72,8 @@ TargetType is a type target to which a rule chain is defined. | ----------- | ----- | -------- | --------- | ----------- | | double | | double | double | float | | float | | float | float | float | -| 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 | -| 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 | +| 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 | +| 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 | | uint32 | Uses variable-length encoding. | uint32 | int | int/long | | uint64 | Uses variable-length encoding. | uint64 | long | int/long | | sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | diff --git a/proto-docs/container.md b/proto-docs/container.md index 3df304f..76cc115 100644 --- a/proto-docs/container.md +++ b/proto-docs/container.md @@ -8,19 +8,10 @@ - [ContainerService](#neo.fs.v2.container.ContainerService) - Messages - - [AnnounceUsedSpaceRequest](#neo.fs.v2.container.AnnounceUsedSpaceRequest) - - [AnnounceUsedSpaceRequest.Body](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body) - - [AnnounceUsedSpaceRequest.Body.Announcement](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body.Announcement) - - [AnnounceUsedSpaceResponse](#neo.fs.v2.container.AnnounceUsedSpaceResponse) - - [AnnounceUsedSpaceResponse.Body](#neo.fs.v2.container.AnnounceUsedSpaceResponse.Body) - [DeleteRequest](#neo.fs.v2.container.DeleteRequest) - [DeleteRequest.Body](#neo.fs.v2.container.DeleteRequest.Body) - [DeleteResponse](#neo.fs.v2.container.DeleteResponse) - [DeleteResponse.Body](#neo.fs.v2.container.DeleteResponse.Body) - - [GetExtendedACLRequest](#neo.fs.v2.container.GetExtendedACLRequest) - - [GetExtendedACLRequest.Body](#neo.fs.v2.container.GetExtendedACLRequest.Body) - - [GetExtendedACLResponse](#neo.fs.v2.container.GetExtendedACLResponse) - - [GetExtendedACLResponse.Body](#neo.fs.v2.container.GetExtendedACLResponse.Body) - [GetRequest](#neo.fs.v2.container.GetRequest) - [GetRequest.Body](#neo.fs.v2.container.GetRequest.Body) - [GetResponse](#neo.fs.v2.container.GetResponse) @@ -33,10 +24,6 @@ - [PutRequest.Body](#neo.fs.v2.container.PutRequest.Body) - [PutResponse](#neo.fs.v2.container.PutResponse) - [PutResponse.Body](#neo.fs.v2.container.PutResponse.Body) - - [SetExtendedACLRequest](#neo.fs.v2.container.SetExtendedACLRequest) - - [SetExtendedACLRequest.Body](#neo.fs.v2.container.SetExtendedACLRequest.Body) - - [SetExtendedACLResponse](#neo.fs.v2.container.SetExtendedACLResponse) - - [SetExtendedACLResponse.Body](#neo.fs.v2.container.SetExtendedACLResponse.Body) - [container/types.proto](#container/types.proto) @@ -62,8 +49,8 @@ ### Service "neo.fs.v2.container.ContainerService" `ContainerService` provides API to interact with `Container` smart contract -in NeoFS sidechain via other NeoFS nodes. All of those actions can be done -equivalently by directly issuing transactions and RPC calls to sidechain +in FrostFS sidechain via other FrostFS nodes. All of those actions can be +done equivalently by directly issuing transactions and RPC calls to sidechain nodes. ``` @@ -71,9 +58,6 @@ rpc Put(PutRequest) returns (PutResponse); rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Get(GetRequest) returns (GetResponse); rpc List(ListRequest) returns (ListResponse); -rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse); -rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse); -rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) returns (AnnounceUsedSpaceResponse); ``` @@ -141,114 +125,9 @@ Statuses: | Name | Input | Output | | ---- | ----- | ------ | | 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); -- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - set container eACL access denied. - -| 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; -- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - access to container eACL is denied. - -| 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) | - - -### 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. | - - - - -### 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. | - - - - -### 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. | - - - - -### 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. | - - - - -### Message AnnounceUsedSpaceResponse.Body -`AnnounceUsedSpaceResponse` has an empty body because announcements are -one way communication. - - - ### Message DeleteRequest @@ -272,7 +151,7 @@ smart contract, so signing algorithm must be supported by NeoVM. | 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. | @@ -298,58 +177,6 @@ and done via consensus in Inner Ring nodes. - - -### 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. | - - - - -### 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 | - - - - -### 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. | - - - - -### 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 | - - ### Message GetRequest @@ -452,7 +279,7 @@ List containers response body. ### Message PutRequest -New NeoFS Container creation request +New FrostFS Container creation request | Field | Type | Label | Description | @@ -474,14 +301,14 @@ additional signature checks. | 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. | ### Message PutResponse -New NeoFS Container creation response +New FrostFS Container creation response | Field | Type | Label | Description | @@ -504,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 | - - - -### 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. | - - - - -### 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. | - - - - -### 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. | - - - - -### 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. - - @@ -612,7 +391,7 @@ There are some "well-known" attributes affecting system behaviour: (`__NEOFS__DISABLE_HOMOMORPHIC_HASHING` is deprecated) \ Disables homomorphic hashing for the container if the value equals "true" string. Any other values are interpreted as missing attribute. Container - could be accepted in a NeoFS network only if the global network hashing + could be accepted in a FrostFS network only if the global network hashing configuration value corresponds with that attribute's value. After container inclusion, network setting is ignored. diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index cbf5593..b49287c 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -55,7 +55,7 @@ `NetmapService` provides methods to work with `Network Map` and the information required to build it. The resulting `Network Map` is stored in sidechain `Netmap` smart contract, while related information can be obtained -from other NeoFS nodes. +from other FrostFS nodes. ``` rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse); @@ -83,7 +83,7 @@ information about the server has been successfully read; | LocalNodeInfo | [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest) | [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) | #### Method NetworkInfo -Read recent information about the NeoFS network. +Read recent information about the FrostFS network. Statuses: - **OK** (0, SECTION_SUCCESS): @@ -95,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) | #### Method NetmapSnapshot -Returns network map snapshot of the current NeoFS epoch. +Returns network map snapshot of the current FrostFS epoch. Statuses: - **OK** (0, SECTION_SUCCESS): @@ -149,7 +149,7 @@ Local Node Info, including API Version in use. | 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 | @@ -287,7 +287,7 @@ Network map structure ### Message NetworkConfig -NeoFS network configuration +FrostFS network configuration | Field | Type | Label | Description | @@ -315,7 +315,7 @@ System parameters: Fee paid for container creation by the container owner. Value: little-endian integer. Default: 0. - **EpochDuration** \ - NeoFS epoch duration measured in Sidechain blocks. + FrostFS epoch duration measured in Sidechain blocks. Value: little-endian integer. Default: 0. - **HomomorphicHashingDisabled** \ Flag of disabling the homomorphic hashing of objects' payload. @@ -327,8 +327,39 @@ System parameters: Flag allowing setting the MAINTENANCE state to storage nodes. Value: true if any byte != 0. Default: false. - **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. + + 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** \ Fee paid for withdrawal of funds paid by the account owner. Value: little-endian integer. Default: 0. @@ -349,45 +380,45 @@ System parameters: ### Message NetworkInfo -Information about NeoFS network +Information about FrostFS network | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| current_epoch | [uint64](#uint64) | | Number of the current epoch in the NeoFS network | -| magic_number | [uint64](#uint64) | | Magic number of the sidechain of the NeoFS network | -| ms_per_block | [int64](#int64) | | MillisecondsPerBlock network parameter of the sidechain of the NeoFS network | -| network_config | [NetworkConfig](#neo.fs.v2.netmap.NetworkConfig) | | NeoFS network configuration | +| current_epoch | [uint64](#uint64) | | Number of the current epoch in the FrostFS network | +| magic_number | [uint64](#uint64) | | Magic number of the sidechain of the FrostFS network | +| ms_per_block | [int64](#int64) | | MillisecondsPerBlock network parameter of the sidechain of the FrostFS network | +| network_config | [NetworkConfig](#neo.fs.v2.netmap.NetworkConfig) | | FrostFS network configuration | ### Message NodeInfo -NeoFS node description +FrostFS node 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 | -| 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. | -| state | [NodeInfo.State](#neo.fs.v2.netmap.NodeInfo.State) | | Carries state of the NeoFS node | +| 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 FrostFS node | ### 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 string. Value can't be empty. 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 one). A string representation of the chain of attributes in NeoFS +last one). A string representation of the chain of attributes in FrostFS 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 use "\:", "\/" and "\\" escaped symbols if any of them appears in an @@ -434,8 +465,8 @@ explicitly set: [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). Calculated automatically from `UN-LOCODE` attribute. * Continent \ - Node's continent name according to the [Seven-Continent model] - (https://en.wikipedia.org/wiki/Continent#Number). Calculated + Node's continent name according to the [Seven-Continent + model](https://en.wikipedia.org/wiki/Continent#Number). Calculated automatically from `UN-LOCODE` attribute. * ExternalAddr Node's preferred way for communications with external clients. @@ -443,7 +474,7 @@ explicitly set: Must contain a comma-separated list of multi-addresses. 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 | @@ -464,7 +495,7 @@ storage policy definition languages. | 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 | -| 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 | | 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 | @@ -522,7 +553,7 @@ hash distance. ### 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 | | ---- | ------ | ----------- | @@ -550,6 +581,7 @@ Operations on filters | OR | 7 | Logical OR | | AND | 8 | Logical AND | | NOT | 9 | Logical negation | +| LIKE | 10 | Matches pattern | diff --git a/proto-docs/object.md b/proto-docs/object.md index 27981e5..dd30ede 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -254,7 +254,7 @@ Statuses: #### Method Search 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. Extended headers can change `Search` behaviour: @@ -404,16 +404,20 @@ been deleted; #### 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. +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. +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; +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. @@ -996,8 +1000,8 @@ prefix to the name. Here is the list of fields available via this prefix: * $Object:split.splitID \ 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. + 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 properties: @@ -1160,7 +1164,7 @@ And some well-known attributes used by applications only: MIME Content Type of object's payload 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 | diff --git a/proto-docs/refs.md b/proto-docs/refs.md index 5b559d3..3ad3126 100644 --- a/proto-docs/refs.md +++ b/proto-docs/refs.md @@ -32,7 +32,7 @@ ### 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 `ContainerID` and `ObjectID` delimited by '/' character. @@ -65,7 +65,7 @@ Depending on checksum algorithm type, the string presentation may vary: ### Message ContainerID -NeoFS container identifier. Container structures are immutable and +FrostFS container identifier. Container structures are immutable and content-addressed. `ContainerID` is a 32 byte long @@ -90,8 +90,9 @@ with/without paddings are accepted. ### Message ObjectID -NeoFS Object unique identifier. Objects are immutable and content-addressed. -It means `ObjectID` will change if the `header` or the `payload` changes. +FrostFS Object unique identifier. Objects are immutable and +content-addressed. It means `ObjectID` will change if the `header` or the +`payload` changes. `ObjectID` is a 32 byte long [SHA256](https://csrc.nist.gov/publications/detail/fips/180/4/final) hash of @@ -141,7 +142,7 @@ with/without paddings are accepted. ### Message Signature -Signature of something in NeoFS. +Signature of something in FrostFS. | Field | Type | Label | Description | diff --git a/proto-docs/session.md b/proto-docs/session.md index 36a73ea..984db48 100644 --- a/proto-docs/session.md +++ b/proto-docs/session.md @@ -48,7 +48,7 @@ `SessionService` allows to establish a temporary trust relationship between two peer nodes and generate a `SessionToken` as the proof of trust to be 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); @@ -168,7 +168,7 @@ Carries objects involved in the object session. | 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. | -| 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. | @@ -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 | | 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 | -| 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. | @@ -237,12 +237,12 @@ Verification info for the response signed by all intermediate nodes ### Message SessionToken -NeoFS Session Token. +FrostFS Session Token. | 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 | diff --git a/proto-docs/status.md b/proto-docs/status.md index 373a7a7..76534fb 100644 --- a/proto-docs/status.md +++ b/proto-docs/status.md @@ -26,12 +26,12 @@ ### Message Status -Declares the general format of the status returns of the NeoFS RPC protocol. -Status is present in all response messages. Each RPC of NeoFS protocol -describes the possible outcomes and details of the operation. +Declares the general format of the status returns of the FrostFS RPC +protocol. Status is present in all response messages. Each RPC of FrostFS +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 -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 is defined for each section. Values can be referred to in the following ways: @@ -98,7 +98,7 @@ Section of failed statuses independent of the operation. | 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. | -| 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. | | 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. | @@ -165,7 +165,7 @@ Section of statuses for session-related operations. ### Success -Section of NeoFS successful return codes. +Section of FrostFS successful return codes. | Name | Number | Description | | ---- | ------ | ----------- | diff --git a/proto-docs/tombstone.md b/proto-docs/tombstone.md index 268e9a2..467ad55 100644 --- a/proto-docs/tombstone.md +++ b/proto-docs/tombstone.md @@ -26,12 +26,12 @@ ### Message Tombstone 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 | | ----- | ---- | ----- | ----------- | -| 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. | | members | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of objects to be deleted. | From 74bbc3a76bf363d8ae3837c74ea7da511331ef32 Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Wed, 11 Sep 2024 13:22:24 +0300 Subject: [PATCH 11/24] [#64] Update obsolete URLs Signed-off-by: Vitaliy Potyarkin --- CONTRIBUTING.md | 13 +++++++------ README.md | 7 +++---- doc/release_instructions.md | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c26de50..b6ecdf5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,8 +3,8 @@ First, thank you for contributing! We love and encourage pull requests from everyone. Please follow the guidelines: -- Check the open [issues](https://github.com/TrueCloudLab/frostfs-api/issues) and - [pull requests](https://github.com/TrueCloudLab/frostfs-api/pulls) for existing +- Check the open [issues](https://git.frostfs.info/TrueCloudLab/frostfs-api/issues) and + [pull requests](https://git.frostfs.info/TrueCloudLab/frostfs-api/pulls) for existing discussions. - 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 are the steps in details: -### Set up your GitHub Repository -Fork [NeoFS node upstream](https://github.com/TrueCloudLab/frostfs-api/fork) source +### Set up your repository + +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 need it for the `git clone` command below). ```sh -$ git clone https://github.com/TrueCloudLab/frostfs-api +$ git clone https://git.frostfs.info/TrueCloudLab/frostfs-api ``` ### Set up git remote as ``upstream`` ```sh $ 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 merge upstream/master ... diff --git a/README.md b/README.md index 5a262ae..561995d 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,17 @@ FrostFS

- FrostFS API language-agnostic protocol definitions + FrostFS API language-agnostic protocol definitions

--- -![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/TrueCloudLab/frostfs-api?sort=semver) -![License](https://img.shields.io/github/license/TrueCloudLab/frostfs-api.svg?style=popout) +![Release](https://git.frostfs.info/TrueCloudLab/frostfs-api/badges/release.svg) ## Overview 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 language-specific code. Use them to integrate applications with FrostFS. diff --git a/doc/release_instructions.md b/doc/release_instructions.md index 853b08a..28834e4 100644 --- a/doc/release_instructions.md +++ b/doc/release_instructions.md @@ -1,6 +1,6 @@ # 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. ## Pre-release checks From 83f2fc594413cfe1c4efa1f812e3a61427fc2e61 Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Wed, 11 Sep 2024 15:56:26 +0300 Subject: [PATCH 12/24] [#65] Remove reference to NeoFS spec Can't update it anymore. Will eventually be superseded by docsite Signed-off-by: Vitaliy Potyarkin --- doc/release_instructions.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/release_instructions.md b/doc/release_instructions.md index 28834e4..e7f8af2 100644 --- a/doc/release_instructions.md +++ b/doc/release_instructions.md @@ -60,4 +60,3 @@ releases. * Close corresponding X.Y.Z Github milestone * Make announcements in Matrix and Discord channels -* Update [NeoFS Technical Specification](https://github.com/nspcc-dev/neofs-spec) From b2f5205976250851af2c7da9bcf98101cd11b080 Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Thu, 12 Sep 2024 21:44:19 +0300 Subject: [PATCH 13/24] [#66] .forgejo: Make 'fmt' job fail on changed files Signed-off-by: Aleksey Savchuk --- .forgejo/workflows/fmt.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/fmt.yaml b/.forgejo/workflows/fmt.yaml index d56bcf1..ddd50a7 100644 --- a/.forgejo/workflows/fmt.yaml +++ b/.forgejo/workflows/fmt.yaml @@ -12,4 +12,6 @@ jobs: apt update apt install -y clang-format - name: Run fmt - run: make fmt + run: | + make fmt + git diff --exit-code --quiet From 5bfbd249bcc666bf53bc4ff729fcc14d8d42025b Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 1 Oct 2024 14:14:02 +0300 Subject: [PATCH 14/24] [#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 --- container/service.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/container/service.proto b/container/service.proto index f1f22de..493b08e 100644 --- a/container/service.proto +++ b/container/service.proto @@ -5,7 +5,6 @@ package neo.fs.v2.container; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc;container"; option csharp_namespace = "Neo.FileStorage.API.Container"; -import "acl/types.proto"; import "container/types.proto"; import "refs/types.proto"; import "session/types.proto"; From 4c51a9b9d63e53ca0b430d9e4aa6d7e692465821 Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Wed, 6 Nov 2024 12:50:32 +0300 Subject: [PATCH 15/24] [#71] Stop using obsolete .github directory This commit is a part of multi-repo cleanup effort: https://git.frostfs.info/TrueCloudLab/frostfs-infra/issues/136 Signed-off-by: Vitaliy Potyarkin --- .../ISSUE_TEMPLATE/bug_report.md | 0 .../ISSUE_TEMPLATE/config.yml | 0 .../ISSUE_TEMPLATE/feature_request.md | 0 {.github => .forgejo}/logo.svg | 0 {.github => .forgejo}/markdown.tmpl | 0 .github/CODEOWNERS | 1 - .github/workflows/buf.yml | 36 ------------------- .github/workflows/dco.yml | 21 ----------- CODEOWNERS | 1 + CONTRIBUTING.md | 2 +- Makefile | 2 +- README.md | 2 +- doc/release_instructions.md | 10 +++--- 13 files changed, 9 insertions(+), 66 deletions(-) rename {.github => .forgejo}/ISSUE_TEMPLATE/bug_report.md (100%) rename {.github => .forgejo}/ISSUE_TEMPLATE/config.yml (100%) rename {.github => .forgejo}/ISSUE_TEMPLATE/feature_request.md (100%) rename {.github => .forgejo}/logo.svg (100%) rename {.github => .forgejo}/markdown.tmpl (100%) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/workflows/buf.yml delete mode 100644 .github/workflows/dco.yml create mode 100644 CODEOWNERS diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.forgejo/ISSUE_TEMPLATE/bug_report.md similarity index 100% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .forgejo/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.forgejo/ISSUE_TEMPLATE/config.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/config.yml rename to .forgejo/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.forgejo/ISSUE_TEMPLATE/feature_request.md similarity index 100% rename from .github/ISSUE_TEMPLATE/feature_request.md rename to .forgejo/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/logo.svg b/.forgejo/logo.svg similarity index 100% rename from .github/logo.svg rename to .forgejo/logo.svg diff --git a/.github/markdown.tmpl b/.forgejo/markdown.tmpl similarity index 100% rename from .github/markdown.tmpl rename to .forgejo/markdown.tmpl diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 29c4211..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @alexvanin @realloc @fyrchik @anatoly-bogatyrev diff --git a/.github/workflows/buf.yml b/.github/workflows/buf.yml deleted file mode 100644 index 5d9d740..0000000 --- a/.github/workflows/buf.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml deleted file mode 100644 index 40ed8fc..0000000 --- a/.github/workflows/dco.yml +++ /dev/null @@ -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 }} diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..4690d7e --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +.* @alexvanin @realloc @fyrchik @a.bogatyrev diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b6ecdf5..1ca386f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,7 +87,7 @@ $ git push origin feature/123-something_awesome ``` ### 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 detailed steps on how to create a pull request. After a Pull Request gets peer reviewed and approved, it will be merged. diff --git a/Makefile b/Makefile index c08d609..6173f5c 100755 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ doc: @for f in `find . -type f -name '*.proto' -exec dirname {} \; | sort -u `; do \ echo "⇒ Documentation for $$(basename $$f)"; \ protoc \ - --doc_opt=.github/markdown.tmpl,$${f}.md \ + --doc_opt=.forgejo/markdown.tmpl,$${f}.md \ --proto_path=.:/usr/local/include \ --doc_out=proto-docs/ $${f}/*.proto; \ done diff --git a/README.md b/README.md index 561995d..5447b7b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

-FrostFS +FrostFS

FrostFS API language-agnostic protocol definitions diff --git a/doc/release_instructions.md b/doc/release_instructions.md index e7f8af2..d4fb9d4 100644 --- a/doc/release_instructions.md +++ b/doc/release_instructions.md @@ -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 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, -describing each change briefly with a reference to GitHub issues, where +describing each change briefly with a reference to issues, where available. ## Release commit @@ -38,7 +38,7 @@ Release v2.9.0 - Anmyeondo (안면도, 安眠島) Use `vX.Y.Z` tag following the semantic versioning standard. For pre-release 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 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 ``` -## 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 ` ( )` scheme for major releases and just `` for regular point @@ -58,5 +58,5 @@ releases. ## Post-release actions -* Close corresponding X.Y.Z Github milestone +* Close corresponding X.Y.Z milestone * Make announcements in Matrix and Discord channels From 1a6bb369ec4cdf262e01be533973e0865a4ae1bb Mon Sep 17 00:00:00 2001 From: Ekaterina Lebedeva Date: Wed, 16 Oct 2024 17:36:52 +0300 Subject: [PATCH 16/24] [#70] container: Add ListStream method Signed-off-by: Ekaterina Lebedeva --- container/service.proto | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/container/service.proto b/container/service.proto index 493b08e..ff79fcb 100644 --- a/container/service.proto +++ b/container/service.proto @@ -61,6 +61,17 @@ service ContainerService { // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ // container list access denied. rpc List(ListRequest) returns (ListResponse); + + // Returns all owner's containers from `Container` smart contract' storage + // via stream. + // + // Statuses: + // - **OK** (0, SECTION_SUCCESS): \ + // container list has been successfully read; + // - Common failures (SECTION_FAILURE_COMMON); + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // container list access denied. + rpc ListStream(ListStreamRequest) returns (stream ListStreamResponse); } // New FrostFS Container creation request @@ -245,3 +256,44 @@ message ListResponse { // transmission. neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; } + +// List containers stream +message ListStreamRequest { + // List containers stream request body. + message Body { + // Identifier of the container owner. + neo.fs.v2.refs.OwnerID owner_id = 1; + } + // Body of list containers stream 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; +} + +// List containers stream +message ListStreamResponse { + // List containers stream response body. + message Body { + // List of `ContainerID`s belonging to the requested `OwnerID` + repeated refs.ContainerID container_ids = 1; + } + + // Body of list containers stream 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; +} From 8540f0d18d5d26fd32ead801478e8405b8fbaaaf Mon Sep 17 00:00:00 2001 From: Ekaterina Lebedeva Date: Wed, 13 Nov 2024 15:39:21 +0300 Subject: [PATCH 17/24] [#70] container: Fix wrong tick in comments Signed-off-by: Ekaterina Lebedeva --- container/service.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container/service.proto b/container/service.proto index ff79fcb..a9a33d2 100644 --- a/container/service.proto +++ b/container/service.proto @@ -52,7 +52,7 @@ service ContainerService { // access to container is denied. 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. // // Statuses: // - **OK** (0, SECTION_SUCCESS): \ @@ -62,7 +62,7 @@ service ContainerService { // container list access denied. rpc List(ListRequest) returns (ListResponse); - // Returns all owner's containers from `Container` smart contract' storage + // Returns all owner's containers from `Container` smart contract storage // via stream. // // Statuses: From 2ed394d380a3e40f490a56c478814fb65907f686 Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Tue, 10 Dec 2024 15:42:13 +0300 Subject: [PATCH 18/24] [#73] Refine CODEOWNERS settings Signed-off-by: Vitaliy Potyarkin --- CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 4690d7e..e72ee14 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1,3 @@ .* @alexvanin @realloc @fyrchik @a.bogatyrev +.forgejo/.* @potyarkin +Makefile @potyarkin From e33194282c0035bed8fcc652175f5a3dabd902a8 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 26 Dec 2024 14:17:07 +0300 Subject: [PATCH 19/24] [#75] CODEOWNERS: Add SDK developers team Signed-off-by: Evgenii Stratonikov --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index e72ee14..854e751 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,3 +1,3 @@ -.* @alexvanin @realloc @fyrchik @a.bogatyrev +.* @alexvanin @realloc @fyrchik @a.bogatyrev @TrueCloudLab/storage-sdk-developers .forgejo/.* @potyarkin Makefile @potyarkin From 52e5bc646f1093be42581362a58e245734bdd8ac Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 26 Dec 2024 14:06:59 +0300 Subject: [PATCH 20/24] [#74] Use edition directive instead of syntax https://go.dev/blog/protobuf-opaque Signed-off-by: Evgenii Stratonikov --- accounting/service.proto | 2 +- accounting/types.proto | 2 +- acl/types.proto | 2 +- ape/types.proto | 2 +- apemanager/service.proto | 2 +- container/service.proto | 2 +- container/types.proto | 2 +- lock/types.proto | 2 +- netmap/service.proto | 2 +- netmap/types.proto | 2 +- object/service.proto | 2 +- object/types.proto | 2 +- refs/types.proto | 2 +- session/service.proto | 2 +- session/types.proto | 2 +- status/types.proto | 2 +- tombstone/types.proto | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/accounting/service.proto b/accounting/service.proto index eedd4ce..cd49b4d 100644 --- a/accounting/service.proto +++ b/accounting/service.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.accounting; diff --git a/accounting/types.proto b/accounting/types.proto index 5dd9b50..7f5e89c 100644 --- a/accounting/types.proto +++ b/accounting/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.accounting; diff --git a/acl/types.proto b/acl/types.proto index fdaffd4..78f247a 100644 --- a/acl/types.proto +++ b/acl/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.acl; diff --git a/ape/types.proto b/ape/types.proto index 3a97e60..2cbc5a9 100644 --- a/ape/types.proto +++ b/ape/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package frostfs.v2.ape; diff --git a/apemanager/service.proto b/apemanager/service.proto index 166ba4d..64c2565 100644 --- a/apemanager/service.proto +++ b/apemanager/service.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package frostfs.v2.apemanager; diff --git a/container/service.proto b/container/service.proto index a9a33d2..72b3789 100644 --- a/container/service.proto +++ b/container/service.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.container; diff --git a/container/types.proto b/container/types.proto index d133a45..d114205 100644 --- a/container/types.proto +++ b/container/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.container; diff --git a/lock/types.proto b/lock/types.proto index 2fdafa5..dc55276 100644 --- a/lock/types.proto +++ b/lock/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.lock; diff --git a/netmap/service.proto b/netmap/service.proto index dce43f4..c21fb53 100644 --- a/netmap/service.proto +++ b/netmap/service.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.netmap; diff --git a/netmap/types.proto b/netmap/types.proto index 969790c..b76b3c1 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.netmap; diff --git a/object/service.proto b/object/service.proto index e6ab5e0..f1ac927 100644 --- a/object/service.proto +++ b/object/service.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.object; diff --git a/object/types.proto b/object/types.proto index 6e9469b..f1df067 100644 --- a/object/types.proto +++ b/object/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.object; diff --git a/refs/types.proto b/refs/types.proto index fe12ec6..2464c34 100644 --- a/refs/types.proto +++ b/refs/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.refs; diff --git a/session/service.proto b/session/service.proto index 544556b..c9a7948 100644 --- a/session/service.proto +++ b/session/service.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.session; diff --git a/session/types.proto b/session/types.proto index c5bb695..1e5b9db 100644 --- a/session/types.proto +++ b/session/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.session; diff --git a/status/types.proto b/status/types.proto index d3e09fd..60fd312 100644 --- a/status/types.proto +++ b/status/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.status; diff --git a/tombstone/types.proto b/tombstone/types.proto index ccf1257..aac19b0 100644 --- a/tombstone/types.proto +++ b/tombstone/types.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; +edition = "2023"; package neo.fs.v2.tombstone; From b337e61e98705d79b01d55a3aeb22997fc5870de Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Wed, 5 Feb 2025 13:43:36 +0300 Subject: [PATCH 21/24] [#78] status: Introduce `RESOURCE_EXHAUSTED` common status Signed-off-by: Aleksey Savchuk --- status/types.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/status/types.proto b/status/types.proto index 60fd312..6a98f84 100644 --- a/status/types.proto +++ b/status/types.proto @@ -109,6 +109,10 @@ enum CommonFail { // request parameter as the client sent it incorrectly, then this code should // be used. INVALID_ARGUMENT = 4; + + // [**1029**] Resource exhausted failure. This code should be used + // if the operation cannot be performed due to a lack of resources. + RESOURCE_EXHAUSTED = 5; } // Section of statuses for object-related operations. From a9eaff2fd6f6f4a12e519890bba7c59deefd1600 Mon Sep 17 00:00:00 2001 From: Ori Bruk Date: Tue, 11 Mar 2025 18:41:01 +0300 Subject: [PATCH 22/24] [#82] Update documentation info Signed-off-by: Ori Bruk --- object/service.proto | 4 +++ proto-docs/container.md | 70 ++++++++++++++++++++++++++++++++++++++++- proto-docs/object.md | 5 ++- proto-docs/status.md | 1 + 4 files changed, 78 insertions(+), 2 deletions(-) diff --git a/object/service.proto b/object/service.proto index f1ac927..8ee955a 100644 --- a/object/service.proto +++ b/object/service.proto @@ -124,6 +124,9 @@ service ObjectService { // returned. If `main_only` request field is set, the short header with only // the very minimal information will be returned instead. // + // Max header size is currently not limited by this API, but may be restricted + // on the service level. By default, gRPC uses a message size of 4 MiB. + // // Extended headers can change `Head` behaviour: // * [ __SYSTEM__NETMAP_EPOCH ] \ // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ @@ -570,6 +573,7 @@ message HeadResponse { ShortHeader short_header = 2; // Meta information of split hierarchy. + // Indicates that the object is virtual, manual assembly is required. SplitInfo split_info = 3; // Meta information for EC object assembly. diff --git a/proto-docs/container.md b/proto-docs/container.md index 76cc115..7ee5dab 100644 --- a/proto-docs/container.md +++ b/proto-docs/container.md @@ -20,6 +20,10 @@ - [ListRequest.Body](#neo.fs.v2.container.ListRequest.Body) - [ListResponse](#neo.fs.v2.container.ListResponse) - [ListResponse.Body](#neo.fs.v2.container.ListResponse.Body) + - [ListStreamRequest](#neo.fs.v2.container.ListStreamRequest) + - [ListStreamRequest.Body](#neo.fs.v2.container.ListStreamRequest.Body) + - [ListStreamResponse](#neo.fs.v2.container.ListStreamResponse) + - [ListStreamResponse.Body](#neo.fs.v2.container.ListStreamResponse.Body) - [PutRequest](#neo.fs.v2.container.PutRequest) - [PutRequest.Body](#neo.fs.v2.container.PutRequest.Body) - [PutResponse](#neo.fs.v2.container.PutResponse) @@ -58,6 +62,7 @@ rpc Put(PutRequest) returns (PutResponse); rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Get(GetRequest) returns (GetResponse); rpc List(ListRequest) returns (ListResponse); +rpc ListStream(ListStreamRequest) returns (stream ListStreamResponse); ``` @@ -113,7 +118,7 @@ Statuses: | Get | [GetRequest](#neo.fs.v2.container.GetRequest) | [GetResponse](#neo.fs.v2.container.GetResponse) | #### Method List -Returns all owner's containers from 'Container` smart contract' storage. +Returns all owner's containers from `Container` smart contract storage. Statuses: - **OK** (0, SECTION_SUCCESS): \ @@ -125,6 +130,21 @@ Statuses: | Name | Input | Output | | ---- | ----- | ------ | | List | [ListRequest](#neo.fs.v2.container.ListRequest) | [ListResponse](#neo.fs.v2.container.ListResponse) | +#### Method ListStream + +Returns all owner's containers from `Container` smart contract storage +via stream. + +Statuses: +- **OK** (0, SECTION_SUCCESS): \ + container list has been successfully read; +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + container list access denied. + +| Name | Input | Output | +| ---- | ----- | ------ | +| ListStream | [ListStreamRequest](#neo.fs.v2.container.ListStreamRequest) | [ListStreamResponse](#neo.fs.v2.container.ListStreamResponse) | @@ -276,6 +296,54 @@ List containers response body. | container_ids | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | repeated | List of `ContainerID`s belonging to the requested `OwnerID` | + + +### Message ListStreamRequest +List containers stream + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body | [ListStreamRequest.Body](#neo.fs.v2.container.ListStreamRequest.Body) | | Body of list containers stream 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. | + + + + +### Message ListStreamRequest.Body +List containers stream request body. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| owner_id | [neo.fs.v2.refs.OwnerID](#neo.fs.v2.refs.OwnerID) | | Identifier of the container owner. | + + + + +### Message ListStreamResponse +List containers stream + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body | [ListStreamResponse.Body](#neo.fs.v2.container.ListStreamResponse.Body) | | Body of list containers stream 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. | + + + + +### Message ListStreamResponse.Body +List containers stream response body. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| container_ids | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | repeated | List of `ContainerID`s belonging to the requested `OwnerID` | + + ### Message PutRequest diff --git a/proto-docs/object.md b/proto-docs/object.md index dd30ede..14b9ae6 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -223,6 +223,9 @@ Returns the object Headers without data payload. By default full header is returned. If `main_only` request field is set, the short header with only the very minimal information will be returned instead. +Max header size is currently not limited by this API, but may be restricted +on the service level. By default, gRPC uses a message size of 4 MiB. + Extended headers can change `Head` behaviour: * [ __SYSTEM__NETMAP_EPOCH ] \ (`__NEOFS__NETMAP_EPOCH` is deprecated) \ @@ -728,7 +731,7 @@ Object HEAD response body | ----- | ---- | ----- | ----------- | | 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 | -| 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. Indicates that the object is virtual, manual assembly is required. | | ec_info | [ECInfo](#neo.fs.v2.object.ECInfo) | | Meta information for EC object assembly. | diff --git a/proto-docs/status.md b/proto-docs/status.md index 76534fb..b00d000 100644 --- a/proto-docs/status.md +++ b/proto-docs/status.md @@ -102,6 +102,7 @@ Section of failed statuses independent of the operation. | SIGNATURE_VERIFICATION_FAIL | 2 | [**1026**] Signature verification failure. | | 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. | +| RESOURCE_EXHAUSTED | 5 | [**1029**] Resource exhausted failure. This code should be used if the operation cannot be performed due to a lack of resources. | From 9c7730b67bbe2163e8d1ea82de48e488c9dd0bff Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Tue, 4 Mar 2025 16:50:03 +0300 Subject: [PATCH 23/24] [#81] object: Extend `PatchRequest.Body` with `new_split_header` field * This field updates object's split header. Signed-off-by: Airat Arifullin --- object/service.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/object/service.proto b/object/service.proto index 8ee955a..c5e4fc7 100644 --- a/object/service.proto +++ b/object/service.proto @@ -891,6 +891,10 @@ message PatchRequest { // key, then it just replaces it while merging the lists. bool replace_attributes = 3; + // New split header for the object. This defines how the object will relate + // to other objects in a split operation. + neo.fs.v2.object.Header.Split new_split_header = 5; + // The patch for the object's payload. message Patch { // The range of the source object for which the payload is replaced by the From 6ea41833977464d82e9bf96394254271f34ea68d Mon Sep 17 00:00:00 2001 From: Roman Loginov Date: Wed, 5 Feb 2025 13:32:45 +0300 Subject: [PATCH 24/24] [#77] object: Add a refinement to description on the FileName attribute Signed-off-by: Roman Loginov --- object/types.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/object/types.proto b/object/types.proto index f1df067..62a6792 100644 --- a/object/types.proto +++ b/object/types.proto @@ -141,7 +141,8 @@ message Header { // * Name \ // Human-friendly name // * FileName \ - // File name to be associated with the object on saving + // File name to be associated with the object on saving. FileName must not + // contain the delimiting symbol '/'. // * FilePath \ // Full path to be associated with the object on saving. Should start with a // '/' and use '/' as a delimiting symbol. Trailing '/' should be