44 lines
2.1 KiB
Go
44 lines
2.1 KiB
Go
/*
|
|
Container contract is a contract deployed in FrostFS sidechain.
|
|
|
|
Container contract stores and manages containers, extended ACLs and container
|
|
size estimations. Contract does not perform sanity or signature checks of
|
|
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.
|
|
|
|
# Contract notifications
|
|
|
|
StartEstimation notification. This notification is produced when Storage nodes
|
|
should exchange estimation values of container sizes among other Storage nodes.
|
|
|
|
StartEstimation:
|
|
- name: epoch
|
|
type: Integer
|
|
|
|
StopEstimation notification. This notification is produced when Storage nodes
|
|
should calculate average container size based on received estimations and store
|
|
it in Container contract.
|
|
|
|
StopEstimation:
|
|
- name: epoch
|
|
type: Integer
|
|
|
|
# Contract storage scheme
|
|
|
|
| Key | Value | Description |
|
|
|-----------------------------------------------------------------------------------------------------|
|
|
| `netmapScriptHash` | Hash160 | netmap contract hash |
|
|
| `balanceScriptHash` | Hash160 | balance contract hash |
|
|
| `identityScriptHash` | Hash160 | frostfsID contract hash |
|
|
| `nnsContractKey` | Hash160 | nns contract hash |
|
|
| `nnsRoot` | string | default value for domain zone |
|
|
| `cnr` + epoch + containerID + publicKeyHash[:10] | ByteArray | estimated container size |
|
|
| `est` + containerID + publicKeyHash | ByteArray | serialized epochs array |
|
|
| `o` + ownerID + containerID | ByteArray | container ID |
|
|
| `x` + containerID | ByteArray | serialized container struct |
|
|
| `nnsHasAlias` + containerID | string | domain name |
|
|
|
|
|
|
*/
|
|
package container
|