From 1fdc65e56351f59d380da97920a1174b6bea6c6c Mon Sep 17 00:00:00 2001 From: anastasia prasolova Date: Fri, 15 Oct 2021 14:42:15 +0300 Subject: [PATCH] [#71] Add "update.eigen_trust_value" target for make Signed-off-by: anastasia prasolova --- bin/config.sh | 11 +++++++---- neofs_config.mk | 17 +++++++++++------ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/bin/config.sh b/bin/config.sh index d9ee540..1432762 100755 --- a/bin/config.sh +++ b/bin/config.sh @@ -14,10 +14,13 @@ WALLET_IMG="${WALLET_IMG:-wallets/node-wallet.json}" PASSWD="one" NETMAP_ADDR=`bin/resolve.sh netmap.neofs` -# NeoFS configuration record: key is a string and value is an int -KEY=${1} -VALUE="${2}" +# NeoFS configuration record: variable type [string|int|etc], +# key is a string and value is a constant of given type +TYPE=${1} +KEY=${2} +VALUE="${3}" +[ -z "$TYPE" ] && echo "Empty config value type" && exit 1 [ -z "$KEY" ] && echo "Empty config key" && exit 1 [ -z "$VALUE" ] && echo "Empty config value" && exit 1 @@ -37,7 +40,7 @@ echo "Changing ${KEY} configration value to ${VALUE}" ${NETMAP_ADDR} \ setConfig bytes:beefcafe \ string:${KEY} \ -int:${VALUE} -- ${ADDR} || exit 1 +${TYPE}:${VALUE} -- ${ADDR} || exit 1 # Update epoch to apply new configuration value ./bin/tick.sh diff --git a/neofs_config.mk b/neofs_config.mk index d2929aa..8863b42 100644 --- a/neofs_config.mk +++ b/neofs_config.mk @@ -1,26 +1,31 @@ # Update epoch duration in side chain blocks (make update.epoch_duration val=30) update.epoch_duration: - @./bin/config.sh EpochDuration $(val) + @./bin/config.sh int EpochDuration $(val) # Update max object size in bytes (make update.max_object_size val=1000) update.max_object_size: - @./bin/config.sh MaxObjectSize $(val) + @./bin/config.sh int MaxObjectSize $(val) # Update audit fee per result in fixed 12 (make update.audit_fee val=100) update.audit_fee: - @./bin/config.sh AuditFee $(val) + @./bin/config.sh int AuditFee $(val) # Update container fee per alphabet node in fixed 12 (make update.container_fee val=500) update.container_fee: - @./bin/config.sh ContainerFee $(val) + @./bin/config.sh int ContainerFee $(val) # Update amount of EigenTrust iterations (make update.eigen_trust_iterations val=2) update.eigen_trust_iterations: - @./bin/config.sh EigenTrustIterations $(val) + @./bin/config.sh int EigenTrustIterations $(val) + + +# Update alpha parameter of EigenTrust algorithm in 0 <= f <= 1.0 (make update.eigen_trust_alpha val=0.2) +update.eigen_trust_alpha: + @./bin/config.sh string EigenTrustAlpha $(val) # Update basic income rate in fixed 12 (make update.basic_income_rate val=1000) update.basic_income_rate: - @./bin/config.sh BasicIncomeRate $(val) + @./bin/config.sh int BasicIncomeRate $(val) # Tick new epoch in side chain tick.epoch: