From 5d2fb6bdfa717e12223b321a16025f36630a1016 Mon Sep 17 00:00:00 2001 From: jstuczyn Date: Mon, 16 Mar 2020 12:37:09 +0000 Subject: [PATCH 1/3] Updated quotation marks used in config templates to work on windows with paths containing `\U` sequences --- mixnode/src/config/template.rs | 16 ++++++++-------- nym-client/src/config/template.rs | 16 ++++++++-------- sfw-provider/src/config/template.rs | 22 +++++++++++----------- validator/src/config/template.rs | 8 ++++---- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/mixnode/src/config/template.rs b/mixnode/src/config/template.rs index 78ec91fa02..9d098af3b9 100644 --- a/mixnode/src/config/template.rs +++ b/mixnode/src/config/template.rs @@ -11,19 +11,19 @@ pub(crate) fn config_template() -> &'static str { [mixnode] # Human readable ID of this particular mixnode. -id = "{{ mixnode.id }}" +id = '{{ mixnode.id }}' # Layer of this particular mixnode determining its position in the network. layer = {{ mixnode.layer }} # Socket address to which this mixnode will bind to and will be listening for packets. -listening_address = "{{ mixnode.listening_address }}" +listening_address = '{{ mixnode.listening_address }}' # Path to file containing private identity key. -private_sphinx_key_file = "{{ mixnode.private_sphinx_key_file }}" +private_sphinx_key_file = '{{ mixnode.private_sphinx_key_file }}' # Path to file containing public sphinx key. -public_sphinx_key_file = "{{ mixnode.public_sphinx_key_file }}" +public_sphinx_key_file = '{{ mixnode.public_sphinx_key_file }}' ##### additional mixnode config options ##### @@ -33,12 +33,12 @@ public_sphinx_key_file = "{{ mixnode.public_sphinx_key_file }}" # Additionally a custom port can be provided, so both `nymtech.net:8080` and `nymtech.net` # are valid announce addresses, while the later will default to whatever port is used for # `listening_address`. -announce_address = "{{ mixnode.announce_address }}" +announce_address = '{{ mixnode.announce_address }}' ##### advanced configuration options ##### # Absolute path to the home Nym Clients directory. -nym_root_directory = "{{ mixnode.nym_root_directory }}" +nym_root_directory = '{{ mixnode.nym_root_directory }}' ##### logging configuration options ##### @@ -55,14 +55,14 @@ nym_root_directory = "{{ mixnode.nym_root_directory }}" [debug] # Directory server to which the server will be reporting their presence data. -presence_directory_server = "{{ debug.presence_directory_server}}" +presence_directory_server = '{{ debug.presence_directory_server}}" # Delay between each subsequent presence data being sent. # The provided value is interpreted as milliseconds. presence_sending_delay = {{ debug.presence_sending_delay }} # Directory server to which the server will be reporting their metrics data. -metrics_directory_server = "{{ debug.metrics_directory_server }}" +metrics_directory_server = '{{ debug.metrics_directory_server }}' # Delay between each subsequent metrics data being sent. # The provided value is interpreted as milliseconds. diff --git a/nym-client/src/config/template.rs b/nym-client/src/config/template.rs index c18730ed4b..ff31cd37e8 100644 --- a/nym-client/src/config/template.rs +++ b/nym-client/src/config/template.rs @@ -11,30 +11,30 @@ pub(crate) fn config_template() -> &'static str { [client] # Human readable ID of this particular client. -id = "{{ client.id }}" +id = '{{ client.id }}' # URL to the directory server. -directory_server = "{{ client.directory_server }}" +directory_server = '{{ client.directory_server }}' # Path to file containing private identity key. -private_identity_key_file = "{{ client.private_identity_key_file }}" +private_identity_key_file = '{{ client.private_identity_key_file }}' # Path to file containing public identity key. -public_identity_key_file = "{{ client.public_identity_key_file }}" +public_identity_key_file = '{{ client.public_identity_key_file }}' ##### additional client config options ##### # ID of the provider from which the client should be fetching messages. -provider_id = "{{ client.provider_id }}" +provider_id = '{{ client.provider_id }}' # A provider specific, optional, base58 stringified authentication token used for # communication with particular provider. -provider_authtoken = "{{ client.provider_authtoken }}" +provider_authtoken = '{{ client.provider_authtoken }}' ##### advanced configuration options ##### # Absolute path to the home Nym Clients directory. -nym_root_directory = "{{ client.nym_root_directory }}" +nym_root_directory = '{{ client.nym_root_directory }}' ##### socket config options ##### @@ -42,7 +42,7 @@ nym_root_directory = "{{ client.nym_root_directory }}" [socket] # allowed values are 'TCP', 'WebSocket' or 'None' -socket_type = "{{ socket.socket_type }}" +socket_type = '{{ socket.socket_type }}' # if applicable (for the case of 'TCP' or 'WebSocket'), the port on which the client # will be listening for incoming requests diff --git a/sfw-provider/src/config/template.rs b/sfw-provider/src/config/template.rs index 64208c8ab7..689cdf2f61 100644 --- a/sfw-provider/src/config/template.rs +++ b/sfw-provider/src/config/template.rs @@ -11,17 +11,17 @@ pub(crate) fn config_template() -> &'static str { [provider] # Human readable ID of this particular service provider. -id = "{{ provider.id }}" +id = '{{ provider.id }}' # Path to file containing private sphinx key. -private_sphinx_key_file = "{{ provider.private_sphinx_key_file }}" +private_sphinx_key_file = '{{ provider.private_sphinx_key_file }}' # Path to file containing public sphinx key. -public_sphinx_key_file = "{{ provider.public_sphinx_key_file }}" +public_sphinx_key_file = '{{ provider.public_sphinx_key_file }}' # nym_home_directory specifies absolute path to the home nym service providers directory. # It is expected to use default value and hence .toml file should not redefine this field. -nym_root_directory = "{{ provider.nym_root_directory }}" +nym_root_directory = '{{ provider.nym_root_directory }}' ##### Mixnet endpoint config options ##### @@ -29,7 +29,7 @@ nym_root_directory = "{{ provider.nym_root_directory }}" [mixnet_endpoint] # Socket address to which this service provider will bind to # and will be listening for sphinx packets coming from the mixnet. -listening_address = "{{ mixnet_endpoint.listening_address }}" +listening_address = '{{ mixnet_endpoint.listening_address }}' # Optional address announced to the directory server for the clients to connect to. # It is useful, say, in NAT scenarios or wanting to more easily update actual IP address @@ -37,7 +37,7 @@ listening_address = "{{ mixnet_endpoint.listening_address }}" # Additionally a custom port can be provided, so both `nymtech.net:8080` and `nymtech.net` # are valid announce addresses, while the later will default to whatever port is used for # `listening_address`. -announce_address = "{{ mixnet_endpoint.announce_address }}" +announce_address = '{{ mixnet_endpoint.announce_address }}' #### Clients endpoint config options ##### @@ -45,7 +45,7 @@ announce_address = "{{ mixnet_endpoint.announce_address }}" [clients_endpoint] # Socket address to which this service provider will bind to # and will be listening for sphinx packets coming from the mixnet. -listening_address = "{{ clients_endpoint.listening_address }}" +listening_address = '{{ clients_endpoint.listening_address }}' # Optional address announced to the directory server for the clients to connect to. # It is useful, say, in NAT scenarios or wanting to more easily update actual IP address @@ -53,14 +53,14 @@ listening_address = "{{ clients_endpoint.listening_address }}" # Additionally a custom port can be provided, so both `nymtech.net:8080` and `nymtech.net` # are valid announce addresses, while the later will default to whatever port is used for # `listening_address`. -announce_address = "{{ clients_endpoint.announce_address }}" +announce_address = '{{ clients_endpoint.announce_address }}' # Path to the directory with clients inboxes containing messages stored for them. -inboxes_directory = "{{ clients_endpoint.inboxes_directory }}" +inboxes_directory = '{{ clients_endpoint.inboxes_directory }}' # [TODO: implement its storage] Full path to a file containing mapping of # client addresses to their access tokens. -ledger_path = "{{ clients_endpoint.ledger_path }}" +ledger_path = '{{ clients_endpoint.ledger_path }}' ##### logging configuration options ##### @@ -77,7 +77,7 @@ ledger_path = "{{ clients_endpoint.ledger_path }}" [debug] # Directory server to which the server will be reporting their presence data. -presence_directory_server = "{{ debug.presence_directory_server}}" +presence_directory_server = '{{ debug.presence_directory_server}}' # Delay between each subsequent presence data being sent. presence_sending_delay = {{ debug.presence_sending_delay }} diff --git a/validator/src/config/template.rs b/validator/src/config/template.rs index 3e8b0c1f82..c8337589c0 100644 --- a/validator/src/config/template.rs +++ b/validator/src/config/template.rs @@ -11,13 +11,13 @@ pub(crate) fn config_template() -> &'static str { [validator] # Human readable ID of this particular validator. -id = "{{ validator.id }}" +id = '{{ validator.id }}' ##### advanced configuration options ##### # nym_home_directory specifies absolute path to the home nym validators directory. # It is expected to use default value and hence .toml file should not redefine this field. -nym_root_directory = "{{ validator.nym_root_directory }}" +nym_root_directory = '{{ validator.nym_root_directory }}' ##### mix mining config options ##### @@ -25,7 +25,7 @@ nym_root_directory = "{{ validator.nym_root_directory }}" [mix_mining] # Directory server from which the validator will obtain initial topology. -directory_server = "{{ mix_mining.directory_server }}" +directory_server = '{{ mix_mining.directory_server }}' # The uniform delay every which validator are running their mix-mining procedure. # The provided value is interpreted as milliseconds. @@ -61,7 +61,7 @@ number_of_test_packets = {{ mix_mining.number_of_test_packets }} [debug] # Directory server to which the server will be reporting their presence data. -presence_directory_server = "{{ debug.presence_directory_server }}" +presence_directory_server = '{{ debug.presence_directory_server }}' # Delay between each subsequent presence data being sent. presence_sending_delay = {{ debug.presence_sending_delay }} From f5e3e10707badaef5fb79f0eb2c890dce669b784 Mon Sep 17 00:00:00 2001 From: jstuczyn Date: Mon, 16 Mar 2020 13:12:15 +0000 Subject: [PATCH 2/3] Updated merged changes in config to be consistent with previous updates --- mixnode/src/config/template.rs | 2 +- sfw-provider/src/config/template.rs | 2 +- validator/src/config/template.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mixnode/src/config/template.rs b/mixnode/src/config/template.rs index b8a2557533..c42174e46c 100644 --- a/mixnode/src/config/template.rs +++ b/mixnode/src/config/template.rs @@ -17,7 +17,7 @@ id = '{{ mixnode.id }}' # Currently it's used entirely for debug purposes, as there are no mechanisms implemented # to verify correctness of the information provided. However, feel free to fill in # this field with as much accuracy as you wish to share. -location = "{{ mixnode.location }}" +location = '{{ mixnode.location }}' # Layer of this particular mixnode determining its position in the network. layer = {{ mixnode.layer }} diff --git a/sfw-provider/src/config/template.rs b/sfw-provider/src/config/template.rs index eb55d3ccd1..ee31ce45cb 100644 --- a/sfw-provider/src/config/template.rs +++ b/sfw-provider/src/config/template.rs @@ -17,7 +17,7 @@ id = '{{ provider.id }}' # Currently it's used entirely for debug purposes, as there are no mechanisms implemented # to verify correctness of the information provided. However, feel free to fill in # this field with as much accuracy as you wish to share. -location = "{{ provider.location }}" +location = '{{ provider.location }}' # Path to file containing private sphinx key. private_sphinx_key_file = '{{ provider.private_sphinx_key_file }}' diff --git a/validator/src/config/template.rs b/validator/src/config/template.rs index 1da0fab405..5b70197ee4 100644 --- a/validator/src/config/template.rs +++ b/validator/src/config/template.rs @@ -17,7 +17,7 @@ id = '{{ validator.id }}' # Currently it's used entirely for debug purposes, as there are no mechanisms implemented # to verify correctness of the information provided. However, feel free to fill in # this field with as much accuracy as you wish to share. -location = "{{ validator.location }}" +location = '{{ validator.location }}' ##### advanced configuration options ##### From c0044499da415ad1de445cc8a1305967d4ac2cb1 Mon Sep 17 00:00:00 2001 From: jstuczyn Date: Mon, 16 Mar 2020 13:33:09 +0000 Subject: [PATCH 3/3] Missing quoation mark --- mixnode/src/config/template.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mixnode/src/config/template.rs b/mixnode/src/config/template.rs index c42174e46c..36accd4392 100644 --- a/mixnode/src/config/template.rs +++ b/mixnode/src/config/template.rs @@ -61,7 +61,7 @@ nym_root_directory = '{{ mixnode.nym_root_directory }}' [debug] # Directory server to which the server will be reporting their presence data. -presence_directory_server = '{{ debug.presence_directory_server}}" +presence_directory_server = '{{ debug.presence_directory_server}}' # Delay between each subsequent presence data being sent. # The provided value is interpreted as milliseconds.