From fb1ddd68cb9323638a504ce746e293cb46d6b4ac Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 20 Nov 2024 17:00:34 +0300 Subject: [PATCH 1/2] blockchain: drop subnet contract section It's long gone (0.19.0+), but autoupdater doesn't remove any files. Signed-off-by: Roman Khimov --- 06-blockchain/03-subnet.md | 161 ------------------------------------- 1 file changed, 161 deletions(-) delete mode 100644 06-blockchain/03-subnet.md diff --git a/06-blockchain/03-subnet.md b/06-blockchain/03-subnet.md deleted file mode 100644 index 06aa01e..0000000 --- a/06-blockchain/03-subnet.md +++ /dev/null @@ -1,161 +0,0 @@ -### subnet contract - -Subnet contract is a contract deployed in NeoFS sidechain\. - -Subnet contract stores and manages NeoFS subnetwork states\. It allows registering and deleting subnetworks\, limiting access to them\, and defining a list of the Storage Nodes that can be included in them\. - -#### Contract notifications - -Put notification\. This notification is produced when a new subnetwork is registered by invoking Put method\. - -``` -Put - - name: id - type: ByteArray - - name: ownerKey - type: PublicKey - - name: info - type: ByteArray -``` - -Delete notification\. This notification is produced when some subnetwork is deleted by invoking Delete method\. - -``` -Delete - - name: id - type: ByteArray -``` - -RemoveNode notification\. This notification is produced when some node is deleted by invoking RemoveNode method\. - -``` -RemoveNode - - name: subnetID - type: ByteArray - - name: node - type: PublicKey -``` - -#### Contract methods - -##### AddClientAdmin - -```go -func AddClientAdmin(subnetID []byte, groupID []byte, adminPublicKey interop.PublicKey) -``` - -AddClientAdmin adds a new client administrator of the specified group in the specified subnetwork\. Must be called by the owner only\. - -##### AddNode - -```go -func AddNode(subnetID []byte, node interop.PublicKey) -``` - -AddNode adds a node to the specified subnetwork\. Must be called by the subnet's owner or the node administrator only\. - -##### AddNodeAdmin - -```go -func AddNodeAdmin(subnetID []byte, adminKey interop.PublicKey) -``` - -AddNodeAdmin adds a new node administrator to the specified subnetwork\. - -##### AddUser - -```go -func AddUser(subnetID []byte, groupID []byte, userID []byte) -``` - -AddUser adds user to the specified subnetwork and group\. Must be called by the owner or the group's admin only\. - -##### Delete - -```go -func Delete(id []byte) -``` - -Delete deletes the subnet with the specified id\. - -##### Get - -```go -func Get(id []byte) []byte -``` - -Get returns info about the subnet with the specified id\. - -##### NodeAllowed - -```go -func NodeAllowed(subnetID []byte, node interop.PublicKey) bool -``` - -NodeAllowed checks if a node is included in the specified subnet\. - -##### Put - -```go -func Put(id []byte, ownerKey interop.PublicKey, info []byte) -``` - -Put creates a new subnet with the specified owner and info\. - -##### RemoveClientAdmin - -```go -func RemoveClientAdmin(subnetID []byte, groupID []byte, adminPublicKey interop.PublicKey) -``` - -RemoveClientAdmin removes client administrator from the specified group in the specified subnetwork\. Must be called by the owner only\. - -##### RemoveNode - -```go -func RemoveNode(subnetID []byte, node interop.PublicKey) -``` - -RemoveNode removes a node from the specified subnetwork\. Must be called by the subnet's owner or the node administrator only\. - -##### RemoveNodeAdmin - -```go -func RemoveNodeAdmin(subnetID []byte, adminKey interop.PublicKey) -``` - -RemoveNodeAdmin removes node administrator from the specified subnetwork\. Must be called by the subnet owner only\. - -##### RemoveUser - -```go -func RemoveUser(subnetID []byte, groupID []byte, userID []byte) -``` - -RemoveUser removes a user from the specified subnetwork and group\. Must be called by the owner or the group's admin only\. - -##### Update - -```go -func Update(script []byte, manifest []byte, data interface{}) -``` - -Update method updates contract source code and manifest\. It can be invoked only by committee\. - -##### UserAllowed - -```go -func UserAllowed(subnetID []byte, user []byte) bool -``` - -UserAllowed returns bool that indicates if a node is included in the specified subnet\. - -##### Version - -```go -func Version() int -``` - -Version returns the version of the contract\. - - From 73526d13f2a3b876702e2e8cc4c0adf6e49591bf Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 20 Nov 2024 17:01:52 +0300 Subject: [PATCH 2/2] api: add missing link payload document An omission of #99/4e11edc14d0f5c881a069d0d7abd6f1426cba123. Signed-off-by: Roman Khimov --- 20-api-v2/link.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 20-api-v2/link.md diff --git a/20-api-v2/link.md b/20-api-v2/link.md new file mode 100644 index 0000000..8fadc92 --- /dev/null +++ b/20-api-v2/link.md @@ -0,0 +1,29 @@ +## neo.fs.v2.link + + + + +### Message Link + +Link is a payload of helper objects that contain the full list of the split +chain objects' IDs. It is created only after the whole split chain is known +and signed. This object is the only object that refers to every "child object" +ID. It is NOT required for the original object assembling. It MUST have ALL +the "child objects" IDs. Child objects MUST be ordered according to the +original payload split, meaning the first payload part holder MUST be placed +at the first place in the corresponding link object. Sizes MUST NOT be omitted +and MUST be a real object payload size in bytes. + +| Field | Type | Description | +| ----- | ---- | ----------- | +| children | MeasuredObject | Full list of the "child" object descriptors. | + +### Message Link.MeasuredObject + +Object ID with its object's payload size. + +| Field | Type | Description | +| ----- | ---- | ----------- | +| id | ObjectID | Object ID. | +| size | uint32 | Object size in bytes. | +