frostfs-contract/netmap/doc.go
Evgenii Stratonikov dacac0b53d
All checks were successful
Tests / Tests (1.19) (pull_request) Successful in 2m48s
DCO action / DCO (pull_request) Successful in 2m53s
Tests / Tests (1.20) (pull_request) Successful in 2m52s
[#50] Makefile: Add code formatting targets
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-07 15:00:05 +03:00

45 lines
1.6 KiB
Go

/*
Netmap contract is a contract deployed in FrostFS sidechain.
Netmap contract stores and manages FrostFS network map, Storage node candidates
and epoch number counter.
# Contract notifications
AddPeer notification. This notification is produced when a Storage node sends
a bootstrap request by invoking AddPeer method.
AddPeer
- name: nodeInfo
type: ByteArray
UpdateState notification. This notification is produced when a Storage node wants
to change its state (go offline) by invoking UpdateState method. Supported
states: (2) -- offline.
UpdateState
- name: state
type: Integer
- name: publicKey
type: PublicKey
NewEpoch notification. This notification is produced when a new epoch is applied
in the network by invoking NewEpoch method.
NewEpoch
- name: epoch
type: Integer
# Contract storage scheme
| Key | Value | Description |
|-----------------------------|------------|-----------------------------------|
| `snapshotCount` | int | snapshot count |
| `snapshotEpoch` | int | snapshot epoch |
| `snapshotBlock` | int | snapshot block |
| `snapshot_` + snapshotNum | ByteArray | serialized '[]Node' array |
| `snapshotCurrent` | int | current snapshot |
| `balanceScriptHash` | Hash160 | balance contract hash |
| `containerScriptHash` | Hash160 | container contract hash |
*/
package netmap