5454b36022
* wip * changed minor/patch weights and introduced full release chain history for more accurate calculations * clippy * updated contract schema * added nym-api endpoint for current rewarded set nodes * added nym-api endpoint for internal config score data * guard mixnet contract against decreasing semver * fixed config score calculation if there are skipped versions
107 lines
2.5 KiB
JSON
107 lines
2.5 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "MigrateMsg",
|
|
"type": "object",
|
|
"required": [
|
|
"current_nym_node_semver"
|
|
],
|
|
"properties": {
|
|
"current_nym_node_semver": {
|
|
"type": "string"
|
|
},
|
|
"unsafe_skip_state_updates": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"version_score_params": {
|
|
"default": {
|
|
"penalty": "0.995",
|
|
"penalty_scaling": "1.65"
|
|
},
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/VersionScoreFormulaParams"
|
|
}
|
|
]
|
|
},
|
|
"version_score_weights": {
|
|
"default": {
|
|
"major": 100,
|
|
"minor": 10,
|
|
"patch": 1,
|
|
"prerelease": 1
|
|
},
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/OutdatedVersionWeights"
|
|
}
|
|
]
|
|
},
|
|
"vesting_contract_address": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"Decimal": {
|
|
"description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)",
|
|
"type": "string"
|
|
},
|
|
"OutdatedVersionWeights": {
|
|
"description": "Defines weights for calculating numbers of versions behind the current release.",
|
|
"type": "object",
|
|
"required": [
|
|
"major",
|
|
"minor",
|
|
"patch",
|
|
"prerelease"
|
|
],
|
|
"properties": {
|
|
"major": {
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"minor": {
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"patch": {
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"prerelease": {
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"VersionScoreFormulaParams": {
|
|
"description": "Given the formula of version_score = penalty ^ (versions_behind_factor ^ penalty_scaling) define the relevant parameters",
|
|
"type": "object",
|
|
"required": [
|
|
"penalty",
|
|
"penalty_scaling"
|
|
],
|
|
"properties": {
|
|
"penalty": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"penalty_scaling": {
|
|
"$ref": "#/definitions/Decimal"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|