Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use well-known expiration attribute for SGs #205

Merged
merged 1 commit into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion proto-docs/storagegroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@ that require payed storage guaranties are gathered in `StorageGroups` with
additional information used for 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
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) | | Last NeoFS epoch number of the storage group lifetime |
| 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 |

<!-- end messages -->
Expand Down
10 changes: 8 additions & 2 deletions storagegroup/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import "refs/types.proto";
// that require payed storage guaranties are gathered in `StorageGroups` with
// additional information used for 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
// 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"];
Expand All @@ -20,8 +26,8 @@ message StorageGroup {
// members in the `members` field.
neo.fs.v2.refs.Checksum validation_hash = 2 [json_name = "validationHash"];

// Last NeoFS epoch number of the storage group lifetime
uint64 expiration_epoch = 3 [json_name = "expirationEpoch"];
// 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
repeated neo.fs.v2.refs.ObjectID members = 4 [json_name = "members"];
Expand Down