21⚡️Lightning Node (@LND_node) header
21⚡️Lightning Node (@LND_node) profile picture

Lightning ⚡️ Routing Node | Tweets from https://xitter.gq/t.co/uN8Xy8dcph

Lightning Network
Joined October 2022
To protect against spam attacks, Lightning nodes will only relay gossip messages from nodes that have at least one public channel, meaning you need to own up bitcoin and pay on-chain transaction fees.
1
Your node will calculate centrality scores for other nodes in the graph. You can obtain these scores with the command: lncli getnodemetrics
1
While good routing nodes are often centrally located in the graph, optimizing your node for centrality is often not considered an ideal strategy as it is not a perfect proxy for routing fees.
1
We can also perform calculations over the graph, such as each node’s centrality. Centrality is a measure of how many random routes in the network pass through a given node. The more central a node, the more hypothetical routes pass through it.
1
Using the information gathered in the graph, we can calculate basic statistics, such as the total number of public nodes, their channels and capacity. lncli getnetworkinfo
1
Peers often update their fees frequently, and each update has to be announced through the gossip network. This can make the gossip network appear very noisy and resource consuming.
1
A node may also remove channels from the graph if it believes its peers are no longer available, or haven’t been heard of in a while.
1
There is no consensus over what the graph looks like. A new node might not hear about an older node’s update that has since dropped off the network, while another node might still have its information.
1
This graph is necessary to calculate routes for payments. A pure routing node may not need this information, for example. You can query this information using your own node with the command: lncli describegraph
1
The network also contains information about each channel, how it can be verified on the blockchain, and what fees its peers charge. Your node will use the gossip network to assemble the network graph.
1
To learn about the existence of other nodes and their channels, the Lightning Network maintains its own gossip network. The messages passed through the gossip network also include information about a peer’s alias, features they support and how to reach them.
1
Lightning Network nodes announce themselves and their public channels to the broader network using a peer-to-peer gossip network. The gossip network also carries information on how to reach specific nodes and what fees they expect to forward funds.
1
In the event that one party were to attempt to “cheat” by publishing an older commitment tx, their peer is able to use the previously exchanged revocation secret to claim the funds of the malicious actor,providing a valuable incentive to remain honest,securing the network overall
These commitment tx are asymmetrical, as they spend the balance of the peer initiating the force close to an arbitration contract, while the funds of the other party are sent to their wallet immediately. This allows the peer that is not initiating the force closure to contest it.
1
Non-cooperatively Alice or Bob may not be available, or may be unable or unwilling to sign their closure transaction. In this case,the party aiming to close the channel will have to publish their commitment tx. This will result in a non-cooperative close, called a force close.
1
As soon as their closure transaction is confirmed on the blockchain, they can use it to open new channels, move the funds elsewhere or leave them in their wallet. Cooperative channel closures are the norm in the Lightning Network.
1
In a cooperative close,both Alice&Bob are online,agree on their balance&on the terms of a channel closure (e.g. fees) proposed by either party. They will sign a new tx that spends the funds back to their respective wallets immediately&no longer process transactions between them.
1
There are two ways of closing a channel: Cooperatively and non-cooperatively
1