reputation

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Reputation contract is a contract deployed in NeoFS side chain.

Inner Ring nodes produce data audit for each container in each epoch. In the end nodes produce DataAuditResult structure that contains information about audit progress. Reputation contract provides storage for such structures and simple interface to iterate over available DataAuditResults on specified epoch.

During settlement process, Alphabet nodes fetch all DataAuditResult structures from the epoch and execute balance transfers from data owners to Storage and Inner Ring nodes, if data audit succeed.

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 list of all stable marshaled DataAuditResult structures produced by specified Inner Ring node in specified epoch.

func GetByID added in v0.7.0

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

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

func ListByEpoch added in v0.7.0

func ListByEpoch(epoch int) [][]byte

ListByEpoch returns 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 DataAuditResult in contract storage. Can be invoked only by Inner Ring nodes. Does not require multi signature invocations.

Epoch is an epoch number when DataAuditResult structure was generated. PeerID contains public keys of Inner Ring node that produced DataAuditResult. Value contains stable marshaled structure of DataAuditResult.

func Update added in v0.11.0

func Update(script []byte, manifest []byte, data interface{})

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

func Version added in v0.7.0

func Version() int

Version returns 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