Estimated reading time: 7 minutes
Note: Bitcoin Core nodes not currently available. References are for future use. Currently supported: LND Node and LITD (TAPD) Node.
Dashboard:
Node health indicators
Recent error logs
Performance metrics
Alert history
API Examples:
Get node details and status:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" \
-H "Content-Type: application/json"
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "X-API-Key: {API_KEY}" \
-H "Content-Type: application/json"
const response = await fetch(
`https://provisioning.cometplatform.com/api/company/${COMPANY_ID}/nodes/${NODE_ID}`,
{
method: 'GET',
headers: {
'Authorization': `Bearer ${AUTH_TOKEN}`,
'Content-Type': 'application/json'
}
}
);
const nodeInfo = await response.json();
console.log('Node status:', nodeInfo.status);
console.log('API endpoint:', nodeInfo.api_endpoint);
import requests
url = f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}"
headers = {
"Authorization": f"Bearer {AUTH_TOKEN}",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
node_info = response.json()
print(f"Node status: {node_info['status']}")
print(f"API endpoint: {node_info['api_endpoint']}")Symptoms: Connection refused, timeouts, "Host unreachable"
Diagnostics:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}"
const response = await fetch(
`https://provisioning.cometplatform.com/api/company/${COMPANY_ID}/nodes/${NODE_ID}`,
{
headers: { 'Authorization': `Bearer ${AUTH_TOKEN}` }
}
);
const node = await response.json();
console.log('Status:', node.status);
console.log('Endpoint:', node.api_endpoint);
import requests
response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
node = response.json()
print(f"Status: {node['status']}")
print(f"Endpoint: {node['api_endpoint']}")Solutions:
Wrong Endpoint
Verify you're using the correct endpoint format from the node details:
import requests
response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
node = response.json()
print(f"API endpoint: {node['api_endpoint']}")Firewall/Network
Check corporate firewall
Try different network
Verify ports 8080/10009 accessible
Symptoms: Connections work sometimes, "Connection reset by peer"
Diagnostics:
Check node status via API. Note: Detailed metrics and logs are available through the dashboard:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}"
import requests
response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
node = response.json()
print(f"Status: {node['status']}")
print(f"Command history: {node.get('command_history', [])}")Solutions:
Implement Retry Logic
import requests
import time
def api_call_with_retry(url, headers, max_retries=5):
for attempt in range(max_retries):
try:
response = requests.get(url, headers=headers, timeout=10)
response.raise_for_status()
return response.json()
except (requests.exceptions.RequestException, requests.exceptions.Timeout) as e:
if attempt == max_retries - 1:
raise
wait_time = 2 ** attempt
print(f"Attempt {attempt + 1} failed, retrying in {wait_time}s...")
time.sleep(wait_time)
return None
node_info = api_call_with_retry(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
async function apiCallWithRetry(url, options, maxRetries = 5) {
for (let attempt = 0; attempt < maxRetries; attempt++) {
try {
const response = await fetch(url, { ...options, signal: AbortSignal.timeout(10000) });
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return await response.json();
} catch (error) {
if (attempt === maxRetries - 1) throw error;
const waitTime = Math.pow(2, attempt) * 1000;
console.log(`Attempt ${attempt + 1} failed, retrying in ${waitTime}ms...`);
await new Promise(resolve => setTimeout(resolve, waitTime));
}
}
}
const nodeInfo = await apiCallWithRetry(
`https://provisioning.cometplatform.com/api/company/${COMPANY_ID}/nodes/${NODE_ID}`,
{ headers: { 'Authorization': `Bearer ${AUTH_TOKEN}` } }
);Resource Exhaustion
Node resource metrics are available through the dashboard. To upgrade node tier, contact support or use the dashboard:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" | jq '.tier'
import requests
response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
node = response.json()
print(f"Current tier: {node['tier']}")
Symptoms: Sync progress not advancing, stuck on "Syncing"
Diagnostics:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}"For LND nodes, check sync status and peers via node's native API:
curl -X GET "https://{API_ENDPOINT}/v1/getinfo" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
import requests
response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
node = response.json()
api_endpoint = node['api_endpoint']
if node['type'] == 'LND':
lnd_response = requests.get(
f"https://{api_endpoint}/v1/getinfo",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX}
)
lnd_info = lnd_response.json()
print(f"Synced: {lnd_info.get('synced_to_chain', False)}")
print(f"Block height: {lnd_info.get('block_height', 0)}")Solutions:
Insufficient Peers (<5)
Node configuration changes require support assistance or dashboard access. Contact support for peer configuration changes.
Resource Constrained
Node tier upgrades can be done through the dashboard or by contacting support. Current tier can be checked via API:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" | jq '.tier'Restart Node
Stop and start the node:
curl -X POST "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}/stop" \
-H "Authorization: Bearer {AUTH_TOKEN}"
curl -X POST "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}/start" \
-H "Authorization: Bearer {AUTH_TOKEN}"
import requests
import time
base_url = f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}"
headers = {"Authorization": f"Bearer {AUTH_TOKEN}"}
requests.post(f"{base_url}/stop", headers=headers)
time.sleep(5)
response = requests.post(f"{base_url}/start", headers=headers)
print(f"Node status: {response.json()['status']}")Symptoms: Progress resets to 0%, blocks re-downloaded
Diagnostics:
Check node status and command history for errors. Detailed logs are available through the dashboard:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" | jq '.command_history'Solutions:
Database Corruption
Database restoration and rebuild operations require support assistance. Contact support@cometcash.com with your node ID for assistance with database issues.
Insufficient Disk/Memory
Node tier upgrades (which include more storage) can be done through the dashboard or by contacting support. Check current tier via API:
import requests
response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
node = response.json()
print(f"Current tier: {node['tier']}")
Symptoms: 401 errors, "Invalid macaroon signature"
Diagnostics:
Download encrypted macaroon and test connection:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}/macaroon/admin" \
-H "Authorization: Bearer {AUTH_TOKEN}" \
-o encrypted_macaroon.json
curl -X GET "https://{API_ENDPOINT}/v1/getinfo" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
import requests
import json
from cryptography.fernet import Fernet
import hashlib
from base64 import b64encode
response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}/macaroon/admin",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
macaroon_data = response.json()
password = "YOUR_PASSWORD"
key = hashlib.pbkdf2_hmac('sha256', password.encode(), b'salt', 100000)
f = Fernet(b64encode(key))
decrypted_macaroon = f.decrypt(macaroon_data['macaroon'].encode())
lnd_response = requests.get(
f"https://{API_ENDPOINT}/v1/getinfo",
headers={'Grpc-Metadata-macaroon': decrypted_macaroon.hex()}
)
print(lnd_response.json())Solutions:
Macaroon Not Hex-Encoded
import codecs
with open('macaroon.dat', 'rb') as f:
macaroon_hex = codecs.encode(f.read(), 'hex').decode()Wrong Macaroon File
Use admin.macaroon for most operations, not readonly.macaroon or invoice.macaroon.
Macaroon Expired/Revoked
Create a new macaroon using LND's native API directly:
curl -X POST "https://{API_ENDPOINT}/v1/macaroon" \
-H "Grpc-Metadata-macaroon: {EXISTING_ADMIN_MACAROON_HEX}" \
-d '{"permissions": [{"entity": "info", "action": "read"}, {"entity": "invoices", "action": "read"}, {"entity": "invoices", "action": "write"}]}'
import requests
node_response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
api_endpoint = node_response.json()['api_endpoint']
response = requests.post(
f"https://{api_endpoint}/v1/macaroon",
headers={'Grpc-Metadata-macaroon': EXISTING_ADMIN_MACAROON_HEX},
json={
"permissions": [
{"entity": "info", "action": "read"},
{"entity": "invoices", "action": "read"},
{"entity": "invoices", "action": "write"}
]
}
)
new_macaroon = response.json()
print(f"New macaroon: {new_macaroon['macaroon']}")Invalid Macaroon
Re-download macaroon from the provisioning API. TLS certificates are managed automatically by the platform - no certificate files are required for API calls:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}/macaroon/admin" \
-H "Authorization: Bearer {AUTH_TOKEN}" \
-o
import requests
response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}/macaroon/admin",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
macaroon_data = response.json()
Symptoms: Auth succeeds but operations fail
Diagnostics:
To check macaroon permissions, use LND's native API or decode the macaroon. Note: Macaroon permissions are determined when it's created.
Solutions:
Create Macaroon with Required Permissions
Create a macaroon with specific permissions using LND's native API:
curl -X POST "https://{API_ENDPOINT}/v1/macaroon" \
-H "Grpc-Metadata-macaroon: {ADMIN_MACAROON_HEX}" \
-d '{
"permissions": [
{"entity": "info", "action": "read"},
{"entity": "invoices", "action": "read"},
{"entity": "invoices", "action": "write"},
{"entity": "offchain", "action": "read"},
{"entity": "offchain", "action": "write"}
]
}'
import requests
permissions = [
{"entity": "info", "action": "read"},
{"entity": "invoices", "action": "read"},
{"entity": "invoices", "action": "write"},
{"entity": "offchain", "action": "read"},
{"entity": "offchain", "action": "write"}
]
response = requests.post(
f"https://{API_ENDPOINT}/v1/macaroon",
headers={'Grpc-Metadata-macaroon': ADMIN_MACAROON_HEX},
json={"permissions": permissions}
)
new_macaroon = response.json()
print(f"New macaroon with custom permissions: {new_macaroon['macaroon']}")Use Admin Macaroon
For full access, use admin.macaroon.
Solutions:
Python Version (requires 3.8+)
Use Virtual Environment
python -m venv comet-env
source comet-env/bin/activate
Install from GitHub
Symptoms: API calls >1 second, timeouts
Diagnostics:
Measure API response times:
import requests
import time
start = time.time()
response = requests.get(
f"https://{API_ENDPOINT}/v1/getinfo",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX}
)
elapsed_ms = (time.time() - start) * 1000
print(f"API call took: {elapsed_ms:.2f}ms")
print(f"Response: {response.json()}")
const start = performance.now();
const response = await fetch(`https://${API_ENDPOINT}/v1/getinfo`, {
method: 'GET',
headers: { 'Grpc-Metadata-macaroon': MACAROON_HEX }
});
const elapsedMs = performance.now() - start;
const data = await response.json();
console.log(`API call took: ${elapsedMs.toFixed(2)}ms`);
console.log('Response:', data);Check node status and tier via provisioning API:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" | jq '{status, tier}'Solutions:
Node Resource Exhausted (>80% CPU/memory)
Node tier upgrades can be done through the dashboard or by contacting support. Check current tier:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" | jq '.tier'Network Latency
Measure latency to node endpoint and check node region. To create a node closer to your application, use the provisioning API:
time curl -X GET "https://{API_ENDPOINT}/v1/getinfo" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" > /dev/null
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" | jq '.region'
import requests
node_data = {
"name": "My New Node",
"network": "testnet",
"node_tier": "standard",
"node_type": "LND",
"region": "us-west-2",
"settings": {
"alias": "MyNode",
"grpc": True,
"rest": True
}
}
response = requests.post(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"},
json=node_data
)
print(response.json())Database Compaction
Database compaction operations require support assistance. Contact support@cometcash.com if you experience database performance issues.
Optimize Queries
channels = node.channels.list(active_only=True, limit=10)
Diagnostics:
List all nodes to see what's consuming credits:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes" \
-H "Authorization: Bearer {AUTH_TOKEN}"
import requests
response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
nodes = response.json()
running_nodes = [n for n in nodes if n['status'] == 'running']
print(f"Running nodes: {len(running_nodes)}")
for node in running_nodes:
print(f" - {node['node_name']} ({node['node_id']}) - Tier: {node['tier']}")Note: Billing and credit breakdown details are available through the dashboard.
Common Causes:
Forgot to Delete Test Nodes
List and delete nodes:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes" \
-H "Authorization: Bearer {AUTH_TOKEN}"
curl -X DELETE "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}"
import requests
response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
nodes = response.json()
for node in nodes:
if 'test' in node['node_name'].lower():
delete_response = requests.delete(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{node['node_id']}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
print(f"Deleted: {node['node_name']}")Running Higher Tier Than Needed
Node tier changes require dashboard access or support assistance. Check current tier:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" | jq '.tier'Use the dashboard to downgrade node tiers, or contact support for assistance.
Supporting Infrastructure
LND nodes consume credits for Bitcoin infrastructure (pruned node + shared full node). See Pricing & Credits.
Diagnostics:
Billing invoices and subscription details are available through the dashboard. Contact billing@cometcash.com for API access to billing information.
Common Causes:
Mid-cycle upgrade: Prorated charge for remaining period
Tax not accounted for: Invoices include VAT/GST
Multiple organizations: Each billed separately
Contact billing@cometcash.com with invoice ID for discrepancies.
Cannot Downgrade - Too Many Resources
Check node list and delete unused nodes to free credits:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes" \
-H "Authorization: Bearer {AUTH_TOKEN}"
curl -X DELETE "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}"Credit consumption details are available through the dashboard.
Payment Method Declined
Payment method management is available through the dashboard. Visit Dashboard → Billing → Payment Methods to update or add payment methods including Bitcoin/Lightning.
Timing:
Downgrades: Effective next billing cycle
Upgrades: Immediate
Diagnostics:
First, get the node's API endpoint from provisioning API, then use Tapd's native REST API:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" | jq -r '.api_endpoint'
curl -X GET "https://{API_ENDPOINT}/v1/taproot-assets/assets/balance" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
curl -X GET "https://{API_ENDPOINT}/v1/taproot-assets/universe/info" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
import requests
node_response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
api_endpoint = node_response.json()['api_endpoint']
balance_response = requests.get(
f"https://{api_endpoint}/v1/taproot-assets/assets/balance",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX}
)
print(f"Balance: {balance_response.json()}")
universe_response = requests.get(
f"https://{api_endpoint}/v1/taproot-assets/universe/info",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX}
)
print(f"Universe info: {universe_response.json()}")
Solutions:
Insufficient Balance
Fund the Tapd node using LND's wallet or Lightning network. First get a wallet address from LND, then send funds:
curl -X GET "https://{API_ENDPOINT}/v1/newaddress?type=WITNESS_PUBKEY_HASH" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
curl -X GET "https://{API_ENDPOINT}/v1/taproot-assets/assets/balance" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"Invalid Metadata
Valid JSON required
Size <4KB
Escape special characters
Fee Rate Too Low
Mint assets with appropriate fee rate using Tapd's native API:
curl -X POST "https://{API_ENDPOINT}/v1/taproot-assets/assets/mint" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"asset": {
"asset_name": "My Asset",
"asset_type": "NORMAL",
"amount": "1000"
},
"fee_rate": 10
}'
import requests
mint_data = {
"asset": {
"asset_name": "My Asset",
"asset_type": "NORMAL",
"amount": "1000"
},
"fee_rate": 10
}
response = requests.post(
f"https://{API_ENDPOINT}/v1/taproot-assets/assets/mint",
headers={
'Grpc-Metadata-macaroon': MACAROON_HEX,
'Content-Type': 'application/json'
},
json=mint_data
)
print(response.json())Diagnostics:
List universe federation servers and test connectivity:
curl -X GET "https://{API_ENDPOINT}/v1/taproot-assets/universe/federation/servers" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
curl -X GET "https://{API_ENDPOINT}/v1/taproot-assets/universe/stats?asset_name={ASSET_NAME}" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
import requests
servers_response = requests.get(
f"https://{API_ENDPOINT}/v1/taproot-assets/universe/federation/servers",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX}
)
print("Federation servers:", servers_response.json())
stats_response = requests.get(
f"https://{API_ENDPOINT}/v1/taproot-assets/universe/stats?asset_name={ASSET_NAME}",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX}
)
print("Universe stats:", stats_response.json())Solutions:
Add Alternative Servers
Add universe federation servers using Tapd's native API:
curl -X POST "https://{API_ENDPOINT}/v1/taproot-assets/universe/federation/add" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"servers": [{
"host": "universe-backup.example.com",
"id": "universe-backup"
}]
}'
import requests
add_server_data = {
"servers": [{
"host": "universe-backup.example.com",
"id": "universe-backup"
}]
}
response = requests.post(
f"https://{API_ENDPOINT}/v1/taproot-assets/universe/federation/add",
headers={
'Grpc-Metadata-macaroon': MACAROON_HEX,
'Content-Type': 'application/json'
},
json=add_server_data
)
print(response.json())Force Sync
Sync universe using Tapd's native API:
curl -X POST "https://{API_ENDPOINT}/v1/taproot-assets/universe/sync" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"universe_host": "universe.example.com",
"asset_name": "{ASSET_NAME}",
"sync_mode": "SYNC_ISSUANCE_ONLY"
}'
import requests
sync_data = {
"universe_host": "universe.example.com",
"asset_name": ASSET_NAME,
"sync_mode": "SYNC_ISSUANCE_ONLY"
}
response = requests.post(
f"https://{API_ENDPOINT}/v1/taproot-assets/universe/sync",
headers={
'Grpc-Metadata-macaroon': MACAROON_HEX,
'Content-Type': 'application/json'
},
json=sync_data
)
print(response.json())Symptoms: Never confirms, stuck in "pending"
Diagnostics:
Check balance, peers, and pending channels using LND's native REST API:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" | jq -r '.api_endpoint'
curl -X GET "https://{API_ENDPOINT}/v1/balance/blockchain" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
curl -X GET "https://{API_ENDPOINT}/v1/peers" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
curl -X GET "https://{API_ENDPOINT}/v1/channels/pending" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
import requests
node_response = requests.get(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
api_endpoint = node_response.json()['api_endpoint']
auth_headers = {
'Grpc-Metadata-macaroon': MACAROON_HEX
}
balance = requests.get(
f"https://{api_endpoint}/v1/balance/blockchain",
headers=auth_headers
).json()
print(f"Balance: {balance}")
peers = requests.get(
f"https://{api_endpoint}/v1/peers",
headers=auth_headers
).json()
print(f"Peers: {peers}")
pending = requests.get(
f"https://{api_endpoint}/v1/channels/pending",
headers=auth_headers
).json()
print(f"Pending channels: {pending}")Solutions:
Peer Not Connected
Connect to peer and open channel using LND's native API:
curl -X POST "https://{API_ENDPOINT}/v1/peers" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"addr": {
"pubkey": "03abc...",
"host": "host:port"
}
}'
curl -X POST "https://{API_ENDPOINT}/v1/channels" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"node_pubkey_string": "03abc...",
"local_funding_amount": "1000000",
"push_sat": "0",
"sat_per_byte": "1"
}'
import requests
connect_data = {
"addr": {
"pubkey": "03abc...",
"host": "host:port"
}
}
requests.post(
f"https://{API_ENDPOINT}/v1/peers",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX},
json=connect_data
)
channel_data = {
"node_pubkey_string": "03abc...",
"local_funding_amount": "1000000",
"push_sat": "0",
"sat_per_byte": "1"
}
response = requests.post(
f"https://{API_ENDPOINT}/v1/channels",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX},
json=channel_data
)
print(response.json())Fee Rate Too Low
Open channel with higher fee rate:
curl -X POST "https://{API_ENDPOINT}/v1/channels" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"node_pubkey_string": "03abc...",
"local_funding_amount": "1000000",
"push_sat": "0",
"sat_per_byte": "20"
}'
import requests
channel_data = {
"node_pubkey_string": "03abc...",
"local_funding_amount": "1000000",
"push_sat": "0",
"sat_per_byte": "20"
}
response = requests.post(
f"https://{API_ENDPOINT}/v1/channels",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX},
json=channel_data
)
print(response.json())Stuck Pending Channel (>24 hours)
Abandon a stuck pending channel. ⚠️ Warning: Only for truly stuck channels. Funds may be lost.
curl -X POST "https://{API_ENDPOINT}/v1/channels/abandonchannel" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"channel_point": {
"funding_txid_str": "abc",
"output_index": 0
}
}'
import requests
abandon_data = {
"channel_point": {
"funding_txid_str": "abc",
"output_index": 0
}
}
response = requests.post(
f"https://{API_ENDPOINT}/v1/channels/abandonchannel",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX},
json=abandon_data
)
print(response.json())Symptoms: "No route found", high failure rate
Diagnostics:
Check channel balance, list channels, and query routes:
curl -X GET "https://{API_ENDPOINT}/v1/balance/channels" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
curl -X GET "https://{API_ENDPOINT}/v1/channels" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
curl -X GET "https://{API_ENDPOINT}/v1/graph/routes/{03xyz...}/10000" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
import requests
auth_headers = {'Grpc-Metadata-macaroon': MACAROON_HEX}
balance = requests.get(
f"https://{API_ENDPOINT}/v1/balance/channels",
headers=auth_headers
).json()
channels = requests.get(
f"https://{API_ENDPOINT}/v1/channels",
headers=auth_headers
).json()
active_channels = [c for c in channels['channels'] if c['active']]
print(f"Active channels: {len(active_channels)}")
routes = requests.get(
f"https://{API_ENDPOINT}/v1/graph/routes/{DEST_PUBKEY}/10000",
headers=auth_headers
).json()
print(f"Routes found: {len(routes.get('routes', []))}")Solutions:
Insufficient Local Balance
Rebalance channels using LND's native API:
curl -X POST "https://{API_ENDPOINT}/v1/channels/rebalance" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"outgoing_chan_id": "123456",
"last_hop_pubkey": "...",
"amt": "100000",
"max_fee": "1000"
}'Alternatively, use circular payment routing or external tools for channel rebalancing.
Poor Network Connectivity
Open channel with well-connected peer:
curl -X POST "https://{API_ENDPOINT}/v1/peers" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"addr": {
"pubkey": "03WELL_CONNECTED_NODE...",
"host": "host:port"
}
}'
curl -X POST "https://{API_ENDPOINT}/v1/channels" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"node_pubkey_string": "03WELL_CONNECTED_NODE...",
"local_funding_amount": "5000000"
}'Payment Too Large
Send payment with multiple parts (MPP - Multi-Path Payments):
curl -X POST "https://{API_ENDPOINT}/v2/router/send" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
-H "Content-Type: application/json" \
-d '{
"payment_request": "lnbc1...",
"max_parts": 5,
"timeout_seconds": 60
}'
import requests
payment_data = {
"payment_request": PAYMENT_REQUEST,
"max_parts": 5,
"timeout_seconds": 60
}
response = requests.post(
f"https://{API_ENDPOINT}/v2/router/send",
headers={'Grpc-Metadata-macaroon': MACAROON_HEX},
json=payment_data
)
print(response.json())Diagnostics:
Bitcoin Core uses JSON-RPC protocol (not REST). Get node endpoint first, then use JSON-RPC:
Solutions:
Increase Connection Limit
Bitcoin Core configuration changes require support assistance or dashboard access. Contact support for configuration changes like increasing maxconnections.
Disconnect Slow Peers
Disconnect nodes and add seed nodes using JSON-RPC:
curl -X POST "http://{API_ENDPOINT}:18449" \
--user "polaruser:polarpass" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "1.0",
"id": "curltest",
"method": "disconnectnode",
"params": ["1.2.3.4"]
}'
curl -X POST "http://{API_ENDPOINT}:18449" \
--user "polaruser:polarpass" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "1.0",
"id": "curltest",
"method": "addnode",
"params": ["seed.bitcoin.sipa.be", "add"]
}'
bitcoin_rpc("disconnectnode", ["1.2.3.4"])
bitcoin_rpc("addnode", ["seed.bitcoin.sipa.be", "add"])Solutions:
Check Status
Check Bitcoin Core status and restart node:
curl -X POST "http://{API_ENDPOINT}:18449" \
--user "polaruser:polarpass" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "1.0",
"id": "curltest",
"method": "getblockchaininfo",
"params": []
}'
curl -X POST "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}/stop" \
-H "Authorization: Bearer {AUTH_TOKEN}"
curl -X POST "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}/start" \
-H "Authorization: Bearer {AUTH_TOKEN}"
status = bitcoin_rpc("getblockchaininfo")
print(f"Status: {status}")
import time
requests.post(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}/stop",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
time.sleep(5)
requests.post(
f"https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}/start",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)RPC Credentials
Comet manages credentials automatically. Check logs for authentication errors.
Solution: Exponential Backoff
import time
def api_call_with_retry(func, max_retries=5):
for i in range(max_retries):
try:
return func()
except RateLimitError:
wait = 2 ** i
time.sleep(wait)
raise Exception("Max retries exceeded")Solutions:
Wait 1-2 minutes and retry
Check node status in dashboard
Implement retry logic
Solutions:
Check status.comet.platform
Review recent API changes
Contact support with request ID
Current Limits:
API Gateway: 100 requests/second per account
Per-node: 50 requests/second
Batch operations: 10 requests/second
Solutions:
Request Batching
node.send_payments_batch(payments)
Cache Responses
from cachetools import TTLCache, cached
cache = TTLCache(maxsize=100, ttl=60)
@cached(cache)
def get_channel_list(node_id):
return node.channels.list()Request Higher Limits
Enterprise tier can request increases. Contact support@cometcash.com
Measure Performance:
import time
start = time.time()
response = node.get_info()
print(f"API call: {(time.time() - start)*1000:.2f}ms")Check Metrics:
Node metrics are available through the dashboard. Check node status and command history via API:
curl -X GET "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes/{NODE_ID}" \
-H "Authorization: Bearer {AUTH_TOKEN}" | jq '{status, tier, command_history}'Common Bottlenecks:
Network latency (high ping)
Node resource exhaustion
Inefficient queries
Database size
Storage:
Database compaction requires support assistance. For LND nodes, delete old payment data using LND's native API:
curl -X GET "https://{API_ENDPOINT}/v1/payments" \
-H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
| jq '.payments[] | select(.creation_date < (now - 2592000)) | .payment_hash'Logs are available through the dashboard. Database compaction operations require contacting support.
Configuration Tuning:
Node configuration changes require dashboard access or support assistance. Contact support for configuration tuning like dbcache, maxconnections, or LND-specific settings.
For LND node configuration, check current settings via LND's native API if available, but most configuration requires node restart with new settings, which should be done through support or dashboard.