51b511b27e
WIP; rebasing Another branch squash Squashing the v3 branch changing min pledge amounts logic for adding new nymnode into the contract converting mixnode/gateway bonding into nym-node bonding logic for migrating gateways into nymnodes ibid for mixnodes further nym-node work + fixed most existing unit tests forbid nymnode migration with pending cost params changes preassign nodeid for gateways changing role assignment and epoch progression changing role assignment and epoch progression optional custom http port logic for unbonding a nym-node updating Delegation struct logic for increasing pledge of either mixnode or nymnode logic for decreasing pledge of either mixnode or a nym node logic for changing cost params of either mixnode or a nym node wip initialise nymnodes storage fixing transaction tests fixed naive family tests reward-compatibility related works resolving delegation events introduced rewarded set metadata another iteration of restoring old tests updated rewarding part of nym-api parking the branch unparking the branch wip purged families added 'ExitGateway' role passing explicit work factor for rewarding function remove legacy layers storage wip: node description queries added announced ports to self-described api step1 in gruelling journey of adding node_id to gateways ensure epoch work never goes above 1.0 changed active set to contain role distribution [theoretically] sending rewarding messages for the new rewarded set [theoretically] assigning new rewarded set reimplementing more nym-api features remove legacy types re-implement legacy network monitor restoring further routes + minor refactor of NodeStatusCache skimmed routes now return legacy nodes alongside nym-nodes seemingly restored all functionalities in nym-api removing more legacy things from the contract initial contract cleanup added nym-api endpoints to return generic annotations regardless of type updated simulator to use new rewarding parameters more contract cleanup made existing mixnet contract tests compile extra validation of nym-node bonding parameters fixed additional compilation issues fixed nym-api v3 database migration failure added additional nym-node contract queries updated the schema made additional delegation/rewards queries compatible with both legacy mixnodes and nym-nodes fixing existing unit tests in mixnet contract wip resolved first batch of 500 compiler errors re-deprecating routes making wallet's rust backend compile fixed non-determinism in contract + nym-api build fixes to the build populating cotracts-cache with nym-nodes data more missing nymnodes queries temp mixnet contract methods + restored result submission in nym-api allow deprecated routes submitting correct results for mixnode results removed deprecated re-export of AxumAppState and removed smurf naming moved axum modules into support::http cleaning up nym-api warnings determine entry gateways before exits exposed transaction to update nym-node config missing memo for updating node config new routes added routes to swagger and fixed relative paths fixed some macro derivations added nym-node commands to nym-cli
134 lines
4.5 KiB
Rust
134 lines
4.5 KiB
Rust
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
pub(crate) const CONFIG_TEMPLATE: &str = r#"
|
|
# This is a TOML config file.
|
|
# For more information, see https://github.com/toml-lang/toml
|
|
|
|
##### main base nym-api config options #####
|
|
|
|
[base]
|
|
|
|
# ID specifies the human readable ID of this particular nym-api.
|
|
id = '{{ base.id }}'
|
|
|
|
# Validator server to which the API will be getting information about the network.
|
|
local_validator = '{{ base.local_validator }}'
|
|
|
|
# Socket address this api will use for binding its http API.
|
|
bind_address = '{{ base.bind_address }}'
|
|
|
|
# Mnemonic used for rewarding and validator interaction
|
|
mnemonic = '{{ base.mnemonic }}'
|
|
|
|
[base.storage_paths]
|
|
# Path to file containing private identity key of the nym-api.
|
|
private_identity_key_file = '{{ base.storage_paths.private_identity_key_file }}'
|
|
|
|
# Path to file containing public identity key of the nym-api.
|
|
public_identity_key_file = '{{ base.storage_paths.public_identity_key_file }}'
|
|
|
|
##### network monitor config options #####
|
|
|
|
[network_monitor]
|
|
# Specifies whether network monitoring service is enabled in this process.
|
|
enabled = {{ network_monitor.enabled }}
|
|
|
|
[network_monitor.storage_paths]
|
|
|
|
# Path to the database containing bandwidth credentials of this client.
|
|
credentials_database_path = '{{ network_monitor.storage_paths.credentials_database_path }}'
|
|
|
|
[network_monitor.debug]
|
|
|
|
# Indicates whether this validator api is running in a disabled credentials mode, thus attempting
|
|
# to claim bandwidth without presenting bandwidth credentials.
|
|
disabled_credentials_mode = {{ network_monitor.debug.disabled_credentials_mode }}
|
|
|
|
# Specifies the interval at which the network monitor sends the test packets.
|
|
run_interval = '{{ network_monitor.debug.run_interval }}'
|
|
|
|
# Desired number of test routes to be constructed (and working) during a monitor test run.
|
|
test_routes = {{ network_monitor.debug.test_routes }}
|
|
|
|
# The minimum number of test routes that need to be constructed (and working) in order for
|
|
# a monitor test run to be valid.
|
|
minimum_test_routes = {{ network_monitor.debug.minimum_test_routes }}
|
|
|
|
# Number of test packets sent via each pseudorandom route to verify whether they work correctly,
|
|
# before using them for testing the rest of the network.
|
|
route_test_packets = {{ network_monitor.debug.route_test_packets }}
|
|
|
|
# Number of test packets sent to each node during regular monitor test run.
|
|
per_node_test_packets = {{ network_monitor.debug.per_node_test_packets }}
|
|
|
|
|
|
##### node status api config options #####
|
|
|
|
[node_status_api.storage_paths]
|
|
|
|
# Path to the database file containing uptime statuses for all mixnodes and gateways.
|
|
database_path = '{{ node_status_api.storage_paths.database_path }}'
|
|
|
|
[node_status_api.debug]
|
|
|
|
caching_interval = '{{ node_status_api.debug.caching_interval }}'
|
|
|
|
|
|
##### topology cacher config options #####
|
|
|
|
[topology_cacher.debug]
|
|
|
|
caching_interval = '{{ topology_cacher.debug.caching_interval }}'
|
|
|
|
|
|
##### circulating supply cacher config options #####
|
|
|
|
[circulating_supply_cacher]
|
|
|
|
# Specifies whether circulating supply caching service is enabled in this process.
|
|
enabled = {{ circulating_supply_cacher.enabled }}
|
|
|
|
[circulating_supply_cacher.debug]
|
|
|
|
caching_interval = '{{ circulating_supply_cacher.debug.caching_interval }}'
|
|
|
|
|
|
##### rewarding config options #####
|
|
|
|
[rewarding]
|
|
|
|
# Specifies whether rewarding service is enabled in this process.
|
|
enabled = {{ rewarding.enabled }}
|
|
|
|
[rewarding.debug]
|
|
|
|
# Specifies the minimum percentage of monitor test run data present in order to
|
|
# distribute rewards for given interval.
|
|
# Note, only values in range 0-100 are valid
|
|
minimum_interval_monitor_threshold = {{ rewarding.debug.minimum_interval_monitor_threshold }}
|
|
|
|
[ecash_signer]
|
|
|
|
# Specifies whether ecash signing protocol is enabled in this process.
|
|
enabled = {{ ecash_signer.enabled }}
|
|
|
|
# address of this nym-api as announced to other instances for the purposes of performing the DKG.
|
|
announce_address = '{{ ecash_signer.announce_address }}'
|
|
|
|
[ecash_signer.storage_paths]
|
|
|
|
# Path to a JSON file where state is persisted between different stages of DKG.
|
|
dkg_persistent_state_path = '{{ ecash_signer.storage_paths.dkg_persistent_state_path }}'
|
|
|
|
# Path to the ecash key.
|
|
ecash_key_path = '{{ ecash_signer.storage_paths.ecash_key_path }}'
|
|
|
|
# Path to the dkg dealer decryption key
|
|
decryption_key_path = '{{ ecash_signer.storage_paths.decryption_key_path }}'
|
|
|
|
# Path to the dkg dealer public key with proof
|
|
public_key_with_proof_path = '{{ ecash_signer.storage_paths.public_key_with_proof_path }}'
|
|
|
|
"#;
|