lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.66k stars 2.07k forks source link

[feature]: allow setting node announcement custom tlv records #7302

Open antonilol opened 1 year ago

antonilol commented 1 year ago

Is your feature request related to a problem? Please describe.

this would be useful to have implemented in lnd as it allows different lightning apps to attach data to the node that others can see, for example to add stats of your routing node, add a message or contact info

Describe the solution you'd like

new rpcs to view, change/add and delete records

Describe alternatives you've considered

i see some custom tlvs on the mainnet and testnet, so at least 1 alternative implementation already supports it

Additional context

https://github.com/lightningnetwork/lnd/issues/7080#issuecomment-1289782636

sputn1ck commented 1 year ago

If I understand your feature proposal correctly this has already been added:

See https://lightning.engineering/api-docs/api/lnd/peers/update-node-announcement

https://github.com/lightningnetwork/lnd/pulls?q=is%3Apr+feature+bit+author%3Apositiveblue

antonilol commented 1 year ago

i mean the custom_records that are returned (for other nodes) by describegraph

on latest master, this command will show the node pubkey and the custom records this node set in its announcement if it has any

lncli describegraph | jq -r '.nodes[] | .pub_key + ": " + (.custom_records | tostring)' | grep -v '{}'

for testnet i get this

0263983b2261d6ad9e2e134c1aa60d0c82d47c1c16b876a096a38d4f283fc236dc: {"1":"029a0032000100004e20"}
02865dbcb933e81e8e04ca5e967fcec0bc7aafa4cf7d1a63f5450795b1708428c5: {"1":"029a000000010000000103e8"}
0325169d12bbb078b8c3d9292686fcf89de4571e6b89afe93fc48a10e9ac422d36: {"1":"029a00320002000001f40186a0"}
sputn1ck commented 1 year ago

Ah I see what you mean now. It seems pretty useful.

A potential downside of this is that it adds a lot of overhead to the gossip network, so this should be treated carefully