Monitoring & Maintenance

This section describes how to monitor, maintain, and secure your Twilight nodes. It covers logging, telemetry, updates, and security best practices to ensure reliable operation across validator and relayer environments.


Overview

Effective monitoring helps node operators ensure uptime, track performance, and identify potential issues early. Maintenance involves regular updates, backups, and proactive security practices to keep your node resilient and synchronized with the Twilight testnet.


Log Management

Logs provide real-time insight into node activity and potential issues.

View Logs

docker logs -f validator

# or
docker logs -f relayer

Check Running Containers

docker ps

Common Log Checks

  • Look for "catching_up": false to confirm synchronization.

  • Watch for connection errors to peers or RPC endpoints.

  • Use grep to filter logs for keywords such as error or panic.


Telemetry & Prometheus

To monitor node metrics (block time, peers, memory, etc.), enable Prometheus telemetry in your configuration files.

Enable Telemetry

File: /root/.nyks/config/app.toml

File: /root/.nyks/config/config.toml

Once enabled, Prometheus metrics will be available on port 26660.


Grafana Integration

Grafana allows visualization of Prometheus metrics in real time.

Sample Prometheus Job Configuration

After setup, dashboards can display node uptime, peer count, block latency, and memory usage.


Node Updates & Maintenance

Regular updates are essential for security and performance improvements. Always back up your .env and volume data before updating.

Update Process

This sequence safely rebuilds your containers while preserving blockchain data.


Security Best Practices

circle-exclamation

As a node operator, it is your responsibility to protect your node from unauthorized access, loss, and theft.

1

Device Security

Physical Access Restrict physical access to the device running your node. For rented or virtual servers, verify the provider’s security policies and disable unnecessary administration panels.

Personal Devices Secure all devices holding wallets, SSH keys, or authentication tokens. Include them in your threat model.

2

Platform Security

Operating System Maintenance Regularly update your OS and third-party software (e.g., OpenSSH).

Firewall Configuration Allow only necessary ports — for example, 26657 for RPC and 26656 for P2P communication.

Network Security Restrict access using trusted IPs or VPN. Prefer key-based SSH authentication over passwords.

3

Software Security

Installation Verification Verify binaries and source code using PGP and git verify-tag. Ensure dependencies like Go are from trusted sources.

Regular Updates Track updates in official GitHub repositories and pull regularly to stay in sync with testnet versions.

4

Wallet Security

Twilight nodes use Cosmos SDK keyring wallets in Validator/Judge mode and BTC wallets when operating as Signers.

Node Wallet Use the file or pass backend for secure key storage. Avoid the test backend — it stores unencrypted keys and is meant only for development.

Seed Phrase Protection Write your 24-word mnemonic on paper and store it securely (fireproof safe or encrypted storage). Do not store it in plaintext or online.

Passphrase Management Encrypt your wallet with a passphrase but store it offline or in a password manager. If lost, there is no recovery option. Never use the same passphrase across multiple nodes.

Backup Encrypt private key backups and store them offline (USB drives, encrypted disks). Test your backups periodically to ensure recoverability.


Backup & Recovery

Backup Important Data

  • .env file

  • Database volumes

  • Wallet keys and mnemonics

Create Encrypted Backups

Store backups on secure offline devices.

Recovery Process

To restore from backup:


Troubleshooting

Node Not Starting

Sync or Peer Issues

Verify that required ports are open and reachable.

Reset Node State


  • Configuration

  • Validator Setup

  • Relayer Setup


By maintaining your node with these practices, you help keep the Twilight network stable, secure, and transparent.