reputation

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package reputation contains implementation of Reputation contract deployed in NeoFS sidechain.

Storage nodes collect reputation data while communicating with other nodes. This data is exchanged and the end result (global trust values) is stored in the contract as opaque data.

Contract notifications

Reputation contract does not produce notifications to process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get added in v0.7.0

func Get(epoch int, peerID []byte) [][]byte

Get method returns a list of all stable marshaled GlobalTrust structures known for the given peer during the specified epoch.

func GetByID added in v0.7.0

func GetByID(id []byte) [][]byte

GetByID method returns a list of all stable marshaled GlobalTrust with the specified id. Use ListByEpoch method to obtain the id.

func ListByEpoch added in v0.7.0

func ListByEpoch(epoch int) [][]byte

ListByEpoch returns a list of IDs that may be used to get reputation data with GetByID method.

func Put

func Put(epoch int, peerID []byte, value []byte)

Put method saves global trust data in contract storage. It can be invoked only by storage nodes with Alphabet assistance (multisignature witness).

Epoch is the epoch number when GlobalTrust structure was generated. PeerID contains public key of the storage node that is the subject of the GlobalTrust. Value contains a stable marshaled structure of GlobalTrust.

func Update added in v0.11.0

func Update(script []byte, manifest []byte, data any)

Update method updates contract source code and manifest. It can be invoked only by committee.

func Version added in v0.7.0

func Version() int

Version returns the version of the contract.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL