forked from TrueCloudLab/frostfs-contract
*: goimports -w
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
9052ec62d6
commit
8ca71d22b2
11 changed files with 152 additions and 154 deletions
|
@ -14,7 +14,7 @@ one of the alphabetical contracts to emit GAS. To vote for a new list of side
|
||||||
chain committee, alphabet nodes of the Inner Ring create multisignature transactions
|
chain committee, alphabet nodes of the Inner Ring create multisignature transactions
|
||||||
for each alphabet contract.
|
for each alphabet contract.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
Alphabet contract does not produce notifications to process.
|
Alphabet contract does not produce notifications to process.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,7 +15,7 @@ nodes send a stable marshaled version of the DataAuditResult structure to the
|
||||||
contract. When Alphabet nodes of the Inner Ring perform settlement operations,
|
contract. When Alphabet nodes of the Inner Ring perform settlement operations,
|
||||||
they make a list and get these AuditResultStructures from the audit contract.
|
they make a list and get these AuditResultStructures from the audit contract.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
Audit contract does not produce notifications to process.
|
Audit contract does not produce notifications to process.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,29 +15,29 @@ minting of NEOFS tokens in Balance contract. Withdraw locks some NEOFS tokens
|
||||||
in a special lock account. When NeoFS contract transfers GAS assets back to the
|
in a special lock account. When NeoFS contract transfers GAS assets back to the
|
||||||
user, the lock account is destroyed with burn operation.
|
user, the lock account is destroyed with burn operation.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
Transfer notification. This is a NEP-17 standard notification.
|
Transfer notification. This is a NEP-17 standard notification.
|
||||||
|
|
||||||
Transfer:
|
Transfer:
|
||||||
- name: from
|
- name: from
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: to
|
- name: to
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: amount
|
- name: amount
|
||||||
type: Integer
|
type: Integer
|
||||||
|
|
||||||
TransferX notification. This is an enhanced transfer notification with details.
|
TransferX notification. This is an enhanced transfer notification with details.
|
||||||
|
|
||||||
TransferX:
|
TransferX:
|
||||||
- name: from
|
- name: from
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: to
|
- name: to
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: amount
|
- name: amount
|
||||||
type: Integer
|
type: Integer
|
||||||
- name: details
|
- name: details
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
|
|
||||||
Lock notification. This notification is produced when a lock account is
|
Lock notification. This notification is produced when a lock account is
|
||||||
created. It contains information about the mainchain transaction that has produced
|
created. It contains information about the mainchain transaction that has produced
|
||||||
|
@ -45,35 +45,34 @@ the asset lock, the address of the lock account and the NeoFS epoch number until
|
||||||
lock account is valid. Alphabet nodes of the Inner Ring catch notification and initialize
|
lock account is valid. Alphabet nodes of the Inner Ring catch notification and initialize
|
||||||
Cheque method invocation of NeoFS contract.
|
Cheque method invocation of NeoFS contract.
|
||||||
|
|
||||||
Lock:
|
Lock:
|
||||||
- name: txID
|
- name: txID
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: from
|
- name: from
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: to
|
- name: to
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: amount
|
- name: amount
|
||||||
type: Integer
|
type: Integer
|
||||||
- name: until
|
- name: until
|
||||||
type: Integer
|
type: Integer
|
||||||
|
|
||||||
Mint notification. This notification is produced when user balance is
|
Mint notification. This notification is produced when user balance is
|
||||||
replenished from deposit in the mainchain.
|
replenished from deposit in the mainchain.
|
||||||
|
|
||||||
Mint:
|
Mint:
|
||||||
- name: to
|
- name: to
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: amount
|
- name: amount
|
||||||
type: Integer
|
type: Integer
|
||||||
|
|
||||||
|
|
||||||
Burn notification. This notification is produced after user balance is reduced
|
Burn notification. This notification is produced after user balance is reduced
|
||||||
when NeoFS contract has transferred GAS assets back to the user.
|
when NeoFS contract has transferred GAS assets back to the user.
|
||||||
|
|
||||||
Burn:
|
Burn:
|
||||||
- name: from
|
- name: from
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: amount
|
- name: amount
|
||||||
type: Integer
|
type: Integer
|
||||||
*/
|
*/
|
||||||
package balance
|
package balance
|
||||||
|
|
|
@ -7,62 +7,62 @@ 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
|
Alphabet nodes approve it by invoking the same Put or SetEACL methods with
|
||||||
the same arguments.
|
the same arguments.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
containerPut notification. This notification is produced when a user wants to
|
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
|
create a new container. Alphabet nodes of the Inner Ring catch the notification and
|
||||||
validate container data, signature and token if present.
|
validate container data, signature and token if present.
|
||||||
|
|
||||||
containerPut:
|
containerPut:
|
||||||
- name: container
|
- name: container
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: signature
|
- name: signature
|
||||||
type: Signature
|
type: Signature
|
||||||
- name: publicKey
|
- name: publicKey
|
||||||
type: PublicKey
|
type: PublicKey
|
||||||
- name: token
|
- name: token
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
|
|
||||||
containerDelete notification. This notification is produced when a container owner
|
containerDelete notification. This notification is produced when a container owner
|
||||||
wants to delete a container. Alphabet nodes of the Inner Ring catch the notification
|
wants to delete a container. Alphabet nodes of the Inner Ring catch the notification
|
||||||
and validate container ownership, signature and token if present.
|
and validate container ownership, signature and token if present.
|
||||||
|
|
||||||
containerDelete:
|
containerDelete:
|
||||||
- name: containerID
|
- name: containerID
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: signature
|
- name: signature
|
||||||
type: Signature
|
type: Signature
|
||||||
- name: token
|
- name: token
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
|
|
||||||
setEACL notification. This notification is produced when a container owner wants
|
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
|
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
|
the notification and validate container ownership, signature and token if
|
||||||
present.
|
present.
|
||||||
|
|
||||||
setEACL:
|
setEACL:
|
||||||
- name: eACL
|
- name: eACL
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: signature
|
- name: signature
|
||||||
type: Signature
|
type: Signature
|
||||||
- name: publicKey
|
- name: publicKey
|
||||||
type: PublicKey
|
type: PublicKey
|
||||||
- name: token
|
- name: token
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
|
|
||||||
StartEstimation notification. This notification is produced when Storage nodes
|
StartEstimation notification. This notification is produced when Storage nodes
|
||||||
should exchange estimation values of container sizes among other Storage nodes.
|
should exchange estimation values of container sizes among other Storage nodes.
|
||||||
|
|
||||||
StartEstimation:
|
StartEstimation:
|
||||||
- name: epoch
|
- name: epoch
|
||||||
type: Integer
|
type: Integer
|
||||||
|
|
||||||
StopEstimation notification. This notification is produced when Storage nodes
|
StopEstimation notification. This notification is produced when Storage nodes
|
||||||
should calculate average container size based on received estimations and store
|
should calculate average container size based on received estimations and store
|
||||||
it in Container contract.
|
it in Container contract.
|
||||||
|
|
||||||
StopEstimation:
|
StopEstimation:
|
||||||
- name: epoch
|
- name: epoch
|
||||||
type: Integer
|
type: Integer
|
||||||
*/
|
*/
|
||||||
package container
|
package container
|
||||||
|
|
97
neofs/doc.go
97
neofs/doc.go
|
@ -12,84 +12,83 @@ NeoFS contract contains the actual list of Alphabet nodes in the sidechain.
|
||||||
Network configuration is also stored in NeoFS contract. All changes in
|
Network configuration is also stored in NeoFS contract. All changes in
|
||||||
configuration are mirrored in the sidechain with notifications.
|
configuration are mirrored in the sidechain with notifications.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
Deposit notification. This notification is produced when user transfers native
|
Deposit notification. This notification is produced when user transfers native
|
||||||
GAS to the NeoFS contract address. The same amount of NEOFS token will be
|
GAS to the NeoFS contract address. The same amount of NEOFS token will be
|
||||||
minted in Balance contract in the sidechain.
|
minted in Balance contract in the sidechain.
|
||||||
|
|
||||||
Deposit:
|
Deposit:
|
||||||
- name: from
|
- name: from
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: amount
|
- name: amount
|
||||||
type: Integer
|
type: Integer
|
||||||
- name: receiver
|
- name: receiver
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: txHash
|
- name: txHash
|
||||||
type: Hash256
|
type: Hash256
|
||||||
|
|
||||||
Withdraw notification. This notification is produced when a user wants to
|
Withdraw notification. This notification is produced when a user wants to
|
||||||
withdraw GAS from the internal NeoFS balance and has paid fee for that.
|
withdraw GAS from the internal NeoFS balance and has paid fee for that.
|
||||||
|
|
||||||
Withdraw:
|
Withdraw:
|
||||||
- name: user
|
- name: user
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: amount
|
- name: amount
|
||||||
type: Integer
|
type: Integer
|
||||||
- name: txHash
|
- name: txHash
|
||||||
type: Hash256
|
type: Hash256
|
||||||
|
|
||||||
|
|
||||||
Cheque notification. This notification is produced when NeoFS contract
|
Cheque notification. This notification is produced when NeoFS contract
|
||||||
has successfully transferred assets back to the user after withdraw.
|
has successfully transferred assets back to the user after withdraw.
|
||||||
|
|
||||||
Cheque:
|
Cheque:
|
||||||
- name: id
|
- name: id
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: user
|
- name: user
|
||||||
type: Hash160
|
type: Hash160
|
||||||
- name: amount
|
- name: amount
|
||||||
type: Integer
|
type: Integer
|
||||||
- name: lockAccount
|
- name: lockAccount
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
|
|
||||||
Bind notification. This notification is produced when a user wants to bind
|
Bind notification. This notification is produced when a user wants to bind
|
||||||
public keys with the user account (OwnerID). Keys argument is an array of ByteArray.
|
public keys with the user account (OwnerID). Keys argument is an array of ByteArray.
|
||||||
|
|
||||||
Bind:
|
Bind:
|
||||||
- name: user
|
- name: user
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: keys
|
- name: keys
|
||||||
type: Array
|
type: Array
|
||||||
|
|
||||||
Unbind notification. This notification is produced when a user wants to unbind
|
Unbind notification. This notification is produced when a user wants to unbind
|
||||||
public keys with the user account (OwnerID). Keys argument is an array of ByteArray.
|
public keys with the user account (OwnerID). Keys argument is an array of ByteArray.
|
||||||
|
|
||||||
Unbind:
|
Unbind:
|
||||||
- name: user
|
- name: user
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: keys
|
- name: keys
|
||||||
type: Array
|
type: Array
|
||||||
|
|
||||||
AlphabetUpdate notification. This notification is produced when Alphabet nodes
|
AlphabetUpdate notification. This notification is produced when Alphabet nodes
|
||||||
have updated their lists in the contract. Alphabet argument is an array of ByteArray. It
|
have updated their lists in the contract. Alphabet argument is an array of ByteArray. It
|
||||||
contains public keys of new alphabet nodes.
|
contains public keys of new alphabet nodes.
|
||||||
|
|
||||||
AlphabetUpdate:
|
AlphabetUpdate:
|
||||||
- name: id
|
- name: id
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: alphabet
|
- name: alphabet
|
||||||
type: Array
|
type: Array
|
||||||
|
|
||||||
SetConfig notification. This notification is produced when Alphabet nodes update
|
SetConfig notification. This notification is produced when Alphabet nodes update
|
||||||
NeoFS network configuration value.
|
NeoFS network configuration value.
|
||||||
|
|
||||||
SetConfig
|
SetConfig
|
||||||
- name: id
|
- name: id
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: key
|
- name: key
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: value
|
- name: value
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
*/
|
*/
|
||||||
package neofs
|
package neofs
|
||||||
|
|
|
@ -13,7 +13,7 @@ by invoking Bind or Unbind methods of NeoFS contract in the mainchain. After tha
|
||||||
Alphabet nodes produce multisigned AddKey and RemoveKey invocations of NeoFSID
|
Alphabet nodes produce multisigned AddKey and RemoveKey invocations of NeoFSID
|
||||||
contract.
|
contract.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
NeoFSID contract does not produce notifications to process.
|
NeoFSID contract does not produce notifications to process.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,30 +5,30 @@ Netmap contract stores and manages NeoFS network map, Storage node candidates
|
||||||
and epoch number counter. In notary disabled environment, contract also stores
|
and epoch number counter. In notary disabled environment, contract also stores
|
||||||
a list of Inner Ring node keys.
|
a list of Inner Ring node keys.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
AddPeer notification. This notification is produced when a Storage node sends
|
AddPeer notification. This notification is produced when a Storage node sends
|
||||||
a bootstrap request by invoking AddPeer method.
|
a bootstrap request by invoking AddPeer method.
|
||||||
|
|
||||||
AddPeer
|
AddPeer
|
||||||
- name: nodeInfo
|
- name: nodeInfo
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
|
|
||||||
UpdateState notification. This notification is produced when a Storage node wants
|
UpdateState notification. This notification is produced when a Storage node wants
|
||||||
to change its state (go offline) by invoking UpdateState method. Supported
|
to change its state (go offline) by invoking UpdateState method. Supported
|
||||||
states: (2) -- offline.
|
states: (2) -- offline.
|
||||||
|
|
||||||
UpdateState
|
UpdateState
|
||||||
- name: state
|
- name: state
|
||||||
type: Integer
|
type: Integer
|
||||||
- name: publicKey
|
- name: publicKey
|
||||||
type: PublicKey
|
type: PublicKey
|
||||||
|
|
||||||
NewEpoch notification. This notification is produced when a new epoch is applied
|
NewEpoch notification. This notification is produced when a new epoch is applied
|
||||||
in the network by invoking NewEpoch method.
|
in the network by invoking NewEpoch method.
|
||||||
|
|
||||||
NewEpoch
|
NewEpoch
|
||||||
- name: epoch
|
- name: epoch
|
||||||
type: Integer
|
type: Integer
|
||||||
*/
|
*/
|
||||||
package netmap
|
package netmap
|
||||||
|
|
|
@ -15,7 +15,7 @@ the multisignature transaction. Therefore, NeoVM executes Verify method of the
|
||||||
contract and if invocation is verified, Processing contract pays for the
|
contract and if invocation is verified, Processing contract pays for the
|
||||||
execution.
|
execution.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
Processing contract does not produce notifications to process.
|
Processing contract does not produce notifications to process.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,7 +14,7 @@ Proxy contract is used as the first signer in a multisignature transaction.
|
||||||
Therefore, NeoVM executes Verify method of the contract; and if invocation is
|
Therefore, NeoVM executes Verify method of the contract; and if invocation is
|
||||||
verified, Proxy contract pays for the execution.
|
verified, Proxy contract pays for the execution.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
Proxy contract does not produce notifications to process.
|
Proxy contract does not produce notifications to process.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,7 +10,7 @@ During settlement process, Alphabet nodes fetch all DataAuditResult structures
|
||||||
from the epoch and execute balance transfers from data owners to Storage and
|
from the epoch and execute balance transfers from data owners to Storage and
|
||||||
Inner Ring nodes if data audit succeeds.
|
Inner Ring nodes if data audit succeeds.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
Reputation contract does not produce notifications to process.
|
Reputation contract does not produce notifications to process.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,33 +5,33 @@ Subnet contract stores and manages NeoFS subnetwork states. It allows registerin
|
||||||
and deleting subnetworks, limiting access to them, and defining a list of the Storage
|
and deleting subnetworks, limiting access to them, and defining a list of the Storage
|
||||||
Nodes that can be included in them.
|
Nodes that can be included in them.
|
||||||
|
|
||||||
Contract notifications
|
# Contract notifications
|
||||||
|
|
||||||
Put notification. This notification is produced when a new subnetwork is
|
Put notification. This notification is produced when a new subnetwork is
|
||||||
registered by invoking Put method.
|
registered by invoking Put method.
|
||||||
|
|
||||||
Put
|
Put
|
||||||
- name: id
|
- name: id
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: ownerKey
|
- name: ownerKey
|
||||||
type: PublicKey
|
type: PublicKey
|
||||||
- name: info
|
- name: info
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
|
|
||||||
Delete notification. This notification is produced when some subnetwork is
|
Delete notification. This notification is produced when some subnetwork is
|
||||||
deleted by invoking Delete method.
|
deleted by invoking Delete method.
|
||||||
|
|
||||||
Delete
|
Delete
|
||||||
- name: id
|
- name: id
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
|
|
||||||
RemoveNode notification. This notification is produced when some node is deleted
|
RemoveNode notification. This notification is produced when some node is deleted
|
||||||
by invoking RemoveNode method.
|
by invoking RemoveNode method.
|
||||||
|
|
||||||
RemoveNode
|
RemoveNode
|
||||||
- name: subnetID
|
- name: subnetID
|
||||||
type: ByteArray
|
type: ByteArray
|
||||||
- name: node
|
- name: node
|
||||||
type: PublicKey
|
type: PublicKey
|
||||||
*/
|
*/
|
||||||
package subnet
|
package subnet
|
||||||
|
|
Loading…
Reference in a new issue