2021-07-07 15:12:28 +00:00
|
|
|
/*
|
2023-01-11 07:49:28 +00:00
|
|
|
Container contract is a contract deployed in FrostFS sidechain.
|
2021-07-07 15:12:28 +00:00
|
|
|
|
|
|
|
Container contract stores and manages containers, extended ACLs and container
|
2022-04-14 11:56:51 +00:00
|
|
|
size estimations. Contract does not perform sanity or signature checks of
|
2021-07-07 15:12:28 +00:00
|
|
|
containers or extended ACLs, it is done by Alphabet nodes of the Inner Ring.
|
|
|
|
Alphabet nodes approve it by invoking the same Put or SetEACL methods with
|
|
|
|
the same arguments.
|
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
# Contract notifications
|
2021-07-07 15:12:28 +00:00
|
|
|
|
2022-04-14 11:56:51 +00:00
|
|
|
containerPut notification. This notification is produced when a user wants to
|
|
|
|
create a new container. Alphabet nodes of the Inner Ring catch the notification and
|
|
|
|
validate container data, signature and token if present.
|
2021-07-07 15:12:28 +00:00
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
containerPut:
|
|
|
|
- name: container
|
|
|
|
type: ByteArray
|
|
|
|
- name: signature
|
|
|
|
type: Signature
|
|
|
|
- name: publicKey
|
|
|
|
type: PublicKey
|
|
|
|
- name: token
|
|
|
|
type: ByteArray
|
2021-07-07 15:12:28 +00:00
|
|
|
|
2022-04-14 11:56:51 +00:00
|
|
|
containerDelete notification. This notification is produced when a container owner
|
|
|
|
wants to delete a container. Alphabet nodes of the Inner Ring catch the notification
|
|
|
|
and validate container ownership, signature and token if present.
|
2021-07-07 15:12:28 +00:00
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
containerDelete:
|
|
|
|
- name: containerID
|
|
|
|
type: ByteArray
|
|
|
|
- name: signature
|
|
|
|
type: Signature
|
|
|
|
- name: token
|
|
|
|
type: ByteArray
|
2021-07-07 15:12:28 +00:00
|
|
|
|
2022-04-14 11:56:51 +00:00
|
|
|
setEACL notification. This notification is produced when a container owner wants
|
|
|
|
to update an extended ACL of a container. Alphabet nodes of the Inner Ring catch
|
|
|
|
the notification and validate container ownership, signature and token if
|
2021-07-07 15:12:28 +00:00
|
|
|
present.
|
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
setEACL:
|
|
|
|
- name: eACL
|
|
|
|
type: ByteArray
|
|
|
|
- name: signature
|
|
|
|
type: Signature
|
|
|
|
- name: publicKey
|
|
|
|
type: PublicKey
|
|
|
|
- name: token
|
|
|
|
type: ByteArray
|
2021-07-07 15:12:28 +00:00
|
|
|
|
|
|
|
StartEstimation notification. This notification is produced when Storage nodes
|
|
|
|
should exchange estimation values of container sizes among other Storage nodes.
|
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
StartEstimation:
|
|
|
|
- name: epoch
|
|
|
|
type: Integer
|
2021-07-07 15:12:28 +00:00
|
|
|
|
|
|
|
StopEstimation notification. This notification is produced when Storage nodes
|
|
|
|
should calculate average container size based on received estimations and store
|
|
|
|
it in Container contract.
|
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
StopEstimation:
|
|
|
|
- name: epoch
|
|
|
|
type: Integer
|
2021-07-07 15:12:28 +00:00
|
|
|
*/
|
2021-07-04 11:08:37 +00:00
|
|
|
package container
|