Documentation ¶
Index ¶
- type Wrapper
- func (w *Wrapper) AddPeer(nodeInfo *netmap.NodeInfo) error
- func (w *Wrapper) AuditFee() (uint64, error)
- func (w *Wrapper) BasicIncomeRate() (uint64, error)
- func (w *Wrapper) ContainerFee() (uint64, error)
- func (w *Wrapper) EigenTrustAlpha() (float64, error)
- func (w *Wrapper) EigenTrustIterations() (uint64, error)
- func (w *Wrapper) Epoch() (uint64, error)
- func (w *Wrapper) EpochDuration() (uint64, error)
- func (w Wrapper) GetCandidates() (*netmap.Netmap, error)
- func (w Wrapper) GetNetMap(diff uint64) (*netmap.Netmap, error)
- func (w Wrapper) GetNetMapByEpoch(epoch uint64) (*netmap.Netmap, error)
- func (w *Wrapper) InnerRingCandidateFee() (uint64, error)
- func (w *Wrapper) MaxObjectSize() (uint64, error)
- func (w *Wrapper) NewEpoch(e uint64) error
- func (w *Wrapper) SetConfig(id, key []byte, value interface{}) error
- func (w *Wrapper) SetInnerRing(keys keys.PublicKeys) error
- func (w *Wrapper) Snapshot() (*netmap.Netmap, error)
- func (w *Wrapper) UpdatePeerState(key []byte, state netmap.NodeState) error
- func (w *Wrapper) WithdrawFee() (uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper is a wrapper over netmap contract client which implements:
- network map storage;
- tool for peer state updating.
Working wrapper must be created via constructor New. Using the Wrapper that has been created with new(Wrapper) expression (or just declaring a Wrapper variable) is unsafe and can lead to panic.
func NewFromMorph ¶ added in v0.21.0
func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8, opts ...client.StaticClientOption) (*Wrapper, error)
NewFromMorph returns the wrapper instance from the raw morph client.
func (*Wrapper) AuditFee ¶ added in v0.19.0
AuditFee returns audit fee configuration value from network config in netmap contract.
func (*Wrapper) BasicIncomeRate ¶ added in v0.19.0
BasicIncomeRate returns basic income rate configuration value from network config in netmap contract.
func (*Wrapper) ContainerFee ¶ added in v0.19.0
ContainerFee returns fee paid by container owner to each alphabet node for container registration.
func (*Wrapper) EigenTrustAlpha ¶ added in v0.19.0
EigenTrustAlpha returns global configuration value of alpha parameter. It receives the alpha as a string and tries to convert it to float.
func (*Wrapper) EigenTrustIterations ¶ added in v0.19.0
EigenTrustIterations returns global configuration value of iteration cycles for EigenTrust algorithm per epoch.
func (*Wrapper) Epoch ¶ added in v0.12.0
Epoch receives number of current NeoFS epoch through the Netmap contract call.
func (*Wrapper) EpochDuration ¶ added in v0.19.0
EpochDuration returns number of sidechain blocks per one NeoFS epoch.
func (Wrapper) GetCandidates ¶ added in v0.22.1
GetCandidates receives information list about candidates for the next epoch network map through the Netmap contract call, composes network map from them and returns it.
func (Wrapper) GetNetMap ¶
GetNetMap receives information list about storage nodes through the Netmap contract call, composes network map from them and returns it. With diff == 0 returns current network map, else return snapshot of previous network map.
func (Wrapper) GetNetMapByEpoch ¶ added in v0.14.1
GetNetMapByEpoch receives information list about storage nodes through the Netmap contract call, composes network map from them and returns it. Returns snapshot of the specified epoch number.
func (*Wrapper) InnerRingCandidateFee ¶ added in v0.19.0
InnerRingCandidateFee returns global configuration value of fee paid by node to be in inner ring candidates list.
func (*Wrapper) MaxObjectSize ¶ added in v0.12.0
MaxObjectSize receives max object size configuration value through the Netmap contract call.
func (*Wrapper) SetInnerRing ¶ added in v0.22.0
func (w *Wrapper) SetInnerRing(keys keys.PublicKeys) error
SetInnerRing updates inner ring keys.
func (*Wrapper) Snapshot ¶ added in v0.22.0
Snapshot returns current netmap node infos. Consider using pkg/morph/client/netmap for this.
func (*Wrapper) UpdatePeerState ¶
UpdatePeerState changes peer status through Netmap contract call.
func (*Wrapper) WithdrawFee ¶ added in v0.19.0
WithdrawFee returns global configuration value of fee paid by user to withdraw assets from NeoFS contract.