forked from TrueCloudLab/frostfs-node
[#247] network_config: Drop reputation
Drop the code that was expected to work with global reputation network parameters. Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
parent
b453bb754c
commit
beabed788c
6 changed files with 0 additions and 60 deletions
|
@ -3,7 +3,6 @@ package netmap
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client"
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/bigint"
|
||||
|
@ -17,8 +16,6 @@ const (
|
|||
EpochDurationConfig = "EpochDuration"
|
||||
ContainerFeeConfig = "ContainerFee"
|
||||
ContainerAliasFeeConfig = "ContainerAliasFee"
|
||||
EtIterationsConfig = "EigenTrustIterations"
|
||||
EtAlphaConfig = "EigenTrustAlpha"
|
||||
IrCandidateFeeConfig = "InnerRingCandidateFee"
|
||||
WithdrawFeeConfig = "WithdrawFee"
|
||||
HomomorphicHashingDisabledKey = "HomomorphicHashingDisabled"
|
||||
|
@ -90,28 +87,6 @@ func (c *Client) ContainerAliasFee() (uint64, error) {
|
|||
return fee, nil
|
||||
}
|
||||
|
||||
// EigenTrustIterations returns global configuration value of iteration cycles
|
||||
// for EigenTrust algorithm per epoch.
|
||||
func (c *Client) EigenTrustIterations() (uint64, error) {
|
||||
iterations, err := c.readUInt64Config(EtIterationsConfig)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("(%T) could not get eigen trust iterations: %w", c, err)
|
||||
}
|
||||
|
||||
return iterations, nil
|
||||
}
|
||||
|
||||
// EigenTrustAlpha returns global configuration value of alpha parameter.
|
||||
// It receives the alpha as a string and tries to convert it to float.
|
||||
func (c *Client) EigenTrustAlpha() (float64, error) {
|
||||
strAlpha, err := c.readStringConfig(EtAlphaConfig)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("(%T) could not get eigen trust alpha: %w", c, err)
|
||||
}
|
||||
|
||||
return strconv.ParseFloat(strAlpha, 64)
|
||||
}
|
||||
|
||||
// HomomorphicHashDisabled returns global configuration value of homomorphic hashing
|
||||
// settings.
|
||||
//
|
||||
|
@ -246,10 +221,6 @@ type NetworkConfiguration struct {
|
|||
|
||||
ContainerAliasFee uint64
|
||||
|
||||
EigenTrustIterations uint64
|
||||
|
||||
EigenTrustAlpha float64
|
||||
|
||||
IRCandidateFee uint64
|
||||
|
||||
WithdrawalFee uint64
|
||||
|
@ -311,13 +282,6 @@ func (c *Client) ReadNetworkConfiguration() (NetworkConfiguration, error) {
|
|||
res.ContainerFee = bytesToUint64(value)
|
||||
case ContainerAliasFeeConfig:
|
||||
res.ContainerAliasFee = bytesToUint64(value)
|
||||
case EtIterationsConfig:
|
||||
res.EigenTrustIterations = bytesToUint64(value)
|
||||
case EtAlphaConfig:
|
||||
res.EigenTrustAlpha, err = strconv.ParseFloat(string(value), 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid prm %s: %v", EtAlphaConfig, err)
|
||||
}
|
||||
case IrCandidateFeeConfig:
|
||||
res.IRCandidateFee = bytesToUint64(value)
|
||||
case WithdrawFeeConfig:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue