w3f / polkadot-validator-setup

Polkadot Validator Secure Setup
Apache License 2.0
217 stars 130 forks source link

Add support for multiple telemetry links #115

Closed kmhagan closed 3 years ago

kmhagan commented 3 years ago

Hello,

I created a PR to address https://github.com/w3f/polkadot-secure-validator/issues/59. This adds support for multiple telemetry links by having the user provide a comma separated list to the variable telemetryUrl. It leverages the same variable name to be backwards compatible with original variable and value.

This PR also cleans up the formatting of the service file by removing excess spacing that was caused by the conditional statements.

Example:

[all:vars]
telemetryUrl=wss://telemetry.polkadot.io/submit/,wss://telemetry-backend.w3f.community/submit

Will produce:

[Unit]
Description=Polkadot Node

[Service]
User=polkadot
Group=polkadot
ExecStart=/usr/local/bin/polkadot \
  --name mynamehere-sv-validator-0 \
  --validator \
  --public-addr=/ip4/servers.ip.address/tcp/80 \
  --listen-addr=/ip4/127.0.0.1/tcp/30333 \
  --rpc-methods=Unsafe \
  -lsync=warn,afg=warn,babe=warn \
  --telemetry-url 'wss://telemetry.polkadot.io/submit/ 1' \
  --telemetry-url 'wss://telemetry-backend.w3f.community/submit 1' \
  --chain=kusama

Restart=always
RestartSec=60

[Install]
WantedBy=multi-user.target

Let me know if you have any concerns with this implementation and thank you for maintaning this repo!

ilhanu commented 3 years ago

@lamafab @ironoa, This feature is a good addition to the telemetry. Can this be merged it's a nice feature to have for users that are are using different telemetries for different purposes.

lamafab commented 3 years ago

Fixed this: https://github.com/w3f/polkadot-validator-setup/commit/f3d1b7d519da68a9717669c747f787c6cd088e13

Sorry for the delay.