From a8344d964da099742cd4b8eafe1e28875cc46b0a Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Tue, 21 Feb 2023 11:18:35 +0300 Subject: [PATCH 01/59] [nspcc-dev#241] Add impersonate field to bearer token Signed-off-by: Denis Kirillov --- acl/types.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/acl/types.proto b/acl/types.proto index 95b18b5..491c1e5 100644 --- a/acl/types.proto +++ b/acl/types.proto @@ -213,6 +213,10 @@ message BearerToken { } // Token expiration and valid time period parameters TokenLifetime lifetime = 3 [json_name="lifetime"]; + + // AllowImpersonate flag to consider token signer as request owner. + // If this field is true extended ACL table in token body isn't processed. + bool AllowImpersonate = 4 [json_name="allow_impersonate"]; } // Bearer Token body Body body = 1 [json_name="body"]; From eafcbff11fc3b0fefee45a8569f2a6521d74f3c7 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Tue, 7 Mar 2023 11:50:02 +0300 Subject: [PATCH 02/59] Rename go package names Due to source code relocation from GitHub. Signed-off-by: Alex Vanin --- accounting/service.proto | 2 +- accounting/types.proto | 2 +- acl/types.proto | 2 +- audit/types.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 +- reputation/service.proto | 2 +- reputation/types.proto | 2 +- session/service.proto | 2 +- session/types.proto | 2 +- status/types.proto | 2 +- storagegroup/types.proto | 2 +- subnet/types.proto | 2 +- tombstone/types.proto | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/accounting/service.proto b/accounting/service.proto index 154382a..6574404 100644 --- a/accounting/service.proto +++ b/accounting/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.accounting; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/accounting/grpc;accounting"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/grpc;accounting"; option csharp_namespace = "Neo.FileStorage.API.Accounting"; import "accounting/types.proto"; diff --git a/accounting/types.proto b/accounting/types.proto index af16f84..205332e 100644 --- a/accounting/types.proto +++ b/accounting/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.accounting; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/accounting/grpc;accounting"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/grpc;accounting"; option csharp_namespace = "Neo.FileStorage.API.Accounting"; // Standard floating point data type can't be used in NeoFS due to inexactness diff --git a/acl/types.proto b/acl/types.proto index 95b18b5..1ca947a 100644 --- a/acl/types.proto +++ b/acl/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.acl; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/acl/grpc;acl"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc;acl"; option csharp_namespace = "Neo.FileStorage.API.Acl"; import "refs/types.proto"; diff --git a/audit/types.proto b/audit/types.proto index 156a31b..c83260c 100644 --- a/audit/types.proto +++ b/audit/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.audit; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/audit/grpc;audit"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/audit/grpc;audit"; option csharp_namespace = "Neo.FileStorage.API.Audit"; import "refs/types.proto"; diff --git a/container/service.proto b/container/service.proto index 249bfb1..8c5f84e 100644 --- a/container/service.proto +++ b/container/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.container; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/container/grpc;container"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc;container"; option csharp_namespace = "Neo.FileStorage.API.Container"; import "acl/types.proto"; diff --git a/container/types.proto b/container/types.proto index a735f74..71fbaa2 100644 --- a/container/types.proto +++ b/container/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.container; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/container/grpc;container"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc;container"; option csharp_namespace = "Neo.FileStorage.API.Container"; import "netmap/types.proto"; diff --git a/lock/types.proto b/lock/types.proto index a2eb833..a278709 100644 --- a/lock/types.proto +++ b/lock/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.lock; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/lock/grpc;lock"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/lock/grpc;lock"; option csharp_namespace = "Neo.FileStorage.API.Lock"; import "refs/types.proto"; diff --git a/netmap/service.proto b/netmap/service.proto index 922cc3e..179a2c1 100644 --- a/netmap/service.proto +++ b/netmap/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.netmap; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/grpc;netmap"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc;netmap"; option csharp_namespace = "Neo.FileStorage.API.Netmap"; import "netmap/types.proto"; diff --git a/netmap/types.proto b/netmap/types.proto index e4b5e6d..f6bd43e 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.netmap; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/grpc;netmap"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc;netmap"; option csharp_namespace = "Neo.FileStorage.API.Netmap"; import "refs/types.proto"; diff --git a/object/service.proto b/object/service.proto index 7170b31..dfc0892 100644 --- a/object/service.proto +++ b/object/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.object; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/object/grpc;object"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object/grpc;object"; option csharp_namespace = "Neo.FileStorage.API.Object"; import "object/types.proto"; diff --git a/object/types.proto b/object/types.proto index 78ed3c5..ff970ed 100644 --- a/object/types.proto +++ b/object/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.object; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/object/grpc;object"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object/grpc;object"; option csharp_namespace = "Neo.FileStorage.API.Object"; import "refs/types.proto"; diff --git a/refs/types.proto b/refs/types.proto index 07659f3..054443e 100644 --- a/refs/types.proto +++ b/refs/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.refs; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc;refs"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc;refs"; option csharp_namespace = "Neo.FileStorage.API.Refs"; // Objects in NeoFS are addressed by their ContainerID and ObjectID. diff --git a/reputation/service.proto b/reputation/service.proto index ecdb60f..2b3c9a6 100644 --- a/reputation/service.proto +++ b/reputation/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.reputation; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/reputation/grpc;reputation"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/reputation/grpc;reputation"; option csharp_namespace = "Neo.FileStorage.API.Reputation"; import "reputation/types.proto"; diff --git a/reputation/types.proto b/reputation/types.proto index 11915ae..74262e7 100644 --- a/reputation/types.proto +++ b/reputation/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.reputation; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/reputation/grpc;reputation"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/reputation/grpc;reputation"; option csharp_namespace = "Neo.FileStorage.API.Reputation"; import "refs/types.proto"; diff --git a/session/service.proto b/session/service.proto index 355d3fc..dcda6c8 100644 --- a/session/service.proto +++ b/session/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.session; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/session/grpc;session"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc;session"; option csharp_namespace = "Neo.FileStorage.API.Session"; import "refs/types.proto"; diff --git a/session/types.proto b/session/types.proto index 71c0e54..2a236d6 100644 --- a/session/types.proto +++ b/session/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.session; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/session/grpc;session"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc;session"; option csharp_namespace = "Neo.FileStorage.API.Session"; import "refs/types.proto"; diff --git a/status/types.proto b/status/types.proto index 4c1eb1d..34134a4 100644 --- a/status/types.proto +++ b/status/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.status; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/status/grpc;status"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/grpc;status"; option csharp_namespace = "Neo.FileStorage.API.Status"; // Declares the general format of the status returns of the NeoFS RPC protocol. diff --git a/storagegroup/types.proto b/storagegroup/types.proto index 1522f1f..f504afe 100644 --- a/storagegroup/types.proto +++ b/storagegroup/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.storagegroup; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/storagegroup/grpc;storagegroup"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/storagegroup/grpc;storagegroup"; option csharp_namespace = "Neo.FileStorage.API.StorageGroup"; import "refs/types.proto"; diff --git a/subnet/types.proto b/subnet/types.proto index 6fe5f36..cc9cae3 100644 --- a/subnet/types.proto +++ b/subnet/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.subnet; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/subnet/grpc;subnet"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/subnet/grpc;subnet"; option csharp_namespace = "Neo.FileStorage.API.Subnet"; import "refs/types.proto"; diff --git a/tombstone/types.proto b/tombstone/types.proto index 70ff8db..1a31726 100644 --- a/tombstone/types.proto +++ b/tombstone/types.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package neo.fs.v2.tombstone; -option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/tombstone/grpc;tombstone"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/tombstone/grpc;tombstone"; option csharp_namespace = "Neo.FileStorage.API.Tombstone"; import "refs/types.proto"; From 3adb55c38a9cc4c699f448858593e3d851d682a2 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Mon, 6 Mar 2023 14:56:09 +0300 Subject: [PATCH 03/59] [#12] Add __FROSTFS__ system prefix Signed-off-by: Denis Kirillov --- container/types.proto | 10 +++++----- lock/types.proto | 2 +- netmap/types.proto | 2 +- object/service.proto | 22 +++++++++++----------- object/types.proto | 10 +++++----- proto-docs/container.md | 10 +++++----- proto-docs/lock.md | 2 +- proto-docs/netmap.md | 2 +- proto-docs/object.md | 32 ++++++++++++++++---------------- proto-docs/session.md | 6 +++--- proto-docs/storagegroup.md | 2 +- proto-docs/tombstone.md | 2 +- session/types.proto | 6 +++--- storagegroup/types.proto | 2 +- tombstone/types.proto | 2 +- 15 files changed, 56 insertions(+), 56 deletions(-) diff --git a/container/types.proto b/container/types.proto index 71fbaa2..050189a 100644 --- a/container/types.proto +++ b/container/types.proto @@ -37,16 +37,16 @@ message Container { // // There are some "well-known" attributes affecting system behaviour: // - // * __NEOFS__SUBNET \ + // * [ __NEOFS__SUBNET | __FROSTFS__SUBNET ] \ // String ID of a container's storage subnet. Any container can be attached to // one subnet only. - // * __NEOFS__NAME \ + // * [ __NEOFS__NAME | __FROSTFS__NAME ] \ // String of a human-friendly container name registered as a domain in // NNS contract. - // * __NEOFS__ZONE \ - // String of a zone for `__NEOFS__NAME`. Used as a TLD of a domain name in NNS + // * [ __NEOFS__ZONE | __FROSTFS__ZONE ] \ + // String of a zone for `__NEOFS__NAME`/`__FROSTFS__NAME`. Used as a TLD of a domain name in NNS // contract. If no zone is specified, use default zone: `container`. - // * __NEOFS__DISABLE_HOMOMORPHIC_HASHING \ + // * [ __NEOFS__DISABLE_HOMOMORPHIC_HASHING | __FROSTFS__DISABLE_HOMOMORPHIC_HASHING ] \ // Disables homomorphic hashing for the container if the value equals "true" string. // Any other values are interpreted as missing attribute. Container could be // accepted in a NeoFS network only if the global network hashing configuration diff --git a/lock/types.proto b/lock/types.proto index a278709..ac52966 100644 --- a/lock/types.proto +++ b/lock/types.proto @@ -9,7 +9,7 @@ import "refs/types.proto"; // Lock objects protects a list of objects from being deleted. The lifetime of a // lock object is limited similar to regular objects in -// `__NEOFS__EXPIRATION_EPOCH` attribute. Lock object MUST have expiration epoch. +// `__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` attribute. Lock object MUST have expiration epoch. // It is impossible to delete a lock object via ObjectService.Delete RPC call. message Lock { // List of objects to lock. Must not be empty or carry empty IDs. diff --git a/netmap/types.proto b/netmap/types.proto index f6bd43e..6b58cd6 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -164,7 +164,7 @@ message NodeInfo { // attributes it's a string presenting floating point number with comma or // point delimiter for decimal part. In the Network Map it will be saved as // 64-bit unsigned integer representing number of minimal token fractions. - // * __NEOFS__SUBNET_%s \ + // * [ __NEOFS__SUBNET_%s | __FROSTFS__SUBNET_%s ] \ // `True` or `False`. Defines if the node is included in the `%s` subnetwork // or not. `%s` must be an existing subnetwork's ID (non-negative integer number). // A node can be included in more than one subnetwork and, therefore, can contain diff --git a/object/service.proto b/object/service.proto index dfc0892..301d526 100644 --- a/object/service.proto +++ b/object/service.proto @@ -20,11 +20,11 @@ service ObjectService { // keeping the receiving order. // // Extended headers can change `Get` behaviour: - // * __NEOFS__NETMAP_EPOCH \ + // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ // Will use the requsted version of Network Map for object placement // calculation. - // * __NEOFS__NETMAP_LOOKUP_DEPTH \ - // Will try older versions (starting from `__NEOFS__NETMAP_EPOCH` if specified or + // * [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ + // Will try older versions (starting from `__NEOFS__NETMAP_EPOCH`/`__FROSTFS__NETMAP_EPOCH` if specified or // the latest one otherwise) of Network Map to find an object until the depth // limit is reached. // @@ -54,7 +54,7 @@ service ObjectService { // Chunk messages SHOULD be sent in the direct order of fragmentation. // // Extended headers can change `Put` behaviour: - // * __NEOFS__NETMAP_EPOCH \ + // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH \ // Will use the requsted version of Network Map for object placement // calculation. // @@ -85,7 +85,7 @@ service ObjectService { // guarantee. Object will be marked for removal and deleted eventually. // // Extended headers can change `Delete` behaviour: - // * __NEOFS__NETMAP_EPOCH \ + // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ // Will use the requsted version of Network Map for object placement // calculation. // @@ -110,7 +110,7 @@ service ObjectService { // the very minimal information will be returned instead. // // Extended headers can change `Head` behaviour: - // * __NEOFS__NETMAP_EPOCH \ + // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ // Will use the requsted version of Network Map for object placement // calculation. // @@ -137,7 +137,7 @@ service ObjectService { // Specification section for more details. // // Extended headers can change `Search` behaviour: - // * __NEOFS__NETMAP_EPOCH \ + // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ // Will use the requsted version of Network Map for object placement // calculation. // @@ -161,10 +161,10 @@ service ObjectService { // order. // // Extended headers can change `GetRange` behaviour: - // * __NEOFS__NETMAP_EPOCH \ + // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ // Will use the requsted version of Network Map for object placement // calculation. - // * __NEOFS__NETMAP_LOOKUP_DEPTH \ + // * [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ // Will try older versions of Network Map to find an object until the depth // limit is reached. // @@ -194,10 +194,10 @@ service ObjectService { // the request. Note that hash is calculated for XORed data. // // Extended headers can change `GetRangeHash` behaviour: - // * __NEOFS__NETMAP_EPOCH \ + // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ // Will use the requsted version of Network Map for object placement // calculation. - // * __NEOFS__NETMAP_LOOKUP_DEPTH \ + // * [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ // Will try older versions of Network Map to find an object until the depth // limit is reached. // diff --git a/object/types.proto b/object/types.proto index ff970ed..ec19334 100644 --- a/object/types.proto +++ b/object/types.proto @@ -114,19 +114,19 @@ message Header { // Objects with duplicated attribute names or attributes with empty values // will be considered invalid. // - // There are some "well-known" attributes starting with `__NEOFS__` prefix + // There are some "well-known" attributes starting with `__NEOFS__`/`__FROSTFS__` prefix // that affect system behaviour: // - // * __NEOFS__UPLOAD_ID \ + // * [ __NEOFS__UPLOAD_ID | __FROSTFS__UPLOAD_ID ] \ // Marks smaller parts of a split bigger object - // * __NEOFS__EXPIRATION_EPOCH \ + // * [ __NEOFS__EXPIRATION_EPOCH | __FROSTFS__EXPIRATION_EPOCH ] \ // Tells GC to delete object after that epoch - // * __NEOFS__TICK_EPOCH \ + // * [ __NEOFS__TICK_EPOCH | __FROSTFS__TICK_EPOCH ] \ // Decimal number that defines what epoch must produce // object notification with UTF-8 object address in a // body (`0` value produces notification right after // object put) - // * __NEOFS__TICK_TOPIC \ + // * [ __NEOFS__TICK_TOPIC | __FROSTFS__TICK_TOPIC ] \ // UTF-8 string topic ID that is used for object notification // // And some well-known attributes used by applications only: diff --git a/proto-docs/container.md b/proto-docs/container.md index b518a67..9cd2d03 100644 --- a/proto-docs/container.md +++ b/proto-docs/container.md @@ -587,16 +587,16 @@ values will be considered invalid. There are some "well-known" attributes affecting system behaviour: -* __NEOFS__SUBNET \ +* [ __NEOFS__SUBNET | __FROSTFS__SUBNET ] \ String ID of a container's storage subnet. Any container can be attached to one subnet only. -* __NEOFS__NAME \ +* [ __NEOFS__NAME | __FROSTFS__NAME ] \ String of a human-friendly container name registered as a domain in NNS contract. -* __NEOFS__ZONE \ - String of a zone for `__NEOFS__NAME`. Used as a TLD of a domain name in NNS +* [ __NEOFS__ZONE | __FROSTFS__ZONE ] \ + String of a zone for `__NEOFS__NAME`/`__FROSTFS__NAME`. Used as a TLD of a domain name in NNS contract. If no zone is specified, use default zone: `container`. -* __NEOFS__DISABLE_HOMOMORPHIC_HASHING \ +* [ __NEOFS__DISABLE_HOMOMORPHIC_HASHING | __FROSTFS__DISABLE_HOMOMORPHIC_HASHING ] \ Disables homomorphic hashing for the container if the value equals "true" string. Any other values are interpreted as missing attribute. Container could be accepted in a NeoFS network only if the global network hashing configuration diff --git a/proto-docs/lock.md b/proto-docs/lock.md index 3bbbf79..80128db 100644 --- a/proto-docs/lock.md +++ b/proto-docs/lock.md @@ -27,7 +27,7 @@ ### Message Lock Lock objects protects a list of objects from being deleted. The lifetime of a lock object is limited similar to regular objects in -`__NEOFS__EXPIRATION_EPOCH` attribute. Lock object MUST have expiration epoch. +`__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` attribute. Lock object MUST have expiration epoch. It is impossible to delete a lock object via ObjectService.Delete RPC call. diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index 2c7545d..0a9f376 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -406,7 +406,7 @@ explicitly set: attributes it's a string presenting floating point number with comma or point delimiter for decimal part. In the Network Map it will be saved as 64-bit unsigned integer representing number of minimal token fractions. -* __NEOFS__SUBNET_%s \ +* [ __NEOFS__SUBNET_%s | __FROSTFS__SUBNET_%s ] \ `True` or `False`. Defines if the node is included in the `%s` subnetwork or not. `%s` must be an existing subnetwork's ID (non-negative integer number). A node can be included in more than one subnetwork and, therefore, can contain diff --git a/proto-docs/object.md b/proto-docs/object.md index e22f6c0..f0e97eb 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -93,11 +93,11 @@ be restored by concatenation of object message payload and all chunks keeping the receiving order. Extended headers can change `Get` behaviour: -* __NEOFS__NETMAP_EPOCH \ +* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ Will use the requsted version of Network Map for object placement calculation. -* __NEOFS__NETMAP_LOOKUP_DEPTH \ - Will try older versions (starting from `__NEOFS__NETMAP_EPOCH` if specified or +* [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ + Will try older versions (starting from `__NEOFS__NETMAP_EPOCH`/`__FROSTFS__NETMAP_EPOCH` if specified or the latest one otherwise) of Network Map to find an object until the depth limit is reached. @@ -131,7 +131,7 @@ object payload. All messages, except first one, SHOULD be payload chunks. Chunk messages SHOULD be sent in the direct order of fragmentation. Extended headers can change `Put` behaviour: -* __NEOFS__NETMAP_EPOCH \ +* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH \ Will use the requsted version of Network Map for object placement calculation. @@ -166,7 +166,7 @@ Delete the object from a container. There is no immediate removal guarantee. Object will be marked for removal and deleted eventually. Extended headers can change `Delete` behaviour: -* __NEOFS__NETMAP_EPOCH \ +* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ Will use the requsted version of Network Map for object placement calculation. @@ -195,7 +195,7 @@ returned. If `main_only` request field is set, the short header with only the very minimal information will be returned instead. Extended headers can change `Head` behaviour: -* __NEOFS__NETMAP_EPOCH \ +* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ Will use the requsted version of Network Map for object placement calculation. @@ -226,7 +226,7 @@ Header's filed values. Please see the corresponding NeoFS Technical Specification section for more details. Extended headers can change `Search` behaviour: -* __NEOFS__NETMAP_EPOCH \ +* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ Will use the requsted version of Network Map for object placement calculation. @@ -254,10 +254,10 @@ restored by concatenation of all received payload chunks keeping the receiving order. Extended headers can change `GetRange` behaviour: -* __NEOFS__NETMAP_EPOCH \ +* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ Will use the requsted version of Network Map for object placement calculation. -* __NEOFS__NETMAP_LOOKUP_DEPTH \ +* [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ Will try older versions of Network Map to find an object until the depth limit is reached. @@ -291,10 +291,10 @@ length) tuples. Hashes order in response corresponds to the ranges order in the request. Note that hash is calculated for XORed data. Extended headers can change `GetRangeHash` behaviour: -* __NEOFS__NETMAP_EPOCH \ +* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ Will use the requsted version of Network Map for object placement calculation. -* __NEOFS__NETMAP_LOOKUP_DEPTH \ +* [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ Will try older versions of Network Map to find an object until the depth limit is reached. @@ -848,19 +848,19 @@ Key name must be an object-unique valid UTF-8 string. Value can't be empty. Objects with duplicated attribute names or attributes with empty values will be considered invalid. -There are some "well-known" attributes starting with `__NEOFS__` prefix +There are some "well-known" attributes starting with `__NEOFS__`/`__FROSTFS__` prefix that affect system behaviour: -* __NEOFS__UPLOAD_ID \ +* [ __NEOFS__UPLOAD_ID | __FROSTFS__UPLOAD_ID ] \ Marks smaller parts of a split bigger object -* __NEOFS__EXPIRATION_EPOCH \ +* [ __NEOFS__EXPIRATION_EPOCH | __FROSTFS__EXPIRATION_EPOCH ] \ Tells GC to delete object after that epoch -* __NEOFS__TICK_EPOCH \ +* [ __NEOFS__TICK_EPOCH | __FROSTFS__TICK_EPOCH ] \ Decimal number that defines what epoch must produce object notification with UTF-8 object address in a body (`0` value produces notification right after object put) -* __NEOFS__TICK_TOPIC \ +* [ __NEOFS__TICK_TOPIC | __FROSTFS__TICK_TOPIC ] \ UTF-8 string topic ID that is used for object notification And some well-known attributes used by applications only: diff --git a/proto-docs/session.md b/proto-docs/session.md index 2cdfd1e..8dcc6bc 100644 --- a/proto-docs/session.md +++ b/proto-docs/session.md @@ -285,14 +285,14 @@ Key name must be a unique valid UTF-8 string. Value can't be empty. Requests or Responses with duplicated header names or headers with empty values will be considered invalid. -There are some "well-known" headers starting with `__NEOFS__` prefix that +There are some "well-known" headers starting with `__NEOFS__` or `__FROSTFS__` prefix that affect system behaviour: -* __NEOFS__NETMAP_EPOCH \ +* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ Netmap epoch to use for object placement calculation. The `value` is string encoded `uint64` in decimal presentation. If set to '0' or not set, the current epoch only will be used. -* __NEOFS__NETMAP_LOOKUP_DEPTH \ +* [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ If object can't be found using current epoch's netmap, this header limits how many past epochs the node can look up through. The `value` is string encoded `uint64` in decimal presentation. If set to '0' or not set, only the diff --git a/proto-docs/storagegroup.md b/proto-docs/storagegroup.md index 3bc0b5e..c31f3e4 100644 --- a/proto-docs/storagegroup.md +++ b/proto-docs/storagegroup.md @@ -31,7 +31,7 @@ additional information used for the proof of storage. `StorageGroup` only contains objects from the same container. Being an object payload, StorageGroup may have expiration Epoch set with -`__NEOFS__EXPIRATION_EPOCH` well-known attribute. When expired, StorageGroup +`__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` well-known attribute. When expired, StorageGroup will be ignored by InnerRing nodes during Data Audit cycles and will be deleted by Storage Nodes. diff --git a/proto-docs/tombstone.md b/proto-docs/tombstone.md index 4657935..3da8c4b 100644 --- a/proto-docs/tombstone.md +++ b/proto-docs/tombstone.md @@ -31,7 +31,7 @@ purged from the NeoFS 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 `__NEOFS__EXPIRATION_EPOCH` attribute. Otherwise, the tombstone will be rejected by a storage node. | +| 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 `__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` 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. | diff --git a/session/types.proto b/session/types.proto index 2a236d6..5963c40 100644 --- a/session/types.proto +++ b/session/types.proto @@ -137,14 +137,14 @@ message SessionToken { // Responses with duplicated header names or headers with empty values will be // considered invalid. // -// There are some "well-known" headers starting with `__NEOFS__` prefix that +// There are some "well-known" headers starting with `__NEOFS__` or `__FROSTFS__` prefix that // affect system behaviour: // -// * __NEOFS__NETMAP_EPOCH \ +// * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ // Netmap epoch to use for object placement calculation. The `value` is string // encoded `uint64` in decimal presentation. If set to '0' or not set, the // current epoch only will be used. -// * __NEOFS__NETMAP_LOOKUP_DEPTH \ +// * [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ // If object can't be found using current epoch's netmap, this header limits // how many past epochs the node can look up through. The `value` is string // encoded `uint64` in decimal presentation. If set to '0' or not set, only the diff --git a/storagegroup/types.proto b/storagegroup/types.proto index f504afe..946affe 100644 --- a/storagegroup/types.proto +++ b/storagegroup/types.proto @@ -13,7 +13,7 @@ import "refs/types.proto"; // contains objects from the same container. // // Being an object payload, StorageGroup may have expiration Epoch set with -// `__NEOFS__EXPIRATION_EPOCH` well-known attribute. When expired, StorageGroup +// `__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` well-known attribute. When expired, StorageGroup // will be ignored by InnerRing nodes during Data Audit cycles and will be // deleted by Storage Nodes. // diff --git a/tombstone/types.proto b/tombstone/types.proto index 1a31726..1e475d6 100644 --- a/tombstone/types.proto +++ b/tombstone/types.proto @@ -12,7 +12,7 @@ import "refs/types.proto"; 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 tombstone object - // must have the same expiration epoch value in `__NEOFS__EXPIRATION_EPOCH` + // must have the same expiration epoch value in `__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` // attribute. Otherwise, the tombstone will be rejected by a storage node. uint64 expiration_epoch = 1 [json_name = "expirationEpoch"]; From 5fd4059061b8922d671b7e6e4615e1a865edf527 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Tue, 14 Mar 2023 10:24:35 +0300 Subject: [PATCH 04/59] [#14] Rename __FROSTFS__ to __SYSTEM__ Signed-off-by: Denis Kirillov --- CHANGELOG.md | 5 ++++ container/types.proto | 14 ++++++---- lock/types.proto | 2 +- netmap/types.proto | 3 +- object/service.proto | 42 +++++++++++++++++----------- object/types.proto | 14 ++++++---- proto-docs/container.md | 14 ++++++---- proto-docs/lock.md | 2 +- proto-docs/netmap.md | 3 +- proto-docs/object.md | 56 ++++++++++++++++++++++++-------------- proto-docs/session.md | 8 ++++-- proto-docs/storagegroup.md | 2 +- proto-docs/tombstone.md | 2 +- session/types.proto | 8 ++++-- storagegroup/types.proto | 2 +- tombstone/types.proto | 2 +- 16 files changed, 113 insertions(+), 66 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81f2852..db99bc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [Unreleased] + +### Changed +- Add `__SYSTEM__` attribute prefix (#12, #14) + ## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島) ### Added diff --git a/container/types.proto b/container/types.proto index 050189a..17ce39c 100644 --- a/container/types.proto +++ b/container/types.proto @@ -37,16 +37,20 @@ message Container { // // There are some "well-known" attributes affecting system behaviour: // - // * [ __NEOFS__SUBNET | __FROSTFS__SUBNET ] \ + // * [ __SYSTEM__SUBNET ] \ + // (`__NEOFS__SUBNET` is deprecated) \ // String ID of a container's storage subnet. Any container can be attached to // one subnet only. - // * [ __NEOFS__NAME | __FROSTFS__NAME ] \ + // * [ __SYSTEM__NAME ] \ + // (`__NEOFS__NAME` is deprecated) \ // String of a human-friendly container name registered as a domain in // NNS contract. - // * [ __NEOFS__ZONE | __FROSTFS__ZONE ] \ - // String of a zone for `__NEOFS__NAME`/`__FROSTFS__NAME`. Used as a TLD of a domain name in NNS + // * [ __SYSTEM__ZONE ] \ + // (`__NEOFS__ZONE` is deprecated) \ + // String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated). Used as a TLD of a domain name in NNS // contract. If no zone is specified, use default zone: `container`. - // * [ __NEOFS__DISABLE_HOMOMORPHIC_HASHING | __FROSTFS__DISABLE_HOMOMORPHIC_HASHING ] \ + // * [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \ + // (`__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 configuration diff --git a/lock/types.proto b/lock/types.proto index ac52966..52cbdea 100644 --- a/lock/types.proto +++ b/lock/types.proto @@ -9,7 +9,7 @@ import "refs/types.proto"; // Lock objects protects a list of objects from being deleted. The lifetime of a // lock object is limited similar to regular objects in -// `__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` attribute. Lock object MUST have expiration epoch. +// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) attribute. Lock object MUST have expiration epoch. // It is impossible to delete a lock object via ObjectService.Delete RPC call. message Lock { // List of objects to lock. Must not be empty or carry empty IDs. diff --git a/netmap/types.proto b/netmap/types.proto index 6b58cd6..750e523 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -164,7 +164,8 @@ message NodeInfo { // attributes it's a string presenting floating point number with comma or // point delimiter for decimal part. In the Network Map it will be saved as // 64-bit unsigned integer representing number of minimal token fractions. - // * [ __NEOFS__SUBNET_%s | __FROSTFS__SUBNET_%s ] \ + // * [ __SYSTEM__SUBNET_%s ] \ + // (`__NEOFS__SUBNET_%s` is deprecated) \ // `True` or `False`. Defines if the node is included in the `%s` subnetwork // or not. `%s` must be an existing subnetwork's ID (non-negative integer number). // A node can be included in more than one subnetwork and, therefore, can contain diff --git a/object/service.proto b/object/service.proto index 301d526..17be2c1 100644 --- a/object/service.proto +++ b/object/service.proto @@ -20,11 +20,13 @@ service ObjectService { // keeping the receiving order. // // Extended headers can change `Get` behaviour: - // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ + // * [ __SYSTEM__NETMAP_EPOCH ] \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ // Will use the requsted version of Network Map for object placement // calculation. - // * [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ - // Will try older versions (starting from `__NEOFS__NETMAP_EPOCH`/`__FROSTFS__NETMAP_EPOCH` if specified or + // * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ + // (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ + // Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or // the latest one otherwise) of Network Map to find an object until the depth // limit is reached. // @@ -54,7 +56,8 @@ service ObjectService { // Chunk messages SHOULD be sent in the direct order of fragmentation. // // Extended headers can change `Put` behaviour: - // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH \ + // * [ __SYSTEM__NETMAP_EPOCH \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ // Will use the requsted version of Network Map for object placement // calculation. // @@ -85,8 +88,9 @@ service ObjectService { // guarantee. Object will be marked for removal and deleted eventually. // // Extended headers can change `Delete` behaviour: - // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ - // Will use the requsted version of Network Map for object placement + // * [ __SYSTEM__NETMAP_EPOCH ] \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + // Will use the requested version of Network Map for object placement // calculation. // // Please refer to detailed `XHeader` description. @@ -110,8 +114,9 @@ service ObjectService { // the very minimal information will be returned instead. // // Extended headers can change `Head` behaviour: - // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ - // Will use the requsted version of Network Map for object placement + // * [ __SYSTEM__NETMAP_EPOCH ] \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + // Will use the requested version of Network Map for object placement // calculation. // // Please refer to detailed `XHeader` description. @@ -137,8 +142,9 @@ service ObjectService { // Specification section for more details. // // Extended headers can change `Search` behaviour: - // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ - // Will use the requsted version of Network Map for object placement + // * [ __SYSTEM__NETMAP_EPOCH ] \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + // Will use the requested version of Network Map for object placement // calculation. // // Please refer to detailed `XHeader` description. @@ -161,10 +167,12 @@ service ObjectService { // order. // // Extended headers can change `GetRange` behaviour: - // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ - // Will use the requsted version of Network Map for object placement + // * [ __SYSTEM__NETMAP_EPOCH ] \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + // Will use the requested version of Network Map for object placement // calculation. - // * [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ + // * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ + // (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ // Will try older versions of Network Map to find an object until the depth // limit is reached. // @@ -194,10 +202,12 @@ service ObjectService { // the request. Note that hash is calculated for XORed data. // // Extended headers can change `GetRangeHash` behaviour: - // * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ - // Will use the requsted version of Network Map for object placement + // * [ __SYSTEM__NETMAP_EPOCH ] \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + // Will use the requested version of Network Map for object placement // calculation. - // * [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ + // * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ + // (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ // Will try older versions of Network Map to find an object until the depth // limit is reached. // diff --git a/object/types.proto b/object/types.proto index ec19334..2af9b6a 100644 --- a/object/types.proto +++ b/object/types.proto @@ -114,19 +114,23 @@ message Header { // Objects with duplicated attribute names or attributes with empty values // will be considered invalid. // - // There are some "well-known" attributes starting with `__NEOFS__`/`__FROSTFS__` prefix + // There are some "well-known" attributes starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix // that affect system behaviour: // - // * [ __NEOFS__UPLOAD_ID | __FROSTFS__UPLOAD_ID ] \ + // * [ __SYSTEM__UPLOAD_ID ] \ + // (`__NEOFS__UPLOAD_ID` is deprecated) \ // Marks smaller parts of a split bigger object - // * [ __NEOFS__EXPIRATION_EPOCH | __FROSTFS__EXPIRATION_EPOCH ] \ + // * [ __SYSTEM__EXPIRATION_EPOCH ] \ + // (`__NEOFS__EXPIRATION_EPOCH` is deprecated) \ // Tells GC to delete object after that epoch - // * [ __NEOFS__TICK_EPOCH | __FROSTFS__TICK_EPOCH ] \ + // * [ __SYSTEM__TICK_EPOCH ] \ + // (`__NEOFS__TICK_EPOCH` is deprecated) \ // Decimal number that defines what epoch must produce // object notification with UTF-8 object address in a // body (`0` value produces notification right after // object put) - // * [ __NEOFS__TICK_TOPIC | __FROSTFS__TICK_TOPIC ] \ + // * [ __SYSTEM__TICK_TOPIC ] \ + // (`__NEOFS__TICK_TOPIC` is deprecated) \ // UTF-8 string topic ID that is used for object notification // // And some well-known attributes used by applications only: diff --git a/proto-docs/container.md b/proto-docs/container.md index 9cd2d03..aae323d 100644 --- a/proto-docs/container.md +++ b/proto-docs/container.md @@ -587,16 +587,20 @@ values will be considered invalid. There are some "well-known" attributes affecting system behaviour: -* [ __NEOFS__SUBNET | __FROSTFS__SUBNET ] \ +* [ __SYSTEM__SUBNET ] \ + (`__NEOFS__SUBNET` is deprecated) \ String ID of a container's storage subnet. Any container can be attached to one subnet only. -* [ __NEOFS__NAME | __FROSTFS__NAME ] \ +* [ __SYSTEM__NAME ] \ + (`__NEOFS__NAME` is deprecated) \ String of a human-friendly container name registered as a domain in NNS contract. -* [ __NEOFS__ZONE | __FROSTFS__ZONE ] \ - String of a zone for `__NEOFS__NAME`/`__FROSTFS__NAME`. Used as a TLD of a domain name in NNS +* [ __SYSTEM__ZONE ] \ + (`__NEOFS__ZONE` is deprecated) \ + String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated). Used as a TLD of a domain name in NNS contract. If no zone is specified, use default zone: `container`. -* [ __NEOFS__DISABLE_HOMOMORPHIC_HASHING | __FROSTFS__DISABLE_HOMOMORPHIC_HASHING ] \ +* [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \ + (`__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 configuration diff --git a/proto-docs/lock.md b/proto-docs/lock.md index 80128db..5ed9780 100644 --- a/proto-docs/lock.md +++ b/proto-docs/lock.md @@ -27,7 +27,7 @@ ### Message Lock Lock objects protects a list of objects from being deleted. The lifetime of a lock object is limited similar to regular objects in -`__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` attribute. Lock object MUST have expiration epoch. +`__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) attribute. Lock object MUST have expiration epoch. It is impossible to delete a lock object via ObjectService.Delete RPC call. diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index 0a9f376..e746b78 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -406,7 +406,8 @@ explicitly set: attributes it's a string presenting floating point number with comma or point delimiter for decimal part. In the Network Map it will be saved as 64-bit unsigned integer representing number of minimal token fractions. -* [ __NEOFS__SUBNET_%s | __FROSTFS__SUBNET_%s ] \ +* [ __SYSTEM__SUBNET_%s ] \ + (`__NEOFS__SUBNET_%s` is deprecated) \ `True` or `False`. Defines if the node is included in the `%s` subnetwork or not. `%s` must be an existing subnetwork's ID (non-negative integer number). A node can be included in more than one subnetwork and, therefore, can contain diff --git a/proto-docs/object.md b/proto-docs/object.md index f0e97eb..b25fa57 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -93,11 +93,13 @@ be restored by concatenation of object message payload and all chunks keeping the receiving order. Extended headers can change `Get` behaviour: -* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ +* [ __SYSTEM__NETMAP_EPOCH ] \ + (`__NEOFS__NETMAP_EPOCH` is deprecated) \ Will use the requsted version of Network Map for object placement calculation. -* [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ - Will try older versions (starting from `__NEOFS__NETMAP_EPOCH`/`__FROSTFS__NETMAP_EPOCH` if specified or +* [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ + (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ + Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or the latest one otherwise) of Network Map to find an object until the depth limit is reached. @@ -131,7 +133,8 @@ object payload. All messages, except first one, SHOULD be payload chunks. Chunk messages SHOULD be sent in the direct order of fragmentation. Extended headers can change `Put` behaviour: -* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH \ +* [ __SYSTEM__NETMAP_EPOCH \ + (`__NEOFS__NETMAP_EPOCH` is deprecated) \ Will use the requsted version of Network Map for object placement calculation. @@ -166,8 +169,9 @@ Delete the object from a container. There is no immediate removal guarantee. Object will be marked for removal and deleted eventually. Extended headers can change `Delete` behaviour: -* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ - Will use the requsted version of Network Map for object placement +* [ __SYSTEM__NETMAP_EPOCH ] \ + (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + Will use the requested version of Network Map for object placement calculation. Please refer to detailed `XHeader` description. @@ -195,8 +199,9 @@ returned. If `main_only` request field is set, the short header with only the very minimal information will be returned instead. Extended headers can change `Head` behaviour: -* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ - Will use the requsted version of Network Map for object placement +* [ __SYSTEM__NETMAP_EPOCH ] \ + (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + Will use the requested version of Network Map for object placement calculation. Please refer to detailed `XHeader` description. @@ -226,8 +231,9 @@ Header's filed values. Please see the corresponding NeoFS Technical Specification section for more details. Extended headers can change `Search` behaviour: -* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ - Will use the requsted version of Network Map for object placement +* [ __SYSTEM__NETMAP_EPOCH ] \ + (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + Will use the requested version of Network Map for object placement calculation. Please refer to detailed `XHeader` description. @@ -254,10 +260,12 @@ restored by concatenation of all received payload chunks keeping the receiving order. Extended headers can change `GetRange` behaviour: -* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ - Will use the requsted version of Network Map for object placement +* [ __SYSTEM__NETMAP_EPOCH ] \ + (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + Will use the requested version of Network Map for object placement calculation. -* [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ +* [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ + (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ Will try older versions of Network Map to find an object until the depth limit is reached. @@ -291,10 +299,12 @@ length) tuples. Hashes order in response corresponds to the ranges order in the request. Note that hash is calculated for XORed data. Extended headers can change `GetRangeHash` behaviour: -* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ - Will use the requsted version of Network Map for object placement +* [ __SYSTEM__NETMAP_EPOCH ] \ + (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + Will use the requested version of Network Map for object placement calculation. -* [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ +* [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ + (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ Will try older versions of Network Map to find an object until the depth limit is reached. @@ -848,19 +858,23 @@ Key name must be an object-unique valid UTF-8 string. Value can't be empty. Objects with duplicated attribute names or attributes with empty values will be considered invalid. -There are some "well-known" attributes starting with `__NEOFS__`/`__FROSTFS__` prefix +There are some "well-known" attributes starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix that affect system behaviour: -* [ __NEOFS__UPLOAD_ID | __FROSTFS__UPLOAD_ID ] \ +* [ __SYSTEM__UPLOAD_ID ] \ + (`__NEOFS__UPLOAD_ID` is deprecated) \ Marks smaller parts of a split bigger object -* [ __NEOFS__EXPIRATION_EPOCH | __FROSTFS__EXPIRATION_EPOCH ] \ +* [ __SYSTEM__EXPIRATION_EPOCH ] \ + (`__NEOFS__EXPIRATION_EPOCH` is deprecated) \ Tells GC to delete object after that epoch -* [ __NEOFS__TICK_EPOCH | __FROSTFS__TICK_EPOCH ] \ +* [ __SYSTEM__TICK_EPOCH ] \ + (`__NEOFS__TICK_EPOCH` is deprecated) \ Decimal number that defines what epoch must produce object notification with UTF-8 object address in a body (`0` value produces notification right after object put) -* [ __NEOFS__TICK_TOPIC | __FROSTFS__TICK_TOPIC ] \ +* [ __SYSTEM__TICK_TOPIC ] \ + (`__NEOFS__TICK_TOPIC` is deprecated) \ UTF-8 string topic ID that is used for object notification And some well-known attributes used by applications only: diff --git a/proto-docs/session.md b/proto-docs/session.md index 8dcc6bc..facb292 100644 --- a/proto-docs/session.md +++ b/proto-docs/session.md @@ -285,14 +285,16 @@ Key name must be a unique valid UTF-8 string. Value can't be empty. Requests or Responses with duplicated header names or headers with empty values will be considered invalid. -There are some "well-known" headers starting with `__NEOFS__` or `__FROSTFS__` prefix that +There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix that affect system behaviour: -* [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ +* [ __SYSTEM__NETMAP_EPOCH ] \ + (`__NEOFS__NETMAP_EPOCH` is deprecated) \ Netmap epoch to use for object placement calculation. The `value` is string encoded `uint64` in decimal presentation. If set to '0' or not set, the current epoch only will be used. -* [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ +* [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ + (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ If object can't be found using current epoch's netmap, this header limits how many past epochs the node can look up through. The `value` is string encoded `uint64` in decimal presentation. If set to '0' or not set, only the diff --git a/proto-docs/storagegroup.md b/proto-docs/storagegroup.md index c31f3e4..da765f1 100644 --- a/proto-docs/storagegroup.md +++ b/proto-docs/storagegroup.md @@ -31,7 +31,7 @@ additional information used for the proof of storage. `StorageGroup` only contains objects from the same container. Being an object payload, StorageGroup may have expiration Epoch set with -`__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` well-known attribute. When expired, StorageGroup +`__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) well-known attribute. When expired, StorageGroup will be ignored by InnerRing nodes during Data Audit cycles and will be deleted by Storage Nodes. diff --git a/proto-docs/tombstone.md b/proto-docs/tombstone.md index 3da8c4b..9056ad2 100644 --- a/proto-docs/tombstone.md +++ b/proto-docs/tombstone.md @@ -31,7 +31,7 @@ purged from the NeoFS 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 `__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` attribute. Otherwise, the tombstone will be rejected by a storage node. | +| 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. | | 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. | diff --git a/session/types.proto b/session/types.proto index 5963c40..63e5ded 100644 --- a/session/types.proto +++ b/session/types.proto @@ -137,14 +137,16 @@ message SessionToken { // Responses with duplicated header names or headers with empty values will be // considered invalid. // -// There are some "well-known" headers starting with `__NEOFS__` or `__FROSTFS__` prefix that +// There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix that // affect system behaviour: // -// * [ __NEOFS__NETMAP_EPOCH | __FROSTFS__NETMAP_EPOCH ] \ +// * [ __SYSTEM__NETMAP_EPOCH ] \ +// (`__NEOFS__NETMAP_EPOCH` is deprecated) \ // Netmap epoch to use for object placement calculation. The `value` is string // encoded `uint64` in decimal presentation. If set to '0' or not set, the // current epoch only will be used. -// * [ __NEOFS__NETMAP_LOOKUP_DEPTH | __FROSTFS__NETMAP_LOOKUP_DEPTH ] \ +// * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ +// (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ // If object can't be found using current epoch's netmap, this header limits // how many past epochs the node can look up through. The `value` is string // encoded `uint64` in decimal presentation. If set to '0' or not set, only the diff --git a/storagegroup/types.proto b/storagegroup/types.proto index 946affe..b74f755 100644 --- a/storagegroup/types.proto +++ b/storagegroup/types.proto @@ -13,7 +13,7 @@ import "refs/types.proto"; // contains objects from the same container. // // Being an object payload, StorageGroup may have expiration Epoch set with -// `__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` well-known attribute. When expired, StorageGroup +// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) well-known attribute. When expired, StorageGroup // will be ignored by InnerRing nodes during Data Audit cycles and will be // deleted by Storage Nodes. // diff --git a/tombstone/types.proto b/tombstone/types.proto index 1e475d6..aa44a45 100644 --- a/tombstone/types.proto +++ b/tombstone/types.proto @@ -12,7 +12,7 @@ import "refs/types.proto"; 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 tombstone object - // must have the same expiration epoch value in `__NEOFS__EXPIRATION_EPOCH`/`__FROSTFS__EXPIRATION_EPOCH` + // 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. uint64 expiration_epoch = 1 [json_name = "expirationEpoch"]; From fc393d4605e7e4c5545e882ef20d5dc171e25ce8 Mon Sep 17 00:00:00 2001 From: Liza Date: Wed, 22 Mar 2023 19:59:07 +0300 Subject: [PATCH 05/59] [#16] Add Issue Template Add bug report and feature request templates Signed-off-by: Liza --- .github/ISSUE_TEMPLATE/bug_report.md | 45 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++ 3 files changed, 66 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..7e778d2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,45 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: community, triage, bug +assignees: '' + +--- + + + +## Expected Behavior + + + +## Current Behavior + + + +## Possible Solution + + + + + + +## Steps to Reproduce (for bugs) + + + +1. + +## Context + + + +## Regression + + + +## Your Environment + +* Version used: +* Server setup and configuration: +* Operating System and version (`uname -a`): diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..d6d1162 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: community, triage +assignees: '' + +--- + +## Is your feature request related to a problem? Please describe. + + +## Describe the solution you'd like + + +## Describe alternatives you've considered + + +## Additional context + From cbc038f84e7e8bf398bcc03ab53527c6b8cd18d1 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Thu, 6 Apr 2023 00:44:42 +0300 Subject: [PATCH 06/59] [#17] object: Allow set `copy_number` for every placement vector Signed-off-by: Pavel Karpy --- object/service.proto | 12 ++++++++++-- proto-docs/object.md | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/object/service.proto b/object/service.proto index 17be2c1..1d08ff5 100644 --- a/object/service.proto +++ b/object/service.proto @@ -311,9 +311,17 @@ message PutRequest { // Object's Header Header header = 3; - // Number of the object copies to store within the RPC call. By default + // Number of copies of the object to store within the RPC call. By default, // object is processed according to the container's placement policy. - uint32 copies_number = 4; + // Can be one of: + // 1. A single number; applied to the whole request and is treated as + // a minimal number of nodes that must store an object to complete the + // request successfully. + // 2. An ordered array; every number is treated as a minimal number of + // nodes in a corresponding placement vector that must store an object + // to complete the request successfully. The length MUST equal the placement + // vectors number, otherwise request is considered malformed. + repeated uint32 copies_number = 4; } // Single message in the request stream. oneof object_part { diff --git a/proto-docs/object.md b/proto-docs/object.md index b25fa57..8b5f460 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -658,7 +658,7 @@ are not set, they will be calculated by a peer node. | object_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | ObjectID if available. | | signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Object signature if available | | header | [Header](#neo.fs.v2.object.Header) | | Object's Header | -| copies_number | [uint32](#uint32) | | Number of the object copies to store within the RPC call. By default object is processed according to the container's placement policy. | +| copies_number | [uint32](#uint32) | repeated | Number of copies of the object to store within the RPC call. By default, object is processed according to the container's placement policy. Can be one of: 1. A single number; applied to the whole request and is treated as a minimal number of nodes that must store an object to complete the request successfully. 2. An ordered array; every number is treated as a minimal number of nodes in a corresponding placement vector that must store an object to complete the request successfully. The length MUST equal the placement vectors number, otherwise request is considered malformed. | From bd50db11514ab543255c48cc5d3dfe7da7e3163c Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Tue, 21 Feb 2023 11:18:35 +0300 Subject: [PATCH 07/59] [#18] acl: Add impersonate field to bearer token Signed-off-by: Denis Kirillov --- CHANGELOG.md | 1 + acl/types.proto | 4 ++++ proto-docs/acl.md | 1 + 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index db99bc4..9b67e88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Changed - Add `__SYSTEM__` attribute prefix (#12, #14) +- Add `allow_impersonate` flag to bearer token (#18) ## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島) diff --git a/acl/types.proto b/acl/types.proto index 1ca947a..31a43d4 100644 --- a/acl/types.proto +++ b/acl/types.proto @@ -213,6 +213,10 @@ message BearerToken { } // Token expiration and valid time period parameters TokenLifetime lifetime = 3 [json_name="lifetime"]; + + // AllowImpersonate flag to consider token signer as request owner. + // If this field is true extended ACL table in token body isn't processed. + bool allow_impersonate = 4 [json_name="allowImpersonate"]; } // Bearer Token body Body body = 1 [json_name="body"]; diff --git a/proto-docs/acl.md b/proto-docs/acl.md index 09762a1..c32f958 100644 --- a/proto-docs/acl.md +++ b/proto-docs/acl.md @@ -60,6 +60,7 @@ owner with additional information preventing token abuse. | eacl_table | [EACLTable](#neo.fs.v2.acl.EACLTable) | | Table of Extended ACL rules to use instead of the ones attached to the container. If it contains `container_id` field, bearer token is only valid for this specific container. Otherwise, any container of the same owner is allowed. | | owner_id | [neo.fs.v2.refs.OwnerID](#neo.fs.v2.refs.OwnerID) | | `OwnerID` defines to whom the token was issued. It must match the request originator's `OwnerID`. If empty, any token bearer will be accepted. | | lifetime | [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime) | | Token expiration and valid time period parameters | +| allow_impersonate | [bool](#bool) | | AllowImpersonate flag to consider token signer as request owner. If this field is true extended ACL table in token body isn't processed. | From b5be17014eb2e9bf457960e3420143866c923e49 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Fri, 14 Apr 2023 16:57:20 +0300 Subject: [PATCH 08/59] [#22] reputation: Drop reputation system support Signed-off-by: Pavel Karpy --- CHANGELOG.md | 3 + netmap/types.proto | 7 - proto-docs/netmap.md | 7 - proto-docs/reputation.md | 289 --------------------------------------- reputation/service.proto | 128 ----------------- reputation/types.proto | 63 --------- 6 files changed, 3 insertions(+), 494 deletions(-) delete mode 100644 proto-docs/reputation.md delete mode 100644 reputation/service.proto delete mode 100644 reputation/types.proto diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b67e88..542f6e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ - Add `__SYSTEM__` attribute prefix (#12, #14) - Add `allow_impersonate` flag to bearer token (#18) +### Removed +- Reputation system (#22) + ## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島) ### Added diff --git a/netmap/types.proto b/netmap/types.proto index 750e523..8b317dc 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -273,13 +273,6 @@ message NetworkConfig { // - **ContainerFee** \ // Fee paid for container creation by the container owner. // Value: little-endian integer. Default: 0. - // - **EigenTrustAlpha** \ - // Alpha parameter of EigenTrust algorithm used in the Reputation system. - // Value: decimal floating-point number in UTF-8 string representation. - // Default: 0. - // - **EigenTrustIterations** \ - // Number of EigenTrust algorithm iterations to pass in the Reputation system. - // Value: little-endian integer. Default: 0. // - **EpochDuration** \ // NeoFS epoch duration measured in Sidechain blocks. // Value: little-endian integer. Default: 0. diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index e746b78..1467a5d 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -313,13 +313,6 @@ System parameters: - **ContainerFee** \ Fee paid for container creation by the container owner. Value: little-endian integer. Default: 0. -- **EigenTrustAlpha** \ - Alpha parameter of EigenTrust algorithm used in the Reputation system. - Value: decimal floating-point number in UTF-8 string representation. - Default: 0. -- **EigenTrustIterations** \ - Number of EigenTrust algorithm iterations to pass in the Reputation system. - Value: little-endian integer. Default: 0. - **EpochDuration** \ NeoFS epoch duration measured in Sidechain blocks. Value: little-endian integer. Default: 0. diff --git a/proto-docs/reputation.md b/proto-docs/reputation.md deleted file mode 100644 index 19558f3..0000000 --- a/proto-docs/reputation.md +++ /dev/null @@ -1,289 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [reputation/service.proto](#reputation/service.proto) - - Services - - [ReputationService](#neo.fs.v2.reputation.ReputationService) - - - Messages - - [AnnounceIntermediateResultRequest](#neo.fs.v2.reputation.AnnounceIntermediateResultRequest) - - [AnnounceIntermediateResultRequest.Body](#neo.fs.v2.reputation.AnnounceIntermediateResultRequest.Body) - - [AnnounceIntermediateResultResponse](#neo.fs.v2.reputation.AnnounceIntermediateResultResponse) - - [AnnounceIntermediateResultResponse.Body](#neo.fs.v2.reputation.AnnounceIntermediateResultResponse.Body) - - [AnnounceLocalTrustRequest](#neo.fs.v2.reputation.AnnounceLocalTrustRequest) - - [AnnounceLocalTrustRequest.Body](#neo.fs.v2.reputation.AnnounceLocalTrustRequest.Body) - - [AnnounceLocalTrustResponse](#neo.fs.v2.reputation.AnnounceLocalTrustResponse) - - [AnnounceLocalTrustResponse.Body](#neo.fs.v2.reputation.AnnounceLocalTrustResponse.Body) - - -- [reputation/types.proto](#reputation/types.proto) - - - Messages - - [GlobalTrust](#neo.fs.v2.reputation.GlobalTrust) - - [GlobalTrust.Body](#neo.fs.v2.reputation.GlobalTrust.Body) - - [PeerID](#neo.fs.v2.reputation.PeerID) - - [PeerToPeerTrust](#neo.fs.v2.reputation.PeerToPeerTrust) - - [Trust](#neo.fs.v2.reputation.Trust) - - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## reputation/service.proto - - - - - - -### Service "neo.fs.v2.reputation.ReputationService" -`ReputationService` provides mechanisms for exchanging trust values with -other NeoFS nodes. Nodes rate each other's reputation based on how good they -process requests and set a trust level based on that rating. The trust -information is passed to the next nodes to check and aggregate unless the -final result is recorded. - -``` -rpc AnnounceLocalTrust(AnnounceLocalTrustRequest) returns (AnnounceLocalTrustResponse); -rpc AnnounceIntermediateResult(AnnounceIntermediateResultRequest) returns (AnnounceIntermediateResultResponse); - -``` - -#### Method AnnounceLocalTrust - -Announce local client trust information to any node in NeoFS network. - -Statuses: -- **OK** (0, SECTION_SUCCESS): -local trust has been successfully announced; -- Common failures (SECTION_FAILURE_COMMON). - -| Name | Input | Output | -| ---- | ----- | ------ | -| AnnounceLocalTrust | [AnnounceLocalTrustRequest](#neo.fs.v2.reputation.AnnounceLocalTrustRequest) | [AnnounceLocalTrustResponse](#neo.fs.v2.reputation.AnnounceLocalTrustResponse) | -#### Method AnnounceIntermediateResult - -Announce the intermediate result of the iterative algorithm for -calculating the global reputation of the node in NeoFS network. - -Statuses: -- **OK** (0, SECTION_SUCCESS): -intermediate trust estimation has been successfully announced; -- Common failures (SECTION_FAILURE_COMMON). - -| Name | Input | Output | -| ---- | ----- | ------ | -| AnnounceIntermediateResult | [AnnounceIntermediateResultRequest](#neo.fs.v2.reputation.AnnounceIntermediateResultRequest) | [AnnounceIntermediateResultResponse](#neo.fs.v2.reputation.AnnounceIntermediateResultResponse) | - - - - - -### Message AnnounceIntermediateResultRequest -Announce intermediate global trust information. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body | [AnnounceIntermediateResultRequest.Body](#neo.fs.v2.reputation.AnnounceIntermediateResultRequest.Body) | | Body of the 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 AnnounceIntermediateResultRequest.Body -Announce intermediate global trust information. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| epoch | [uint64](#uint64) | | Iteration execution Epoch number | -| iteration | [uint32](#uint32) | | Iteration sequence number | -| trust | [PeerToPeerTrust](#neo.fs.v2.reputation.PeerToPeerTrust) | | Current global trust value calculated at the specified iteration | - - - - -### Message AnnounceIntermediateResultResponse -Intermediate global trust information announcement response. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body | [AnnounceIntermediateResultResponse.Body](#neo.fs.v2.reputation.AnnounceIntermediateResultResponse.Body) | | Body of the 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 AnnounceIntermediateResultResponse.Body -Response to the node's intermediate global trust information announcement has -an empty body because the trust exchange operation is asynchronous. If -Trust information does not pass sanity checks, it is silently ignored. - - - - - -### Message AnnounceLocalTrustRequest -Announce node's local trust information. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body | [AnnounceLocalTrustRequest.Body](#neo.fs.v2.reputation.AnnounceLocalTrustRequest.Body) | | Body of the 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 AnnounceLocalTrustRequest.Body -Announce node's local trust information. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| epoch | [uint64](#uint64) | | Trust assessment Epoch number | -| trusts | [Trust](#neo.fs.v2.reputation.Trust) | repeated | List of normalized local trust values to other NeoFS nodes. The value is calculated according to EigenTrust++ algorithm and must be a floating point number in [0;1] range. | - - - - -### Message AnnounceLocalTrustResponse -Node's local trust information announcement response. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body | [AnnounceLocalTrustResponse.Body](#neo.fs.v2.reputation.AnnounceLocalTrustResponse.Body) | | Body of the 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 AnnounceLocalTrustResponse.Body -Response to the node's local trust information announcement has an empty body -because the trust exchange operation is asynchronous. If Trust information -does not pass sanity checks, it is silently ignored. - - - - - - - - - -

Top

- -## reputation/types.proto - - - - - - - -### Message GlobalTrust -Global trust level to NeoFS node. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Message format version. Effectively, the version of API library used to create the message. | -| body | [GlobalTrust.Body](#neo.fs.v2.reputation.GlobalTrust.Body) | | Message body | -| signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of the binary `body` field by the manager. | - - - - -### Message GlobalTrust.Body -Message body structure. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| manager | [PeerID](#neo.fs.v2.reputation.PeerID) | | Node manager ID | -| trust | [Trust](#neo.fs.v2.reputation.Trust) | | Global trust level | - - - - -### Message PeerID -NeoFS unique peer identifier is a 33 byte long compressed public key of the -node, the same as the one stored in the network map. - -String presentation is a -[base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string. - -JSON value will be data encoded as a string using standard base64 -encoding with paddings. Either -[standard](https://tools.ietf.org/html/rfc4648#section-4) or -[URL-safe](https://tools.ietf.org/html/rfc4648#section-5) base64 encoding -with/without paddings are accepted. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| public_key | [bytes](#bytes) | | Peer node's public key | - - - - -### Message PeerToPeerTrust -Trust level of a peer to a peer. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| trusting_peer | [PeerID](#neo.fs.v2.reputation.PeerID) | | Identifier of the trusting peer | -| trust | [Trust](#neo.fs.v2.reputation.Trust) | | Trust level | - - - - -### Message Trust -Trust level to a NeoFS network peer. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| peer | [PeerID](#neo.fs.v2.reputation.PeerID) | | Identifier of the trusted peer | -| value | [double](#double) | | Trust level in [0:1] range | - - - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ Type | Java Type | Python Type | -| ----------- | ----- | -------- | --------- | ----------- | -| 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 | -| 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 | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | -| sfixed32 | Always four bytes. | int32 | int | int | -| sfixed64 | Always eight bytes. | int64 | long | int/long | -| 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/reputation/service.proto b/reputation/service.proto deleted file mode 100644 index 2b3c9a6..0000000 --- a/reputation/service.proto +++ /dev/null @@ -1,128 +0,0 @@ -syntax = "proto3"; - -package neo.fs.v2.reputation; - -option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/reputation/grpc;reputation"; -option csharp_namespace = "Neo.FileStorage.API.Reputation"; - -import "reputation/types.proto"; -import "session/types.proto"; - -// `ReputationService` provides mechanisms for exchanging trust values with -// other NeoFS nodes. Nodes rate each other's reputation based on how good they -// process requests and set a trust level based on that rating. The trust -// information is passed to the next nodes to check and aggregate unless the -// final result is recorded. -service ReputationService { - // Announce local client trust information to any node in NeoFS network. - // - // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // local trust has been successfully announced; - // - Common failures (SECTION_FAILURE_COMMON). - rpc AnnounceLocalTrust (AnnounceLocalTrustRequest) returns (AnnounceLocalTrustResponse); - - // Announce the intermediate result of the iterative algorithm for - // calculating the global reputation of the node in NeoFS network. - // - // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // intermediate trust estimation has been successfully announced; - // - Common failures (SECTION_FAILURE_COMMON). - rpc AnnounceIntermediateResult (AnnounceIntermediateResultRequest) returns (AnnounceIntermediateResultResponse); -} - -// Announce node's local trust information. -message AnnounceLocalTrustRequest { - // Announce node's local trust information. - message Body { - // Trust assessment Epoch number - uint64 epoch = 1; - - // List of normalized local trust values to other NeoFS nodes. The value - // is calculated according to EigenTrust++ algorithm and must be a - // floating point number in [0;1] range. - repeated Trust trusts = 2; - } - - // Body of the 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; -} - -// Node's local trust information announcement response. -message AnnounceLocalTrustResponse { - // Response to the node's local trust information announcement has an empty body - // because the trust exchange operation is asynchronous. If Trust information - // does not pass sanity checks, it is silently ignored. - message Body { - } - - // Body of the response message. - Body body = 1; - - // Carries response meta information. Header data is used only to regulate - // message transport and does not affect request execution. - neo.fs.v2.session.ResponseMetaHeader meta_header = 2; - - // Carries response verification information. This header is used to - // authenticate the nodes of the message route and check the correctness of - // transmission. - neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; -} - -// Announce intermediate global trust information. -message AnnounceIntermediateResultRequest { - // Announce intermediate global trust information. - message Body { - // Iteration execution Epoch number - uint64 epoch = 1; - - // Iteration sequence number - uint32 iteration = 2; - - // Current global trust value calculated at the specified iteration - PeerToPeerTrust trust = 3; - } - - // Body of the 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; -} - -// Intermediate global trust information announcement response. -message AnnounceIntermediateResultResponse { - // Response to the node's intermediate global trust information announcement has - // an empty body because the trust exchange operation is asynchronous. If - // Trust information does not pass sanity checks, it is silently ignored. - message Body { - } - - // Body of the 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; -} diff --git a/reputation/types.proto b/reputation/types.proto deleted file mode 100644 index 74262e7..0000000 --- a/reputation/types.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; - -package neo.fs.v2.reputation; - -option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/reputation/grpc;reputation"; -option csharp_namespace = "Neo.FileStorage.API.Reputation"; - -import "refs/types.proto"; - -// NeoFS unique peer identifier is a 33 byte long compressed public key of the -// node, the same as the one stored in the network map. -// -// String presentation is a -// [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string. -// -// JSON value will be data encoded as a string using standard base64 -// encoding with paddings. Either -// [standard](https://tools.ietf.org/html/rfc4648#section-4) or -// [URL-safe](https://tools.ietf.org/html/rfc4648#section-5) base64 encoding -// with/without paddings are accepted. -message PeerID { - // Peer node's public key - bytes public_key = 1 [json_name = "publicKey"]; -} - -// Trust level to a NeoFS network peer. -message Trust { - // Identifier of the trusted peer - PeerID peer = 1 [json_name = "peer"]; - - // Trust level in [0:1] range - double value = 2 [json_name = "value"]; -} - -// Trust level of a peer to a peer. -message PeerToPeerTrust { - // Identifier of the trusting peer - PeerID trusting_peer = 1 [json_name = "trustingPeer"]; - - // Trust level - Trust trust = 2 [json_name = "trust"]; -} - -// Global trust level to NeoFS node. -message GlobalTrust { - // Message format version. Effectively, the version of API library used to create - // the message. - neo.fs.v2.refs.Version version = 1 [json_name = "version"]; - // Message body structure. - message Body { - // Node manager ID - PeerID manager = 1 [json_name = "manager"]; - - // Global trust level - Trust trust = 2 [json_name = "trust"]; - } - - // Message body - Body body = 2 [json_name = "body"]; - - // Signature of the binary `body` field by the manager. - neo.fs.v2.refs.Signature signature = 3 [json_name = "signature"]; -} From 7f59b8aaeb605f055a61bd0c327f5d84da772d0b Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Mon, 17 Apr 2023 10:32:18 +0300 Subject: [PATCH 09/59] [#25] subnet: Drop fields and types Signed-off-by: Dmitrii Stepanov --- CHANGELOG.md | 1 + container/types.proto | 4 -- netmap/types.proto | 14 ------- proto-docs/container.md | 92 ++++++++++++++++++++--------------------- proto-docs/netmap.md | 78 +++++++++++++++------------------- proto-docs/refs.md | 44 +++++++------------- proto-docs/subnet.md | 61 --------------------------- refs/types.proto | 10 ----- subnet/types.proto | 18 -------- 9 files changed, 93 insertions(+), 229 deletions(-) delete mode 100644 proto-docs/subnet.md delete mode 100644 subnet/types.proto diff --git a/CHANGELOG.md b/CHANGELOG.md index 542f6e5..91ebf2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Removed - Reputation system (#22) +- All `subnet` related fields and types (#25) ## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島) diff --git a/container/types.proto b/container/types.proto index 17ce39c..5f7f76b 100644 --- a/container/types.proto +++ b/container/types.proto @@ -37,10 +37,6 @@ message Container { // // There are some "well-known" attributes affecting system behaviour: // - // * [ __SYSTEM__SUBNET ] \ - // (`__NEOFS__SUBNET` is deprecated) \ - // String ID of a container's storage subnet. Any container can be attached to - // one subnet only. // * [ __SYSTEM__NAME ] \ // (`__NEOFS__NAME` is deprecated) \ // String of a human-friendly container name registered as a domain in diff --git a/netmap/types.proto b/netmap/types.proto index 8b317dc..fb5cf82 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -5,8 +5,6 @@ package neo.fs.v2.netmap; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc;netmap"; option csharp_namespace = "Neo.FileStorage.API.Netmap"; -import "refs/types.proto"; - // Operations on filters enum Operation { // No Operation defined @@ -121,10 +119,6 @@ message PlacementPolicy { // List of named filters to reference in selectors repeated Filter filters = 4 [json_name = "filters"]; - - // Subnetwork ID to select nodes from. Zero subnet (default) represents - // all of the nodes which didn't explicitly opt out of membership. - refs.SubnetID subnet_id = 5 [json_name = "subnetId"]; } // NeoFS node description @@ -164,14 +158,6 @@ message NodeInfo { // attributes it's a string presenting floating point number with comma or // point delimiter for decimal part. In the Network Map it will be saved as // 64-bit unsigned integer representing number of minimal token fractions. - // * [ __SYSTEM__SUBNET_%s ] \ - // (`__NEOFS__SUBNET_%s` is deprecated) \ - // `True` or `False`. Defines if the node is included in the `%s` subnetwork - // or not. `%s` must be an existing subnetwork's ID (non-negative integer number). - // A node can be included in more than one subnetwork and, therefore, can contain - // more than one subnet attribute. A missing attribute is equivalent to the - // presence of the attribute with `False` value (except default zero subnetwork - // (with `%s` == 0) for which missing attribute means inclusion in that network). // * UN-LOCODE \ // Node's geographic location in // [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html) diff --git a/proto-docs/container.md b/proto-docs/container.md index aae323d..6368889 100644 --- a/proto-docs/container.md +++ b/proto-docs/container.md @@ -3,50 +3,50 @@ ## Table of Contents -- [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) - - [AnnounceUsedSpaceRequest.Body.Announcement](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body.Announcement) - - [AnnounceUsedSpaceResponse](#neo.fs.v2.container.AnnounceUsedSpaceResponse) - - [AnnounceUsedSpaceResponse.Body](#neo.fs.v2.container.AnnounceUsedSpaceResponse.Body) - - [DeleteRequest](#neo.fs.v2.container.DeleteRequest) - - [DeleteRequest.Body](#neo.fs.v2.container.DeleteRequest.Body) - - [DeleteResponse](#neo.fs.v2.container.DeleteResponse) - - [DeleteResponse.Body](#neo.fs.v2.container.DeleteResponse.Body) - - [GetExtendedACLRequest](#neo.fs.v2.container.GetExtendedACLRequest) - - [GetExtendedACLRequest.Body](#neo.fs.v2.container.GetExtendedACLRequest.Body) - - [GetExtendedACLResponse](#neo.fs.v2.container.GetExtendedACLResponse) - - [GetExtendedACLResponse.Body](#neo.fs.v2.container.GetExtendedACLResponse.Body) - - [GetRequest](#neo.fs.v2.container.GetRequest) - - [GetRequest.Body](#neo.fs.v2.container.GetRequest.Body) - - [GetResponse](#neo.fs.v2.container.GetResponse) - - [GetResponse.Body](#neo.fs.v2.container.GetResponse.Body) - - [ListRequest](#neo.fs.v2.container.ListRequest) - - [ListRequest.Body](#neo.fs.v2.container.ListRequest.Body) - - [ListResponse](#neo.fs.v2.container.ListResponse) - - [ListResponse.Body](#neo.fs.v2.container.ListResponse.Body) - - [PutRequest](#neo.fs.v2.container.PutRequest) - - [PutRequest.Body](#neo.fs.v2.container.PutRequest.Body) - - [PutResponse](#neo.fs.v2.container.PutResponse) - - [PutResponse.Body](#neo.fs.v2.container.PutResponse.Body) - - [SetExtendedACLRequest](#neo.fs.v2.container.SetExtendedACLRequest) - - [SetExtendedACLRequest.Body](#neo.fs.v2.container.SetExtendedACLRequest.Body) - - [SetExtendedACLResponse](#neo.fs.v2.container.SetExtendedACLResponse) - - [SetExtendedACLResponse.Body](#neo.fs.v2.container.SetExtendedACLResponse.Body) - - -- [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) +- [Protocol Documentation](#protocol-documentation) + - [Table of Contents](#table-of-contents) + - [container/service.proto](#containerserviceproto) + - [Service "neo.fs.v2.container.ContainerService"](#service-neofsv2containercontainerservice) + - [Method Put](#method-put) + - [Method Delete](#method-delete) + - [Method Get](#method-get) + - [Method List](#method-list) + - [Method SetExtendedACL](#method-setextendedacl) + - [Method GetExtendedACL](#method-getextendedacl) + - [Method AnnounceUsedSpace](#method-announceusedspace) + - [Message AnnounceUsedSpaceRequest](#message-announceusedspacerequest) + - [Message AnnounceUsedSpaceRequest.Body](#message-announceusedspacerequestbody) + - [Message AnnounceUsedSpaceRequest.Body.Announcement](#message-announceusedspacerequestbodyannouncement) + - [Message AnnounceUsedSpaceResponse](#message-announceusedspaceresponse) + - [Message AnnounceUsedSpaceResponse.Body](#message-announceusedspaceresponsebody) + - [Message DeleteRequest](#message-deleterequest) + - [Message DeleteRequest.Body](#message-deleterequestbody) + - [Message DeleteResponse](#message-deleteresponse) + - [Message DeleteResponse.Body](#message-deleteresponsebody) + - [Message GetExtendedACLRequest](#message-getextendedaclrequest) + - [Message GetExtendedACLRequest.Body](#message-getextendedaclrequestbody) + - [Message GetExtendedACLResponse](#message-getextendedaclresponse) + - [Message GetExtendedACLResponse.Body](#message-getextendedaclresponsebody) + - [Message GetRequest](#message-getrequest) + - [Message GetRequest.Body](#message-getrequestbody) + - [Message GetResponse](#message-getresponse) + - [Message GetResponse.Body](#message-getresponsebody) + - [Message ListRequest](#message-listrequest) + - [Message ListRequest.Body](#message-listrequestbody) + - [Message ListResponse](#message-listresponse) + - [Message ListResponse.Body](#message-listresponsebody) + - [Message PutRequest](#message-putrequest) + - [Message PutRequest.Body](#message-putrequestbody) + - [Message PutResponse](#message-putresponse) + - [Message PutResponse.Body](#message-putresponsebody) + - [Message SetExtendedACLRequest](#message-setextendedaclrequest) + - [Message SetExtendedACLRequest.Body](#message-setextendedaclrequestbody) + - [Message SetExtendedACLResponse](#message-setextendedaclresponse) + - [Message SetExtendedACLResponse.Body](#message-setextendedaclresponsebody) + - [container/types.proto](#containertypesproto) + - [Message Container](#message-container) + - [Message Container.Attribute](#message-containerattribute) + - [Scalar Value Types](#scalar-value-types) @@ -587,10 +587,6 @@ values will be considered invalid. There are some "well-known" attributes affecting system behaviour: -* [ __SYSTEM__SUBNET ] \ - (`__NEOFS__SUBNET` is deprecated) \ - String ID of a container's storage subnet. Any container can be attached to - one subnet only. * [ __SYSTEM__NAME ] \ (`__NEOFS__NAME` is deprecated) \ String of a human-friendly container name registered as a domain in diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index 1467a5d..19b8bd2 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -3,41 +3,40 @@ ## Table of Contents -- [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) - - [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) - - [LocalNodeInfoResponse.Body](#neo.fs.v2.netmap.LocalNodeInfoResponse.Body) - - [NetmapSnapshotRequest](#neo.fs.v2.netmap.NetmapSnapshotRequest) - - [NetmapSnapshotRequest.Body](#neo.fs.v2.netmap.NetmapSnapshotRequest.Body) - - [NetmapSnapshotResponse](#neo.fs.v2.netmap.NetmapSnapshotResponse) - - [NetmapSnapshotResponse.Body](#neo.fs.v2.netmap.NetmapSnapshotResponse.Body) - - [NetworkInfoRequest](#neo.fs.v2.netmap.NetworkInfoRequest) - - [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) - - - Messages - - [Filter](#neo.fs.v2.netmap.Filter) - - [Netmap](#neo.fs.v2.netmap.Netmap) - - [NetworkConfig](#neo.fs.v2.netmap.NetworkConfig) - - [NetworkConfig.Parameter](#neo.fs.v2.netmap.NetworkConfig.Parameter) - - [NetworkInfo](#neo.fs.v2.netmap.NetworkInfo) - - [NodeInfo](#neo.fs.v2.netmap.NodeInfo) - - [NodeInfo.Attribute](#neo.fs.v2.netmap.NodeInfo.Attribute) - - [PlacementPolicy](#neo.fs.v2.netmap.PlacementPolicy) - - [Replica](#neo.fs.v2.netmap.Replica) - - [Selector](#neo.fs.v2.netmap.Selector) - - -- [Scalar Value Types](#scalar-value-types) +- [Protocol Documentation](#protocol-documentation) + - [Table of Contents](#table-of-contents) + - [netmap/service.proto](#netmapserviceproto) + - [Service "neo.fs.v2.netmap.NetmapService"](#service-neofsv2netmapnetmapservice) + - [Method LocalNodeInfo](#method-localnodeinfo) + - [Method NetworkInfo](#method-networkinfo) + - [Method NetmapSnapshot](#method-netmapsnapshot) + - [Message LocalNodeInfoRequest](#message-localnodeinforequest) + - [Message LocalNodeInfoRequest.Body](#message-localnodeinforequestbody) + - [Message LocalNodeInfoResponse](#message-localnodeinforesponse) + - [Message LocalNodeInfoResponse.Body](#message-localnodeinforesponsebody) + - [Message NetmapSnapshotRequest](#message-netmapsnapshotrequest) + - [Message NetmapSnapshotRequest.Body](#message-netmapsnapshotrequestbody) + - [Message NetmapSnapshotResponse](#message-netmapsnapshotresponse) + - [Message NetmapSnapshotResponse.Body](#message-netmapsnapshotresponsebody) + - [Message NetworkInfoRequest](#message-networkinforequest) + - [Message NetworkInfoRequest.Body](#message-networkinforequestbody) + - [Message NetworkInfoResponse](#message-networkinforesponse) + - [Message NetworkInfoResponse.Body](#message-networkinforesponsebody) + - [netmap/types.proto](#netmaptypesproto) + - [Message Filter](#message-filter) + - [Message Netmap](#message-netmap) + - [Message NetworkConfig](#message-networkconfig) + - [Message NetworkConfig.Parameter](#message-networkconfigparameter) + - [Message NetworkInfo](#message-networkinfo) + - [Message NodeInfo](#message-nodeinfo) + - [Message NodeInfo.Attribute](#message-nodeinfoattribute) + - [Message PlacementPolicy](#message-placementpolicy) + - [Message Replica](#message-replica) + - [Message Selector](#message-selector) + - [Clause](#clause) + - [NodeInfo.State](#nodeinfostate) + - [Operation](#operation) + - [Scalar Value Types](#scalar-value-types) @@ -399,14 +398,6 @@ explicitly set: attributes it's a string presenting floating point number with comma or point delimiter for decimal part. In the Network Map it will be saved as 64-bit unsigned integer representing number of minimal token fractions. -* [ __SYSTEM__SUBNET_%s ] \ - (`__NEOFS__SUBNET_%s` is deprecated) \ - `True` or `False`. Defines if the node is included in the `%s` subnetwork - or not. `%s` must be an existing subnetwork's ID (non-negative integer number). - A node can be included in more than one subnetwork and, therefore, can contain - more than one subnet attribute. A missing attribute is equivalent to the - presence of the attribute with `False` value (except default zero subnetwork - (with `%s` == 0) for which missing attribute means inclusion in that network). * UN-LOCODE \ Node's geographic location in [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html) @@ -468,7 +459,6 @@ storage policy definition languages. | container_backup_factor | [uint32](#uint32) | | Container backup factor controls how deep NeoFS 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 | -| subnet_id | [neo.fs.v2.refs.SubnetID](#neo.fs.v2.refs.SubnetID) | | Subnetwork ID to select nodes from. Zero subnet (default) represents all of the nodes which didn't explicitly opt out of membership. | diff --git a/proto-docs/refs.md b/proto-docs/refs.md index 651822f..7d66e5a 100644 --- a/proto-docs/refs.md +++ b/proto-docs/refs.md @@ -3,21 +3,20 @@ ## Table of Contents -- [refs/types.proto](#refs/types.proto) - - - Messages - - [Address](#neo.fs.v2.refs.Address) - - [Checksum](#neo.fs.v2.refs.Checksum) - - [ContainerID](#neo.fs.v2.refs.ContainerID) - - [ObjectID](#neo.fs.v2.refs.ObjectID) - - [OwnerID](#neo.fs.v2.refs.OwnerID) - - [Signature](#neo.fs.v2.refs.Signature) - - [SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) - - [SubnetID](#neo.fs.v2.refs.SubnetID) - - [Version](#neo.fs.v2.refs.Version) - - -- [Scalar Value Types](#scalar-value-types) +- [Protocol Documentation](#protocol-documentation) + - [Table of Contents](#table-of-contents) + - [refs/types.proto](#refstypesproto) + - [Message Address](#message-address) + - [Message Checksum](#message-checksum) + - [Message ContainerID](#message-containerid) + - [Message ObjectID](#message-objectid) + - [Message OwnerID](#message-ownerid) + - [Message Signature](#message-signature) + - [Message SignatureRFC6979](#message-signaturerfc6979) + - [Message Version](#message-version) + - [ChecksumType](#checksumtype) + - [SignatureScheme](#signaturescheme) + - [Scalar Value Types](#scalar-value-types) @@ -164,21 +163,6 @@ RFC 6979 signature. | sign | [bytes](#bytes) | | Deterministic ECDSA with SHA-256 hashing | - - -### Message SubnetID -NeoFS subnetwork identifier. - -String representation of a value is base-10 integer. - -JSON representation is an object containing a single `value` number field. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| value | [fixed32](#fixed32) | | 4-byte integer subnetwork identifier. | - - ### Message Version diff --git a/proto-docs/subnet.md b/proto-docs/subnet.md deleted file mode 100644 index a766dc6..0000000 --- a/proto-docs/subnet.md +++ /dev/null @@ -1,61 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [subnet/types.proto](#subnet/types.proto) - - - Messages - - [SubnetInfo](#neo.fs.v2.subnet.SubnetInfo) - - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## subnet/types.proto - - - - - - - -### Message SubnetInfo -NeoFS subnetwork description - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [neo.fs.v2.refs.SubnetID](#neo.fs.v2.refs.SubnetID) | | Unique subnet identifier. Missing ID is equivalent to zero (default subnetwork) ID. | -| owner | [neo.fs.v2.refs.OwnerID](#neo.fs.v2.refs.OwnerID) | | Identifier of the subnetwork owner | - - - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ Type | Java Type | Python Type | -| ----------- | ----- | -------- | --------- | ----------- | -| 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 | -| 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 | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | -| sfixed32 | Always four bytes. | int32 | int | int | -| sfixed64 | Always eight bytes. | int64 | long | int/long | -| 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/refs/types.proto b/refs/types.proto index 054443e..2f94dd2 100644 --- a/refs/types.proto +++ b/refs/types.proto @@ -77,16 +77,6 @@ message OwnerID { bytes value = 1 [json_name = "value"]; } -// NeoFS subnetwork identifier. -// -// String representation of a value is base-10 integer. -// -// JSON representation is an object containing a single `value` number field. -message SubnetID { - // 4-byte integer subnetwork identifier. - fixed32 value = 1 [json_name = "value"]; -} - // API version used by a node. // // String presentation is a Semantic Versioning 2.0.0 compatible version string diff --git a/subnet/types.proto b/subnet/types.proto deleted file mode 100644 index cc9cae3..0000000 --- a/subnet/types.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package neo.fs.v2.subnet; - -option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/subnet/grpc;subnet"; -option csharp_namespace = "Neo.FileStorage.API.Subnet"; - -import "refs/types.proto"; - -// NeoFS subnetwork description -message SubnetInfo { - // Unique subnet identifier. Missing ID is - // equivalent to zero (default subnetwork) ID. - neo.fs.v2.refs.SubnetID id = 1; - - // Identifier of the subnetwork owner - neo.fs.v2.refs.OwnerID owner = 2; -} From dbfa9c944bd7486f96daad3090cad6c238e9f833 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Tue, 23 May 2023 18:47:09 +0300 Subject: [PATCH 10/59] [#26] netmap: Add NOT and UNIQUE keywords Signed-off-by: Airat Arifullin a.arifullin@yadro.com --- netmap/types.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netmap/types.proto b/netmap/types.proto index fb5cf82..2d72c7e 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -33,6 +33,9 @@ enum Operation { // Logical AND AND = 8; + + // Logical negation + NOT = 9; } // Selector modifier shows how the node set will be formed. By default selector @@ -119,6 +122,9 @@ message PlacementPolicy { // List of named filters to reference in selectors repeated Filter filters = 4 [json_name = "filters"]; + + // Unique flag defines non-overlapping application for replicas + bool unique = 5 [json_name = "unique"]; } // NeoFS node description From b471eaaba91bac2da1a7772c8771695318dd41f3 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Thu, 15 Jun 2023 11:39:55 +0300 Subject: [PATCH 11/59] [#29] object: Extend Delete rpc specification * Add OBJECT_NOT_FOUND status specification Signed-off-by: Airat Arifullin a.arifullin@yadro.com --- object/service.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/object/service.proto b/object/service.proto index 1d08ff5..fae833e 100644 --- a/object/service.proto +++ b/object/service.proto @@ -101,6 +101,9 @@ service ObjectService { // - Common failures (SECTION_FAILURE_COMMON); // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ // delete access to the object is denied; + // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + // the object could not be deleted because it has not been \ + // found within the container; // - **LOCKED** (2050, SECTION_OBJECT): \ // deleting a locked object is prohibited; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ From f2a60016abfc7396029823972d59c664ea934079 Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Thu, 29 Jun 2023 12:05:30 +0300 Subject: [PATCH 12/59] [#9] object service: Add PutSingle RPC Signed-off-by: Dmitrii Stepanov --- object/service.proto | 77 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/object/service.proto b/object/service.proto index fae833e..3a0a3de 100644 --- a/object/service.proto +++ b/object/service.proto @@ -231,6 +231,38 @@ service ObjectService { // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); + + // Put the prepared object into container. + // `ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` and `PayloadLength` of an object MUST be set. + // + // Extended headers can change `Put` behaviour: + // * [ __SYSTEM__NETMAP_EPOCH \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + // Will use the requested version of Network Map for object placement + // calculation. + // + // Please refer to detailed `XHeader` description. + // + // Statuses: + // - **OK** (0, SECTION_SUCCESS): \ + // object has been successfully saved in the container; + // - Common failures (SECTION_FAILURE_COMMON); + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // write access to the container is denied; + // - **LOCKED** (2050, SECTION_OBJECT): \ + // placement of an object of type TOMBSTONE that includes at least one locked + // object is prohibited; + // - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \ + // placement of an object of type LOCK that includes at least one object of + // type other than REGULAR is prohibited; + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // object storage container not found; + // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ + // (for trusted object preparation) session private key does not exist or has + // been deleted; + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // provided session token has expired. + rpc PutSingle(PutSingleRequest) returns (PutSingleResponse); } // GET object request @@ -709,3 +741,48 @@ message GetRangeHashResponse { // transmission. neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; } + +// Object PUT Single request +message PutSingleRequest { + // PUT Single request body + message Body { + // Prepared object with payload. + Object object = 1; + // Number of copies of the object to store within the RPC call. By default, + // object is processed according to the container's placement policy. + // Every number is treated as a minimal number of + // nodes in a corresponding placement vector that must store an object + // to complete the request successfully. The length MUST equal the placement + // vectors number, otherwise request is considered malformed. + repeated uint32 copies_number = 2; + } + // Body of put single object request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.RequestVerificationHeader verify_header = 3; +} + +// Object PUT Single response +message PutSingleResponse { + // PUT Single Object response body + message Body { + } + // Body of put single object response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; +} \ No newline at end of file From 51d330b06a1aaf72d52fe13214a7251abe4b8e13 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 17 Aug 2023 11:04:47 +0300 Subject: [PATCH 13/59] [#19] Remove storage groups Signed-off-by: Evgenii Stratonikov --- CHANGELOG.md | 1 + object/service.proto | 129 ++++++++++++++++++++------------------- object/types.proto | 86 +++++++++++++------------- storagegroup/types.proto | 34 ----------- 4 files changed, 111 insertions(+), 139 deletions(-) delete mode 100644 storagegroup/types.proto diff --git a/CHANGELOG.md b/CHANGELOG.md index 91ebf2f..ee28fa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Removed - Reputation system (#22) - All `subnet` related fields and types (#25) +- Storage group (#19) ## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島) diff --git a/object/service.proto b/object/service.proto index 3a0a3de..2a3c6ff 100644 --- a/object/service.proto +++ b/object/service.proto @@ -13,11 +13,11 @@ import "session/types.proto"; // not affect the sidechain and are only served by nodes in p2p style. service ObjectService { // Receive full object structure, including Headers and payload. Response uses - // gRPC stream. First response message carries the object with the requested address. - // Chunk messages are parts of the object's payload if it is needed. All - // messages, except the first one, carry payload chunks. The requested object can - // be restored by concatenation of object message payload and all chunks - // keeping the receiving order. + // gRPC stream. First response message carries the object with the requested + // address. Chunk messages are parts of the object's payload if it is needed. + // All messages, except the first one, carry payload chunks. The requested + // object can be restored by concatenation of object message payload and all + // chunks keeping the receiving order. // // Extended headers can change `Get` behaviour: // * [ __SYSTEM__NETMAP_EPOCH ] \ @@ -26,9 +26,10 @@ service ObjectService { // calculation. // * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ // (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ - // Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or - // the latest one otherwise) of Network Map to find an object until the depth - // limit is reached. + // Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` + // (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or the latest one + // otherwise) of Network Map to find an object until the depth limit is + // reached. // // Please refer to detailed `XHeader` description. // @@ -70,15 +71,16 @@ service ObjectService { // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ // write access to the container is denied; // - **LOCKED** (2050, SECTION_OBJECT): \ - // placement of an object of type TOMBSTONE that includes at least one locked - // object is prohibited; + // placement of an object of type TOMBSTONE that includes at least one + // locked object is prohibited; // - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \ // placement of an object of type LOCK that includes at least one object of // type other than REGULAR is prohibited; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // object storage container not found; // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ - // (for trusted object preparation) session private key does not exist or has + // (for trusted object preparation) session private key does not exist or + // has // been deleted; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. @@ -166,8 +168,8 @@ service ObjectService { // Get byte range of data payload. Range is set as an (offset, length) tuple. // Like in `Get` method, the response uses gRPC stream. Requested range can be - // restored by concatenation of all received payload chunks keeping the receiving - // order. + // restored by concatenation of all received payload chunks keeping the + // receiving order. // // Extended headers can change `GetRange` behaviour: // * [ __SYSTEM__NETMAP_EPOCH ] \ @@ -233,7 +235,8 @@ service ObjectService { rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); // Put the prepared object into container. - // `ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` and `PayloadLength` of an object MUST be set. + // `ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` and `PayloadLength` of + // an object MUST be set. // // Extended headers can change `Put` behaviour: // * [ __SYSTEM__NETMAP_EPOCH \ @@ -250,15 +253,16 @@ service ObjectService { // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ // write access to the container is denied; // - **LOCKED** (2050, SECTION_OBJECT): \ - // placement of an object of type TOMBSTONE that includes at least one locked - // object is prohibited; + // placement of an object of type TOMBSTONE that includes at least one + // locked object is prohibited; // - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \ // placement of an object of type LOCK that includes at least one object of // type other than REGULAR is prohibited; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // object storage container not found; // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ - // (for trusted object preparation) session private key does not exist or has + // (for trusted object preparation) session private key does not exist or + // has // been deleted; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. @@ -346,16 +350,16 @@ message PutRequest { // Object's Header Header header = 3; - // Number of copies of the object to store within the RPC call. By default, - // object is processed according to the container's placement policy. - // Can be one of: + // Number of copies of the object to store within the RPC call. By + // default, object is processed according to the container's placement + // policy. Can be one of: // 1. A single number; applied to the whole request and is treated as // a minimal number of nodes that must store an object to complete the // request successfully. // 2. An ordered array; every number is treated as a minimal number of // nodes in a corresponding placement vector that must store an object - // to complete the request successfully. The length MUST equal the placement - // vectors number, otherwise request is considered malformed. + // to complete the request successfully. The length MUST equal the + // placement vectors number, otherwise request is considered malformed. repeated uint32 copies_number = 4; } // Single message in the request stream. @@ -406,7 +410,7 @@ message DeleteRequest { message Body { // Address of the object to be deleted neo.fs.v2.refs.Address address = 1; - } + } // Body of delete object request message. Body body = 1; @@ -478,10 +482,10 @@ message HeadRequest { // 3. Check if `ObjectID` signature in `signature` field is correct message HeaderWithSignature { // Full object header - Header header = 1 [json_name = "header"]; + Header header = 1 [ json_name = "header" ]; // Signed `ObjectID` to verify full header's authenticity - neo.fs.v2.refs.Signature signature = 2 [json_name = "signature"]; + neo.fs.v2.refs.Signature signature = 2 [ json_name = "signature" ]; } // Object HEAD response @@ -490,7 +494,7 @@ message HeadResponse { message Body { // Requested object header, it's part or meta information about split // object. - oneof head{ + oneof head { // Full object's `Header` with `ObjectID` signature HeaderWithSignature header = 1; @@ -523,11 +527,11 @@ message SearchRequest { // Version of the Query Language used uint32 version = 2; - // Filter structure checks if the object header field or the attribute content - // matches a value. + // Filter structure checks if the object header field or the attribute + // content matches a value. // // If no filters are set, search request will return all objects of the - // container, including Regular object, Tombstones and Storage Group + // container, including Regular object and Tombstone // objects. Most human users expect to get only object they can directly // work with. In that case, `$Object:ROOT` filter should be used. // @@ -562,11 +566,11 @@ message SearchRequest { // properties: // // * $Object:ROOT \ - // Returns only `REGULAR` type objects that are not split or that are the top - // level root objects in a split hierarchy. This includes objects not + // Returns only `REGULAR` type objects that are not split or that are the + // top level root objects in a split hierarchy. This includes objects not // present physically, like large objects split into smaller objects // without a separate top-level root object. Objects of other types like - // StorageGroups and Tombstones will not be shown. This filter may be + // Locks and Tombstones will not be shown. This filter may be // useful for listing objects like `ls` command of some virtual file // system. This filter is activated if the `key` exists, disregarding the // value and matcher type. @@ -575,17 +579,17 @@ message SearchRequest { // activated if the `key` exists, disregarding the value and matcher type. // // Note: using filters with a key with prefix `$Object:` and match type - // `NOT_PRESENT `is not recommended since this is not a cross-version approach. - // Behavior when processing this kind of filters is undefined. + // `NOT_PRESENT `is not recommended since this is not a cross-version + // approach. Behavior when processing this kind of filters is undefined. message Filter { // Match type to use - MatchType match_type = 1 [json_name = "matchType"]; + MatchType match_type = 1 [ json_name = "matchType" ]; // Attribute or Header fields to match - string key = 2 [json_name = "key"]; + string key = 2 [ json_name = "key" ]; // Value to match - string value = 3 [json_name = "value"]; + string value = 3 [ json_name = "value" ]; } // List of search expressions repeated Filter filters = 3; @@ -668,7 +672,7 @@ message GetRangeResponse { // chunks. message Body { // Requested object range or meta information about split object. - oneof range_part{ + oneof range_part { // Chunked object payload's range. bytes chunk = 1; @@ -744,36 +748,35 @@ message GetRangeHashResponse { // Object PUT Single request message PutSingleRequest { - // PUT Single request body - message Body { - // Prepared object with payload. - Object object = 1; - // Number of copies of the object to store within the RPC call. By default, - // object is processed according to the container's placement policy. - // Every number is treated as a minimal number of - // nodes in a corresponding placement vector that must store an object - // to complete the request successfully. The length MUST equal the placement - // vectors number, otherwise request is considered malformed. - repeated uint32 copies_number = 2; - } - // Body of put single object request message. - Body body = 1; - - // Carries request meta information. Header data is used only to regulate - // message transport and does not affect request execution. - neo.fs.v2.session.RequestMetaHeader meta_header = 2; - - // Carries request verification information. This header is used to - // authenticate the nodes of the message route and check the correctness of - // transmission. - neo.fs.v2.session.RequestVerificationHeader verify_header = 3; + // PUT Single request body + message Body { + // Prepared object with payload. + Object object = 1; + // Number of copies of the object to store within the RPC call. By default, + // object is processed according to the container's placement policy. + // Every number is treated as a minimal number of + // nodes in a corresponding placement vector that must store an object + // to complete the request successfully. The length MUST equal the placement + // vectors number, otherwise request is considered malformed. + repeated uint32 copies_number = 2; + } + // Body of put single object request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.RequestVerificationHeader verify_header = 3; } // Object PUT Single response message PutSingleResponse { // PUT Single Object response body - message Body { - } + message Body {} // Body of put single object response message. Body body = 1; diff --git a/object/types.proto b/object/types.proto index 2af9b6a..41b785b 100644 --- a/object/types.proto +++ b/object/types.proto @@ -9,13 +9,12 @@ import "refs/types.proto"; import "session/types.proto"; // Type of the object payload content. Only `REGULAR` type objects can be split, -// hence `TOMBSTONE`, `STORAGE_GROUP` and `LOCK` payload is limited by the maximum -// object size. +// hence `TOMBSTONE` and `LOCK` payload is limited by the +// maximum object size. // // String presentation of object type is the same as definition: // * REGULAR // * TOMBSTONE -// * STORAGE_GROUP // * LOCK enum ObjectType { // Just a normal object @@ -24,8 +23,8 @@ enum ObjectType { // Used internally to identify deleted objects TOMBSTONE = 1; - // StorageGroup information - STORAGE_GROUP = 2; + // Unused (previously storageGroup information) + // _ = 2; // Object lock LOCK = 3; @@ -53,59 +52,62 @@ enum MatchType { message ShortHeader { // Object format version. Effectively, the version of API library used to // create particular object. - neo.fs.v2.refs.Version version = 1 [json_name = "version"]; + neo.fs.v2.refs.Version version = 1 [ json_name = "version" ]; // Epoch when the object was created - uint64 creation_epoch = 2 [json_name = "creationEpoch"]; + uint64 creation_epoch = 2 [ json_name = "creationEpoch" ]; // Object's owner - neo.fs.v2.refs.OwnerID owner_id = 3 [json_name = "ownerID"]; + neo.fs.v2.refs.OwnerID owner_id = 3 [ json_name = "ownerID" ]; // Type of the object payload content - ObjectType object_type = 4 [json_name = "objectType"]; + ObjectType object_type = 4 [ json_name = "objectType" ]; // Size of payload in bytes. // `0xFFFFFFFFFFFFFFFF` means `payload_length` is unknown - uint64 payload_length = 5 [json_name = "payloadLength"]; + uint64 payload_length = 5 [ json_name = "payloadLength" ]; // Hash of payload bytes - neo.fs.v2.refs.Checksum payload_hash = 6 [json_name = "payloadHash"]; + neo.fs.v2.refs.Checksum payload_hash = 6 [ json_name = "payloadHash" ]; // Homomorphic hash of the object payload - neo.fs.v2.refs.Checksum homomorphic_hash = 7 [json_name = "homomorphicHash"]; + neo.fs.v2.refs.Checksum homomorphic_hash = 7 + [ json_name = "homomorphicHash" ]; } // Object Header message Header { // Object format version. Effectively, the version of API library used to // create particular object - neo.fs.v2.refs.Version version = 1 [json_name = "version"]; + neo.fs.v2.refs.Version version = 1 [ json_name = "version" ]; // Object's container - neo.fs.v2.refs.ContainerID container_id = 2 [json_name = "containerID"]; + neo.fs.v2.refs.ContainerID container_id = 2 [ json_name = "containerID" ]; // Object's owner - neo.fs.v2.refs.OwnerID owner_id = 3 [json_name = "ownerID"]; + neo.fs.v2.refs.OwnerID owner_id = 3 [ json_name = "ownerID" ]; // Object creation Epoch - uint64 creation_epoch = 4 [json_name = "creationEpoch"]; + uint64 creation_epoch = 4 [ json_name = "creationEpoch" ]; // Size of payload in bytes. // `0xFFFFFFFFFFFFFFFF` means `payload_length` is unknown. - uint64 payload_length = 5 [json_name = "payloadLength"]; + uint64 payload_length = 5 [ json_name = "payloadLength" ]; // Hash of payload bytes - neo.fs.v2.refs.Checksum payload_hash = 6 [json_name = "payloadHash"]; + neo.fs.v2.refs.Checksum payload_hash = 6 [ json_name = "payloadHash" ]; // Type of the object payload content - ObjectType object_type = 7 [json_name = "objectType"]; + ObjectType object_type = 7 [ json_name = "objectType" ]; // Homomorphic hash of the object payload - neo.fs.v2.refs.Checksum homomorphic_hash = 8 [json_name = "homomorphicHash"]; + neo.fs.v2.refs.Checksum homomorphic_hash = 8 + [ json_name = "homomorphicHash" ]; // Session token, if it was used during Object creation. Need it to verify // integrity and authenticity out of Request scope. - neo.fs.v2.session.SessionToken session_token = 9 [json_name = "sessionToken"]; + neo.fs.v2.session.SessionToken session_token = 9 + [ json_name = "sessionToken" ]; // `Attribute` is a user-defined Key-Value metadata pair attached to an // object. @@ -114,8 +116,8 @@ message Header { // Objects with duplicated attribute names or attributes with empty values // will be considered invalid. // - // There are some "well-known" attributes starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix - // that affect system behaviour: + // There are some "well-known" attributes starting with `__SYSTEM__` + // (`__NEOFS__` is deprecated) prefix that affect system behaviour: // // * [ __SYSTEM__UPLOAD_ID ] \ // (`__NEOFS__UPLOAD_ID` is deprecated) \ @@ -155,12 +157,12 @@ message Header { // corresponding section in NeoFS Technical Specification. message Attribute { // string key to the object attribute - string key = 1 [json_name = "key"]; + string key = 1 [ json_name = "key" ]; // string value of the object attribute - string value = 2 [json_name = "value"]; + string value = 2 [ json_name = "value" ]; } // User-defined object attributes - repeated Attribute attributes = 10 [json_name = "attributes"]; + repeated Attribute attributes = 10 [ json_name = "attributes" ]; // Bigger objects can be split into a chain of smaller objects. Information // about inter-dependencies between spawned objects and how to re-construct @@ -168,54 +170,54 @@ message Header { // must be within the same container. message Split { // Identifier of the origin object. Known only to the minor child. - neo.fs.v2.refs.ObjectID parent = 1 [json_name = "parent"]; + neo.fs.v2.refs.ObjectID parent = 1 [ json_name = "parent" ]; // Identifier of the left split neighbor - neo.fs.v2.refs.ObjectID previous = 2 [json_name = "previous"]; + neo.fs.v2.refs.ObjectID previous = 2 [ json_name = "previous" ]; // `signature` field of the parent object. Used to reconstruct parent. - neo.fs.v2.refs.Signature parent_signature = 3 [json_name = "parentSignature"]; + neo.fs.v2.refs.Signature parent_signature = 3 + [ json_name = "parentSignature" ]; // `header` field of the parent object. Used to reconstruct parent. - Header parent_header = 4 [json_name = "parentHeader"]; + Header parent_header = 4 [ json_name = "parentHeader" ]; // List of identifiers of the objects generated by splitting current one. - repeated neo.fs.v2.refs.ObjectID children = 5 [json_name = "children"]; + repeated neo.fs.v2.refs.ObjectID children = 5 [ json_name = "children" ]; // 16 byte UUIDv4 used to identify the split object hierarchy parts. Must be // unique inside container. All objects participating in the split must have // the same `split_id` value. - bytes split_id = 6 [json_name = "splitID"]; - + bytes split_id = 6 [ json_name = "splitID" ]; } // Position of the object in the split hierarchy - Split split = 11 [json_name = "split"]; + Split split = 11 [ json_name = "split" ]; } // Object structure. Object is immutable and content-addressed. It means -// `ObjectID` will change if the header or the payload changes. It's calculated as a -// hash of header field which contains hash of the object's payload. +// `ObjectID` will change if the header or the payload changes. It's calculated +// as a hash of header field which contains hash of the object's payload. // // For non-regular object types payload format depends on object type specified // in the header. message Object { // Object's unique identifier. - neo.fs.v2.refs.ObjectID object_id = 1 [json_name = "objectID"]; + neo.fs.v2.refs.ObjectID object_id = 1 [ json_name = "objectID" ]; // Signed object_id - neo.fs.v2.refs.Signature signature = 2 [json_name = "signature"]; + neo.fs.v2.refs.Signature signature = 2 [ json_name = "signature" ]; // Object metadata headers - Header header = 3 [json_name = "header"]; + Header header = 3 [ json_name = "header" ]; // Payload bytes - bytes payload = 4 [json_name = "payload"]; + bytes payload = 4 [ json_name = "payload" ]; } // Meta information of split hierarchy for object assembly. With the last part // one can traverse linked list of split hierarchy back to the first part and -// assemble the original object. With a linking object one can assemble an object -// right from the object parts. +// assemble the original object. With a linking object one can assemble an +// object right from the object parts. message SplitInfo { // 16 byte UUID used to identify the split object hierarchy parts. bytes split_id = 1; diff --git a/storagegroup/types.proto b/storagegroup/types.proto deleted file mode 100644 index b74f755..0000000 --- a/storagegroup/types.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package neo.fs.v2.storagegroup; - -option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/storagegroup/grpc;storagegroup"; -option csharp_namespace = "Neo.FileStorage.API.StorageGroup"; - -import "refs/types.proto"; - -// StorageGroup keeps verification information for Data Audit sessions. Objects -// that require paid storage guarantees are gathered in `StorageGroups` with -// additional information used for the proof of storage. `StorageGroup` only -// contains objects from the same container. -// -// Being an object payload, StorageGroup may have expiration Epoch set with -// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) well-known attribute. When expired, StorageGroup -// will be ignored by InnerRing nodes during Data Audit cycles and will be -// deleted by Storage Nodes. -// -message StorageGroup { - // Total size of the payloads of objects in the storage group - uint64 validation_data_size = 1 [json_name = "validationDataSize"]; - - // Homomorphic hash from the concatenation of the payloads of the storage - // group members. The order of concatenation is the same as the order of the - // members in the `members` field. - neo.fs.v2.refs.Checksum validation_hash = 2 [json_name = "validationHash"]; - - // DEPRECATED. Last NeoFS epoch number of the storage group lifetime - uint64 expiration_epoch = 3 [json_name = "expirationEpoch", deprecated = true]; - - // Strictly ordered list of storage group member objects. Members MUST be unique - repeated neo.fs.v2.refs.ObjectID members = 4 [json_name = "members"]; -} From 188f580e469c9fafc603a1ff3c54933e7cf8b820 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 5 Sep 2023 09:55:35 +0300 Subject: [PATCH 14/59] [#2] object: Clarify locked object expiration Signed-off-by: Evgenii Stratonikov --- object/types.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/object/types.proto b/object/types.proto index 41b785b..dfc3afc 100644 --- a/object/types.proto +++ b/object/types.proto @@ -124,7 +124,8 @@ message Header { // Marks smaller parts of a split bigger object // * [ __SYSTEM__EXPIRATION_EPOCH ] \ // (`__NEOFS__EXPIRATION_EPOCH` is deprecated) \ - // Tells GC to delete object after that epoch + // The epoch after which object with no LOCKs on it becomes unavailable. + // Locked object continues to be available until each of the LOCKs expire. // * [ __SYSTEM__TICK_EPOCH ] \ // (`__NEOFS__TICK_EPOCH` is deprecated) \ // Decimal number that defines what epoch must produce From 4c68d92468503b10282c8a92af83a56f170c8a3a Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 28 Feb 2024 18:53:04 +0300 Subject: [PATCH 15/59] [#39] Makefile: Add fmt target Signed-off-by: Evgenii Stratonikov --- Makefile | 6 ++ accounting/service.proto | 5 +- accounting/types.proto | 4 +- acl/types.proto | 59 ++++++++--------- audit/types.proto | 38 +++++------ container/service.proto | 30 +++++---- container/types.proto | 44 +++++++------ lock/types.proto | 7 +- netmap/service.proto | 132 ++++++++++++++++++------------------- netmap/types.proto | 95 +++++++++++++-------------- refs/types.proto | 38 +++++------ session/service.proto | 2 +- session/types.proto | 136 ++++++++++++++++++++------------------- status/types.proto | 134 +++++++++++++++++++------------------- tombstone/types.proto | 13 ++-- 15 files changed, 379 insertions(+), 364 deletions(-) diff --git a/Makefile b/Makefile index d66c98a..532d8b0 100644 --- a/Makefile +++ b/Makefile @@ -19,3 +19,9 @@ doc: --proto_path=.:/usr/local/include \ --doc_out=proto-docs/ $${f}/*.proto; \ done + +fmt: + @for f in `ls **/*.proto`; do \ + echo "⇒ Formatting $$f"; \ + clang-format -i $$f; \ + done diff --git a/accounting/service.proto b/accounting/service.proto index 6574404..ac988c9 100644 --- a/accounting/service.proto +++ b/accounting/service.proto @@ -21,7 +21,7 @@ service AccountingService { // - **OK** (0, SECTION_SUCCESS): // balance has been successfully read; // - Common failures (SECTION_FAILURE_COMMON). - rpc Balance (BalanceRequest) returns (BalanceResponse); + rpc Balance(BalanceRequest) returns (BalanceResponse); } // BalanceRequest message @@ -51,7 +51,8 @@ message BalanceRequest { // BalanceResponse message message BalanceResponse { // The amount of funds in GAS token for the `OwnerID`'s account requested. - // Balance is given in the `Decimal` format to avoid precision issues with rounding. + // Balance is given in the `Decimal` format to avoid precision issues with + // rounding. message Body { // Amount of funds in GAS token for the requested account. Decimal balance = 1; diff --git a/accounting/types.proto b/accounting/types.proto index 205332e..eadf9a8 100644 --- a/accounting/types.proto +++ b/accounting/types.proto @@ -14,9 +14,9 @@ option csharp_namespace = "Neo.FileStorage.API.Accounting"; // description. message Decimal { // Number in the smallest Token fractions. - int64 value = 1 [json_name = "value"]; + int64 value = 1 [ json_name = "value" ]; // Precision value indicating how many smallest fractions can be in one // integer. - uint32 precision = 2 [json_name = "precision"]; + uint32 precision = 2 [ json_name = "precision" ]; } diff --git a/acl/types.proto b/acl/types.proto index 31a43d4..e9ea987 100644 --- a/acl/types.proto +++ b/acl/types.proto @@ -19,7 +19,8 @@ enum Role { // container or an inner ring node SYSTEM = 2; - // Others target rule is applied if sender is neither a user nor a system target + // Others target rule is applied if sender is neither a user nor a system + // target OTHERS = 3; } @@ -95,10 +96,10 @@ enum HeaderType { // Describes a single eACL rule. message EACLRecord { // NeoFS request Verb to match - Operation operation = 1 [json_name = "operation"]; + Operation operation = 1 [ json_name = "operation" ]; // Rule execution result. Either allows or denies access if filters match. - Action action = 2 [json_name = "action"]; + Action action = 2 [ json_name = "action" ]; // Filter to check particular properties of the request or the object. // @@ -132,32 +133,32 @@ message EACLRecord { // it's possible to take that information from the requested address. message Filter { // Define if Object or Request header will be used - HeaderType header_type = 1 [json_name = "headerType"]; + HeaderType header_type = 1 [ json_name = "headerType" ]; // Match operation type - MatchType match_type = 2 [json_name = "matchType"]; + MatchType match_type = 2 [ json_name = "matchType" ]; // Name of the Header to use - string key = 3 [json_name="key"]; + string key = 3 [ json_name = "key" ]; // Expected Header Value or pattern to match - string value = 4 [json_name="value"]; + string value = 4 [ json_name = "value" ]; } // List of filters to match and see if rule is applicable - repeated Filter filters = 3 [json_name="filters"]; + repeated Filter filters = 3 [ json_name = "filters" ]; // Target to apply ACL rule. Can be a subject's role class or a list of public // keys to match. message Target { // Target subject's role class - Role role = 1 [json_name="role"]; + Role role = 1 [ json_name = "role" ]; // List of public keys to identify target subject - repeated bytes keys = 2 [json_name="keys"]; + repeated bytes keys = 2 [ json_name = "keys" ]; } // List of target subjects to apply ACL rule to - repeated Target targets = 4 [json_name="targets"]; + repeated Target targets = 4 [ json_name = "targets" ]; } // Extended ACL rules table. A list of ACL rules defined additionally to Basic @@ -167,13 +168,13 @@ message EACLRecord { message EACLTable { // eACL format version. Effectively, the version of API library used to create // eACL Table. - neo.fs.v2.refs.Version version = 1 [json_name = "version"]; + neo.fs.v2.refs.Version version = 1 [ json_name = "version" ]; // Identifier of the container that should use given access control rules - neo.fs.v2.refs.ContainerID container_id = 2 [json_name="containerID"]; + neo.fs.v2.refs.ContainerID container_id = 2 [ json_name = "containerID" ]; // List of Extended ACL rules - repeated EACLRecord records = 3 [json_name="records"]; + repeated EACLRecord records = 3 [ json_name = "records" ]; } // BearerToken allows to attach signed Extended ACL rules to the request in @@ -183,44 +184,44 @@ message EACLTable { // used in the similar use cases, like providing authorisation to externally // authenticated party. // -// BearerToken can be issued only by the container's owner and must be signed using -// the key associated with the container's `OwnerID`. +// BearerToken can be issued only by the container's owner and must be signed +// using the key associated with the container's `OwnerID`. message BearerToken { - // Bearer Token body structure contains Extended ACL table issued by the container - // owner with additional information preventing token abuse. + // Bearer Token body structure contains Extended ACL table issued by the + // container owner with additional information preventing token abuse. message Body { // Table of Extended ACL rules to use instead of the ones attached to the // container. If it contains `container_id` field, bearer token is only - // valid for this specific container. Otherwise, any container of the same owner - // is allowed. - EACLTable eacl_table = 1 [json_name="eaclTable"]; + // valid for this specific container. Otherwise, any container of the same + // owner is allowed. + EACLTable eacl_table = 1 [ json_name = "eaclTable" ]; // `OwnerID` defines to whom the token was issued. It must match the request // originator's `OwnerID`. If empty, any token bearer will be accepted. - neo.fs.v2.refs.OwnerID owner_id = 2 [json_name="ownerID"]; + neo.fs.v2.refs.OwnerID owner_id = 2 [ json_name = "ownerID" ]; // Lifetime parameters of the token. Field names taken from // [rfc7519](https://tools.ietf.org/html/rfc7519). message TokenLifetime { // Expiration Epoch - uint64 exp = 1 [json_name="exp"]; + uint64 exp = 1 [ json_name = "exp" ]; // Not valid before Epoch - uint64 nbf = 2 [json_name="nbf"]; + uint64 nbf = 2 [ json_name = "nbf" ]; // Issued at Epoch - uint64 iat = 3 [json_name="iat"]; + uint64 iat = 3 [ json_name = "iat" ]; } // Token expiration and valid time period parameters - TokenLifetime lifetime = 3 [json_name="lifetime"]; + TokenLifetime lifetime = 3 [ json_name = "lifetime" ]; // AllowImpersonate flag to consider token signer as request owner. // If this field is true extended ACL table in token body isn't processed. - bool allow_impersonate = 4 [json_name="allowImpersonate"]; + bool allow_impersonate = 4 [ json_name = "allowImpersonate" ]; } // Bearer Token body - Body body = 1 [json_name="body"]; + Body body = 1 [ json_name = "body" ]; // Signature of BearerToken body - neo.fs.v2.refs.Signature signature = 2 [json_name="signature"]; + neo.fs.v2.refs.Signature signature = 2 [ json_name = "signature" ]; } diff --git a/audit/types.proto b/audit/types.proto index c83260c..c5c19ec 100644 --- a/audit/types.proto +++ b/audit/types.proto @@ -12,48 +12,48 @@ import "refs/types.proto"; message DataAuditResult { // Data Audit Result format version. Effectively, the version of API library // used to report DataAuditResult structure. - neo.fs.v2.refs.Version version = 1 [json_name = "version"]; + neo.fs.v2.refs.Version version = 1 [ json_name = "version" ]; // Epoch number when the Data Audit was conducted - fixed64 audit_epoch = 2 [json_name = "auditEpoch"]; + fixed64 audit_epoch = 2 [ json_name = "auditEpoch" ]; // Container under audit - neo.fs.v2.refs.ContainerID container_id = 3 [json_name = "containerID"]; + neo.fs.v2.refs.ContainerID container_id = 3 [ json_name = "containerID" ]; // Public key of the auditing InnerRing node in a binary format - bytes public_key = 4 [json_name = "publicKey"]; + bytes public_key = 4 [ json_name = "publicKey" ]; // Shows if Data Audit process was complete in time or if it was cancelled - bool complete = 5 [json_name = "complete"]; + bool complete = 5 [ json_name = "complete" ]; // Number of request done at PoR stage - uint32 requests = 6 [json_name = "requests"]; + uint32 requests = 6 [ json_name = "requests" ]; // Number of retries done at PoR stage - uint32 retries = 7 [json_name = "retries"]; + uint32 retries = 7 [ json_name = "retries" ]; // List of Storage Groups that passed audit PoR stage - repeated neo.fs.v2.refs.ObjectID pass_sg = 8 [json_name = "passSG"]; + repeated neo.fs.v2.refs.ObjectID pass_sg = 8 [ json_name = "passSG" ]; // List of Storage Groups that failed audit PoR stage - repeated neo.fs.v2.refs.ObjectID fail_sg = 9 [json_name = "failSG"]; + repeated neo.fs.v2.refs.ObjectID fail_sg = 9 [ json_name = "failSG" ]; - // Number of sampled objects under the audit placed in an optimal way according to - // the containers placement policy when checking PoP - uint32 hit = 10 [json_name = "hit"]; + // Number of sampled objects under the audit placed in an optimal way + // according to the containers placement policy when checking PoP + uint32 hit = 10 [ json_name = "hit" ]; - // Number of sampled objects under the audit placed in suboptimal way according to - // the containers placement policy, but still at a satisfactory level when - // checking PoP - uint32 miss = 11 [json_name = "miss"]; + // Number of sampled objects under the audit placed in suboptimal way + // according to the containers placement policy, but still at a satisfactory + // level when checking PoP + uint32 miss = 11 [ json_name = "miss" ]; // Number of sampled objects under the audit stored inconsistently with the // placement policy or not found at all when checking PoP - uint32 fail = 12 [json_name = "fail"]; + uint32 fail = 12 [ json_name = "fail" ]; // List of storage node public keys that passed at least one PDP - repeated bytes pass_nodes = 13 [json_name = "passNodes"]; + repeated bytes pass_nodes = 13 [ json_name = "passNodes" ]; // List of storage node public keys that failed at least one PDP - repeated bytes fail_nodes = 14 [json_name = "failNodes"]; + repeated bytes fail_nodes = 14 [ json_name = "failNodes" ]; } diff --git a/container/service.proto b/container/service.proto index 8c5f84e..fa45703 100644 --- a/container/service.proto +++ b/container/service.proto @@ -17,8 +17,8 @@ import "session/types.proto"; service ContainerService { // `Put` invokes `Container` smart contract's `Put` method and returns // response immediately. After a new block is issued in sidechain, request is - // verified by Inner Ring nodes. After one more block in sidechain, the container - // is added into smart contract storage. + // verified by Inner Ring nodes. After one more block in sidechain, the + // container is added into smart contract storage. // // Statuses: // - **OK** (0, SECTION_SUCCESS): \ @@ -28,8 +28,8 @@ service ContainerService { // `Delete` invokes `Container` smart contract's `Delete` method and returns // response immediately. After a new block is issued in sidechain, request is - // verified by Inner Ring nodes. After one more block in sidechain, the container - // is added into smart contract storage. + // verified by Inner Ring nodes. After one more block in sidechain, the + // container is added into smart contract storage. // // Statuses: // - **OK** (0, SECTION_SUCCESS): \ @@ -56,8 +56,8 @@ service ContainerService { rpc List(ListRequest) returns (ListResponse); // Invokes 'SetEACL' method of 'Container` smart contract and returns response - // immediately. After one more block in sidechain, changes in an Extended ACL are - // added into smart contract storage. + // immediately. After one more block in sidechain, changes in an Extended ACL + // are added into smart contract storage. // // Statuses: // - **OK** (0, SECTION_SUCCESS): \ @@ -84,7 +84,8 @@ service ContainerService { // - **OK** (0, SECTION_SUCCESS): \ // estimation of used space has been successfully announced; // - Common failures (SECTION_FAILURE_COMMON). - rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) returns (AnnounceUsedSpaceResponse); + rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) + returns (AnnounceUsedSpaceResponse); } // New NeoFS Container creation request @@ -146,7 +147,8 @@ message DeleteRequest { // Identifier of the container to delete from NeoFS neo.fs.v2.refs.ContainerID container_id = 1; - // `ContainerID` signed with the container owner's key according to RFC-6979. + // `ContainerID` signed with the container owner's key according to + // RFC-6979. neo.fs.v2.refs.SignatureRFC6979 signature = 2; } // Body of container delete request message. @@ -296,9 +298,9 @@ message SetExtendedACLRequest { // Set Extended ACL message SetExtendedACLResponse { // `SetExtendedACLResponse` has an empty body because the operation is - // asynchronous and the update should be reflected in `Container` smart contract's - // storage after next block is issued in sidechain. - message Body { } + // asynchronous and the update should be reflected in `Container` smart + // contract's storage after next block is issued in sidechain. + message Body {} // Body of set extended acl response message. Body body = 1; @@ -337,8 +339,8 @@ message GetExtendedACLRequest { // 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. + // 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; @@ -401,7 +403,7 @@ message AnnounceUsedSpaceRequest { message AnnounceUsedSpaceResponse { // `AnnounceUsedSpaceResponse` has an empty body because announcements are // one way communication. - message Body { } + message Body {} // Body of announce used space response message. Body body = 1; diff --git a/container/types.proto b/container/types.proto index 5f7f76b..8b4a8a9 100644 --- a/container/types.proto +++ b/container/types.proto @@ -10,26 +10,26 @@ import "refs/types.proto"; // Container is a structure that defines object placement behaviour. Objects can // be stored only within containers. They define placement rule, attributes and -// access control information. An ID of a container is a 32 byte long SHA256 hash -// of stable-marshalled container message. +// access control information. An ID of a container is a 32 byte long SHA256 +// hash of stable-marshalled container message. message Container { // Container format version. Effectively, the version of API library used to // create the container. - neo.fs.v2.refs.Version version = 1 [json_name = "version"]; + neo.fs.v2.refs.Version version = 1 [ json_name = "version" ]; // Identifier of the container owner - neo.fs.v2.refs.OwnerID owner_id = 2 [json_name = "ownerID"]; + neo.fs.v2.refs.OwnerID owner_id = 2 [ json_name = "ownerID" ]; // Nonce is a 16 byte UUIDv4, used to avoid collisions of `ContainerID`s - bytes nonce = 3 [json_name = "nonce"]; + bytes nonce = 3 [ json_name = "nonce" ]; - // `BasicACL` contains access control rules for the owner, system and others groups, - // as well as permission bits for `BearerToken` and `Extended ACL` - uint32 basic_acl = 4 [json_name = "basicACL"]; + // `BasicACL` contains access control rules for the owner, system and others + // groups, as well as permission bits for `BearerToken` and `Extended ACL` + uint32 basic_acl = 4 [ json_name = "basicACL" ]; // `Attribute` is a user-defined Key-Value metadata pair attached to the - // container. Container attributes are immutable. They are set at the moment of - // container creation and can never be added or updated. + // container. Container attributes are immutable. They are set at the moment + // of container creation and can never be added or updated. // // Key name must be a container-unique valid UTF-8 string. Value can't be // empty. Containers with duplicated attribute names or attributes with empty @@ -43,15 +43,16 @@ message Container { // NNS contract. // * [ __SYSTEM__ZONE ] \ // (`__NEOFS__ZONE` is deprecated) \ - // String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated). Used as a TLD of a domain name in NNS - // contract. If no zone is specified, use default zone: `container`. + // String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated). + // Used as a TLD of a domain name in NNS contract. If no zone is specified, + // use default zone: `container`. // * [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \ // (`__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 configuration - // value corresponds with that attribute's value. After container inclusion, network - // setting is ignored. + // Disables homomorphic hashing for the container if the value equals "true" + // string. Any other values are interpreted as missing attribute. Container + // could be accepted in a NeoFS network only if the global network hashing + // configuration value corresponds with that attribute's value. After + // container inclusion, network setting is ignored. // // And some well-known attributes used by applications only: // @@ -61,14 +62,15 @@ message Container { // User-defined local time of container creation in Unix Timestamp format message Attribute { // Attribute name key - string key = 1 [json_name = "key"]; + string key = 1 [ json_name = "key" ]; // Attribute value - string value = 2 [json_name = "value"]; + string value = 2 [ json_name = "value" ]; } // Attributes represent immutable container's meta data - repeated Attribute attributes = 5 [json_name = "attributes"]; + repeated Attribute attributes = 5 [ json_name = "attributes" ]; // Placement policy for the object inside the container - neo.fs.v2.netmap.PlacementPolicy placement_policy = 6 [json_name = "placementPolicy"]; + neo.fs.v2.netmap.PlacementPolicy placement_policy = 6 + [ json_name = "placementPolicy" ]; } diff --git a/lock/types.proto b/lock/types.proto index 52cbdea..2fdafa5 100644 --- a/lock/types.proto +++ b/lock/types.proto @@ -9,10 +9,11 @@ import "refs/types.proto"; // Lock objects protects a list of objects from being deleted. The lifetime of a // lock object is limited similar to regular objects in -// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) attribute. Lock object MUST have expiration epoch. -// It is impossible to delete a lock object via ObjectService.Delete RPC call. +// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) +// attribute. Lock object MUST have expiration epoch. It is impossible to delete +// a lock object via ObjectService.Delete RPC call. message Lock { // List of objects to lock. Must not be empty or carry empty IDs. // All members must be of the `REGULAR` type. - repeated neo.fs.v2.refs.ObjectID members = 1 [json_name = "members"]; + repeated neo.fs.v2.refs.ObjectID members = 1 [ json_name = "members" ]; } diff --git a/netmap/service.proto b/netmap/service.proto index 179a2c1..f5e7d9f 100644 --- a/netmap/service.proto +++ b/netmap/service.proto @@ -9,22 +9,23 @@ import "netmap/types.proto"; import "refs/types.proto"; 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. +// `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. service NetmapService { - // Get NodeInfo structure from the particular node directly. - // Node information can be taken from `Netmap` smart contract. In some cases, though, - // one may want to get recent information directly or to talk to the node not yet - // present in the `Network Map` to find out what API version can be used for - // further communication. This can be also used to check if a node is up and running. + // Get NodeInfo structure from the particular node directly. + // Node information can be taken from `Netmap` smart contract. In some cases, + // though, one may want to get recent information directly or to talk to the + // node not yet present in the `Network Map` to find out what API version can + // be used for further communication. This can be also used to check if a node + // is up and running. // // Statuses: // - **OK** (0, SECTION_SUCCESS): // information about the server has been successfully read; // - Common failures (SECTION_FAILURE_COMMON). - rpc LocalNodeInfo (LocalNodeInfoRequest) returns (LocalNodeInfoResponse); + rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse); // Read recent information about the NeoFS network. // @@ -32,7 +33,7 @@ service NetmapService { // - **OK** (0, SECTION_SUCCESS): // information about the current network state has been successfully read; // - Common failures (SECTION_FAILURE_COMMON). - rpc NetworkInfo (NetworkInfoRequest) returns (NetworkInfoResponse); + rpc NetworkInfo(NetworkInfoRequest) returns (NetworkInfoResponse); // Returns network map snapshot of the current NeoFS epoch. // @@ -40,14 +41,13 @@ service NetmapService { // - **OK** (0, SECTION_SUCCESS): // information about the current network map has been successfully read; // - Common failures (SECTION_FAILURE_COMMON). - rpc NetmapSnapshot (NetmapSnapshotRequest) returns (NetmapSnapshotResponse); + rpc NetmapSnapshot(NetmapSnapshotRequest) returns (NetmapSnapshotResponse); } // Get NodeInfo structure directly from a particular node message LocalNodeInfoRequest { // LocalNodeInfo request body is empty. - message Body { - } + message Body {} // Body of the LocalNodeInfo request message Body body = 1; @@ -86,81 +86,77 @@ message LocalNodeInfoResponse { // Get NetworkInfo structure with the network view from a particular node. message NetworkInfoRequest { - // NetworkInfo request body is empty. - message Body { - } - // Body of the NetworkInfo request message - Body body = 1; + // NetworkInfo request body is empty. + message Body {} + // Body of the NetworkInfo 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 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; + // 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; } // Response with NetworkInfo structure including current epoch and // sidechain magic number. message NetworkInfoResponse { - // Information about the network. - message Body { - // NetworkInfo structure with recent information. - NetworkInfo network_info = 1; - } - // Body of the NetworkInfo response message. - Body body = 1; + // Information about the network. + message Body { + // NetworkInfo structure with recent information. + NetworkInfo network_info = 1; + } + // Body of the NetworkInfo response message. + Body body = 1; - // Carries response meta information. Header data is used only to regulate - // message transport and does not affect response execution. - neo.fs.v2.session.ResponseMetaHeader meta_header = 2; + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect response 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; + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; } // Get netmap snapshot request message NetmapSnapshotRequest { - // Get netmap snapshot request body. - message Body { - } + // Get netmap snapshot request body. + message Body {} - // Body of get netmap snapshot request message. - Body body = 1; + // Body of get netmap snapshot 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; + // 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; } // Response with current netmap snapshot message NetmapSnapshotResponse { - // Get netmap snapshot response body - message Body { - // Structure of the requested network map. - Netmap netmap = 1 [json_name = "netmap"]; - } + // Get netmap snapshot response body + message Body { + // Structure of the requested network map. + Netmap netmap = 1 [ json_name = "netmap" ]; + } - // Body of get netmap snapshot response message. - Body body = 1; + // Body of get netmap snapshot response message. + Body body = 1; - // Carries response meta information. Header data is used only to regulate - // message transport and does not affect response 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; + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect response 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; } diff --git a/netmap/types.proto b/netmap/types.proto index 2d72c7e..a3c9c00 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -52,46 +52,46 @@ enum Clause { DISTINCT = 2; } -// This filter will return the subset of nodes from `NetworkMap` or another filter's -// results that will satisfy filter's conditions. +// This filter will return the subset of nodes from `NetworkMap` or another +// filter's results that will satisfy filter's conditions. message Filter { // Name of the filter or a reference to a named filter. '*' means // application to the whole unfiltered NetworkMap. At top level it's used as a // filter name. At lower levels it's considered to be a reference to another // named filter - string name = 1 [json_name = "name"]; + string name = 1 [ json_name = "name" ]; // Key to filter - string key = 2 [json_name = "key"]; + string key = 2 [ json_name = "key" ]; // Filtering operation - Operation op = 3 [json_name = "op"]; + Operation op = 3 [ json_name = "op" ]; // Value to match - string value = 4 [json_name = "value"]; + string value = 4 [ json_name = "value" ]; // List of inner filters. Top level operation will be applied to the whole // list. - repeated Filter filters = 5 [json_name = "filters"]; + repeated Filter filters = 5 [ json_name = "filters" ]; } // Selector chooses a number of nodes from the bucket taking the nearest nodes // to the provided `ContainerID` by hash distance. message Selector { // Selector name to reference in object placement section - string name = 1 [json_name = "name"]; + string name = 1 [ json_name = "name" ]; // How many nodes to select from the bucket - uint32 count = 2 [json_name = "count"]; + uint32 count = 2 [ json_name = "count" ]; // Selector modifier showing how to form a bucket - Clause clause = 3 [json_name = "clause"]; + Clause clause = 3 [ json_name = "clause" ]; // Bucket attribute to select from - string attribute = 4 [json_name = "attribute"]; + string attribute = 4 [ json_name = "attribute" ]; // Filter reference to select from - string filter = 5 [json_name = "filter"]; + string filter = 5 [ json_name = "filter" ]; } // Number of object replicas in a set of nodes from the defined selector. If no @@ -99,10 +99,10 @@ message Selector { // default. message Replica { // How many object replicas to put - uint32 count = 1 [json_name = "count"]; + uint32 count = 1 [ json_name = "count" ]; // Named selector bucket to put replicas - string selector = 2 [json_name = "selector"]; + string selector = 2 [ json_name = "selector" ]; } // Set of rules to select a subset of nodes from `NetworkMap` able to store @@ -111,29 +111,29 @@ message Replica { message PlacementPolicy { // Rules to set number of object replicas and place each one into a named // bucket - repeated Replica replicas = 1 [json_name = "replicas"]; + repeated Replica replicas = 1 [ json_name = "replicas" ]; // Container backup factor controls how deep NeoFS will search for nodes // alternatives to include into container's nodes subset - uint32 container_backup_factor = 2 [json_name = "containerBackupFactor"]; + uint32 container_backup_factor = 2 [ json_name = "containerBackupFactor" ]; // Set of Selectors to form the container's nodes subset - repeated Selector selectors = 3 [json_name = "selectors"]; + repeated Selector selectors = 3 [ json_name = "selectors" ]; // List of named filters to reference in selectors - repeated Filter filters = 4 [json_name = "filters"]; + repeated Filter filters = 4 [ json_name = "filters" ]; // Unique flag defines non-overlapping application for replicas - bool unique = 5 [json_name = "unique"]; + bool unique = 5 [ json_name = "unique" ]; } // NeoFS node description message NodeInfo { // Public key of the NeoFS node in a binary format - bytes public_key = 1 [json_name = "publicKey"]; + bytes public_key = 1 [ json_name = "publicKey" ]; // Ways to connect to a node - repeated string addresses = 2 [json_name = "addresses"]; + repeated string addresses = 2 [ json_name = "addresses" ]; // Administrator-defined Attributes of the NeoFS Storage Node. // @@ -141,15 +141,15 @@ message NodeInfo { // 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 Storage - // Node configuration uses ":" and "/" symbols, e.g.: + // 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 + // Storage Node configuration uses ":" and "/" symbols, e.g.: // // `NEOFS_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 attribute's - // key or value. + // Therefore the string attribute representation in the Node configuration + // must use "\:", "\/" and "\\" escaped symbols if any of them appears in an + // attribute's key or value. // // Node's attributes are mostly used during Storage Policy evaluation to // calculate object's placement and find a set of nodes satisfying policy @@ -204,20 +204,20 @@ message NodeInfo { // corresponding section in NeoFS Technical Specification. message Attribute { // Key of the node attribute - string key = 1 [json_name = "key"]; + string key = 1 [ json_name = "key" ]; // Value of the node attribute - string value = 2 [json_name = "value"]; + string value = 2 [ json_name = "value" ]; // Parent keys, if any. For example for `City` it could be `Region` and // `Country`. - repeated string parents = 3 [json_name = "parents"]; + repeated string parents = 3 [ json_name = "parents" ]; } // Carries list of the NeoFS node attributes in a key-value form. Key name // 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"]; + repeated Attribute attributes = 3 [ json_name = "attributes" ]; // Represents the enumeration of various states of the NeoFS node. enum State { @@ -235,16 +235,16 @@ message NodeInfo { } // Carries state of the NeoFS node - State state = 4 [json_name = "state"]; + State state = 4 [ json_name = "state" ]; } // Network map structure message Netmap { - // Network map revision number. - uint64 epoch = 1 [json_name = "epoch"]; + // Network map revision number. + uint64 epoch = 1 [ json_name = "epoch" ]; - // Nodes presented in network. - repeated NodeInfo nodes = 2 [json_name = "nodes"]; + // Nodes presented in network. + repeated NodeInfo nodes = 2 [ json_name = "nodes" ]; } // NeoFS network configuration @@ -285,26 +285,27 @@ message NetworkConfig { // Value: little-endian integer. Default: 0. message Parameter { // Parameter key. UTF-8 encoded string - bytes key = 1 [json_name = "key"]; + bytes key = 1 [ json_name = "key" ]; // Parameter value - bytes value = 2 [json_name = "value"]; + bytes value = 2 [ json_name = "value" ]; } // List of parameter values - repeated Parameter parameters = 1 [json_name = "parameters"]; + repeated Parameter parameters = 1 [ json_name = "parameters" ]; } // Information about NeoFS network message NetworkInfo { - // Number of the current epoch in the NeoFS network - uint64 current_epoch = 1 [json_name = "currentEpoch"]; + // Number of the current epoch in the NeoFS network + uint64 current_epoch = 1 [ json_name = "currentEpoch" ]; - // Magic number of the sidechain of the NeoFS network - uint64 magic_number = 2 [json_name = "magicNumber"]; + // Magic number of the sidechain of the NeoFS network + uint64 magic_number = 2 [ json_name = "magicNumber" ]; - // MillisecondsPerBlock network parameter of the sidechain of the NeoFS network - int64 ms_per_block = 3 [json_name = "msPerBlock"]; + // MillisecondsPerBlock network parameter of the sidechain of the NeoFS + // network + int64 ms_per_block = 3 [ json_name = "msPerBlock" ]; - // NeoFS network configuration - NetworkConfig network_config = 4 [json_name = "networkConfig"]; + // NeoFS network configuration + NetworkConfig network_config = 4 [ json_name = "networkConfig" ]; } diff --git a/refs/types.proto b/refs/types.proto index 2f94dd2..ebc076f 100644 --- a/refs/types.proto +++ b/refs/types.proto @@ -11,9 +11,9 @@ option csharp_namespace = "Neo.FileStorage.API.Refs"; // `ContainerID` and `ObjectID` delimited by '/' character. message Address { // Container identifier - ContainerID container_id = 1 [json_name = "containerID"]; + ContainerID container_id = 1 [ json_name = "containerID" ]; // Object identifier - ObjectID object_id = 2 [json_name = "objectID"]; + ObjectID object_id = 2 [ json_name = "objectID" ]; } // NeoFS Object unique identifier. Objects are immutable and content-addressed. @@ -21,8 +21,8 @@ message Address { // // `ObjectID` is a 32 byte long // [SHA256](https://csrc.nist.gov/publications/detail/fips/180/4/final) hash of -// the object's `header` field, which, in it's turn, contains the hash of the object's -// payload. +// the object's `header` field, which, in it's turn, contains the hash of the +// object's payload. // // String presentation is a // [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string. @@ -34,7 +34,7 @@ message Address { // with/without paddings are accepted. message ObjectID { // Object identifier in a binary format - bytes value = 1 [json_name = "value"]; + bytes value = 1 [ json_name = "value" ]; } // NeoFS container identifier. Container structures are immutable and @@ -54,7 +54,7 @@ message ObjectID { // with/without paddings are accepted. message ContainerID { // Container identifier in a binary format. - bytes value = 1 [json_name = "value"]; + bytes value = 1 [ json_name = "value" ]; } // `OwnerID` is a derivative of a user's main public key. The transformation @@ -74,32 +74,34 @@ message ContainerID { // with/without paddings are accepted. message OwnerID { // Identifier of the container owner in a binary format - bytes value = 1 [json_name = "value"]; + bytes value = 1 [ json_name = "value" ]; } // API version used by a node. // // String presentation is a Semantic Versioning 2.0.0 compatible version string -// with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor number. +// with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor +// number. message Version { // Major API version - uint32 major = 1 [json_name = "major"]; + uint32 major = 1 [ json_name = "major" ]; // Minor API version - uint32 minor = 2 [json_name = "minor"]; + uint32 minor = 2 [ json_name = "minor" ]; } // Signature of something in NeoFS. message Signature { // Public key used for signing - bytes key = 1 [json_name = "key"]; + bytes key = 1 [ json_name = "key" ]; // Signature - bytes sign = 2 [json_name = "signature"]; + bytes sign = 2 [ json_name = "signature" ]; // Scheme contains digital signature scheme identifier - SignatureScheme scheme = 3 [json_name = "scheme"]; + SignatureScheme scheme = 3 [ json_name = "scheme" ]; } -// Signature scheme describes digital signing scheme used for (key, signature) pair. +// Signature scheme describes digital signing scheme used for (key, signature) +// pair. enum SignatureScheme { // ECDSA with SHA-512 hashing (FIPS 186-3) ECDSA_SHA512 = 0; @@ -115,9 +117,9 @@ enum SignatureScheme { // RFC 6979 signature. message SignatureRFC6979 { // Public key used for signing - bytes key = 1 [json_name = "key"]; + bytes key = 1 [ json_name = "key" ]; // Deterministic ECDSA with SHA-256 hashing - bytes sign = 2 [json_name = "signature"]; + bytes sign = 2 [ json_name = "signature" ]; } // Checksum algorithm type. @@ -141,8 +143,8 @@ enum ChecksumType { // Hex encoded string without `0x` prefix message Checksum { // Checksum algorithm type - ChecksumType type = 1 [json_name = "type"]; + ChecksumType type = 1 [ json_name = "type" ]; // Checksum itself - bytes sum = 2 [json_name = "sum"]; + bytes sum = 2 [ json_name = "sum" ]; } diff --git a/session/service.proto b/session/service.proto index dcda6c8..6e12147 100644 --- a/session/service.proto +++ b/session/service.proto @@ -19,7 +19,7 @@ service SessionService { // - **OK** (0, SECTION_SUCCESS): // session has been successfully opened; // - Common failures (SECTION_FAILURE_COMMON). - rpc Create (CreateRequest) returns (CreateResponse); + rpc Create(CreateRequest) returns (CreateResponse); } // Information necessary for opening a session. diff --git a/session/types.proto b/session/types.proto index 63e5ded..a878665 100644 --- a/session/types.proto +++ b/session/types.proto @@ -38,51 +38,51 @@ message ObjectSessionContext { RANGEHASH = 7; } // Type of request for which the token is issued - Verb verb = 1 [json_name = "verb"]; + Verb verb = 1 [ json_name = "verb" ]; // Carries objects involved in the object session. message Target { // Indicates which container the session is spread to. Field MUST be set // and correct. - refs.ContainerID container = 1 [json_name = "container"]; + refs.ContainerID container = 1 [ json_name = "container" ]; // Indicates which objects the session is spread to. Objects are expected // to be stored in the NeoFS container referenced by `container` field. // Each element MUST have correct format. - repeated refs.ObjectID objects = 2 [json_name = "objects"]; + repeated refs.ObjectID objects = 2 [ json_name = "objects" ]; } // Object session target. MUST be correctly formed and set. If `objects` // field is not empty, then the session applies only to these elements, // otherwise, to all objects from the specified container. - Target target = 2 [json_name = "target"]; + Target target = 2 [ json_name = "target" ]; } // Context information for Session Tokens related to ContainerService requests. message ContainerSessionContext { - // Container request verbs - enum Verb { - // Unknown verb - VERB_UNSPECIFIED = 0; + // Container request verbs + enum Verb { + // Unknown verb + VERB_UNSPECIFIED = 0; - // Refers to container.Put RPC call - PUT = 1; + // Refers to container.Put RPC call + PUT = 1; - // Refers to container.Delete RPC call - DELETE = 2; + // Refers to container.Delete RPC call + DELETE = 2; - // Refers to container.SetExtendedACL RPC call - SETEACL = 3; - } - // Type of request for which the token is issued - Verb verb = 1 [json_name = "verb"]; + // Refers to container.SetExtendedACL RPC call + SETEACL = 3; + } + // Type of request for which the token is issued + Verb verb = 1 [ json_name = "verb" ]; - // Spreads the action to all owner containers. - // If set, container_id field is ignored. - bool wildcard = 2 [json_name = "wildcard"]; + // Spreads the action to all owner containers. + // If set, container_id field is ignored. + bool wildcard = 2 [ json_name = "wildcard" ]; - // Particular container to which the action applies. - // Ignored if wildcard flag is set. - refs.ContainerID container_id = 3 [json_name = "containerID"]; + // Particular container to which the action applies. + // Ignored if wildcard flag is set. + refs.ContainerID container_id = 3 [ json_name = "containerID" ]; } // NeoFS Session Token. @@ -90,55 +90,55 @@ message SessionToken { // Session Token body message Body { // Token identifier is a valid UUIDv4 in binary form - bytes id = 1 [json_name = "id"]; + bytes id = 1 [ json_name = "id" ]; // Identifier of the session initiator - neo.fs.v2.refs.OwnerID owner_id = 2 [json_name = "ownerID"]; + neo.fs.v2.refs.OwnerID owner_id = 2 [ json_name = "ownerID" ]; // Lifetime parameters of the token. Field names taken from rfc7519. message TokenLifetime { // Expiration Epoch - uint64 exp = 1 [json_name = "exp"]; + uint64 exp = 1 [ json_name = "exp" ]; // Not valid before Epoch - uint64 nbf = 2 [json_name = "nbf"]; + uint64 nbf = 2 [ json_name = "nbf" ]; // Issued at Epoch - uint64 iat = 3 [json_name = "iat"]; + uint64 iat = 3 [ json_name = "iat" ]; } // Lifetime of the session - TokenLifetime lifetime = 3 [json_name = "lifetime"]; + TokenLifetime lifetime = 3 [ json_name = "lifetime" ]; // Public key used in session - bytes session_key = 4 [json_name = "sessionKey"]; + bytes session_key = 4 [ json_name = "sessionKey" ]; // Session Context information oneof context { // ObjectService session context - ObjectSessionContext object = 5 [json_name = "object"]; + ObjectSessionContext object = 5 [ json_name = "object" ]; // ContainerService session context - ContainerSessionContext container = 6 [json_name = "container"]; + ContainerSessionContext container = 6 [ json_name = "container" ]; } } // 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 body = 1 [json_name = "body"]; + Body body = 1 [ json_name = "body" ]; // Signature of `SessionToken` information - neo.fs.v2.refs.Signature signature = 2 [json_name = "signature"]; + neo.fs.v2.refs.Signature signature = 2 [ json_name = "signature" ]; } -// Extended headers for Request/Response. They may contain any user-defined headers -// to be interpreted on application level. +// Extended headers for Request/Response. They may contain any user-defined +// headers to be interpreted on application level. // -// Key name must be a unique valid UTF-8 string. Value can't be empty. Requests or -// Responses with duplicated header names or headers with empty values will be -// considered invalid. +// Key name must be a unique valid UTF-8 string. Value can't be empty. Requests +// or Responses with duplicated header names or headers with empty values will +// be considered invalid. // -// There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix that -// affect system behaviour: +// There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__` +// is deprecated) prefix that affect system behaviour: // // * [ __SYSTEM__NETMAP_EPOCH ] \ // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ @@ -149,88 +149,90 @@ message SessionToken { // (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ // If object can't be found using current epoch's netmap, this header limits // how many past epochs the node can look up through. The `value` is string -// encoded `uint64` in decimal presentation. If set to '0' or not set, only the -// current epoch will be used. +// encoded `uint64` in decimal presentation. If set to '0' or not set, only +// the current epoch will be used. message XHeader { // Key of the X-Header - string key = 1 [json_name = "key"]; + string key = 1 [ json_name = "key" ]; // Value of the X-Header - string value = 2 [json_name = "value"]; + string value = 2 [ json_name = "value" ]; } // Meta information attached to the request. When forwarded between peers, // request meta headers are folded in matryoshka style. message RequestMetaHeader { // Peer's API version used - neo.fs.v2.refs.Version version = 1 [json_name = "version"]; + neo.fs.v2.refs.Version version = 1 [ json_name = "version" ]; // Peer's local epoch number. Set to 0 if unknown. - uint64 epoch = 2 [json_name = "epoch"]; + uint64 epoch = 2 [ json_name = "epoch" ]; // Maximum number of intermediate nodes in the request route - uint32 ttl = 3 [json_name = "ttl"]; + uint32 ttl = 3 [ json_name = "ttl" ]; // Request X-Headers - repeated XHeader x_headers = 4 [json_name = "xHeaders"]; + repeated XHeader x_headers = 4 [ json_name = "xHeaders" ]; // Session token within which the request is sent - SessionToken session_token = 5 [json_name = "sessionToken"]; + SessionToken session_token = 5 [ json_name = "sessionToken" ]; // `BearerToken` with eACL overrides for the request - neo.fs.v2.acl.BearerToken bearer_token = 6 [json_name = "bearerToken"]; + neo.fs.v2.acl.BearerToken bearer_token = 6 [ json_name = "bearerToken" ]; // `RequestMetaHeader` of the origin request - RequestMetaHeader origin = 7 [json_name = "origin"]; + RequestMetaHeader origin = 7 [ json_name = "origin" ]; // NeoFS network magic. Must match the value for the network // that the server belongs to. - uint64 magic_number = 8 [json_name = "magicNumber"]; + uint64 magic_number = 8 [ json_name = "magicNumber" ]; } // Information about the response message ResponseMetaHeader { // Peer's API version used - neo.fs.v2.refs.Version version = 1 [json_name = "version"]; + neo.fs.v2.refs.Version version = 1 [ json_name = "version" ]; // Peer's local epoch number - uint64 epoch = 2 [json_name = "epoch"]; + uint64 epoch = 2 [ json_name = "epoch" ]; // Maximum number of intermediate nodes in the request route - uint32 ttl = 3 [json_name = "ttl"]; + uint32 ttl = 3 [ json_name = "ttl" ]; // Response X-Headers - repeated XHeader x_headers = 4 [json_name = "xHeaders"]; + repeated XHeader x_headers = 4 [ json_name = "xHeaders" ]; // `ResponseMetaHeader` of the origin request - ResponseMetaHeader origin = 5 [json_name = "origin"]; + ResponseMetaHeader origin = 5 [ json_name = "origin" ]; // Status return - neo.fs.v2.status.Status status = 6 [json_name = "status"]; + neo.fs.v2.status.Status status = 6 [ json_name = "status" ]; } // Verification info for the request signed by all intermediate nodes. message RequestVerificationHeader { // Request Body signature. Should be generated once by the request initiator. - neo.fs.v2.refs.Signature body_signature = 1 [json_name = "bodySignature"]; + neo.fs.v2.refs.Signature body_signature = 1 [ json_name = "bodySignature" ]; // Request Meta signature is added and signed by each intermediate node - neo.fs.v2.refs.Signature meta_signature = 2 [json_name = "metaSignature"]; + neo.fs.v2.refs.Signature meta_signature = 2 [ json_name = "metaSignature" ]; // Signature of previous hops - neo.fs.v2.refs.Signature origin_signature = 3 [json_name = "originSignature"]; + neo.fs.v2.refs.Signature origin_signature = 3 + [ json_name = "originSignature" ]; // Chain of previous hops signatures - RequestVerificationHeader origin = 4 [json_name = "origin"]; + RequestVerificationHeader origin = 4 [ json_name = "origin" ]; } // Verification info for the response signed by all intermediate nodes message ResponseVerificationHeader { // Response Body signature. Should be generated once by an answering node. - neo.fs.v2.refs.Signature body_signature = 1 [json_name = "bodySignature"]; + neo.fs.v2.refs.Signature body_signature = 1 [ json_name = "bodySignature" ]; // Response Meta signature is added and signed by each intermediate node - neo.fs.v2.refs.Signature meta_signature = 2 [json_name = "metaSignature"]; + neo.fs.v2.refs.Signature meta_signature = 2 [ json_name = "metaSignature" ]; // Signature of previous hops - neo.fs.v2.refs.Signature origin_signature = 3 [json_name = "originSignature"]; + neo.fs.v2.refs.Signature origin_signature = 3 + [ json_name = "originSignature" ]; // Chain of previous hops signatures - ResponseVerificationHeader origin = 4 [json_name = "origin"]; + ResponseVerificationHeader origin = 4 [ json_name = "origin" ]; } diff --git a/status/types.proto b/status/types.proto index 34134a4..60dfd94 100644 --- a/status/types.proto +++ b/status/types.proto @@ -33,113 +33,113 @@ option csharp_namespace = "Neo.FileStorage.API.Status"; // should not expect) useful information in the message. Field `details` // should make the return more detailed. message Status { - // The status code - uint32 code = 1; + // The status code + uint32 code = 1; - // Developer-facing error message - string message = 2; + // Developer-facing error message + string message = 2; - // Return detail. It contains additional information that can be used to - // analyze the response. Each code defines a set of details that can be - // attached to a status. Client should not handle details that are not - // covered by the code. - message Detail { - // Detail ID. The identifier is required to determine the binary format - // of the detail and how to decode it. - uint32 id = 1; + // Return detail. It contains additional information that can be used to + // analyze the response. Each code defines a set of details that can be + // attached to a status. Client should not handle details that are not + // covered by the code. + message Detail { + // Detail ID. The identifier is required to determine the binary format + // of the detail and how to decode it. + uint32 id = 1; - // Binary status detail. Must follow the format associated with ID. - // The possibility of missing a value must be explicitly allowed. - bytes value = 2; - } + // Binary status detail. Must follow the format associated with ID. + // The possibility of missing a value must be explicitly allowed. + bytes value = 2; + } - // Data detailing the outcome of the operation. Must be unique by ID. - repeated Detail details = 3; + // Data detailing the outcome of the operation. Must be unique by ID. + repeated Detail details = 3; } // Section identifiers. enum Section { - // Successful return codes. - SECTION_SUCCESS = 0; + // Successful return codes. + SECTION_SUCCESS = 0; - // Failure codes regardless of the operation. - SECTION_FAILURE_COMMON = 1; + // Failure codes regardless of the operation. + SECTION_FAILURE_COMMON = 1; - // Object service-specific errors. - SECTION_OBJECT = 2; + // Object service-specific errors. + SECTION_OBJECT = 2; - // Container service-specific errors. - SECTION_CONTAINER = 3; + // Container service-specific errors. + SECTION_CONTAINER = 3; - // Session service-specific errors. - SECTION_SESSION = 4; + // Session service-specific errors. + SECTION_SESSION = 4; } // Section of NeoFS successful return codes. enum Success { - // [**0**] Default success. Not detailed. - // If the server cannot match successful outcome to the code, it should - // use this code. - OK = 0; + // [**0**] Default success. Not detailed. + // If the server cannot match successful outcome to the code, it should + // use this code. + OK = 0; } // Section of failed statuses independent of the operation. enum CommonFail { - // [**1024**] Internal server error, default failure. Not detailed. - // If the server cannot match failed outcome to the code, it should - // use this code. - INTERNAL = 0; + // [**1024**] Internal server error, default failure. Not detailed. + // If the server cannot match failed outcome to the code, it should + // use this code. + INTERNAL = 0; - // [**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 NeoFS network. + // Details: + // - [**0**] Magic number of the served NeoFS network (big-endian 64-bit + // unsigned integer). + WRONG_MAGIC_NUMBER = 1; - // [**1026**] Signature verification failure. - SIGNATURE_VERIFICATION_FAIL = 2; + // [**1026**] Signature verification failure. + SIGNATURE_VERIFICATION_FAIL = 2; - // [**1027**] Node is under maintenance. - NODE_UNDER_MAINTENANCE = 3; + // [**1027**] Node is under maintenance. + NODE_UNDER_MAINTENANCE = 3; } // Section of statuses for object-related operations. enum Object { - // [**2048**] Access denied by ACL. - // Details: - // - [**0**] Human-readable description (UTF-8 encoded string). - ACCESS_DENIED = 0; + // [**2048**] Access denied by ACL. + // Details: + // - [**0**] Human-readable description (UTF-8 encoded string). + ACCESS_DENIED = 0; - // [**2049**] Object not found. - OBJECT_NOT_FOUND = 1; + // [**2049**] Object not found. + OBJECT_NOT_FOUND = 1; - // [**2050**] Operation rejected by the object lock. - LOCKED = 2; + // [**2050**] Operation rejected by the object lock. + LOCKED = 2; - // [**2051**] Locking an object with a non-REGULAR type rejected. - LOCK_NON_REGULAR_OBJECT = 3; + // [**2051**] Locking an object with a non-REGULAR type rejected. + LOCK_NON_REGULAR_OBJECT = 3; - // [**2052**] Object has been marked deleted. - OBJECT_ALREADY_REMOVED = 4; + // [**2052**] Object has been marked deleted. + OBJECT_ALREADY_REMOVED = 4; - // [**2053**] Invalid range has been requested for an object. - OUT_OF_RANGE = 5; + // [**2053**] Invalid range has been requested for an object. + OUT_OF_RANGE = 5; } // Section of statuses for container-related operations. enum Container { - // [**3072**] Container not found. - CONTAINER_NOT_FOUND = 0; + // [**3072**] Container not found. + CONTAINER_NOT_FOUND = 0; - // [**3073**] eACL table not found. - EACL_NOT_FOUND = 1; + // [**3073**] eACL table not found. + EACL_NOT_FOUND = 1; } // Section of statuses for session-related operations. enum Session { - // [**4096**] Token not found. - TOKEN_NOT_FOUND = 0; + // [**4096**] Token not found. + TOKEN_NOT_FOUND = 0; - // [**4097**] Token has expired. - TOKEN_EXPIRED = 1; + // [**4097**] Token has expired. + TOKEN_EXPIRED = 1; } diff --git a/tombstone/types.proto b/tombstone/types.proto index aa44a45..6547958 100644 --- a/tombstone/types.proto +++ b/tombstone/types.proto @@ -10,17 +10,18 @@ import "refs/types.proto"; // Tombstone keeps record of deleted objects for a few epochs until they are // purged from the NeoFS 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 tombstone object - // must have the same expiration epoch value in `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) + // 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. - uint64 expiration_epoch = 1 [json_name = "expirationEpoch"]; + uint64 expiration_epoch = 1 [ json_name = "expirationEpoch" ]; // 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. - bytes split_id = 2 [json_name = "splitID"]; + bytes split_id = 2 [ json_name = "splitID" ]; // List of objects to be deleted. - repeated neo.fs.v2.refs.ObjectID members = 3 [json_name = "members"]; + repeated neo.fs.v2.refs.ObjectID members = 3 [ json_name = "members" ]; } From f56ccf36b121f416137dade7e43573171cbd1186 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 28 Feb 2024 13:42:59 +0300 Subject: [PATCH 16/59] [#41] object: Support erasure codes Signed-off-by: Evgenii Stratonikov --- object/service.proto | 9 +++++++++ object/types.proto | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/object/service.proto b/object/service.proto index 2a3c6ff..3f727f4 100644 --- a/object/service.proto +++ b/object/service.proto @@ -319,6 +319,9 @@ message GetResponse { // Meta information of split hierarchy for object assembly. SplitInfo split_info = 3; + + // Meta information for EC object assembly. + ECInfo ec_info = 4; } } // Body of get object response message. @@ -503,6 +506,9 @@ message HeadResponse { // Meta information of split hierarchy. SplitInfo split_info = 3; + + // Meta information for EC object assembly. + ECInfo ec_info = 4; } } // Body of head object response message. @@ -678,6 +684,9 @@ message GetRangeResponse { // Meta information of split hierarchy. SplitInfo split_info = 2; + + // Meta information for EC object assembly. + ECInfo ec_info = 3; } } diff --git a/object/types.proto b/object/types.proto index dfc3afc..5b02365 100644 --- a/object/types.proto +++ b/object/types.proto @@ -193,6 +193,24 @@ message Header { } // Position of the object in the split hierarchy Split split = 11 [ json_name = "split" ]; + + // Erasure code can be applied to any object. + // Information about encoded object structure is stored in `EC` header. + // All objects belonging to a single EC group have the same `parent` field. + message EC { + // Identifier of the origin object. Known to all chunks. + neo.fs.v2.refs.ObjectID parent = 1 [ json_name = "parent" ]; + // Index of this chunk. + uint32 index = 2 [ json_name = "index" ]; + // Total number of chunks in this split. + uint32 total = 3 [ json_name = "total" ]; + // Total length of a parent header. Used to trim padding zeroes. + uint32 header_length = 4 [ json_name = "headerLength" ]; + // Chunk of a parent header. + bytes header = 5 [ json_name = "header" ]; + } + // Erasure code chunk information. + EC ec = 12 [ json_name = "ec" ]; } // Object structure. Object is immutable and content-addressed. It means @@ -232,3 +250,17 @@ message SplitInfo { // object parts. neo.fs.v2.refs.ObjectID link = 3; } + +// Meta information for the erasure-encoded object. +message ECInfo { + message Chunk { + // Object ID of the chunk. + neo.fs.v2.refs.ObjectID id = 1; + // Index of the chunk. + uint32 index = 2; + // Total number of chunks in this split. + uint32 total = 3; + } + // Chunk stored on the node. + repeated Chunk chunks = 1; +} \ No newline at end of file From 063d236c872bedf5c6c75b0835319ac35313d040 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 14 Mar 2024 10:05:40 +0300 Subject: [PATCH 17/59] [#41] netmap: Support EC policy Signed-off-by: Evgenii Stratonikov --- netmap/types.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netmap/types.proto b/netmap/types.proto index a3c9c00..f599d56 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -103,6 +103,12 @@ message Replica { // Named selector bucket to put replicas string selector = 2 [ json_name = "selector" ]; + + // Data shards count + uint32 ec_data_count = 6 [ json_name = "ecDataCount" ]; + + // Parity shards count + uint32 ec_parity_count = 7 [ json_name = "ecParityCount" ]; } // Set of rules to select a subset of nodes from `NetworkMap` able to store From 46dd3885d2c655e98dd1c77b6f972c54afbc56ae Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 14 Mar 2024 10:11:06 +0300 Subject: [PATCH 18/59] [#41] netmap: Add well-known EC-related network settings Because big number of chunks can lead to excessive CPU/RAM usage, we restrict EC policies via network settings. Signed-off-by: Evgenii Stratonikov --- netmap/types.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netmap/types.proto b/netmap/types.proto index f599d56..926c4bc 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -289,6 +289,12 @@ message NetworkConfig { // - **WithdrawFee** \ // Fee paid for withdrawal of funds paid by the account owner. // Value: little-endian integer. Default: 0. + // - **MaxECDataCount** \ + // Maximum number of data shards for EC placement policy. + // Value: little-endian integer. Default: 0. + // - **MaxECParityCount** \ + // Maximum number of parity shards for EC placement policy. + // Value: little-endian integer. Default: 0. message Parameter { // Parameter key. UTF-8 encoded string bytes key = 1 [ json_name = "key" ]; From 07eb6a438cdb57fab8b1a219c112a572b9e8c6b8 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Tue, 5 Mar 2024 12:36:58 +0300 Subject: [PATCH 19/59] [#40] status: Introduce CONTAINER_ACCESS_DENIED status * Add a new status CONTAINER_ACCESS_DENIED. * Fix descriptions for methods of container and object services. * Also regenerate md docs. Signed-off-by: Airat Arifullin --- container/service.proto | 24 +++-- object/service.proto | 16 +++ proto-docs/accounting.md | 3 +- proto-docs/acl.md | 8 +- proto-docs/container.md | 155 ++++++++++++++------------- proto-docs/lock.md | 5 +- proto-docs/netmap.md | 114 +++++++++++--------- proto-docs/object.md | 220 +++++++++++++++++++++++++++++++++------ proto-docs/refs.md | 38 +++---- proto-docs/session.md | 18 ++-- proto-docs/status.md | 1 + status/types.proto | 3 + 12 files changed, 411 insertions(+), 194 deletions(-) diff --git a/container/service.proto b/container/service.proto index fa45703..5695b66 100644 --- a/container/service.proto +++ b/container/service.proto @@ -23,7 +23,9 @@ service ContainerService { // Statuses: // - **OK** (0, SECTION_SUCCESS): \ // request to save the container has been sent to the sidechain; - // - Common failures (SECTION_FAILURE_COMMON). + // - Common failures (SECTION_FAILURE_COMMON); + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // container create access denied. rpc Put(PutRequest) returns (PutResponse); // `Delete` invokes `Container` smart contract's `Delete` method and returns @@ -34,7 +36,9 @@ service ContainerService { // Statuses: // - **OK** (0, SECTION_SUCCESS): \ // request to remove the container has been sent to the sidechain; - // - Common failures (SECTION_FAILURE_COMMON). + // - Common failures (SECTION_FAILURE_COMMON); + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // container delete access denied. rpc Delete(DeleteRequest) returns (DeleteResponse); // Returns container structure from `Container` smart contract storage. @@ -44,7 +48,9 @@ service ContainerService { // container has been successfully read; // - Common failures (SECTION_FAILURE_COMMON); // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ - // requested container not found. + // requested container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied. rpc Get(GetRequest) returns (GetResponse); // Returns all owner's containers from 'Container` smart contract' storage. @@ -52,7 +58,9 @@ service ContainerService { // Statuses: // - **OK** (0, SECTION_SUCCESS): \ // container list has been successfully read; - // - Common failures (SECTION_FAILURE_COMMON). + // - Common failures (SECTION_FAILURE_COMMON); + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // container list access denied. rpc List(ListRequest) returns (ListResponse); // Invokes 'SetEACL' method of 'Container` smart contract and returns response @@ -62,7 +70,9 @@ service ContainerService { // Statuses: // - **OK** (0, SECTION_SUCCESS): \ // request to save container eACL has been sent to the sidechain; - // - Common failures (SECTION_FAILURE_COMMON). + // - Common failures (SECTION_FAILURE_COMMON); + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // set container eACL access denied. rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse); // Returns Extended ACL table and signature from `Container` smart contract @@ -75,7 +85,9 @@ service ContainerService { // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // container not found; // - **EACL_NOT_FOUND** (3073, SECTION_CONTAINER): \ - // eACL table not found. + // eACL table not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container eACL is denied. rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse); // Announces the space values used by the container for P2P synchronization. diff --git a/object/service.proto b/object/service.proto index 3f727f4..bbf0fc3 100644 --- a/object/service.proto +++ b/object/service.proto @@ -45,6 +45,8 @@ service ObjectService { // the requested object has been marked as deleted; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // object container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. rpc Get(GetRequest) returns (stream GetResponse); @@ -78,6 +80,8 @@ service ObjectService { // type other than REGULAR is prohibited; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // object storage container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ // (for trusted object preparation) session private key does not exist or // has @@ -110,6 +114,8 @@ service ObjectService { // deleting a locked object is prohibited; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // object container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. rpc Delete(DeleteRequest) returns (DeleteResponse); @@ -138,6 +144,8 @@ service ObjectService { // the requested object has been marked as deleted; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // object container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. rpc Head(HeadRequest) returns (HeadResponse); @@ -162,6 +170,8 @@ service ObjectService { // access to operation SEARCH of the object is denied; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // search container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. rpc Search(SearchRequest) returns (stream SearchResponse); @@ -197,6 +207,8 @@ service ObjectService { // the requested range is out of bounds; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // object container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse); @@ -230,6 +242,8 @@ service ObjectService { // the requested range is out of bounds; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // object container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); @@ -260,6 +274,8 @@ service ObjectService { // type other than REGULAR is prohibited; // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // object storage container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ // (for trusted object preparation) session private key does not exist or // has diff --git a/proto-docs/accounting.md b/proto-docs/accounting.md index 94de765..9ed7186 100644 --- a/proto-docs/accounting.md +++ b/proto-docs/accounting.md @@ -105,7 +105,8 @@ BalanceResponse message ### Message BalanceResponse.Body The amount of funds in GAS token for the `OwnerID`'s account requested. -Balance is given in the `Decimal` format to avoid precision issues with rounding. +Balance is given in the `Decimal` format to avoid precision issues with +rounding. | Field | Type | Label | Description | diff --git a/proto-docs/acl.md b/proto-docs/acl.md index c32f958..69d1d3d 100644 --- a/proto-docs/acl.md +++ b/proto-docs/acl.md @@ -38,8 +38,8 @@ like [JWT](https://jwt.io), it has a limited lifetime and scope, hence can be used in the similar use cases, like providing authorisation to externally authenticated party. -BearerToken can be issued only by the container's owner and must be signed using -the key associated with the container's `OwnerID`. +BearerToken can be issued only by the container's owner and must be signed +using the key associated with the container's `OwnerID`. | Field | Type | Label | Description | @@ -51,8 +51,8 @@ the key associated with the container's `OwnerID`. ### Message BearerToken.Body -Bearer Token body structure contains Extended ACL table issued by the container -owner with additional information preventing token abuse. +Bearer Token body structure contains Extended ACL table issued by the +container owner with additional information preventing token abuse. | Field | Type | Label | Description | diff --git a/proto-docs/container.md b/proto-docs/container.md index 6368889..024057f 100644 --- a/proto-docs/container.md +++ b/proto-docs/container.md @@ -3,50 +3,50 @@ ## Table of Contents -- [Protocol Documentation](#protocol-documentation) - - [Table of Contents](#table-of-contents) - - [container/service.proto](#containerserviceproto) - - [Service "neo.fs.v2.container.ContainerService"](#service-neofsv2containercontainerservice) - - [Method Put](#method-put) - - [Method Delete](#method-delete) - - [Method Get](#method-get) - - [Method List](#method-list) - - [Method SetExtendedACL](#method-setextendedacl) - - [Method GetExtendedACL](#method-getextendedacl) - - [Method AnnounceUsedSpace](#method-announceusedspace) - - [Message AnnounceUsedSpaceRequest](#message-announceusedspacerequest) - - [Message AnnounceUsedSpaceRequest.Body](#message-announceusedspacerequestbody) - - [Message AnnounceUsedSpaceRequest.Body.Announcement](#message-announceusedspacerequestbodyannouncement) - - [Message AnnounceUsedSpaceResponse](#message-announceusedspaceresponse) - - [Message AnnounceUsedSpaceResponse.Body](#message-announceusedspaceresponsebody) - - [Message DeleteRequest](#message-deleterequest) - - [Message DeleteRequest.Body](#message-deleterequestbody) - - [Message DeleteResponse](#message-deleteresponse) - - [Message DeleteResponse.Body](#message-deleteresponsebody) - - [Message GetExtendedACLRequest](#message-getextendedaclrequest) - - [Message GetExtendedACLRequest.Body](#message-getextendedaclrequestbody) - - [Message GetExtendedACLResponse](#message-getextendedaclresponse) - - [Message GetExtendedACLResponse.Body](#message-getextendedaclresponsebody) - - [Message GetRequest](#message-getrequest) - - [Message GetRequest.Body](#message-getrequestbody) - - [Message GetResponse](#message-getresponse) - - [Message GetResponse.Body](#message-getresponsebody) - - [Message ListRequest](#message-listrequest) - - [Message ListRequest.Body](#message-listrequestbody) - - [Message ListResponse](#message-listresponse) - - [Message ListResponse.Body](#message-listresponsebody) - - [Message PutRequest](#message-putrequest) - - [Message PutRequest.Body](#message-putrequestbody) - - [Message PutResponse](#message-putresponse) - - [Message PutResponse.Body](#message-putresponsebody) - - [Message SetExtendedACLRequest](#message-setextendedaclrequest) - - [Message SetExtendedACLRequest.Body](#message-setextendedaclrequestbody) - - [Message SetExtendedACLResponse](#message-setextendedaclresponse) - - [Message SetExtendedACLResponse.Body](#message-setextendedaclresponsebody) - - [container/types.proto](#containertypesproto) - - [Message Container](#message-container) - - [Message Container.Attribute](#message-containerattribute) - - [Scalar Value Types](#scalar-value-types) +- [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) + - [AnnounceUsedSpaceRequest.Body.Announcement](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body.Announcement) + - [AnnounceUsedSpaceResponse](#neo.fs.v2.container.AnnounceUsedSpaceResponse) + - [AnnounceUsedSpaceResponse.Body](#neo.fs.v2.container.AnnounceUsedSpaceResponse.Body) + - [DeleteRequest](#neo.fs.v2.container.DeleteRequest) + - [DeleteRequest.Body](#neo.fs.v2.container.DeleteRequest.Body) + - [DeleteResponse](#neo.fs.v2.container.DeleteResponse) + - [DeleteResponse.Body](#neo.fs.v2.container.DeleteResponse.Body) + - [GetExtendedACLRequest](#neo.fs.v2.container.GetExtendedACLRequest) + - [GetExtendedACLRequest.Body](#neo.fs.v2.container.GetExtendedACLRequest.Body) + - [GetExtendedACLResponse](#neo.fs.v2.container.GetExtendedACLResponse) + - [GetExtendedACLResponse.Body](#neo.fs.v2.container.GetExtendedACLResponse.Body) + - [GetRequest](#neo.fs.v2.container.GetRequest) + - [GetRequest.Body](#neo.fs.v2.container.GetRequest.Body) + - [GetResponse](#neo.fs.v2.container.GetResponse) + - [GetResponse.Body](#neo.fs.v2.container.GetResponse.Body) + - [ListRequest](#neo.fs.v2.container.ListRequest) + - [ListRequest.Body](#neo.fs.v2.container.ListRequest.Body) + - [ListResponse](#neo.fs.v2.container.ListResponse) + - [ListResponse.Body](#neo.fs.v2.container.ListResponse.Body) + - [PutRequest](#neo.fs.v2.container.PutRequest) + - [PutRequest.Body](#neo.fs.v2.container.PutRequest.Body) + - [PutResponse](#neo.fs.v2.container.PutResponse) + - [PutResponse.Body](#neo.fs.v2.container.PutResponse.Body) + - [SetExtendedACLRequest](#neo.fs.v2.container.SetExtendedACLRequest) + - [SetExtendedACLRequest.Body](#neo.fs.v2.container.SetExtendedACLRequest.Body) + - [SetExtendedACLResponse](#neo.fs.v2.container.SetExtendedACLResponse) + - [SetExtendedACLResponse.Body](#neo.fs.v2.container.SetExtendedACLResponse.Body) + + +- [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) @@ -81,13 +81,15 @@ rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) returns (AnnounceUsedSpaceRespon `Put` invokes `Container` smart contract's `Put` method and returns response immediately. After a new block is issued in sidechain, request is -verified by Inner Ring nodes. After one more block in sidechain, the container -is added into smart contract storage. +verified by Inner Ring nodes. After one more block in sidechain, the +container is added into smart contract storage. Statuses: - **OK** (0, SECTION_SUCCESS): \ request to save the container has been sent to the sidechain; -- Common failures (SECTION_FAILURE_COMMON). +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + container create access denied. | Name | Input | Output | | ---- | ----- | ------ | @@ -96,13 +98,15 @@ Statuses: `Delete` invokes `Container` smart contract's `Delete` method and returns response immediately. After a new block is issued in sidechain, request is -verified by Inner Ring nodes. After one more block in sidechain, the container -is added into smart contract storage. +verified by Inner Ring nodes. After one more block in sidechain, the +container is added into smart contract storage. Statuses: - **OK** (0, SECTION_SUCCESS): \ request to remove the container has been sent to the sidechain; -- Common failures (SECTION_FAILURE_COMMON). +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + container delete access denied. | Name | Input | Output | | ---- | ----- | ------ | @@ -116,7 +120,9 @@ Statuses: container has been successfully read; - Common failures (SECTION_FAILURE_COMMON); - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ - requested container not found. + requested container not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container is denied. | Name | Input | Output | | ---- | ----- | ------ | @@ -128,7 +134,9 @@ Returns all owner's containers from 'Container` smart contract' storage. Statuses: - **OK** (0, SECTION_SUCCESS): \ container list has been successfully read; -- Common failures (SECTION_FAILURE_COMMON). +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + container list access denied. | Name | Input | Output | | ---- | ----- | ------ | @@ -136,13 +144,15 @@ Statuses: #### 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. +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). +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + set container eACL access denied. | Name | Input | Output | | ---- | ----- | ------ | @@ -159,7 +169,9 @@ Statuses: - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ container not found; - **EACL_NOT_FOUND** (3073, SECTION_CONTAINER): \ - eACL table not found. + eACL table not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container eACL is denied. | Name | Input | Output | | ---- | ----- | ------ | @@ -327,8 +339,8 @@ Get Extended ACL ### 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. +not have Extended ACL Table attached or Extended ACL has not been allowed +at the time of container creation. | Field | Type | Label | Description | @@ -536,8 +548,8 @@ Set Extended ACL ### 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. +asynchronous and the update should be reflected in `Container` smart +contract's storage after next block is issued in sidechain. @@ -560,8 +572,8 @@ storage after next block is issued in sidechain. ### Message Container Container is a structure that defines object placement behaviour. Objects can be stored only within containers. They define placement rule, attributes and -access control information. An ID of a container is a 32 byte long SHA256 hash -of stable-marshalled container message. +access control information. An ID of a container is a 32 byte long SHA256 +hash of stable-marshalled container message. | Field | Type | Label | Description | @@ -578,8 +590,8 @@ of stable-marshalled container message. ### Message Container.Attribute `Attribute` is a user-defined Key-Value metadata pair attached to the -container. Container attributes are immutable. They are set at the moment of -container creation and can never be added or updated. +container. Container attributes are immutable. They are set at the moment +of container creation and can never be added or updated. Key name must be a container-unique valid UTF-8 string. Value can't be empty. Containers with duplicated attribute names or attributes with empty @@ -593,15 +605,16 @@ There are some "well-known" attributes affecting system behaviour: NNS contract. * [ __SYSTEM__ZONE ] \ (`__NEOFS__ZONE` is deprecated) \ - String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated). Used as a TLD of a domain name in NNS - contract. If no zone is specified, use default zone: `container`. + String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated). + Used as a TLD of a domain name in NNS contract. If no zone is specified, + use default zone: `container`. * [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \ (`__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 configuration - value corresponds with that attribute's value. After container inclusion, network - setting is ignored. + Disables homomorphic hashing for the container if the value equals "true" + string. Any other values are interpreted as missing attribute. Container + could be accepted in a NeoFS network only if the global network hashing + configuration value corresponds with that attribute's value. After + container inclusion, network setting is ignored. And some well-known attributes used by applications only: diff --git a/proto-docs/lock.md b/proto-docs/lock.md index 5ed9780..2e730f8 100644 --- a/proto-docs/lock.md +++ b/proto-docs/lock.md @@ -27,8 +27,9 @@ ### Message Lock Lock objects protects a list of objects from being deleted. The lifetime of a lock object is limited similar to regular objects in -`__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) attribute. Lock object MUST have expiration epoch. -It is impossible to delete a lock object via ObjectService.Delete RPC call. +`__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) +attribute. Lock object MUST have expiration epoch. It is impossible to delete +a lock object via ObjectService.Delete RPC call. | Field | Type | Label | Description | diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index 19b8bd2..45fd764 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -3,40 +3,41 @@ ## Table of Contents -- [Protocol Documentation](#protocol-documentation) - - [Table of Contents](#table-of-contents) - - [netmap/service.proto](#netmapserviceproto) - - [Service "neo.fs.v2.netmap.NetmapService"](#service-neofsv2netmapnetmapservice) - - [Method LocalNodeInfo](#method-localnodeinfo) - - [Method NetworkInfo](#method-networkinfo) - - [Method NetmapSnapshot](#method-netmapsnapshot) - - [Message LocalNodeInfoRequest](#message-localnodeinforequest) - - [Message LocalNodeInfoRequest.Body](#message-localnodeinforequestbody) - - [Message LocalNodeInfoResponse](#message-localnodeinforesponse) - - [Message LocalNodeInfoResponse.Body](#message-localnodeinforesponsebody) - - [Message NetmapSnapshotRequest](#message-netmapsnapshotrequest) - - [Message NetmapSnapshotRequest.Body](#message-netmapsnapshotrequestbody) - - [Message NetmapSnapshotResponse](#message-netmapsnapshotresponse) - - [Message NetmapSnapshotResponse.Body](#message-netmapsnapshotresponsebody) - - [Message NetworkInfoRequest](#message-networkinforequest) - - [Message NetworkInfoRequest.Body](#message-networkinforequestbody) - - [Message NetworkInfoResponse](#message-networkinforesponse) - - [Message NetworkInfoResponse.Body](#message-networkinforesponsebody) - - [netmap/types.proto](#netmaptypesproto) - - [Message Filter](#message-filter) - - [Message Netmap](#message-netmap) - - [Message NetworkConfig](#message-networkconfig) - - [Message NetworkConfig.Parameter](#message-networkconfigparameter) - - [Message NetworkInfo](#message-networkinfo) - - [Message NodeInfo](#message-nodeinfo) - - [Message NodeInfo.Attribute](#message-nodeinfoattribute) - - [Message PlacementPolicy](#message-placementpolicy) - - [Message Replica](#message-replica) - - [Message Selector](#message-selector) - - [Clause](#clause) - - [NodeInfo.State](#nodeinfostate) - - [Operation](#operation) - - [Scalar Value Types](#scalar-value-types) +- [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) + - [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) + - [LocalNodeInfoResponse.Body](#neo.fs.v2.netmap.LocalNodeInfoResponse.Body) + - [NetmapSnapshotRequest](#neo.fs.v2.netmap.NetmapSnapshotRequest) + - [NetmapSnapshotRequest.Body](#neo.fs.v2.netmap.NetmapSnapshotRequest.Body) + - [NetmapSnapshotResponse](#neo.fs.v2.netmap.NetmapSnapshotResponse) + - [NetmapSnapshotResponse.Body](#neo.fs.v2.netmap.NetmapSnapshotResponse.Body) + - [NetworkInfoRequest](#neo.fs.v2.netmap.NetworkInfoRequest) + - [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) + + - Messages + - [Filter](#neo.fs.v2.netmap.Filter) + - [Netmap](#neo.fs.v2.netmap.Netmap) + - [NetworkConfig](#neo.fs.v2.netmap.NetworkConfig) + - [NetworkConfig.Parameter](#neo.fs.v2.netmap.NetworkConfig.Parameter) + - [NetworkInfo](#neo.fs.v2.netmap.NetworkInfo) + - [NodeInfo](#neo.fs.v2.netmap.NodeInfo) + - [NodeInfo.Attribute](#neo.fs.v2.netmap.NodeInfo.Attribute) + - [PlacementPolicy](#neo.fs.v2.netmap.PlacementPolicy) + - [Replica](#neo.fs.v2.netmap.Replica) + - [Selector](#neo.fs.v2.netmap.Selector) + + +- [Scalar Value Types](#scalar-value-types) @@ -51,10 +52,10 @@ ### Service "neo.fs.v2.netmap.NetmapService" -`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. +`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. ``` rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse); @@ -65,11 +66,12 @@ rpc NetmapSnapshot(NetmapSnapshotRequest) returns (NetmapSnapshotResponse); #### Method LocalNodeInfo -Get NodeInfo structure from the particular node directly. -Node information can be taken from `Netmap` smart contract. In some cases, though, -one may want to get recent information directly or to talk to the node not yet -present in the `Network Map` to find out what API version can be used for -further communication. This can be also used to check if a node is up and running. +Get NodeInfo structure from the particular node directly. +Node information can be taken from `Netmap` smart contract. In some cases, +though, one may want to get recent information directly or to talk to the +node not yet present in the `Network Map` to find out what API version can +be used for further communication. This can be also used to check if a node +is up and running. Statuses: - **OK** (0, SECTION_SUCCESS): @@ -257,8 +259,8 @@ Information about the network. ### Message Filter -This filter will return the subset of nodes from `NetworkMap` or another filter's -results that will satisfy filter's conditions. +This filter will return the subset of nodes from `NetworkMap` or another +filter's results that will satisfy filter's conditions. | Field | Type | Label | Description | @@ -330,6 +332,12 @@ System parameters: - **WithdrawFee** \ Fee paid for withdrawal of funds paid by the account owner. Value: little-endian integer. Default: 0. +- **MaxECDataCount** \ + Maximum number of data shards for EC placement policy. + Value: little-endian integer. Default: 0. +- **MaxECParityCount** \ + Maximum number of parity shards for EC placement policy. + Value: little-endian integer. Default: 0. | Field | Type | Label | Description | @@ -375,15 +383,15 @@ Administrator-defined Attributes of the NeoFS Storage Node. 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 Storage -Node configuration uses ":" and "/" symbols, e.g.: +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 +Storage Node configuration uses ":" and "/" symbols, e.g.: `NEOFS_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 attribute's -key or value. +Therefore the string attribute representation in the Node configuration +must use "\:", "\/" and "\\" escaped symbols if any of them appears in an +attribute's key or value. Node's attributes are mostly used during Storage Policy evaluation to calculate object's placement and find a set of nodes satisfying policy @@ -459,6 +467,7 @@ storage policy definition languages. | container_backup_factor | [uint32](#uint32) | | Container backup factor controls how deep NeoFS 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 | @@ -473,6 +482,8 @@ default. | ----- | ---- | ----- | ----------- | | count | [uint32](#uint32) | | How many object replicas to put | | selector | [string](#string) | | Named selector bucket to put replicas | +| ec_data_count | [uint32](#uint32) | | Data shards count | +| ec_parity_count | [uint32](#uint32) | | Parity shards count | @@ -538,6 +549,7 @@ Operations on filters | LE | 6 | Less or equal | | OR | 7 | Logical OR | | AND | 8 | Logical AND | +| NOT | 9 | Logical negation | diff --git a/proto-docs/object.md b/proto-docs/object.md index 8b5f460..f080e4a 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -35,6 +35,10 @@ - [PutRequest.Body.Init](#neo.fs.v2.object.PutRequest.Body.Init) - [PutResponse](#neo.fs.v2.object.PutResponse) - [PutResponse.Body](#neo.fs.v2.object.PutResponse.Body) + - [PutSingleRequest](#neo.fs.v2.object.PutSingleRequest) + - [PutSingleRequest.Body](#neo.fs.v2.object.PutSingleRequest.Body) + - [PutSingleResponse](#neo.fs.v2.object.PutSingleResponse) + - [PutSingleResponse.Body](#neo.fs.v2.object.PutSingleResponse.Body) - [Range](#neo.fs.v2.object.Range) - [SearchRequest](#neo.fs.v2.object.SearchRequest) - [SearchRequest.Body](#neo.fs.v2.object.SearchRequest.Body) @@ -46,8 +50,11 @@ - [object/types.proto](#object/types.proto) - Messages + - [ECInfo](#neo.fs.v2.object.ECInfo) + - [ECInfo.Chunk](#neo.fs.v2.object.ECInfo.Chunk) - [Header](#neo.fs.v2.object.Header) - [Header.Attribute](#neo.fs.v2.object.Header.Attribute) + - [Header.EC](#neo.fs.v2.object.Header.EC) - [Header.Split](#neo.fs.v2.object.Header.Split) - [Object](#neo.fs.v2.object.Object) - [ShortHeader](#neo.fs.v2.object.ShortHeader) @@ -80,17 +87,18 @@ rpc Head(HeadRequest) returns (HeadResponse); rpc Search(SearchRequest) returns (stream SearchResponse); rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse); rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); +rpc PutSingle(PutSingleRequest) returns (PutSingleResponse); ``` #### Method Get Receive full object structure, including Headers and payload. Response uses -gRPC stream. First response message carries the object with the requested address. -Chunk messages are parts of the object's payload if it is needed. All -messages, except the first one, carry payload chunks. The requested object can -be restored by concatenation of object message payload and all chunks -keeping the receiving order. +gRPC stream. First response message carries the object with the requested +address. Chunk messages are parts of the object's payload if it is needed. +All messages, except the first one, carry payload chunks. The requested +object can be restored by concatenation of object message payload and all +chunks keeping the receiving order. Extended headers can change `Get` behaviour: * [ __SYSTEM__NETMAP_EPOCH ] \ @@ -99,9 +107,10 @@ Extended headers can change `Get` behaviour: calculation. * [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \ (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ - Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or - the latest one otherwise) of Network Map to find an object until the depth - limit is reached. + Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` + (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or the latest one + otherwise) of Network Map to find an object until the depth limit is + reached. Please refer to detailed `XHeader` description. @@ -117,6 +126,8 @@ Statuses: the requested object has been marked as deleted; - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object container not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -147,15 +158,18 @@ Statuses: - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ write access to the container is denied; - **LOCKED** (2050, SECTION_OBJECT): \ - placement of an object of type TOMBSTONE that includes at least one locked - object is prohibited; + placement of an object of type TOMBSTONE that includes at least one + locked object is prohibited; - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \ placement of an object of type LOCK that includes at least one object of type other than REGULAR is prohibited; - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object storage container not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container is denied; - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ - (for trusted object preparation) session private key does not exist or has + (for trusted object preparation) session private key does not exist or + has been deleted; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -182,10 +196,15 @@ Statuses: - Common failures (SECTION_FAILURE_COMMON); - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ delete access to the object is denied; +- **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + the object could not be deleted because it has not been \ + found within the container; - **LOCKED** (2050, SECTION_OBJECT): \ deleting a locked object is prohibited; - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object container not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -218,6 +237,8 @@ Statuses: the requested object has been marked as deleted; - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object container not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -246,6 +267,8 @@ Statuses: access to operation SEARCH of the object is denied; - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ search container not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -256,8 +279,8 @@ Statuses: Get byte range of data payload. Range is set as an (offset, length) tuple. Like in `Get` method, the response uses gRPC stream. Requested range can be -restored by concatenation of all received payload chunks keeping the receiving -order. +restored by concatenation of all received payload chunks keeping the +receiving order. Extended headers can change `GetRange` behaviour: * [ __SYSTEM__NETMAP_EPOCH ] \ @@ -285,6 +308,8 @@ Statuses: the requested range is out of bounds; - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object container not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. @@ -322,12 +347,54 @@ Statuses: the requested range is out of bounds; - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ object container not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container is denied; - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ provided session token has expired. | Name | Input | Output | | ---- | ----- | ------ | | GetRangeHash | [GetRangeHashRequest](#neo.fs.v2.object.GetRangeHashRequest) | [GetRangeHashResponse](#neo.fs.v2.object.GetRangeHashResponse) | +#### Method PutSingle + +Put the prepared object into container. +`ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` and `PayloadLength` of +an object MUST be set. + +Extended headers can change `Put` behaviour: +* [ __SYSTEM__NETMAP_EPOCH \ + (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + Will use the requested version of Network Map for object placement + calculation. + +Please refer to detailed `XHeader` description. + +Statuses: +- **OK** (0, SECTION_SUCCESS): \ + object has been successfully saved in the container; +- Common failures (SECTION_FAILURE_COMMON); +- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + write access to the container is denied; +- **LOCKED** (2050, SECTION_OBJECT): \ + placement of an object of type TOMBSTONE that includes at least one + locked object is prohibited; +- **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \ + placement of an object of type LOCK that includes at least one object of + type other than REGULAR is prohibited; +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + object storage container not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container is denied; +- **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ + (for trusted object preparation) session private key does not exist or + has +been deleted; +- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + provided session token has expired. + +| Name | Input | Output | +| ---- | ----- | ------ | +| PutSingle | [PutSingleRequest](#neo.fs.v2.object.PutSingleRequest) | [PutSingleResponse](#neo.fs.v2.object.PutSingleResponse) | @@ -484,6 +551,7 @@ chunks. | ----- | ---- | ----- | ----------- | | chunk | [bytes](#bytes) | | Chunked object payload's range. | | split_info | [SplitInfo](#neo.fs.v2.object.SplitInfo) | | Meta information of split hierarchy. | +| ec_info | [ECInfo](#neo.fs.v2.object.ECInfo) | | Meta information for EC object assembly. | @@ -535,6 +603,7 @@ GET Object Response body | init | [GetResponse.Body.Init](#neo.fs.v2.object.GetResponse.Body.Init) | | Initial part of the object stream | | chunk | [bytes](#bytes) | | Chunked object payload | | split_info | [SplitInfo](#neo.fs.v2.object.SplitInfo) | | Meta information of split hierarchy for object assembly. | +| ec_info | [ECInfo](#neo.fs.v2.object.ECInfo) | | Meta information for EC object assembly. | @@ -601,6 +670,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. | +| ec_info | [ECInfo](#neo.fs.v2.object.ECInfo) | | Meta information for EC object assembly. | @@ -685,6 +755,51 @@ PUT Object response body | object_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | Identifier of the saved object | + + +### Message PutSingleRequest +Object PUT Single request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body | [PutSingleRequest.Body](#neo.fs.v2.object.PutSingleRequest.Body) | | Body of put single object request message. | +| meta_header | [neo.fs.v2.session.RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. | +| verify_header | [neo.fs.v2.session.RequestVerificationHeader](#neo.fs.v2.session.RequestVerificationHeader) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. | + + + + +### Message PutSingleRequest.Body +PUT Single request body + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| object | [Object](#neo.fs.v2.object.Object) | | Prepared object with payload. | +| copies_number | [uint32](#uint32) | repeated | Number of copies of the object to store within the RPC call. By default, object is processed according to the container's placement policy. Every number is treated as a minimal number of nodes in a corresponding placement vector that must store an object to complete the request successfully. The length MUST equal the placement vectors number, otherwise request is considered malformed. | + + + + +### Message PutSingleResponse +Object PUT Single response + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body | [PutSingleResponse.Body](#neo.fs.v2.object.PutSingleResponse.Body) | | Body of put single object response message. | +| meta_header | [neo.fs.v2.session.ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. | +| verify_header | [neo.fs.v2.session.ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. | + + + + +### Message PutSingleResponse.Body +PUT Single Object response body + + + ### Message Range @@ -726,11 +841,11 @@ Object Search request body ### Message SearchRequest.Body.Filter -Filter structure checks if the object header field or the attribute content -matches a value. +Filter structure checks if the object header field or the attribute +content matches a value. If no filters are set, search request will return all objects of the -container, including Regular object, Tombstones and Storage Group +container, including Regular object and Tombstone objects. Most human users expect to get only object they can directly work with. In that case, `$Object:ROOT` filter should be used. @@ -765,11 +880,11 @@ There are some well-known filter aliases to match objects by certain properties: * $Object:ROOT \ - Returns only `REGULAR` type objects that are not split or that are the top - level root objects in a split hierarchy. This includes objects not + Returns only `REGULAR` type objects that are not split or that are the + top level root objects in a split hierarchy. This includes objects not present physically, like large objects split into smaller objects without a separate top-level root object. Objects of other types like - StorageGroups and Tombstones will not be shown. This filter may be + Locks and Tombstones will not be shown. This filter may be useful for listing objects like `ls` command of some virtual file system. This filter is activated if the `key` exists, disregarding the value and matcher type. @@ -778,8 +893,8 @@ properties: activated if the `key` exists, disregarding the value and matcher type. Note: using filters with a key with prefix `$Object:` and match type -`NOT_PRESENT `is not recommended since this is not a cross-version approach. -Behavior when processing this kind of filters is undefined. +`NOT_PRESENT `is not recommended since this is not a cross-version +approach. Behavior when processing this kind of filters is undefined. | Field | Type | Label | Description | @@ -827,6 +942,30 @@ Object Search response body + + +### Message ECInfo +Meta information for the erasure-encoded object. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| chunks | [ECInfo.Chunk](#neo.fs.v2.object.ECInfo.Chunk) | repeated | Chunk stored on the node. | + + + + +### Message ECInfo.Chunk + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | Object ID of the chunk. | +| index | [uint32](#uint32) | | Index of the chunk. | +| total | [uint32](#uint32) | | Total number of chunks in this split. | + + ### Message Header @@ -846,6 +985,7 @@ Object Header | session_token | [neo.fs.v2.session.SessionToken](#neo.fs.v2.session.SessionToken) | | Session token, if it was used during Object creation. Need it to verify integrity and authenticity out of Request scope. | | attributes | [Header.Attribute](#neo.fs.v2.object.Header.Attribute) | repeated | User-defined object attributes | | split | [Header.Split](#neo.fs.v2.object.Header.Split) | | Position of the object in the split hierarchy | +| ec | [Header.EC](#neo.fs.v2.object.Header.EC) | | Erasure code chunk information. | @@ -858,15 +998,16 @@ Key name must be an object-unique valid UTF-8 string. Value can't be empty. Objects with duplicated attribute names or attributes with empty values will be considered invalid. -There are some "well-known" attributes starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix -that affect system behaviour: +There are some "well-known" attributes starting with `__SYSTEM__` +(`__NEOFS__` is deprecated) prefix that affect system behaviour: * [ __SYSTEM__UPLOAD_ID ] \ (`__NEOFS__UPLOAD_ID` is deprecated) \ Marks smaller parts of a split bigger object * [ __SYSTEM__EXPIRATION_EPOCH ] \ (`__NEOFS__EXPIRATION_EPOCH` is deprecated) \ - Tells GC to delete object after that epoch + The epoch after which object with no LOCKs on it becomes unavailable. + Locked object continues to be available until each of the LOCKs expire. * [ __SYSTEM__TICK_EPOCH ] \ (`__NEOFS__TICK_EPOCH` is deprecated) \ Decimal number that defines what epoch must produce @@ -905,6 +1046,23 @@ corresponding section in NeoFS Technical Specification. | value | [string](#string) | | string value of the object attribute | + + +### Message Header.EC +Erasure code can be applied to any object. +Information about encoded object structure is stored in `EC` header. +All objects belonging to a single EC group have the same `parent` field. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| parent | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | Identifier of the origin object. Known to all chunks. | +| index | [uint32](#uint32) | | Index of this chunk. | +| total | [uint32](#uint32) | | Total number of chunks in this split. | +| header_length | [uint32](#uint32) | | Total length of a parent header. Used to trim padding zeroes. | +| header | [bytes](#bytes) | | Chunk of a parent header. | + + ### Message Header.Split @@ -928,8 +1086,8 @@ must be within the same container. ### Message Object Object structure. Object is immutable and content-addressed. It means -`ObjectID` will change if the header or the payload changes. It's calculated as a -hash of header field which contains hash of the object's payload. +`ObjectID` will change if the header or the payload changes. It's calculated +as a hash of header field which contains hash of the object's payload. For non-regular object types payload format depends on object type specified in the header. @@ -965,8 +1123,8 @@ Short header fields ### Message SplitInfo Meta information of split hierarchy for object assembly. With the last part one can traverse linked list of split hierarchy back to the first part and -assemble the original object. With a linking object one can assemble an object -right from the object parts. +assemble the original object. With a linking object one can assemble an +object right from the object parts. | Field | Type | Label | Description | @@ -997,20 +1155,18 @@ Type of match expression ### ObjectType Type of the object payload content. Only `REGULAR` type objects can be split, -hence `TOMBSTONE`, `STORAGE_GROUP` and `LOCK` payload is limited by the maximum -object size. +hence `TOMBSTONE` and `LOCK` payload is limited by the +maximum object size. String presentation of object type is the same as definition: * REGULAR * TOMBSTONE -* STORAGE_GROUP * LOCK | Name | Number | Description | | ---- | ------ | ----------- | | REGULAR | 0 | Just a normal object | | TOMBSTONE | 1 | Used internally to identify deleted objects | -| STORAGE_GROUP | 2 | StorageGroup information | | LOCK | 3 | Object lock | diff --git a/proto-docs/refs.md b/proto-docs/refs.md index 7d66e5a..d688387 100644 --- a/proto-docs/refs.md +++ b/proto-docs/refs.md @@ -3,20 +3,20 @@ ## Table of Contents -- [Protocol Documentation](#protocol-documentation) - - [Table of Contents](#table-of-contents) - - [refs/types.proto](#refstypesproto) - - [Message Address](#message-address) - - [Message Checksum](#message-checksum) - - [Message ContainerID](#message-containerid) - - [Message ObjectID](#message-objectid) - - [Message OwnerID](#message-ownerid) - - [Message Signature](#message-signature) - - [Message SignatureRFC6979](#message-signaturerfc6979) - - [Message Version](#message-version) - - [ChecksumType](#checksumtype) - - [SignatureScheme](#signaturescheme) - - [Scalar Value Types](#scalar-value-types) +- [refs/types.proto](#refs/types.proto) + + - Messages + - [Address](#neo.fs.v2.refs.Address) + - [Checksum](#neo.fs.v2.refs.Checksum) + - [ContainerID](#neo.fs.v2.refs.ContainerID) + - [ObjectID](#neo.fs.v2.refs.ObjectID) + - [OwnerID](#neo.fs.v2.refs.OwnerID) + - [Signature](#neo.fs.v2.refs.Signature) + - [SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) + - [Version](#neo.fs.v2.refs.Version) + + +- [Scalar Value Types](#scalar-value-types) @@ -95,8 +95,8 @@ 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 -the object's `header` field, which, in it's turn, contains the hash of the object's -payload. +the object's `header` field, which, in it's turn, contains the hash of the +object's payload. String presentation is a [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string. @@ -169,7 +169,8 @@ RFC 6979 signature. API version used by a node. String presentation is a Semantic Versioning 2.0.0 compatible version string -with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor number. +with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor +number. | Field | Type | Label | Description | @@ -196,7 +197,8 @@ Checksum algorithm type. ### SignatureScheme -Signature scheme describes digital signing scheme used for (key, signature) pair. +Signature scheme describes digital signing scheme used for (key, signature) +pair. | Name | Number | Description | | ---- | ------ | ----------- | diff --git a/proto-docs/session.md b/proto-docs/session.md index facb292..0c4cb8e 100644 --- a/proto-docs/session.md +++ b/proto-docs/session.md @@ -278,15 +278,15 @@ Lifetime parameters of the token. Field names taken from rfc7519. ### Message XHeader -Extended headers for Request/Response. They may contain any user-defined headers -to be interpreted on application level. +Extended headers for Request/Response. They may contain any user-defined +headers to be interpreted on application level. -Key name must be a unique valid UTF-8 string. Value can't be empty. Requests or -Responses with duplicated header names or headers with empty values will be -considered invalid. +Key name must be a unique valid UTF-8 string. Value can't be empty. Requests +or Responses with duplicated header names or headers with empty values will +be considered invalid. -There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix that -affect system behaviour: +There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__` +is deprecated) prefix that affect system behaviour: * [ __SYSTEM__NETMAP_EPOCH ] \ (`__NEOFS__NETMAP_EPOCH` is deprecated) \ @@ -297,8 +297,8 @@ affect system behaviour: (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \ If object can't be found using current epoch's netmap, this header limits how many past epochs the node can look up through. The `value` is string - encoded `uint64` in decimal presentation. If set to '0' or not set, only the - current epoch will be used. + encoded `uint64` in decimal presentation. If set to '0' or not set, only + the current epoch will be used. | Field | Type | Label | Description | diff --git a/proto-docs/status.md b/proto-docs/status.md index b426326..d809daf 100644 --- a/proto-docs/status.md +++ b/proto-docs/status.md @@ -102,6 +102,7 @@ Section of statuses for container-related operations. | ---- | ------ | ----------- | | CONTAINER_NOT_FOUND | 0 | [**3072**] Container not found. | | EACL_NOT_FOUND | 1 | [**3073**] eACL table not found. | +| CONTAINER_ACCESS_DENIED | 2 | [**3074**] Container access denied. | diff --git a/status/types.proto b/status/types.proto index 60dfd94..52a7214 100644 --- a/status/types.proto +++ b/status/types.proto @@ -133,6 +133,9 @@ enum Container { // [**3073**] eACL table not found. EACL_NOT_FOUND = 1; + + // [**3074**] Container access denied. + CONTAINER_ACCESS_DENIED = 2; } // Section of statuses for session-related operations. From 433b2e6a47163bebec6c84cda86a0271e20b06fa Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Tue, 26 Mar 2024 18:59:45 +0300 Subject: [PATCH 20/59] [#42] netmap: Renumerate Replica message fields * Reassign ec_data_count and ec_parity_count to 3 and 4. Signed-off-by: Airat Arifullin --- netmap/types.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netmap/types.proto b/netmap/types.proto index 926c4bc..2180869 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -105,10 +105,10 @@ message Replica { string selector = 2 [ json_name = "selector" ]; // Data shards count - uint32 ec_data_count = 6 [ json_name = "ecDataCount" ]; + uint32 ec_data_count = 3 [ json_name = "ecDataCount" ]; // Parity shards count - uint32 ec_parity_count = 7 [ json_name = "ecParityCount" ]; + uint32 ec_parity_count = 4 [ json_name = "ecParityCount" ]; } // Set of rules to select a subset of nodes from `NetworkMap` able to store From 4bae9dd78abcf1a358a65a45fe7303e37fd98099 Mon Sep 17 00:00:00 2001 From: Artem Tataurov Date: Wed, 3 Apr 2024 11:21:40 +0300 Subject: [PATCH 21/59] [#43] Improve table of contents in proto documentation template Signed-off-by: Artem Tataurov --- .github/markdown.tmpl | 6 +-- proto-docs/accounting.md | 14 +++--- proto-docs/acl.md | 14 +++--- proto-docs/audit.md | 2 +- proto-docs/container.md | 66 +++++++++++++-------------- proto-docs/lock.md | 2 +- proto-docs/netmap.md | 48 ++++++++++---------- proto-docs/object.md | 96 ++++++++++++++++++++-------------------- proto-docs/refs.md | 16 +++---- proto-docs/session.md | 34 +++++++------- proto-docs/status.md | 4 +- proto-docs/tombstone.md | 2 +- 12 files changed, 152 insertions(+), 152 deletions(-) diff --git a/.github/markdown.tmpl b/.github/markdown.tmpl index f945c13..2d6c57b 100644 --- a/.github/markdown.tmpl +++ b/.github/markdown.tmpl @@ -4,11 +4,11 @@ ## Table of Contents {{range .Files}} {{$file_name := .Name}}- [{{.Name}}](#{{.Name}}) -{{if .Services}} - Services - {{range .Services}}- [{{.Name}}](#{{.FullName}}) +{{if .Services}} - Services + {{range .Services}} - [{{.Name}}](#{{.FullName}}) {{end}}{{end}} {{if .Messages}} - Messages - {{range .Messages}}- [{{.LongName}}](#{{.FullName}}) + {{range .Messages}} - [{{.LongName}}](#{{.FullName}}) {{end}}{{end}} {{end}} - [Scalar Value Types](#scalar-value-types) diff --git a/proto-docs/accounting.md b/proto-docs/accounting.md index 9ed7186..a23a63c 100644 --- a/proto-docs/accounting.md +++ b/proto-docs/accounting.md @@ -4,20 +4,20 @@ ## Table of Contents - [accounting/service.proto](#accounting/service.proto) - - Services - - [AccountingService](#neo.fs.v2.accounting.AccountingService) + - 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) + - [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) + - [Decimal](#neo.fs.v2.accounting.Decimal) - [Scalar Value Types](#scalar-value-types) diff --git a/proto-docs/acl.md b/proto-docs/acl.md index 69d1d3d..91fd36b 100644 --- a/proto-docs/acl.md +++ b/proto-docs/acl.md @@ -6,13 +6,13 @@ - [acl/types.proto](#acl/types.proto) - Messages - - [BearerToken](#neo.fs.v2.acl.BearerToken) - - [BearerToken.Body](#neo.fs.v2.acl.BearerToken.Body) - - [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime) - - [EACLRecord](#neo.fs.v2.acl.EACLRecord) - - [EACLRecord.Filter](#neo.fs.v2.acl.EACLRecord.Filter) - - [EACLRecord.Target](#neo.fs.v2.acl.EACLRecord.Target) - - [EACLTable](#neo.fs.v2.acl.EACLTable) + - [BearerToken](#neo.fs.v2.acl.BearerToken) + - [BearerToken.Body](#neo.fs.v2.acl.BearerToken.Body) + - [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime) + - [EACLRecord](#neo.fs.v2.acl.EACLRecord) + - [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) diff --git a/proto-docs/audit.md b/proto-docs/audit.md index b8d2010..99bcfc8 100644 --- a/proto-docs/audit.md +++ b/proto-docs/audit.md @@ -6,7 +6,7 @@ - [audit/types.proto](#audit/types.proto) - Messages - - [DataAuditResult](#neo.fs.v2.audit.DataAuditResult) + - [DataAuditResult](#neo.fs.v2.audit.DataAuditResult) - [Scalar Value Types](#scalar-value-types) diff --git a/proto-docs/container.md b/proto-docs/container.md index 024057f..b568eed 100644 --- a/proto-docs/container.md +++ b/proto-docs/container.md @@ -4,46 +4,46 @@ ## Table of Contents - [container/service.proto](#container/service.proto) - - Services - - [ContainerService](#neo.fs.v2.container.ContainerService) + - Services + - [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) - - [GetResponse.Body](#neo.fs.v2.container.GetResponse.Body) - - [ListRequest](#neo.fs.v2.container.ListRequest) - - [ListRequest.Body](#neo.fs.v2.container.ListRequest.Body) - - [ListResponse](#neo.fs.v2.container.ListResponse) - - [ListResponse.Body](#neo.fs.v2.container.ListResponse.Body) - - [PutRequest](#neo.fs.v2.container.PutRequest) - - [PutRequest.Body](#neo.fs.v2.container.PutRequest.Body) - - [PutResponse](#neo.fs.v2.container.PutResponse) - - [PutResponse.Body](#neo.fs.v2.container.PutResponse.Body) - - [SetExtendedACLRequest](#neo.fs.v2.container.SetExtendedACLRequest) - - [SetExtendedACLRequest.Body](#neo.fs.v2.container.SetExtendedACLRequest.Body) - - [SetExtendedACLResponse](#neo.fs.v2.container.SetExtendedACLResponse) - - [SetExtendedACLResponse.Body](#neo.fs.v2.container.SetExtendedACLResponse.Body) + - [AnnounceUsedSpaceRequest](#neo.fs.v2.container.AnnounceUsedSpaceRequest) + - [AnnounceUsedSpaceRequest.Body](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body) + - [AnnounceUsedSpaceRequest.Body.Announcement](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body.Announcement) + - [AnnounceUsedSpaceResponse](#neo.fs.v2.container.AnnounceUsedSpaceResponse) + - [AnnounceUsedSpaceResponse.Body](#neo.fs.v2.container.AnnounceUsedSpaceResponse.Body) + - [DeleteRequest](#neo.fs.v2.container.DeleteRequest) + - [DeleteRequest.Body](#neo.fs.v2.container.DeleteRequest.Body) + - [DeleteResponse](#neo.fs.v2.container.DeleteResponse) + - [DeleteResponse.Body](#neo.fs.v2.container.DeleteResponse.Body) + - [GetExtendedACLRequest](#neo.fs.v2.container.GetExtendedACLRequest) + - [GetExtendedACLRequest.Body](#neo.fs.v2.container.GetExtendedACLRequest.Body) + - [GetExtendedACLResponse](#neo.fs.v2.container.GetExtendedACLResponse) + - [GetExtendedACLResponse.Body](#neo.fs.v2.container.GetExtendedACLResponse.Body) + - [GetRequest](#neo.fs.v2.container.GetRequest) + - [GetRequest.Body](#neo.fs.v2.container.GetRequest.Body) + - [GetResponse](#neo.fs.v2.container.GetResponse) + - [GetResponse.Body](#neo.fs.v2.container.GetResponse.Body) + - [ListRequest](#neo.fs.v2.container.ListRequest) + - [ListRequest.Body](#neo.fs.v2.container.ListRequest.Body) + - [ListResponse](#neo.fs.v2.container.ListResponse) + - [ListResponse.Body](#neo.fs.v2.container.ListResponse.Body) + - [PutRequest](#neo.fs.v2.container.PutRequest) + - [PutRequest.Body](#neo.fs.v2.container.PutRequest.Body) + - [PutResponse](#neo.fs.v2.container.PutResponse) + - [PutResponse.Body](#neo.fs.v2.container.PutResponse.Body) + - [SetExtendedACLRequest](#neo.fs.v2.container.SetExtendedACLRequest) + - [SetExtendedACLRequest.Body](#neo.fs.v2.container.SetExtendedACLRequest.Body) + - [SetExtendedACLResponse](#neo.fs.v2.container.SetExtendedACLResponse) + - [SetExtendedACLResponse.Body](#neo.fs.v2.container.SetExtendedACLResponse.Body) - [container/types.proto](#container/types.proto) - Messages - - [Container](#neo.fs.v2.container.Container) - - [Container.Attribute](#neo.fs.v2.container.Container.Attribute) + - [Container](#neo.fs.v2.container.Container) + - [Container.Attribute](#neo.fs.v2.container.Container.Attribute) - [Scalar Value Types](#scalar-value-types) diff --git a/proto-docs/lock.md b/proto-docs/lock.md index 2e730f8..ae74c5b 100644 --- a/proto-docs/lock.md +++ b/proto-docs/lock.md @@ -6,7 +6,7 @@ - [lock/types.proto](#lock/types.proto) - Messages - - [Lock](#neo.fs.v2.lock.Lock) + - [Lock](#neo.fs.v2.lock.Lock) - [Scalar Value Types](#scalar-value-types) diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index 45fd764..fb4eccb 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -4,37 +4,37 @@ ## Table of Contents - [netmap/service.proto](#netmap/service.proto) - - Services - - [NetmapService](#neo.fs.v2.netmap.NetmapService) + - Services + - [NetmapService](#neo.fs.v2.netmap.NetmapService) - Messages - - [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest) - - [LocalNodeInfoRequest.Body](#neo.fs.v2.netmap.LocalNodeInfoRequest.Body) - - [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) - - [LocalNodeInfoResponse.Body](#neo.fs.v2.netmap.LocalNodeInfoResponse.Body) - - [NetmapSnapshotRequest](#neo.fs.v2.netmap.NetmapSnapshotRequest) - - [NetmapSnapshotRequest.Body](#neo.fs.v2.netmap.NetmapSnapshotRequest.Body) - - [NetmapSnapshotResponse](#neo.fs.v2.netmap.NetmapSnapshotResponse) - - [NetmapSnapshotResponse.Body](#neo.fs.v2.netmap.NetmapSnapshotResponse.Body) - - [NetworkInfoRequest](#neo.fs.v2.netmap.NetworkInfoRequest) - - [NetworkInfoRequest.Body](#neo.fs.v2.netmap.NetworkInfoRequest.Body) - - [NetworkInfoResponse](#neo.fs.v2.netmap.NetworkInfoResponse) - - [NetworkInfoResponse.Body](#neo.fs.v2.netmap.NetworkInfoResponse.Body) + - [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest) + - [LocalNodeInfoRequest.Body](#neo.fs.v2.netmap.LocalNodeInfoRequest.Body) + - [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) + - [LocalNodeInfoResponse.Body](#neo.fs.v2.netmap.LocalNodeInfoResponse.Body) + - [NetmapSnapshotRequest](#neo.fs.v2.netmap.NetmapSnapshotRequest) + - [NetmapSnapshotRequest.Body](#neo.fs.v2.netmap.NetmapSnapshotRequest.Body) + - [NetmapSnapshotResponse](#neo.fs.v2.netmap.NetmapSnapshotResponse) + - [NetmapSnapshotResponse.Body](#neo.fs.v2.netmap.NetmapSnapshotResponse.Body) + - [NetworkInfoRequest](#neo.fs.v2.netmap.NetworkInfoRequest) + - [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) - Messages - - [Filter](#neo.fs.v2.netmap.Filter) - - [Netmap](#neo.fs.v2.netmap.Netmap) - - [NetworkConfig](#neo.fs.v2.netmap.NetworkConfig) - - [NetworkConfig.Parameter](#neo.fs.v2.netmap.NetworkConfig.Parameter) - - [NetworkInfo](#neo.fs.v2.netmap.NetworkInfo) - - [NodeInfo](#neo.fs.v2.netmap.NodeInfo) - - [NodeInfo.Attribute](#neo.fs.v2.netmap.NodeInfo.Attribute) - - [PlacementPolicy](#neo.fs.v2.netmap.PlacementPolicy) - - [Replica](#neo.fs.v2.netmap.Replica) - - [Selector](#neo.fs.v2.netmap.Selector) + - [Filter](#neo.fs.v2.netmap.Filter) + - [Netmap](#neo.fs.v2.netmap.Netmap) + - [NetworkConfig](#neo.fs.v2.netmap.NetworkConfig) + - [NetworkConfig.Parameter](#neo.fs.v2.netmap.NetworkConfig.Parameter) + - [NetworkInfo](#neo.fs.v2.netmap.NetworkInfo) + - [NodeInfo](#neo.fs.v2.netmap.NodeInfo) + - [NodeInfo.Attribute](#neo.fs.v2.netmap.NodeInfo.Attribute) + - [PlacementPolicy](#neo.fs.v2.netmap.PlacementPolicy) + - [Replica](#neo.fs.v2.netmap.Replica) + - [Selector](#neo.fs.v2.netmap.Selector) - [Scalar Value Types](#scalar-value-types) diff --git a/proto-docs/object.md b/proto-docs/object.md index f080e4a..9fe88a5 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -4,61 +4,61 @@ ## Table of Contents - [object/service.proto](#object/service.proto) - - Services - - [ObjectService](#neo.fs.v2.object.ObjectService) + - Services + - [ObjectService](#neo.fs.v2.object.ObjectService) - Messages - - [DeleteRequest](#neo.fs.v2.object.DeleteRequest) - - [DeleteRequest.Body](#neo.fs.v2.object.DeleteRequest.Body) - - [DeleteResponse](#neo.fs.v2.object.DeleteResponse) - - [DeleteResponse.Body](#neo.fs.v2.object.DeleteResponse.Body) - - [GetRangeHashRequest](#neo.fs.v2.object.GetRangeHashRequest) - - [GetRangeHashRequest.Body](#neo.fs.v2.object.GetRangeHashRequest.Body) - - [GetRangeHashResponse](#neo.fs.v2.object.GetRangeHashResponse) - - [GetRangeHashResponse.Body](#neo.fs.v2.object.GetRangeHashResponse.Body) - - [GetRangeRequest](#neo.fs.v2.object.GetRangeRequest) - - [GetRangeRequest.Body](#neo.fs.v2.object.GetRangeRequest.Body) - - [GetRangeResponse](#neo.fs.v2.object.GetRangeResponse) - - [GetRangeResponse.Body](#neo.fs.v2.object.GetRangeResponse.Body) - - [GetRequest](#neo.fs.v2.object.GetRequest) - - [GetRequest.Body](#neo.fs.v2.object.GetRequest.Body) - - [GetResponse](#neo.fs.v2.object.GetResponse) - - [GetResponse.Body](#neo.fs.v2.object.GetResponse.Body) - - [GetResponse.Body.Init](#neo.fs.v2.object.GetResponse.Body.Init) - - [HeadRequest](#neo.fs.v2.object.HeadRequest) - - [HeadRequest.Body](#neo.fs.v2.object.HeadRequest.Body) - - [HeadResponse](#neo.fs.v2.object.HeadResponse) - - [HeadResponse.Body](#neo.fs.v2.object.HeadResponse.Body) - - [HeaderWithSignature](#neo.fs.v2.object.HeaderWithSignature) - - [PutRequest](#neo.fs.v2.object.PutRequest) - - [PutRequest.Body](#neo.fs.v2.object.PutRequest.Body) - - [PutRequest.Body.Init](#neo.fs.v2.object.PutRequest.Body.Init) - - [PutResponse](#neo.fs.v2.object.PutResponse) - - [PutResponse.Body](#neo.fs.v2.object.PutResponse.Body) - - [PutSingleRequest](#neo.fs.v2.object.PutSingleRequest) - - [PutSingleRequest.Body](#neo.fs.v2.object.PutSingleRequest.Body) - - [PutSingleResponse](#neo.fs.v2.object.PutSingleResponse) - - [PutSingleResponse.Body](#neo.fs.v2.object.PutSingleResponse.Body) - - [Range](#neo.fs.v2.object.Range) - - [SearchRequest](#neo.fs.v2.object.SearchRequest) - - [SearchRequest.Body](#neo.fs.v2.object.SearchRequest.Body) - - [SearchRequest.Body.Filter](#neo.fs.v2.object.SearchRequest.Body.Filter) - - [SearchResponse](#neo.fs.v2.object.SearchResponse) - - [SearchResponse.Body](#neo.fs.v2.object.SearchResponse.Body) + - [DeleteRequest](#neo.fs.v2.object.DeleteRequest) + - [DeleteRequest.Body](#neo.fs.v2.object.DeleteRequest.Body) + - [DeleteResponse](#neo.fs.v2.object.DeleteResponse) + - [DeleteResponse.Body](#neo.fs.v2.object.DeleteResponse.Body) + - [GetRangeHashRequest](#neo.fs.v2.object.GetRangeHashRequest) + - [GetRangeHashRequest.Body](#neo.fs.v2.object.GetRangeHashRequest.Body) + - [GetRangeHashResponse](#neo.fs.v2.object.GetRangeHashResponse) + - [GetRangeHashResponse.Body](#neo.fs.v2.object.GetRangeHashResponse.Body) + - [GetRangeRequest](#neo.fs.v2.object.GetRangeRequest) + - [GetRangeRequest.Body](#neo.fs.v2.object.GetRangeRequest.Body) + - [GetRangeResponse](#neo.fs.v2.object.GetRangeResponse) + - [GetRangeResponse.Body](#neo.fs.v2.object.GetRangeResponse.Body) + - [GetRequest](#neo.fs.v2.object.GetRequest) + - [GetRequest.Body](#neo.fs.v2.object.GetRequest.Body) + - [GetResponse](#neo.fs.v2.object.GetResponse) + - [GetResponse.Body](#neo.fs.v2.object.GetResponse.Body) + - [GetResponse.Body.Init](#neo.fs.v2.object.GetResponse.Body.Init) + - [HeadRequest](#neo.fs.v2.object.HeadRequest) + - [HeadRequest.Body](#neo.fs.v2.object.HeadRequest.Body) + - [HeadResponse](#neo.fs.v2.object.HeadResponse) + - [HeadResponse.Body](#neo.fs.v2.object.HeadResponse.Body) + - [HeaderWithSignature](#neo.fs.v2.object.HeaderWithSignature) + - [PutRequest](#neo.fs.v2.object.PutRequest) + - [PutRequest.Body](#neo.fs.v2.object.PutRequest.Body) + - [PutRequest.Body.Init](#neo.fs.v2.object.PutRequest.Body.Init) + - [PutResponse](#neo.fs.v2.object.PutResponse) + - [PutResponse.Body](#neo.fs.v2.object.PutResponse.Body) + - [PutSingleRequest](#neo.fs.v2.object.PutSingleRequest) + - [PutSingleRequest.Body](#neo.fs.v2.object.PutSingleRequest.Body) + - [PutSingleResponse](#neo.fs.v2.object.PutSingleResponse) + - [PutSingleResponse.Body](#neo.fs.v2.object.PutSingleResponse.Body) + - [Range](#neo.fs.v2.object.Range) + - [SearchRequest](#neo.fs.v2.object.SearchRequest) + - [SearchRequest.Body](#neo.fs.v2.object.SearchRequest.Body) + - [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) - Messages - - [ECInfo](#neo.fs.v2.object.ECInfo) - - [ECInfo.Chunk](#neo.fs.v2.object.ECInfo.Chunk) - - [Header](#neo.fs.v2.object.Header) - - [Header.Attribute](#neo.fs.v2.object.Header.Attribute) - - [Header.EC](#neo.fs.v2.object.Header.EC) - - [Header.Split](#neo.fs.v2.object.Header.Split) - - [Object](#neo.fs.v2.object.Object) - - [ShortHeader](#neo.fs.v2.object.ShortHeader) - - [SplitInfo](#neo.fs.v2.object.SplitInfo) + - [ECInfo](#neo.fs.v2.object.ECInfo) + - [ECInfo.Chunk](#neo.fs.v2.object.ECInfo.Chunk) + - [Header](#neo.fs.v2.object.Header) + - [Header.Attribute](#neo.fs.v2.object.Header.Attribute) + - [Header.EC](#neo.fs.v2.object.Header.EC) + - [Header.Split](#neo.fs.v2.object.Header.Split) + - [Object](#neo.fs.v2.object.Object) + - [ShortHeader](#neo.fs.v2.object.ShortHeader) + - [SplitInfo](#neo.fs.v2.object.SplitInfo) - [Scalar Value Types](#scalar-value-types) diff --git a/proto-docs/refs.md b/proto-docs/refs.md index d688387..e27d4ba 100644 --- a/proto-docs/refs.md +++ b/proto-docs/refs.md @@ -6,14 +6,14 @@ - [refs/types.proto](#refs/types.proto) - Messages - - [Address](#neo.fs.v2.refs.Address) - - [Checksum](#neo.fs.v2.refs.Checksum) - - [ContainerID](#neo.fs.v2.refs.ContainerID) - - [ObjectID](#neo.fs.v2.refs.ObjectID) - - [OwnerID](#neo.fs.v2.refs.OwnerID) - - [Signature](#neo.fs.v2.refs.Signature) - - [SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) - - [Version](#neo.fs.v2.refs.Version) + - [Address](#neo.fs.v2.refs.Address) + - [Checksum](#neo.fs.v2.refs.Checksum) + - [ContainerID](#neo.fs.v2.refs.ContainerID) + - [ObjectID](#neo.fs.v2.refs.ObjectID) + - [OwnerID](#neo.fs.v2.refs.OwnerID) + - [Signature](#neo.fs.v2.refs.Signature) + - [SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) + - [Version](#neo.fs.v2.refs.Version) - [Scalar Value Types](#scalar-value-types) diff --git a/proto-docs/session.md b/proto-docs/session.md index 0c4cb8e..40088d1 100644 --- a/proto-docs/session.md +++ b/proto-docs/session.md @@ -4,30 +4,30 @@ ## Table of Contents - [session/service.proto](#session/service.proto) - - Services - - [SessionService](#neo.fs.v2.session.SessionService) + - 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) + - [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) - Messages - - [ContainerSessionContext](#neo.fs.v2.session.ContainerSessionContext) - - [ObjectSessionContext](#neo.fs.v2.session.ObjectSessionContext) - - [ObjectSessionContext.Target](#neo.fs.v2.session.ObjectSessionContext.Target) - - [RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) - - [RequestVerificationHeader](#neo.fs.v2.session.RequestVerificationHeader) - - [ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader) - - [ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader) - - [SessionToken](#neo.fs.v2.session.SessionToken) - - [SessionToken.Body](#neo.fs.v2.session.SessionToken.Body) - - [SessionToken.Body.TokenLifetime](#neo.fs.v2.session.SessionToken.Body.TokenLifetime) - - [XHeader](#neo.fs.v2.session.XHeader) + - [ContainerSessionContext](#neo.fs.v2.session.ContainerSessionContext) + - [ObjectSessionContext](#neo.fs.v2.session.ObjectSessionContext) + - [ObjectSessionContext.Target](#neo.fs.v2.session.ObjectSessionContext.Target) + - [RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) + - [RequestVerificationHeader](#neo.fs.v2.session.RequestVerificationHeader) + - [ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader) + - [ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader) + - [SessionToken](#neo.fs.v2.session.SessionToken) + - [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) diff --git a/proto-docs/status.md b/proto-docs/status.md index d809daf..87d3b41 100644 --- a/proto-docs/status.md +++ b/proto-docs/status.md @@ -6,8 +6,8 @@ - [status/types.proto](#status/types.proto) - Messages - - [Status](#neo.fs.v2.status.Status) - - [Status.Detail](#neo.fs.v2.status.Status.Detail) + - [Status](#neo.fs.v2.status.Status) + - [Status.Detail](#neo.fs.v2.status.Status.Detail) - [Scalar Value Types](#scalar-value-types) diff --git a/proto-docs/tombstone.md b/proto-docs/tombstone.md index 9056ad2..7a7761b 100644 --- a/proto-docs/tombstone.md +++ b/proto-docs/tombstone.md @@ -6,7 +6,7 @@ - [tombstone/types.proto](#tombstone/types.proto) - Messages - - [Tombstone](#neo.fs.v2.tombstone.Tombstone) + - [Tombstone](#neo.fs.v2.tombstone.Tombstone) - [Scalar Value Types](#scalar-value-types) From 9802fd23ae559d67c72943152565a69e268f6b48 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Sat, 20 Apr 2024 13:42:24 +0300 Subject: [PATCH 22/59] audit: Remove deprecated service Signed-off-by: Evgenii Stratonikov --- audit/types.proto | 59 ----------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 audit/types.proto diff --git a/audit/types.proto b/audit/types.proto deleted file mode 100644 index c5c19ec..0000000 --- a/audit/types.proto +++ /dev/null @@ -1,59 +0,0 @@ -syntax = "proto3"; - -package neo.fs.v2.audit; - -option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/audit/grpc;audit"; -option csharp_namespace = "Neo.FileStorage.API.Audit"; - -import "refs/types.proto"; - -// DataAuditResult keeps record of conducted Data Audits. The detailed report is -// generated separately. -message DataAuditResult { - // Data Audit Result format version. Effectively, the version of API library - // used to report DataAuditResult structure. - neo.fs.v2.refs.Version version = 1 [ json_name = "version" ]; - - // Epoch number when the Data Audit was conducted - fixed64 audit_epoch = 2 [ json_name = "auditEpoch" ]; - - // Container under audit - neo.fs.v2.refs.ContainerID container_id = 3 [ json_name = "containerID" ]; - - // Public key of the auditing InnerRing node in a binary format - bytes public_key = 4 [ json_name = "publicKey" ]; - - // Shows if Data Audit process was complete in time or if it was cancelled - bool complete = 5 [ json_name = "complete" ]; - - // Number of request done at PoR stage - uint32 requests = 6 [ json_name = "requests" ]; - - // Number of retries done at PoR stage - uint32 retries = 7 [ json_name = "retries" ]; - - // List of Storage Groups that passed audit PoR stage - repeated neo.fs.v2.refs.ObjectID pass_sg = 8 [ json_name = "passSG" ]; - - // List of Storage Groups that failed audit PoR stage - repeated neo.fs.v2.refs.ObjectID fail_sg = 9 [ json_name = "failSG" ]; - - // Number of sampled objects under the audit placed in an optimal way - // according to the containers placement policy when checking PoP - uint32 hit = 10 [ json_name = "hit" ]; - - // Number of sampled objects under the audit placed in suboptimal way - // according to the containers placement policy, but still at a satisfactory - // level when checking PoP - uint32 miss = 11 [ json_name = "miss" ]; - - // Number of sampled objects under the audit stored inconsistently with the - // placement policy or not found at all when checking PoP - uint32 fail = 12 [ json_name = "fail" ]; - - // List of storage node public keys that passed at least one PDP - repeated bytes pass_nodes = 13 [ json_name = "passNodes" ]; - - // List of storage node public keys that failed at least one PDP - repeated bytes fail_nodes = 14 [ json_name = "failNodes" ]; -} From c94b8ab6aed6698a62f5efd4875ec3bef061440a Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Tue, 23 Apr 2024 22:18:22 +0300 Subject: [PATCH 23/59] [#46] apemanager: Introduce proto-s for apemanager service * Introduce proto-s for `APEManagerService` and related types. * Introduce a new status section related to `APEManagerService`. * Generate proto-docs. Signed-off-by: Airat Arifullin --- apemanager/service.proto | 171 ++++++++++++++++++++ apemanager/types.proto | 33 ++++ proto-docs/apemanager.md | 329 +++++++++++++++++++++++++++++++++++++++ proto-docs/status.md | 12 ++ status/types.proto | 9 ++ 5 files changed, 554 insertions(+) create mode 100644 apemanager/service.proto create mode 100644 apemanager/types.proto create mode 100644 proto-docs/apemanager.md diff --git a/apemanager/service.proto b/apemanager/service.proto new file mode 100644 index 0000000..6b9da60 --- /dev/null +++ b/apemanager/service.proto @@ -0,0 +1,171 @@ +syntax = "proto3"; + +package frostfs.v2.apemanager; + +import "apemanager/types.proto"; +import "session/types.proto"; + +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc;apemanager"; + +// `APEManagerService` provides API to manage rule chains within sidechain's +// `Policy` smart contract. +service APEManagerService { + // Add a rule chain for a specific target to `Policy` smart contract. + // + // Statuses: + // - **OK** (0, SECTION_SUCCESS): \ + // the chain has been successfully added; + // - Common failures (SECTION_FAILURE_COMMON); + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // container (as target) not found; + // - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \ + // the operation is denied by the service. + rpc AddChain(AddChainRequest) returns (AddChainResponse); + + // Remove a rule chain for a specific target from `Policy` smart contract. + // RemoveChain is an idempotent operation: removal of non-existing rule chain + // also means success. + // + // Statuses: + // - **OK** (0, SECTION_SUCCESS): \ + // the chain has been successfully removed; + // - Common failures (SECTION_FAILURE_COMMON); + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // container (as target) not found; + // - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \ + // the operation is denied by the service. + rpc RemoveChain(RemoveChainRequest) returns (RemoveChainResponse); + + // List chains defined for a specific target from `Policy` smart contract. + // + // Statuses: + // - **OK** (0, SECTION_SUCCESS): \ + // chains have been successfully listed; + // - Common failures (SECTION_FAILURE_COMMON); + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // container (as target) not found; + // - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \ + // the operation is denied by the service. + rpc ListChains(ListChainsRequest) returns (ListChainsResponse); +} + +message AddChainRequest { + message Body { + // A target for which a rule chain is added. + ChainTarget target = 1; + + // The chain to set for the target. + Chain chain = 2; + } + + // The request's body. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.RequestVerificationHeader verify_header = 3; +} + +message AddChainResponse { + message Body { + // Chain ID assigned for the added rule chain. + // If chain ID is left empty in the request, then + // it will be generated. + bytes chain_id = 1; + } + + // The response's body. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; +} + +message RemoveChainRequest { + message Body { + // Target for which a rule chain is removed. + ChainTarget target = 1; + + // Chain ID assigned for the rule chain. + bytes chain_id = 2; + } + + // The request's body. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.RequestVerificationHeader verify_header = 3; +} + +message RemoveChainResponse { + // Since RemoveChain is an idempotent operation, then the only indicator that + // operation could not be performed is an error returning to a client. + message Body {} + + // The response's body. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; +} + +message ListChainsRequest { + message Body { + // Target for which rule chains are listed. + ChainTarget target = 1; + } + + // The request's body. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.RequestVerificationHeader verify_header = 3; +} + +message ListChainsResponse { + message Body { + // The list of chains defined for the reqeusted target. + repeated Chain chains = 1; + } + + // The response's body. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; +} \ No newline at end of file diff --git a/apemanager/types.proto b/apemanager/types.proto new file mode 100644 index 0000000..c064627 --- /dev/null +++ b/apemanager/types.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package frostfs.v2.apemanager; + +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc;apemanager"; + +// TargetType is a type target to which a rule chain is defined. +enum TargetType { + UNDEFINED = 0; + + NAMESPACE = 1; + + CONTAINER = 2; + + USER = 3; + + GROUP = 4; +} + +// ChainTarget is an object to which a rule chain is defined. +message ChainTarget { + TargetType type = 1; + + string name = 2; +} + +// Chain is a chain of rules defined for a specific target. +message Chain { + oneof kind { + // Raw representation of a serizalized rule chain. + bytes raw = 1; + } +} diff --git a/proto-docs/apemanager.md b/proto-docs/apemanager.md new file mode 100644 index 0000000..303f7f1 --- /dev/null +++ b/proto-docs/apemanager.md @@ -0,0 +1,329 @@ +# Protocol Documentation + + +## Table of Contents + +- [apemanager/service.proto](#apemanager/service.proto) + - Services + - [APEManagerService](#frostfs.v2.apemanager.APEManagerService) + + - Messages + - [AddChainRequest](#frostfs.v2.apemanager.AddChainRequest) + - [AddChainRequest.Body](#frostfs.v2.apemanager.AddChainRequest.Body) + - [AddChainResponse](#frostfs.v2.apemanager.AddChainResponse) + - [AddChainResponse.Body](#frostfs.v2.apemanager.AddChainResponse.Body) + - [ListChainsRequest](#frostfs.v2.apemanager.ListChainsRequest) + - [ListChainsRequest.Body](#frostfs.v2.apemanager.ListChainsRequest.Body) + - [ListChainsResponse](#frostfs.v2.apemanager.ListChainsResponse) + - [ListChainsResponse.Body](#frostfs.v2.apemanager.ListChainsResponse.Body) + - [RemoveChainRequest](#frostfs.v2.apemanager.RemoveChainRequest) + - [RemoveChainRequest.Body](#frostfs.v2.apemanager.RemoveChainRequest.Body) + - [RemoveChainResponse](#frostfs.v2.apemanager.RemoveChainResponse) + - [RemoveChainResponse.Body](#frostfs.v2.apemanager.RemoveChainResponse.Body) + + +- [apemanager/types.proto](#apemanager/types.proto) + + - Messages + - [Chain](#frostfs.v2.apemanager.Chain) + - [ChainTarget](#frostfs.v2.apemanager.ChainTarget) + + +- [Scalar Value Types](#scalar-value-types) + + + + +

Top

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

Top

+ +## apemanager/types.proto + + + + + + + +### Message Chain +Chain is a chain of rules defined for a specific target. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| raw | [bytes](#bytes) | | Raw representation of a serizalized rule chain. | + + + + +### Message ChainTarget +ChainTarget is an object to which a rule chain is defined. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [TargetType](#frostfs.v2.apemanager.TargetType) | | | +| name | [string](#string) | | | + + + + + + +### TargetType +TargetType is a type target to which a rule chain is defined. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNDEFINED | 0 | | +| NAMESPACE | 1 | | +| CONTAINER | 2 | | +| USER | 3 | | +| GROUP | 4 | | + + + + + + +## Scalar Value Types + +| .proto Type | Notes | C++ Type | Java Type | Python Type | +| ----------- | ----- | -------- | --------- | ----------- | +| 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 | +| 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 | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | +| sfixed32 | Always four bytes. | int32 | int | int | +| sfixed64 | Always eight bytes. | int64 | long | int/long | +| 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 87d3b41..c1401bd 100644 --- a/proto-docs/status.md +++ b/proto-docs/status.md @@ -79,6 +79,17 @@ covered by the code. + + +### APEManager +Section of status for APE manager related operations. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| APE_MANAGER_ACCESS_DENIED | 0 | [**5120**] The operation is denied by APE manager. | + + + ### CommonFail @@ -134,6 +145,7 @@ Section identifiers. | SECTION_OBJECT | 2 | Object service-specific errors. | | SECTION_CONTAINER | 3 | Container service-specific errors. | | SECTION_SESSION | 4 | Session service-specific errors. | +| SECTION_APE_MANAGER | 5 | Session service-specific errors. | diff --git a/status/types.proto b/status/types.proto index 52a7214..2205abc 100644 --- a/status/types.proto +++ b/status/types.proto @@ -73,6 +73,9 @@ enum Section { // Session service-specific errors. SECTION_SESSION = 4; + + // Session service-specific errors. + SECTION_APE_MANAGER = 5; } // Section of NeoFS successful return codes. @@ -146,3 +149,9 @@ enum Session { // [**4097**] Token has expired. TOKEN_EXPIRED = 1; } + +// Section of status for APE manager related operations. +enum APEManager { + // [**5120**] The operation is denied by APE manager. + APE_MANAGER_ACCESS_DENIED = 0; +} \ No newline at end of file From b182533828a3f7ccd1d54b72e0e6f2cee5126002 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Fri, 3 May 2024 12:08:33 +0300 Subject: [PATCH 24/59] [#47] object: Specify ec_parent attribute for Object.Search * Add $Object:ec.parent attribute to Object.Search specification. * Update docs for Object. Signed-off-by: Airat Arifullin --- object/service.proto | 3 +++ proto-docs/object.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/object/service.proto b/object/service.proto index bbf0fc3..1168e4e 100644 --- a/object/service.proto +++ b/object/service.proto @@ -583,6 +583,9 @@ message SearchRequest { // object_id of parent // * $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. // // There are some well-known filter aliases to match objects by certain // properties: diff --git a/proto-docs/object.md b/proto-docs/object.md index 9fe88a5..9c51c98 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -875,6 +875,9 @@ prefix to the name. Here is the list of fields available via this prefix: object_id of parent * $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. There are some well-known filter aliases to match objects by certain properties: From cfb148ea0c55f7d497292730f6a0ffc904d11a86 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Wed, 8 May 2024 13:07:33 +0300 Subject: [PATCH 25/59] [#48] object: Introduce `parent_split_id` and `parent_index` for `EC` * Introduce new fields for `EC`-header for `Object` service; * Regenerate docs. Signed-off-by: Airat Arifullin --- object/types.proto | 6 ++++++ proto-docs/object.md | 2 ++ 2 files changed, 8 insertions(+) diff --git a/object/types.proto b/object/types.proto index 5b02365..70cd948 100644 --- a/object/types.proto +++ b/object/types.proto @@ -208,6 +208,12 @@ message Header { uint32 header_length = 4 [ json_name = "headerLength" ]; // Chunk of a parent header. bytes header = 5 [ json_name = "header" ]; + // As the origin object is EC-splitted its identifier is known to all + // chunks as parent. But parent itself can be a part of Split (does not relate to EC-split). + // In this case parent_split_id should be set. + bytes parent_split_id = 6 [ json_name = "parentSplitID" ]; + // Parent's index in Split. + uint32 parent_split_index = 7 [ json_name = "parentSplitIndex" ]; } // Erasure code chunk information. EC ec = 12 [ json_name = "ec" ]; diff --git a/proto-docs/object.md b/proto-docs/object.md index 9c51c98..9e0e271 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -1064,6 +1064,8 @@ All objects belonging to a single EC group have the same `parent` field. | total | [uint32](#uint32) | | Total number of chunks in this split. | | header_length | [uint32](#uint32) | | Total length of a parent header. Used to trim padding zeroes. | | header | [bytes](#bytes) | | Chunk of a parent header. | +| parent_split_id | [bytes](#bytes) | | As the origin object is EC-splitted its identifier is known to all chunks as parent. But parent itself can be a part of Split (does not relate to EC-split). In this case parent_split_id should be set. | +| parent_split_index | [uint32](#uint32) | | Parent's index in Split. | From fd316479e2bc16c1582b8059c8eb778738d4d8a0 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Thu, 16 May 2024 11:38:58 +0300 Subject: [PATCH 26/59] [#51] object: Introduce `parentSplitParentID` field in `EC` * Replace `parentSplitIndex` by `parentSplitParentID` as the first one is inappropriate; * Regenerate docs. Signed-off-by: Airat Arifullin --- object/types.proto | 6 ++++-- proto-docs/object.md | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/object/types.proto b/object/types.proto index 70cd948..7591be7 100644 --- a/object/types.proto +++ b/object/types.proto @@ -212,8 +212,10 @@ message Header { // chunks as parent. But parent itself can be a part of Split (does not relate to EC-split). // In this case parent_split_id should be set. bytes parent_split_id = 6 [ json_name = "parentSplitID" ]; - // Parent's index in Split. - uint32 parent_split_index = 7 [ json_name = "parentSplitIndex" ]; + // EC-parent's parent ID. parent_split_parent_id is set if EC-parent, itself, is a part of Split and + // if an object ID of its parent is presented. The field allows to determine how EC-chunk is placed + // in Split hierarchy. + neo.fs.v2.refs.ObjectID parent_split_parent_id = 7 [ json_name = "parentSplitParentID" ]; } // Erasure code chunk information. EC ec = 12 [ json_name = "ec" ]; diff --git a/proto-docs/object.md b/proto-docs/object.md index 9e0e271..07e3fd0 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -1065,7 +1065,7 @@ All objects belonging to a single EC group have the same `parent` field. | header_length | [uint32](#uint32) | | Total length of a parent header. Used to trim padding zeroes. | | header | [bytes](#bytes) | | Chunk of a parent header. | | parent_split_id | [bytes](#bytes) | | As the origin object is EC-splitted its identifier is known to all chunks as parent. But parent itself can be a part of Split (does not relate to EC-split). In this case parent_split_id should be set. | -| parent_split_index | [uint32](#uint32) | | Parent's index in Split. | +| parent_split_parent_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | EC-parent's parent ID. parent_split_parent_id is set if EC-parent, itself, is a part of Split and if an object ID of its parent is presented.The field allows to determine how EC-chunk is placed in Split hierarchy. | From e199ad2914da26d76ad8966b439b2ff984bcbf99 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 28 May 2024 15:51:02 +0300 Subject: [PATCH 27/59] [#53] proto-docs: Regenerate docs Also, remove obsolete ones. Signed-off-by: Evgenii Stratonikov --- proto-docs/audit.md | 74 ---------------------- proto-docs/bootstrap.md | 89 -------------------------- proto-docs/object.md | 2 +- proto-docs/service.md | 125 ------------------------------------- proto-docs/storagegroup.md | 71 --------------------- 5 files changed, 1 insertion(+), 360 deletions(-) delete mode 100644 proto-docs/audit.md delete mode 100644 proto-docs/bootstrap.md delete mode 100644 proto-docs/service.md delete mode 100644 proto-docs/storagegroup.md diff --git a/proto-docs/audit.md b/proto-docs/audit.md deleted file mode 100644 index 99bcfc8..0000000 --- a/proto-docs/audit.md +++ /dev/null @@ -1,74 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [audit/types.proto](#audit/types.proto) - - - Messages - - [DataAuditResult](#neo.fs.v2.audit.DataAuditResult) - - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## audit/types.proto - - - - - - - -### Message DataAuditResult -DataAuditResult keeps record of conducted Data Audits. The detailed report is -generated separately. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Data Audit Result format version. Effectively, the version of API library used to report DataAuditResult structure. | -| audit_epoch | [fixed64](#fixed64) | | Epoch number when the Data Audit was conducted | -| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Container under audit | -| public_key | [bytes](#bytes) | | Public key of the auditing InnerRing node in a binary format | -| complete | [bool](#bool) | | Shows if Data Audit process was complete in time or if it was cancelled | -| requests | [uint32](#uint32) | | Number of request done at PoR stage | -| retries | [uint32](#uint32) | | Number of retries done at PoR stage | -| pass_sg | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of Storage Groups that passed audit PoR stage | -| fail_sg | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of Storage Groups that failed audit PoR stage | -| hit | [uint32](#uint32) | | Number of sampled objects under the audit placed in an optimal way according to the containers placement policy when checking PoP | -| miss | [uint32](#uint32) | | Number of sampled objects under the audit placed in suboptimal way according to the containers placement policy, but still at a satisfactory level when checking PoP | -| fail | [uint32](#uint32) | | Number of sampled objects under the audit stored inconsistently with the placement policy or not found at all when checking PoP | -| pass_nodes | [bytes](#bytes) | repeated | List of storage node public keys that passed at least one PDP | -| fail_nodes | [bytes](#bytes) | repeated | List of storage node public keys that failed at least one PDP | - - - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ Type | Java Type | Python Type | -| ----------- | ----- | -------- | --------- | ----------- | -| 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 | -| 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 | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | -| sfixed32 | Always four bytes. | int32 | int | int | -| sfixed64 | Always eight bytes. | int64 | long | int/long | -| 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/bootstrap.md b/proto-docs/bootstrap.md deleted file mode 100644 index ad08a7d..0000000 --- a/proto-docs/bootstrap.md +++ /dev/null @@ -1,89 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [bootstrap/types.proto](#bootstrap/types.proto) - - - Messages - - [NodeInfo](#bootstrap.NodeInfo) - - [NodeInfo.Attribute](#bootstrap.NodeInfo.Attribute) - - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## bootstrap/types.proto - - - - - - - -### Message NodeInfo -Groups the information about the NeoFS node. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| Address | [string](#string) | | Carries network address of the NeoFS node. | -| PublicKey | [bytes](#bytes) | | Carries public key of the NeoFS node in a binary format. | -| Attributes | [NodeInfo.Attribute](#bootstrap.NodeInfo.Attribute) | repeated | Carries list of the NeoFS node attributes in a string key-value format. | -| state | [NodeInfo.State](#bootstrap.NodeInfo.State) | | Carries state of the NeoFS node. | - - - - -### Message NodeInfo.Attribute -Groups attributes of the NeoFS node. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| Key | [string](#string) | | Carries string key to the node attribute. | -| Value | [string](#string) | | Carries string value of the node attribute. | - - - - - - -### NodeInfo.State -Represents the enumeration of various states of the NeoFS node. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| Unknown | 0 | Undefined state. | -| Online | 1 | Active state on the network. | -| Offline | 2 | Network unavailable state. | - - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ Type | Java Type | Python Type | -| ----------- | ----- | -------- | --------- | ----------- | -| 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 | -| 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 | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | -| sfixed32 | Always four bytes. | int32 | int | int | -| sfixed64 | Always eight bytes. | int64 | long | int/long | -| 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 07e3fd0..7f53a68 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -1065,7 +1065,7 @@ All objects belonging to a single EC group have the same `parent` field. | header_length | [uint32](#uint32) | | Total length of a parent header. Used to trim padding zeroes. | | header | [bytes](#bytes) | | Chunk of a parent header. | | parent_split_id | [bytes](#bytes) | | As the origin object is EC-splitted its identifier is known to all chunks as parent. But parent itself can be a part of Split (does not relate to EC-split). In this case parent_split_id should be set. | -| parent_split_parent_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | EC-parent's parent ID. parent_split_parent_id is set if EC-parent, itself, is a part of Split and if an object ID of its parent is presented.The field allows to determine how EC-chunk is placed in Split hierarchy. | +| parent_split_parent_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | EC-parent's parent ID. parent_split_parent_id is set if EC-parent, itself, is a part of Split and if an object ID of its parent is presented. The field allows to determine how EC-chunk is placed in Split hierarchy. | diff --git a/proto-docs/service.md b/proto-docs/service.md deleted file mode 100644 index e37ad9f..0000000 --- a/proto-docs/service.md +++ /dev/null @@ -1,125 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [service/types.proto](#service/types.proto) - - - Messages - - [RequestMetaHeader](#neo.fs.v2.service.RequestMetaHeader) - - [RequestVerificationHeader](#neo.fs.v2.service.RequestVerificationHeader) - - [ResponseMetaHeader](#neo.fs.v2.service.ResponseMetaHeader) - - [ResponseVerificationHeader](#neo.fs.v2.service.ResponseVerificationHeader) - - [XHeader](#neo.fs.v2.service.XHeader) - - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## service/types.proto - - - - - - - -### Message RequestMetaHeader -Information about the request - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Client API version. | -| epoch | [uint64](#uint64) | | Client local epoch number. Set to 0 if unknown. | -| ttl | [uint32](#uint32) | | Maximum number of nodes in the request route. | -| x_headers | [XHeader](#neo.fs.v2.service.XHeader) | repeated | Request X-Headers. | -| session_token | [neo.fs.v2.session.SessionToken](#neo.fs.v2.session.SessionToken) | | Token is a token of the session within which the request is sent | -| bearer_token | [neo.fs.v2.acl.BearerToken](#neo.fs.v2.acl.BearerToken) | | Bearer is a Bearer token of the request | -| origin | [RequestMetaHeader](#neo.fs.v2.service.RequestMetaHeader) | | RequestMetaHeader of the origin request. | - - - - -### Message RequestVerificationHeader -Verification info for request signed by all intermediate nodes - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Request Body signature. Should be generated once by request initiator. | -| meta_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Request Meta signature is added and signed by any intermediate node | -| origin_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Sign previous hops | -| origin | [RequestVerificationHeader](#neo.fs.v2.service.RequestVerificationHeader) | | Chain of previous hops signatures | - - - - -### Message ResponseMetaHeader -Information about the response - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Server API version. | -| epoch | [uint64](#uint64) | | Server local epoch number. | -| ttl | [uint32](#uint32) | | Maximum number of nodes in the response route. | -| x_headers | [XHeader](#neo.fs.v2.service.XHeader) | repeated | Response X-Headers. | -| origin | [ResponseMetaHeader](#neo.fs.v2.service.ResponseMetaHeader) | | Carries response meta header of the origin response. | - - - - -### Message ResponseVerificationHeader -Verification info for response signed by all intermediate nodes - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Response Body signature. Should be generated once by answering node. | -| meta_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Response Meta signature is added and signed by any intermediate node | -| origin_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Sign previous hops | -| origin | [ResponseVerificationHeader](#neo.fs.v2.service.ResponseVerificationHeader) | | Chain of previous hops signatures | - - - - -### Message XHeader -Extended headers for Request/Response - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | Key of the X-Header. | -| value | [string](#string) | | Value of the X-Header. | - - - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ Type | Java Type | Python Type | -| ----------- | ----- | -------- | --------- | ----------- | -| 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 | -| 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 | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | -| sfixed32 | Always four bytes. | int32 | int | int | -| sfixed64 | Always eight bytes. | int64 | long | int/long | -| 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/storagegroup.md b/proto-docs/storagegroup.md deleted file mode 100644 index da765f1..0000000 --- a/proto-docs/storagegroup.md +++ /dev/null @@ -1,71 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [storagegroup/types.proto](#storagegroup/types.proto) - - - Messages - - [StorageGroup](#neo.fs.v2.storagegroup.StorageGroup) - - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## storagegroup/types.proto - - - - - - - -### Message StorageGroup -StorageGroup keeps verification information for Data Audit sessions. Objects -that require paid storage guarantees are gathered in `StorageGroups` with -additional information used for the proof of storage. `StorageGroup` only -contains objects from the same container. - -Being an object payload, StorageGroup may have expiration Epoch set with -`__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) well-known attribute. When expired, StorageGroup -will be ignored by InnerRing nodes during Data Audit cycles and will be -deleted by Storage Nodes. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| validation_data_size | [uint64](#uint64) | | Total size of the payloads of objects in the storage group | -| validation_hash | [neo.fs.v2.refs.Checksum](#neo.fs.v2.refs.Checksum) | | Homomorphic hash from the concatenation of the payloads of the storage group members. The order of concatenation is the same as the order of the members in the `members` field. | -| expiration_epoch | [uint64](#uint64) | | DEPRECATED. Last NeoFS epoch number of the storage group lifetime | -| members | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | Strictly ordered list of storage group member objects. Members MUST be unique | - - - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ Type | Java Type | Python Type | -| ----------- | ----- | -------- | --------- | ----------- | -| 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 | -| 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 | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | -| sfixed32 | Always four bytes. | int32 | int | int | -| sfixed64 | Always eight bytes. | int64 | long | int/long | -| 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 | - From 393c95899fd91179b2e2d2f93fbc7f8d918847b6 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Mon, 27 May 2024 17:44:56 +0300 Subject: [PATCH 28/59] [#54] apemanager: Move APE specific types to separate package * Introduce `ape` package and move `apemanager/types.proto` to `ape/`; * Fix `apemanager/service.proto`. Signed-off-by: Airat Arifullin --- {apemanager => ape}/types.proto | 4 +- apemanager/service.proto | 12 ++--- proto-docs/ape.md | 88 +++++++++++++++++++++++++++++++++ proto-docs/apemanager.md | 69 ++------------------------ 4 files changed, 101 insertions(+), 72 deletions(-) rename {apemanager => ape}/types.proto (89%) create mode 100644 proto-docs/ape.md diff --git a/apemanager/types.proto b/ape/types.proto similarity index 89% rename from apemanager/types.proto rename to ape/types.proto index c064627..3a97e60 100644 --- a/apemanager/types.proto +++ b/ape/types.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package frostfs.v2.apemanager; +package frostfs.v2.ape; -option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc;apemanager"; +option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc;ape"; // TargetType is a type target to which a rule chain is defined. enum TargetType { diff --git a/apemanager/service.proto b/apemanager/service.proto index 6b9da60..7ff23a7 100644 --- a/apemanager/service.proto +++ b/apemanager/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package frostfs.v2.apemanager; -import "apemanager/types.proto"; +import "ape/types.proto"; import "session/types.proto"; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc;apemanager"; @@ -52,10 +52,10 @@ service APEManagerService { message AddChainRequest { message Body { // A target for which a rule chain is added. - ChainTarget target = 1; + frostfs.v2.ape.ChainTarget target = 1; // The chain to set for the target. - Chain chain = 2; + frostfs.v2.ape.Chain chain = 2; } // The request's body. @@ -95,7 +95,7 @@ message AddChainResponse { message RemoveChainRequest { message Body { // Target for which a rule chain is removed. - ChainTarget target = 1; + frostfs.v2.ape.ChainTarget target = 1; // Chain ID assigned for the rule chain. bytes chain_id = 2; @@ -135,7 +135,7 @@ message RemoveChainResponse { message ListChainsRequest { message Body { // Target for which rule chains are listed. - ChainTarget target = 1; + frostfs.v2.ape.ChainTarget target = 1; } // The request's body. @@ -154,7 +154,7 @@ message ListChainsRequest { message ListChainsResponse { message Body { // The list of chains defined for the reqeusted target. - repeated Chain chains = 1; + repeated frostfs.v2.ape.Chain chains = 1; } // The response's body. diff --git a/proto-docs/ape.md b/proto-docs/ape.md new file mode 100644 index 0000000..c4d7157 --- /dev/null +++ b/proto-docs/ape.md @@ -0,0 +1,88 @@ +# Protocol Documentation + + +## Table of Contents + +- [ape/types.proto](#ape/types.proto) + + - Messages + - [Chain](#frostfs.v2.ape.Chain) + - [ChainTarget](#frostfs.v2.ape.ChainTarget) + + +- [Scalar Value Types](#scalar-value-types) + + + + +

Top

+ +## ape/types.proto + + + + + + + +### Message Chain +Chain is a chain of rules defined for a specific target. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| raw | [bytes](#bytes) | | Raw representation of a serizalized rule chain. | + + + + +### Message ChainTarget +ChainTarget is an object to which a rule chain is defined. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [TargetType](#frostfs.v2.ape.TargetType) | | | +| name | [string](#string) | | | + + + + + + +### TargetType +TargetType is a type target to which a rule chain is defined. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNDEFINED | 0 | | +| NAMESPACE | 1 | | +| CONTAINER | 2 | | +| USER | 3 | | +| GROUP | 4 | | + + + + + + +## Scalar Value Types + +| .proto Type | Notes | C++ Type | Java Type | Python Type | +| ----------- | ----- | -------- | --------- | ----------- | +| 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 | +| 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 | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | +| sfixed32 | Always four bytes. | int32 | int | int | +| sfixed64 | Always eight bytes. | int64 | long | int/long | +| 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 303f7f1..5d0e2e6 100644 --- a/proto-docs/apemanager.md +++ b/proto-docs/apemanager.md @@ -22,13 +22,6 @@ - [RemoveChainResponse.Body](#frostfs.v2.apemanager.RemoveChainResponse.Body) -- [apemanager/types.proto](#apemanager/types.proto) - - - Messages - - [Chain](#frostfs.v2.apemanager.Chain) - - [ChainTarget](#frostfs.v2.apemanager.ChainTarget) - - - [Scalar Value Types](#scalar-value-types) @@ -128,8 +121,8 @@ Statuses: | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| target | [ChainTarget](#frostfs.v2.apemanager.ChainTarget) | | A target for which a rule chain is added. | -| chain | [Chain](#frostfs.v2.apemanager.Chain) | | The chain to set for the target. | +| target | [frostfs.v2.ape.ChainTarget](#frostfs.v2.ape.ChainTarget) | | A target for which a rule chain is added. | +| chain | [frostfs.v2.ape.Chain](#frostfs.v2.ape.Chain) | | The chain to set for the target. | @@ -177,7 +170,7 @@ Statuses: | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| target | [ChainTarget](#frostfs.v2.apemanager.ChainTarget) | | Target for which rule chains are listed. | +| target | [frostfs.v2.ape.ChainTarget](#frostfs.v2.ape.ChainTarget) | | Target for which rule chains are listed. | @@ -201,7 +194,7 @@ Statuses: | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| chains | [Chain](#frostfs.v2.apemanager.Chain) | repeated | The list of chains defined for the reqeusted target. | +| chains | [frostfs.v2.ape.Chain](#frostfs.v2.ape.Chain) | repeated | The list of chains defined for the reqeusted target. | @@ -225,7 +218,7 @@ Statuses: | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| target | [ChainTarget](#frostfs.v2.apemanager.ChainTarget) | | Target for which a rule chain is removed. | +| target | [frostfs.v2.ape.ChainTarget](#frostfs.v2.ape.ChainTarget) | | Target for which a rule chain is removed. | | chain_id | [bytes](#bytes) | | Chain ID assigned for the rule chain. | @@ -255,58 +248,6 @@ operation could not be performed is an error returning to a client. - -

Top

- -## apemanager/types.proto - - - - - - - -### Message Chain -Chain is a chain of rules defined for a specific target. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| raw | [bytes](#bytes) | | Raw representation of a serizalized rule chain. | - - - - -### Message ChainTarget -ChainTarget is an object to which a rule chain is defined. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| type | [TargetType](#frostfs.v2.apemanager.TargetType) | | | -| name | [string](#string) | | | - - - - - - -### TargetType -TargetType is a type target to which a rule chain is defined. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| UNDEFINED | 0 | | -| NAMESPACE | 1 | | -| CONTAINER | 2 | | -| USER | 3 | | -| GROUP | 4 | | - - - - - - ## Scalar Value Types | .proto Type | Notes | C++ Type | Java Type | Python Type | From 4c2193443eaa10c7c442feb365a924aaf5f7b564 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Tue, 28 May 2024 11:52:42 +0300 Subject: [PATCH 29/59] [#54] acl: Add APE chains to Bearer token Signed-off-by: Airat Arifullin --- acl/types.proto | 20 ++++++++++++++++++++ proto-docs/acl.md | 23 ++++++++++++++++++++++- proto-docs/ape.md | 4 ++-- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/acl/types.proto b/acl/types.proto index e9ea987..ec15021 100644 --- a/acl/types.proto +++ b/acl/types.proto @@ -6,6 +6,7 @@ option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc;ac option csharp_namespace = "Neo.FileStorage.API.Acl"; import "refs/types.proto"; +import "ape/types.proto"; // Target role of the access control rule in access control list. enum Role { @@ -194,6 +195,8 @@ message BearerToken { // container. If it contains `container_id` field, bearer token is only // valid for this specific container. Otherwise, any container of the same // owner is allowed. + // + // Deprecated: eACL tables are no longer relevant - `APEOverrides` should be used instead. EACLTable eacl_table = 1 [ json_name = "eaclTable" ]; // `OwnerID` defines to whom the token was issued. It must match the request @@ -218,6 +221,23 @@ message BearerToken { // AllowImpersonate flag to consider token signer as request owner. // If this field is true extended ACL table in token body isn't processed. bool allow_impersonate = 4 [ json_name = "allowImpersonate" ]; + + // APEOverride is the list of APE chains defined for a target. + // These chains are meant to serve as overrides to the already defined (or even undefined) + // APE chains for the target (see contract `Policy`). + // + // The server-side processing of the bearer token with set APE overrides must verify if a client is permitted + // to override chains for the target, preventing unauthorized access through the APE mechanism. + message APEOverride { + // Target for which chains are applied. + frostfs.v2.ape.ChainTarget target = 1 [ json_name = "target" ]; + + // The list of APE chains. + repeated frostfs.v2.ape.Chain chains = 2 [ json_name = "chains" ]; + } + + // APE override for the target. + APEOverride ape_override = 5 [ json_name = "apeOverride" ]; } // Bearer Token body Body body = 1 [ json_name = "body" ]; diff --git a/proto-docs/acl.md b/proto-docs/acl.md index 91fd36b..19c1a8d 100644 --- a/proto-docs/acl.md +++ b/proto-docs/acl.md @@ -8,6 +8,7 @@ - Messages - [BearerToken](#neo.fs.v2.acl.BearerToken) - [BearerToken.Body](#neo.fs.v2.acl.BearerToken.Body) + - [BearerToken.Body.APEOverride](#neo.fs.v2.acl.BearerToken.Body.APEOverride) - [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime) - [EACLRecord](#neo.fs.v2.acl.EACLRecord) - [EACLRecord.Filter](#neo.fs.v2.acl.EACLRecord.Filter) @@ -57,10 +58,30 @@ container owner with additional information preventing token abuse. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| eacl_table | [EACLTable](#neo.fs.v2.acl.EACLTable) | | Table of Extended ACL rules to use instead of the ones attached to the container. If it contains `container_id` field, bearer token is only valid for this specific container. Otherwise, any container of the same owner is allowed. | +| eacl_table | [EACLTable](#neo.fs.v2.acl.EACLTable) | | Table of Extended ACL rules to use instead of the ones attached to the container. If it contains `container_id` field, bearer token is only valid for this specific container. Otherwise, any container of the same owner is allowed. + +Deprecated: eACL tables are no longer relevant - `APEOverrides` should be used instead. | | owner_id | [neo.fs.v2.refs.OwnerID](#neo.fs.v2.refs.OwnerID) | | `OwnerID` defines to whom the token was issued. It must match the request originator's `OwnerID`. If empty, any token bearer will be accepted. | | lifetime | [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime) | | Token expiration and valid time period parameters | | allow_impersonate | [bool](#bool) | | AllowImpersonate flag to consider token signer as request owner. If this field is true extended ACL table in token body isn't processed. | +| ape_override | [BearerToken.Body.APEOverride](#neo.fs.v2.acl.BearerToken.Body.APEOverride) | | APE override for the target. | + + + + +### Message BearerToken.Body.APEOverride +APEOverride is the list of APE chains defined for a target. +These chains are meant to serve as overrides to the already defined (or even undefined) +APE chains for the target (see contract `Policy`). + +The server-side processing of the bearer token with set APE overrides must verify if a client is permitted +to override chains for the target, preventing unauthorized access through the APE mechanism. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| target | [frostfs.v2.ape.ChainTarget](#frostfs.v2.ape.ChainTarget) | | Target for which chains are applied. | +| chains | [frostfs.v2.ape.Chain](#frostfs.v2.ape.Chain) | repeated | The list of APE chains. | diff --git a/proto-docs/ape.md b/proto-docs/ape.md index c4d7157..b101c83 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 | From c7473ed98cf9034d9e719f412bac4e136326ff03 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Thu, 23 May 2024 22:40:45 +0300 Subject: [PATCH 30/59] [#52] object: Add `parent_attributes` field to EC-header Signed-off-by: Airat Arifullin --- object/types.proto | 2 ++ proto-docs/object.md | 1 + 2 files changed, 3 insertions(+) diff --git a/object/types.proto b/object/types.proto index 7591be7..2e2a343 100644 --- a/object/types.proto +++ b/object/types.proto @@ -216,6 +216,8 @@ message Header { // if an object ID of its parent is presented. The field allows to determine how EC-chunk is placed // in Split hierarchy. neo.fs.v2.refs.ObjectID parent_split_parent_id = 7 [ json_name = "parentSplitParentID" ]; + // EC parent's attributes. + repeated Attribute parent_attributes = 8 [ json_name = "parentAttributes" ]; } // Erasure code chunk information. EC ec = 12 [ json_name = "ec" ]; diff --git a/proto-docs/object.md b/proto-docs/object.md index 7f53a68..c141a60 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -1066,6 +1066,7 @@ All objects belonging to a single EC group have the same `parent` field. | header | [bytes](#bytes) | | Chunk of a parent header. | | parent_split_id | [bytes](#bytes) | | As the origin object is EC-splitted its identifier is known to all chunks as parent. But parent itself can be a part of Split (does not relate to EC-split). In this case parent_split_id should be set. | | parent_split_parent_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | EC-parent's parent ID. parent_split_parent_id is set if EC-parent, itself, is a part of Split and if an object ID of its parent is presented. The field allows to determine how EC-chunk is placed in Split hierarchy. | +| parent_attributes | [Header.Attribute](#neo.fs.v2.object.Header.Attribute) | repeated | EC parent's attributes. | From 0916cb5398dc06b0f229bf36170582e7d7038438 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Mon, 13 May 2024 16:48:05 +0300 Subject: [PATCH 31/59] [#49] status: Introduce new common status code * Introduce `INVALID_ARGUMENT` for common status section; * Regenerate docs. Signed-off-by: Airat Arifullin --- proto-docs/status.md | 1 + status/types.proto | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/proto-docs/status.md b/proto-docs/status.md index c1401bd..6444072 100644 --- a/proto-docs/status.md +++ b/proto-docs/status.md @@ -101,6 +101,7 @@ Section of failed statuses independent of the operation. | 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). | | 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. | diff --git a/status/types.proto b/status/types.proto index 2205abc..8d2d5c0 100644 --- a/status/types.proto +++ b/status/types.proto @@ -104,6 +104,10 @@ enum CommonFail { // [**1027**] Node is under maintenance. NODE_UNDER_MAINTENANCE = 3; + + // [**1028**] Invalid argument error. If the server fails on validation of a + // request parameter as the client sent it incorrectly, then this code should be used. + INVALID_ARGUMENT = 4; } // Section of statuses for object-related operations. From 4a4a7612f665ee9b9cc2eaf312e17b8d64474ed8 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 25 Jul 2024 18:19:02 +0300 Subject: [PATCH 32/59] [#57] *: Format with clang-format Signed-off-by: Evgenii Stratonikov --- acl/types.proto | 12 +++++++----- container/service.proto | 12 ++++++------ object/service.proto | 18 +++++++++--------- object/types.proto | 14 ++++++++------ status/types.proto | 3 ++- 5 files changed, 32 insertions(+), 27 deletions(-) diff --git a/acl/types.proto b/acl/types.proto index ec15021..b36df14 100644 --- a/acl/types.proto +++ b/acl/types.proto @@ -196,7 +196,8 @@ message BearerToken { // valid for this specific container. Otherwise, any container of the same // owner is allowed. // - // Deprecated: eACL tables are no longer relevant - `APEOverrides` should be used instead. + // Deprecated: eACL tables are no longer relevant - `APEOverrides` should be + // used instead. EACLTable eacl_table = 1 [ json_name = "eaclTable" ]; // `OwnerID` defines to whom the token was issued. It must match the request @@ -223,11 +224,12 @@ message BearerToken { bool allow_impersonate = 4 [ json_name = "allowImpersonate" ]; // APEOverride is the list of APE chains defined for a target. - // These chains are meant to serve as overrides to the already defined (or even undefined) - // APE chains for the target (see contract `Policy`). + // 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. message APEOverride { // Target for which chains are applied. frostfs.v2.ape.ChainTarget target = 1 [ json_name = "target" ]; diff --git a/container/service.proto b/container/service.proto index 5695b66..f572ba5 100644 --- a/container/service.proto +++ b/container/service.proto @@ -25,7 +25,7 @@ service ContainerService { // request to save the container has been sent to the sidechain; // - Common failures (SECTION_FAILURE_COMMON); // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - // container create access denied. + // container create access denied. rpc Put(PutRequest) returns (PutResponse); // `Delete` invokes `Container` smart contract's `Delete` method and returns @@ -38,7 +38,7 @@ service ContainerService { // request to remove the container has been sent to the sidechain; // - Common failures (SECTION_FAILURE_COMMON); // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - // container delete access denied. + // container delete access denied. rpc Delete(DeleteRequest) returns (DeleteResponse); // Returns container structure from `Container` smart contract storage. @@ -50,7 +50,7 @@ service ContainerService { // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ // requested container not found; // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - // access to container is denied. + // access to container is denied. rpc Get(GetRequest) returns (GetResponse); // Returns all owner's containers from 'Container` smart contract' storage. @@ -60,7 +60,7 @@ service ContainerService { // container list has been successfully read; // - Common failures (SECTION_FAILURE_COMMON); // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - // container list access denied. + // container list access denied. rpc List(ListRequest) returns (ListResponse); // Invokes 'SetEACL' method of 'Container` smart contract and returns response @@ -72,7 +72,7 @@ service ContainerService { // 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. + // set container eACL access denied. rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse); // Returns Extended ACL table and signature from `Container` smart contract @@ -87,7 +87,7 @@ service ContainerService { // - **EACL_NOT_FOUND** (3073, SECTION_CONTAINER): \ // eACL table not found; // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - // access to container eACL is denied. + // access to container eACL is denied. rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse); // Announces the space values used by the container for P2P synchronization. diff --git a/object/service.proto b/object/service.proto index 1168e4e..a92c42a 100644 --- a/object/service.proto +++ b/object/service.proto @@ -46,7 +46,7 @@ service ObjectService { // - **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. rpc Get(GetRequest) returns (stream GetResponse); @@ -115,7 +115,7 @@ service ObjectService { // - **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. rpc Delete(DeleteRequest) returns (DeleteResponse); @@ -145,7 +145,7 @@ service ObjectService { // - **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. rpc Head(HeadRequest) returns (HeadResponse); @@ -171,7 +171,7 @@ service ObjectService { // - **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. rpc Search(SearchRequest) returns (stream SearchResponse); @@ -208,7 +208,7 @@ service ObjectService { // - **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. rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse); @@ -243,7 +243,7 @@ service ObjectService { // - **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. rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); @@ -275,7 +275,7 @@ service ObjectService { // - **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 @@ -584,8 +584,8 @@ message SearchRequest { // * $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: diff --git a/object/types.proto b/object/types.proto index 2e2a343..b25e792 100644 --- a/object/types.proto +++ b/object/types.proto @@ -209,13 +209,15 @@ message Header { // Chunk of a parent header. bytes header = 5 [ json_name = "header" ]; // As the origin object is EC-splitted its identifier is known to all - // chunks as parent. But parent itself can be a part of Split (does not relate to EC-split). - // In this case parent_split_id should be set. + // chunks as parent. But parent itself can be a part of Split (does not + // relate to EC-split). In this case parent_split_id should be set. bytes parent_split_id = 6 [ json_name = "parentSplitID" ]; - // EC-parent's parent ID. parent_split_parent_id is set if EC-parent, itself, is a part of Split and - // if an object ID of its parent is presented. The field allows to determine how EC-chunk is placed - // in Split hierarchy. - neo.fs.v2.refs.ObjectID parent_split_parent_id = 7 [ json_name = "parentSplitParentID" ]; + // EC-parent's parent ID. parent_split_parent_id is set if EC-parent, + // itself, is a part of Split and if an object ID of its parent is + // presented. The field allows to determine how EC-chunk is placed in Split + // hierarchy. + neo.fs.v2.refs.ObjectID parent_split_parent_id = 7 + [ json_name = "parentSplitParentID" ]; // EC parent's attributes. repeated Attribute parent_attributes = 8 [ json_name = "parentAttributes" ]; } diff --git a/status/types.proto b/status/types.proto index 8d2d5c0..49c784f 100644 --- a/status/types.proto +++ b/status/types.proto @@ -106,7 +106,8 @@ enum CommonFail { NODE_UNDER_MAINTENANCE = 3; // [**1028**] Invalid argument error. If the server fails on validation of a - // request parameter as the client sent it incorrectly, then this code should be used. + // request parameter as the client sent it incorrectly, then this code should + // be used. INVALID_ARGUMENT = 4; } From 8dd63c451c6543d1a4d049c13a0db30e40c9cd60 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 25 Jul 2024 18:19:34 +0300 Subject: [PATCH 33/59] [#57] container: Remove deprecated methods Signed-off-by: Evgenii Stratonikov --- container/service.proto | 119 ---------------------------------------- 1 file changed, 119 deletions(-) diff --git a/container/service.proto b/container/service.proto index f572ba5..66542aa 100644 --- a/container/service.proto +++ b/container/service.proto @@ -63,18 +63,6 @@ service ContainerService { // container list access denied. rpc List(ListRequest) returns (ListResponse); - // Invokes 'SetEACL' method of 'Container` smart contract and returns response - // immediately. After one more block in sidechain, changes in an Extended ACL - // are added into smart contract storage. - // - // Statuses: - // - **OK** (0, SECTION_SUCCESS): \ - // request to save container eACL has been sent to the sidechain; - // - Common failures (SECTION_FAILURE_COMMON); - // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ - // set container eACL access denied. - rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse); - // Returns Extended ACL table and signature from `Container` smart contract // storage. // @@ -89,15 +77,6 @@ service ContainerService { // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ // access to container eACL is denied. rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse); - - // Announces the space values used by the container for P2P synchronization. - // - // Statuses: - // - **OK** (0, SECTION_SUCCESS): \ - // estimation of used space has been successfully announced; - // - Common failures (SECTION_FAILURE_COMMON). - rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) - returns (AnnounceUsedSpaceResponse); } // New NeoFS Container creation request @@ -283,50 +262,6 @@ message ListResponse { neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; } -// Set Extended ACL -message SetExtendedACLRequest { - // Set Extended ACL request body does not have separate `ContainerID` - // reference. It will be taken from `EACLTable.container_id` field. - message Body { - // Extended ACL table to set for the container - neo.fs.v2.acl.EACLTable eacl = 1; - - // Signature of stable-marshalled Extended ACL table according to RFC-6979. - neo.fs.v2.refs.SignatureRFC6979 signature = 2; - } - // Body of set extended acl request message. - Body body = 1; - - // Carries request meta information. Header data is used only to regulate - // message transport and does not affect request execution. - neo.fs.v2.session.RequestMetaHeader meta_header = 2; - - // Carries request verification information. This header is used to - // authenticate the nodes of the message route and check the correctness of - // transmission. - neo.fs.v2.session.RequestVerificationHeader verify_header = 3; -} - -// Set Extended ACL -message SetExtendedACLResponse { - // `SetExtendedACLResponse` has an empty body because the operation is - // asynchronous and the update should be reflected in `Container` smart - // contract's storage after next block is issued in sidechain. - message Body {} - - // Body of set extended acl response message. - Body body = 1; - - // Carries response meta information. Header data is used only to regulate - // message transport and does not affect request execution. - neo.fs.v2.session.ResponseMetaHeader meta_header = 2; - - // Carries response verification information. This header is used to - // authenticate the nodes of the message route and check the correctness of - // transmission. - neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; -} - // Get Extended ACL message GetExtendedACLRequest { // Get Extended ACL request body @@ -375,57 +310,3 @@ message GetExtendedACLResponse { // transmission. neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; } - -// Announce container used space -message AnnounceUsedSpaceRequest { - // Container used space announcement body. - message Body { - // Announcement contains used space information for a single container. - message Announcement { - // Epoch number for which the container size estimation was produced. - uint64 epoch = 1; - - // Identifier of the container. - neo.fs.v2.refs.ContainerID container_id = 2; - - // Used space is a sum of object payload sizes of a specified - // container, stored in the node. It must not include inhumed objects. - uint64 used_space = 3; - } - - // List of announcements. If nodes share several containers, - // announcements are transferred in a batch. - repeated Announcement announcements = 1; - } - - // Body of announce used space request message. - Body body = 1; - - // Carries request meta information. Header data is used only to regulate - // message transport and does not affect request execution. - neo.fs.v2.session.RequestMetaHeader meta_header = 2; - - // Carries request verification information. This header is used to - // authenticate the nodes of the message route and check the correctness of - // transmission. - neo.fs.v2.session.RequestVerificationHeader verify_header = 3; -} - -// Announce container used space -message AnnounceUsedSpaceResponse { - // `AnnounceUsedSpaceResponse` has an empty body because announcements are - // one way communication. - message Body {} - - // Body of announce used space response message. - Body body = 1; - - // Carries response meta information. Header data is used only to regulate - // message transport and does not affect request execution. - neo.fs.v2.session.ResponseMetaHeader meta_header = 2; - - // Carries response verification information. This header is used to - // authenticate the nodes of the message route and check the correctness of - // transmission. - neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; -} From 2efdc8fedbdda636bdfc63ae4f7a54182ee7b5c6 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Tue, 23 Jul 2024 14:12:49 +0300 Subject: [PATCH 34/59] [#56] object: Introduce `Patch` method * Introduce rpc `Patch` and corresponding types; * Generate docs. Signed-off-by: Airat Arifullin --- object/service.proto | 113 +++++++++++++++++++++++++++++++++++++++- proto-docs/object.md | 120 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 232 insertions(+), 1 deletion(-) diff --git a/object/service.proto b/object/service.proto index a92c42a..dc39c1c 100644 --- a/object/service.proto +++ b/object/service.proto @@ -283,6 +283,51 @@ service ObjectService { // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. rpc PutSingle(PutSingleRequest) returns (PutSingleResponse); + + // Patch the object. Request uses gRPC stream. First message must set + // the address of the object that is going to get patched. If the object's attributes + // are patched, then these attrubutes must be set only within the first stream message. + // + // If the patch request is performed by NOT the object's owner but if the actor has the permission + // to perform the patch, then `OwnerID` of the object is changed. In this case the object's owner + // loses the object's ownership after the patch request is successfully done. + // + // As objects are content-addressable the patching causes new object ID generation for the patched object. + // This object id is set witihn `PatchResponse`. But the object id may remain unchanged in such cases: + // 1. The chunk of the applying patch contains the same value as the object's payload within the same range; + // 2. The patch that reverts the changes applied by preceding patch; + // 3. The application of the same patches for the object a few times. + // + // Extended headers can change `Patch` behaviour: + // * [ __SYSTEM__NETMAP_EPOCH \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + // Will use the requsted version of Network Map for object placement + // calculation. + // + // Please refer to detailed `XHeader` description. + // + // Statuses: + // - **OK** (0, SECTION_SUCCESS): \ + // object has been successfully patched and saved in the container; + // - Common failures (SECTION_FAILURE_COMMON); + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // write access to the container is denied; + // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + // object not found in container; + // - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): \ + // the requested object has been marked as deleted. + // - **OUT_OF_RANGE** (2053, SECTION_OBJECT): \ + // the requested range is out of bounds; + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // object storage container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; + // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ + // (for trusted object preparation) session private key does not exist or + // has been deleted; + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // provided session token has expired. + rpc Patch(stream PatchRequest) returns (PatchResponse); } // GET object request @@ -816,4 +861,70 @@ message PutSingleResponse { // 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 +} + +// Object PATCH request +message PatchRequest { + // PATCH request body + message Body { + // The address of the object that is requested to get patched. + neo.fs.v2.refs.Address address = 1; + + // New attributes for the object. See `replace_attributes` flag usage to define how + // new attributes should be set. + repeated neo.fs.v2.object.Header.Attribute new_attributes = 2; + + // If this flag is set, then the object's attributes will be entirely replaced by `new_attributes` list. + // The empty `new_attributes` list with `replace_attributes = true` just resets attributes list for the object. + // + // Default `false` value for this flag means the attributes will be just merged. If the incoming `new_attributes` + // list contains already existing key, then it just replaces it while merging the lists. + bool replace_attributes = 3; + + // The patch for the object's payload. + message Patch { + // The range of the source object for which the payload is replaced by the patch's chunk. + // If the range's `length = 0`, then the patch's chunk is just appended to the original payload + // starting from the `offest` without any replace. + Range source_range = 1; + + // The chunk that is being appended to or that replaces the original payload on the given range. + bytes chunk = 2; + } + + // The patch that is applied for the object. + Patch patch = 4; + } + + // Body for patch request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + neo.fs.v2.session.RequestVerificationHeader verify_header = 3; +} + +// Object PATCH response +message PatchResponse { + // PATCH response body + message Body { + // The object ID of the saved patched object. + neo.fs.v2.refs.ObjectID object_id = 1; + } + + // Body for patch response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + neo.fs.v2.session.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; +} diff --git a/proto-docs/object.md b/proto-docs/object.md index c141a60..f353b3f 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -30,6 +30,11 @@ - [HeadResponse](#neo.fs.v2.object.HeadResponse) - [HeadResponse.Body](#neo.fs.v2.object.HeadResponse.Body) - [HeaderWithSignature](#neo.fs.v2.object.HeaderWithSignature) + - [PatchRequest](#neo.fs.v2.object.PatchRequest) + - [PatchRequest.Body](#neo.fs.v2.object.PatchRequest.Body) + - [PatchRequest.Body.Patch](#neo.fs.v2.object.PatchRequest.Body.Patch) + - [PatchResponse](#neo.fs.v2.object.PatchResponse) + - [PatchResponse.Body](#neo.fs.v2.object.PatchResponse.Body) - [PutRequest](#neo.fs.v2.object.PutRequest) - [PutRequest.Body](#neo.fs.v2.object.PutRequest.Body) - [PutRequest.Body.Init](#neo.fs.v2.object.PutRequest.Body.Init) @@ -88,6 +93,7 @@ rpc Search(SearchRequest) returns (stream SearchResponse); rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse); rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); rpc PutSingle(PutSingleRequest) returns (PutSingleResponse); +rpc Patch(stream PatchRequest) returns (PatchResponse); ``` @@ -395,6 +401,55 @@ been deleted; | Name | Input | Output | | ---- | ----- | ------ | | PutSingle | [PutSingleRequest](#neo.fs.v2.object.PutSingleRequest) | [PutSingleResponse](#neo.fs.v2.object.PutSingleResponse) | +#### Method Patch + +Patch the object. Request uses gRPC stream. First message must set +the address of the object that is going to get patched. If the object's attributes +are patched, then these attrubutes must be set only within the first stream message. + +If the patch request is performed by NOT the object's owner but if the actor has the permission +to perform the patch, then `OwnerID` of the object is changed. In this case the object's owner +loses the object's ownership after the patch request is successfully done. + +As objects are content-addressable the patching causes new object ID generation for the patched object. +This object id is set witihn `PatchResponse`. But the object id may remain unchanged in such cases: +1. The chunk of the applying patch contains the same value as the object's payload within the same range; +2. The patch that reverts the changes applied by preceding patch; +3. The application of the same patches for the object a few times. + +Extended headers can change `Patch` behaviour: +* [ __SYSTEM__NETMAP_EPOCH \ + (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + Will use the requsted version of Network Map for object placement + calculation. + +Please refer to detailed `XHeader` description. + +Statuses: +- **OK** (0, SECTION_SUCCESS): \ + object has been successfully patched and saved in the container; +- Common failures (SECTION_FAILURE_COMMON); +- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + write access to the container is denied; +- **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + object not found in container; +- **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): \ + the requested object has been marked as deleted. +- **OUT_OF_RANGE** (2053, SECTION_OBJECT): \ + the requested range is out of bounds; +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + object storage container not found; +- **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + access to container is denied; +- **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ + (for trusted object preparation) session private key does not exist or + has been deleted; +- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + provided session token has expired. + +| Name | Input | Output | +| ---- | ----- | ------ | +| Patch | [PatchRequest](#neo.fs.v2.object.PatchRequest) | [PatchResponse](#neo.fs.v2.object.PatchResponse) | @@ -691,6 +746,71 @@ following steps: | signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signed `ObjectID` to verify full header's authenticity | + + +### Message PatchRequest +Object PATCH request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body | [PatchRequest.Body](#neo.fs.v2.object.PatchRequest.Body) | | Body for patch request message. | +| meta_header | [neo.fs.v2.session.RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. | +| verify_header | [neo.fs.v2.session.RequestVerificationHeader](#neo.fs.v2.session.RequestVerificationHeader) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. | + + + + +### Message PatchRequest.Body +PATCH request body + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [neo.fs.v2.refs.Address](#neo.fs.v2.refs.Address) | | The address of the object that is requested to get patched. | +| new_attributes | [Header.Attribute](#neo.fs.v2.object.Header.Attribute) | repeated | New attributes for the object. See `replace_attributes` flag usage to define how new attributes should be set. | +| replace_attributes | [bool](#bool) | | If this flag is set, then the object's attributes will be entirely replaced by `new_attributes` list. The empty `new_attributes` list with `replace_attributes = true` just resets attributes list for the object. + +Default `false` value for this flag means the attributes will be just merged. If the incoming `new_attributes` list contains already existing key, then it just replaces it while merging the lists. | +| patch | [PatchRequest.Body.Patch](#neo.fs.v2.object.PatchRequest.Body.Patch) | | The patch that is applied for the object. | + + + + +### Message PatchRequest.Body.Patch +The patch for the object's payload. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| source_range | [Range](#neo.fs.v2.object.Range) | | The range of the source object for which the payload is replaced by the patch's chunk. If the range's `length = 0`, then the patch's chunk is just appended to the original payload starting from the `offest` without any replace. | +| chunk | [bytes](#bytes) | | The chunk that is being appended to or that replaces the original payload on the given range. | + + + + +### Message PatchResponse +Object PATCH response + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body | [PatchResponse.Body](#neo.fs.v2.object.PatchResponse.Body) | | Body for patch response message. | +| meta_header | [neo.fs.v2.session.ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. | +| verify_header | [neo.fs.v2.session.ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. | + + + + +### Message PatchResponse.Body +PATCH response body + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| object_id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | The object ID of the saved patched object. | + + ### Message PutRequest From e5c976b557b2dc5f600ae17997923f0e4b8489d9 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Mon, 5 Aug 2024 20:43:00 +0300 Subject: [PATCH 35/59] [#59] session: Add `Patch` verb * Regenerate docs. Signed-off-by: Airat Arifullin --- proto-docs/session.md | 1 + session/types.proto | 3 +++ 2 files changed, 4 insertions(+) diff --git a/proto-docs/session.md b/proto-docs/session.md index 40088d1..699a907 100644 --- a/proto-docs/session.md +++ b/proto-docs/session.md @@ -338,6 +338,7 @@ Object request verbs | DELETE | 5 | Refers to object.Delete RPC call | | RANGE | 6 | Refers to object.GetRange RPC call | | RANGEHASH | 7 | Refers to object.GetRangeHash RPC call | +| PATCH | 8 | Refers to object.Patch RPC call | diff --git a/session/types.proto b/session/types.proto index a878665..e039081 100644 --- a/session/types.proto +++ b/session/types.proto @@ -36,6 +36,9 @@ message ObjectSessionContext { // Refers to object.GetRangeHash RPC call RANGEHASH = 7; + + // Refers to object.Patch RPC call + PATCH = 8; } // Type of request for which the token is issued Verb verb = 1 [ json_name = "verb" ]; From 542d0d9ec2b09c08df915acef226463a7fcfacce Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Mon, 24 Jun 2024 09:35:29 +0300 Subject: [PATCH 36/59] [#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 37/59] [#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 38/59] [#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 39/59] [#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 40/59] [#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 41/59] [#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 42/59] [#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 43/59] [#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 44/59] [#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 45/59] [#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 46/59] [#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 47/59] [#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 48/59] [#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 49/59] [#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 50/59] [#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 51/59] [#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 52/59] [#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 53/59] [#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 54/59] [#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 55/59] [#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 56/59] [#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 57/59] [#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 58/59] [#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 59/59] [#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