mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-02 13:23:10 +00:00
* perf: optimizing parameters sizing * chore: feedback Co-authored-by: markspanbroek <mark@spanbroek.net> * style: formatting * perf: more optimizations * chore: fixes * chore: fix certora spec * chore: more fixes for certora spec * chore: more and more fixes for certora spec * fix: ends type * test(certora): timestamp conversion * test(certora): timestamp conversion again * test(certora): timestamp conversion revert to assert_uint64 * test(certora): timestamp with mathint * test(certora): timestamp back with uint64 with require * Add missing configuration * Fix previous merge * Update StorageRequested to use int64 for expiry * requestDurationLimit => uint64 --------- Co-authored-by: markspanbroek <mark@spanbroek.net> Co-authored-by: Arnaud <arnaud@status.im> Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
36 lines
861 B
JavaScript
36 lines
861 B
JavaScript
const fs = require("fs")
|
|
|
|
const BASE_PATH = __dirname + "/networks"
|
|
|
|
const DEFAULT_CONFIGURATION = {
|
|
collateral: {
|
|
repairRewardPercentage: 10,
|
|
maxNumberOfSlashes: 2,
|
|
slashPercentage: 20,
|
|
validatorRewardPercentage: 20, // percentage of the slashed amount going to the validators
|
|
},
|
|
proofs: {
|
|
// period has to be less than downtime * blocktime
|
|
period: 120, // seconds
|
|
timeout: 30, // seconds
|
|
downtime: 64, // number of blocks
|
|
downtimeProduct: 67, // number of blocks
|
|
zkeyHash: "",
|
|
},
|
|
reservations: {
|
|
maxReservations: 3,
|
|
},
|
|
requestDurationLimit: 60*60*24*30 // 30 days
|
|
}
|
|
|
|
function loadConfiguration(name) {
|
|
const path = `${BASE_PATH}/${name}/configuration.js`
|
|
if (fs.existsSync(path)) {
|
|
return require(path)
|
|
} else {
|
|
return DEFAULT_CONFIGURATION
|
|
}
|
|
}
|
|
|
|
module.exports = { loadConfiguration }
|