Lightning Nodes

Testnet Guide

Testnet Guide

Test Lightning applications safely with testnet bitcoin.

Overview

Testnet = Bitcoin test network with worthless coins.

Benefits:

  • Free testing

  • No financial risk

  • Faster blocks (~10 min)

  • Reset periodically

Get Started

Create Testnet Node

bashCopycomet node create --network testnet --region us-east

Free Features:

  • No credit charges

  • Full LND functionality

  • Bitcoin Core access

  • Same as mainnet (except network)

Get Testnet Coins

Faucets:

Request:

  1. Generate address: comet onchain address --node_id

  2. Visit faucet

  3. Enter address

  4. Receive coins (~0.01 tBTC)

Open Channels

Find Testnet Peers:

bashCopycomet peer recommend --node_id <node_id> --network testnet</node_id>

Open Channel:

bashCopycomet channel open --node_id <node_id> --peer_pubkey <pubkey> --amount 100000</pubkey></node_id

Testing Workflows

Payment Testing

Create Invoice:

bashCopycomet invoice create --node_id <node_id> --amount 10000 --memo "Test payment"</node_id>

Pay Invoice:

bashCopycomet payment send --node_id <node_id> --payment_request <lnbc...></lnbc...></node_id>

Channel Testing

Test Scenarios:

  1. Open channel

  2. Send payments

  3. Receive payments

  4. Rebalance

  5. Close channel (cooperative)

  6. Force close (test recovery)

API Testing

Test Integration:

pythonCopyimport requests

API_KEY = "test_api_key"
NODE_ID = "testnet_node_id"

# Create invoice
response = requests.post(
    'https://api.comet.dev/v1/invoices/create',
    headers={'Authorization': f'Bearer {API_KEY}'},
    json={'node_id': NODE_ID, 'amount': 10000}
)

invoice = response.json()
print(f"Invoice: {invoice['payment_request']}")

Testnet vs Mainnet

Feature

Testnet

Mainnet

Cost

Free

Paid

Coins

Worthless

Real value

Risk

None

Financial

Block time

~10 min

~10 min

Resets

Periodic

Never

Use case

Testing

Production

Best Practices

  1. Always test first: Validate on testnet before mainnet

  2. Test edge cases: Force closes, failures, timeouts

  3. Load testing: Simulate production volumes

  4. Integration testing: Test full workflows

  5. Document results: Track test outcomes

Limitations

Testnet Constraints:

  • Coins have no value

  • Network less stable

  • Fewer nodes/channels

  • May reset (rare)

  • Lower liquidity

Migration to Mainnet

Checklist

  • All tests passing

  • Error handling verified

  • Backup procedures tested

  • Monitoring configured

  • Documentation complete

Deploy

bashCopy# Create mainnet node
comet node create --network mainnet --region us-east

# Update configuration
export NODE_ID="mainnet_node_id"

# Deploy application
# Monitor closely

Resources

Table of Contents

Copyright © 2025 Comet Cash

Czech Republic VASP License Registration Nº 22053751

info@cometcash.com

All rights reserved.

Copyright © 2025 Comet Cash

Czech Republic VASP License Registration Nº 22053751

info@cometcash.com

All rights reserved.