Commit 445a84f5 authored by Cédric Moreau's avatar Cédric Moreau

Removing MSExpires & VTExpires + set voter actualization to 14 days

parent 6146809f
......@@ -49,8 +49,7 @@ function RegistryBinding (registryServer, conf) {
UD0: conf.sync.UD0,
UDPercent: conf.sync.UDPercent,
UDMinCoin: conf.sync.UDMinCoin,
Consensus: conf.sync.Consensus,
MSExpires: conf.sync.MSExpires
Consensus: conf.sync.Consensus
}, null, " "));
};
......
......@@ -51,7 +51,7 @@ module.exports = function (isMemberFunc, getPubkeyFunc) {
};
}
var VTExpires = 3600*24*90; // Every 90 days
var VTExpires = 3600*24*14; // Every 14 days
/**
......
......@@ -4,7 +4,7 @@ module.exports = function (pubkey, ctx, amNext, done) {
common.computeIndicators(pubkey, ctx, amNext, context2AnalyticalMembership, context2AnalyticalVoting, done);
}
var VTExpires = 3600*24*90; // Every 90 days
var VTExpires = 3600*24*14; // Every 14 days
/**
......
......@@ -302,9 +302,7 @@ var tasks = {
async.apply(simpleInteger, "Dividend frequency", "UDFreq", conf.sync),
async.apply(simpleFloat, "Consensus %required", "Consensus", conf.sync),
async.apply(simpleInteger, "Initial dividend", "UD0", conf.sync),
async.apply(simpleFloat, "Universal Dividend %growth", "UDPercent", conf.sync),
async.apply(simpleInteger, "Membership validity duration", "MSExpires", conf.sync),
async.apply(simpleInteger, "Voting request validity duration", "VTExpires", conf.sync),
async.apply(simpleFloat, "Universal Dividend %growth", "UDPercent", conf.sync)
], done);
},
function disabled () {
......
......@@ -25,8 +25,6 @@ var ConfigurationSchema = new Schema({
UD0: 100,
UDPercent: 0.007376575, // 0.73%
Consensus: 2/3,
MSExpires: 3600*24*30.4375*6, // 6 months
VTExpires: 3600*24*30.4375*1, // 1 months
Algorithm: 'AnyKey'
}}
});
......
......@@ -306,8 +306,6 @@ function overrideConf(conf) {
UD0: program.ud0,
UDPercent: program.udpercent,
Consensus: program.consensus,
MSExpires: program.msvalidity,
VTExpires: program.vtvalidity,
Algorithm: program.algorithm
}
};
......@@ -335,8 +333,6 @@ function overrideConf(conf) {
if (cli.sync.UD0) conf.sync.UD0 = cli.sync.UD0;
if (cli.sync.UDPercent) conf.sync.UDPercent = cli.sync.UDPercent;
if (cli.sync.Consensus) conf.sync.Consensus = cli.sync.Consensus;
if (cli.sync.MSExpires) conf.sync.MSExpires = cli.sync.MSExpires;
if (cli.sync.VTExpires) conf.sync.VTExpires = cli.sync.VTExpires;
if (cli.sync.Algorithm) conf.sync.Algorithm = cli.sync.Algorithm;
// Specific internal settings
......
......@@ -1422,9 +1422,7 @@ The synchronization parameters.
"UD0": 100,
"UDPercent": 0.007376575,
"CoinAlgo": "Base2Draft",
"Consensus": 0.6666666666666666,
"MSExpires": 15778800,
"VTExpires": 15778800
"Consensus": 0.6666666666666666
}
```
......@@ -1439,8 +1437,6 @@ UD0 | Universal Dividend initial value
UDPercent | Universal Dividend % of monetary mass growth
CoinAlgo | Algorithm used for generating coins (this also gives interpretation of coins' value in each amendment)
Consensus | Percent of voters required to valid an Amendment
MSExpires | Delay by which a membership is to be considered expired
VTExpires | Delay by which a voting is to be considered expired
#### `flow`
......
......@@ -225,7 +225,7 @@ Vvar = MAX[-1, MIN[1, !Voter*(+VT -ML) + Voter*(-ML) + Voterx*(-1 +VT -ML)]]
Using this formula, it can be known at any moment how to apply variation of the voter for next amendment.
> N.B.: `Voterx` parameter: voter is considered **eligibile** if his last voting document's date does not exceeds a certain duration `vtvalidity` which is algorithm dependent. For `AnyKey` and `1Sig`, this value is **3 months**, inclusive.
> N.B.: `Voterx` parameter: voter is considered **eligibile** if his last voting document's date does not exceeds a certain duration `vtvalidity` which is algorithm dependent. For `AnyKey` and `1Sig`, this value is **14 days**, inclusive.
> N.B.: `Voter`, `!Voter` and `Voterx` fields are exclusive, so at any time `Voter + !Voter + Voterx = 1`.
......
......@@ -161,12 +161,6 @@ function RegistryServer (dbConf, overrideConf, interceptors) {
if (!conf.sync.Consensus) {
errors.push('Autovoting enabled but %required votes not given');
}
if (!conf.sync.MSExpires) {
errors.push('Autovoting enabled but membership validity not given');
}
if (!conf.sync.VTExpires) {
errors.push('Autovoting enabled but voting validity not given');
}
}
done(errors[0]);
};
......
......@@ -33,9 +33,7 @@ var conf = {
UDFreq: 2, // Dividend every 2 seconds
UD0: 145,
UDPercent: 0.5, // So it can be tested under 4 UD - this ultra high value of UD growth
Consensus: 2/3,
MSExpires: 8, // seconds, so AM9 will see ]AM0;AM1] members be kicked out at AM9
VTExpires: 3 // seconds, so AM4 will see not-actualized voters kicked out
Consensus: 2/3
},
createNext: true,
isValidPubkey: function (pubkey, am) {
......
......@@ -51,8 +51,6 @@ describe('A server', function () {
"UD0": 100,
"UDPercent": 0.1,
"Consensus": 0.33,
"MSExpires": 15778800,
"VTExpires": 15778800,
"AMDaemon" : "OFF",
"Algorithm" : "AnyKey"
}
......
......@@ -97,8 +97,7 @@ before(function (done) {
UDFreq: 2, // Dividend every 5 seconds
UD0: 10,
UDPercent: 0.5, // So it can be tested under 4 UD - this ultra high value of UD growth
Consensus: 2/3,
MSExpires: 3600*24*30 // 30 days
Consensus: 2/3
}
});
server.on('BMALoaded', function (err, appReady) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment