d8c84cc4d6
* wip * wip: wrap node's sphinx key with a manager * wip: choosing correct key for packet processing * further propagation of key rotation information * attaching key rotation information to reply surbs * added basic key rotation information to mixnet contract * wip: introducing cached queries for key rotation info from nym api * unified nym-api contract cache refreshing * finish packet decoding * multi api client + retrieving rotation id * rotating sphinx key files * logic for migrating config file * wip: putting new sphinx keys to self described endpoints * processing loop of KeyRotationController * fixed sphinx key loading * rotating bloomfilters * wired up KeyRotationController * flushing bloomfilters to disk and loading * most of nym-node changes * post rebase fixes * fixes due to backwards compatible hostkeys * split http state.rs file * dont use deprecated fields * fixed backwards compatible deserialisation of host information * split up node describe cache * added a dedicated CacheRefresher listener to perform full refresh outside the set interval * controlling announced sphinx keys within nym-api * retrieving rotation id when pulling topology * split nym-nodes http handlers * v2 nym-api endpoints to retrieve nodes with additional metadata information * bug fixes... * additional bugfixes and guards against stuck epoch * testnet manager: set first nym-api as the rewarder * fixed host information deserialisation * fixed panic during first key rotation * post rebase fixes * clippy * more guards against stuck epochs * added helper method to reset node's sphinx key * instantiate mixnet contract with custom key rotation validity * additional bugfixes and debugging nym-api deadlock * passing shutdown to nym apis client * remove dead test * post rebasing fixes * missing MixnetQueryClient variants * remove usage of deprecated methods in sdk example * fix: incorrect method signature * post rebasing fixes * attempt to retrieve key rotation id before doing any config migration work * ignore tests relying on networking behaviour * allow networking failures in certain tests
288 lines
7.5 KiB
JSON
288 lines
7.5 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "InstantiateMsg",
|
|
"type": "object",
|
|
"required": [
|
|
"current_nym_node_version",
|
|
"epoch_duration",
|
|
"epochs_in_interval",
|
|
"initial_rewarding_params",
|
|
"rewarding_denom",
|
|
"rewarding_validator_address",
|
|
"vesting_contract_address"
|
|
],
|
|
"properties": {
|
|
"current_nym_node_version": {
|
|
"type": "string"
|
|
},
|
|
"epoch_duration": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"epochs_in_interval": {
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"initial_rewarding_params": {
|
|
"$ref": "#/definitions/InitialRewardingParams"
|
|
},
|
|
"interval_operating_cost": {
|
|
"default": {
|
|
"maximum": "1000000000000000",
|
|
"minimum": "0"
|
|
},
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/RangedValue_for_Uint128"
|
|
}
|
|
]
|
|
},
|
|
"key_validity_in_epochs": {
|
|
"default": null,
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"profit_margin": {
|
|
"default": {
|
|
"maximum": "1",
|
|
"minimum": "0"
|
|
},
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/RangedValue_for_Percent"
|
|
}
|
|
]
|
|
},
|
|
"rewarding_denom": {
|
|
"type": "string"
|
|
},
|
|
"rewarding_validator_address": {
|
|
"type": "string"
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"Duration": {
|
|
"type": "object",
|
|
"required": [
|
|
"nanos",
|
|
"secs"
|
|
],
|
|
"properties": {
|
|
"nanos": {
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"secs": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"InitialRewardingParams": {
|
|
"type": "object",
|
|
"required": [
|
|
"active_set_work_factor",
|
|
"initial_reward_pool",
|
|
"initial_staking_supply",
|
|
"interval_pool_emission",
|
|
"rewarded_set_params",
|
|
"staking_supply_scale_factor",
|
|
"sybil_resistance"
|
|
],
|
|
"properties": {
|
|
"active_set_work_factor": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"initial_reward_pool": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"initial_staking_supply": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"interval_pool_emission": {
|
|
"$ref": "#/definitions/Percent"
|
|
},
|
|
"rewarded_set_params": {
|
|
"$ref": "#/definitions/RewardedSetParams"
|
|
},
|
|
"staking_supply_scale_factor": {
|
|
"$ref": "#/definitions/Percent"
|
|
},
|
|
"sybil_resistance": {
|
|
"$ref": "#/definitions/Percent"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"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
|
|
},
|
|
"Percent": {
|
|
"description": "Percent represents a value between 0 and 100% (i.e. between 0.0 and 1.0)",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Decimal"
|
|
}
|
|
]
|
|
},
|
|
"RangedValue_for_Percent": {
|
|
"type": "object",
|
|
"required": [
|
|
"maximum",
|
|
"minimum"
|
|
],
|
|
"properties": {
|
|
"maximum": {
|
|
"$ref": "#/definitions/Percent"
|
|
},
|
|
"minimum": {
|
|
"$ref": "#/definitions/Percent"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"RangedValue_for_Uint128": {
|
|
"type": "object",
|
|
"required": [
|
|
"maximum",
|
|
"minimum"
|
|
],
|
|
"properties": {
|
|
"maximum": {
|
|
"$ref": "#/definitions/Uint128"
|
|
},
|
|
"minimum": {
|
|
"$ref": "#/definitions/Uint128"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"RewardedSetParams": {
|
|
"type": "object",
|
|
"required": [
|
|
"entry_gateways",
|
|
"exit_gateways",
|
|
"mixnodes",
|
|
"standby"
|
|
],
|
|
"properties": {
|
|
"entry_gateways": {
|
|
"description": "The expected number of nodes assigned entry gateway role (i.e. [`Role::EntryGateway`])",
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"exit_gateways": {
|
|
"description": "The expected number of nodes assigned exit gateway role (i.e. [`Role::ExitGateway`])",
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"mixnodes": {
|
|
"description": "The expected number of nodes assigned the 'mixnode' role, i.e. total of [`Role::Layer1`], [`Role::Layer2`] and [`Role::Layer3`].",
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"standby": {
|
|
"description": "Number of nodes in the 'standby' set. (i.e. [`Role::Standby`])",
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"Uint128": {
|
|
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
|
|
"type": "string"
|
|
},
|
|
"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
|
|
}
|
|
}
|
|
}
|