-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BOLT 1: introduce port convention for different network #968
BOLT 1: introduce port convention for different network #968
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a look at my proposed changes please.
335a5a1
to
7607af5
Compare
Fine with me, just adding a new convention really. |
7607af5
to
c279fab
Compare
Signed-off-by: Vincenzo Palazzo <[email protected]>
c279fab
to
caf7064
Compare
Thanks for the improvement guys and the feedback, sorry if I was not present at the meeting last time. Now the PR should be ready, and the port convention try to follow the bitcoin 0.22 convention like |
Add signet too? I know a bunch of people are using the public default signet these days instead of testnet. Agree with taking out Litecoin :)
Bitcoin Core still has default ports for these different networks, it just now (after the above linked PR) supports changing the defaults without it impacting automatic connections. I don't think there's anything in there that argues against setting default ports for various networks across say Lightning implementations. |
I'm not very familiar with the signet network. However, the only reason that I didn't add signet as network is that we can have two or more complete blockchains in on signet right? and in this case, the default port has no sense to me. BTW I can have some missing on this reason.
Mh I don't follow all the conversation on bitcoin core, but the first introduction in the PR has good pro and cons to have a default port number. Like the following one
|
There is a default signet network that Core is configured to use. Of course custom signets can be set up (and are encouraged) for testing new functionality that isn't enabled on the default signet.
Yeah I guess that is arguing for something stronger than merely supporting non-default ports. I still think you need to set a default. The alternative is somehow randomizing the port number or forcing the user to choose a port number rather than falling back to the default. |
Oh cool, so if there is a default signet, we can add a default port for signet! Thanks to point me out this feature.
Yes, I agree, I think that the point of view is both correct, but lightning has some convention as in this case can be good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After addressing the grammatical nit I'll ACK
Signed-off-by: Vincenzo Palazzo <[email protected]>
ff264f1
to
9101f33
Compare
ACK 9101f33 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ⛱
I wanted to ask about the idea of LN being chain agnostic. I don't think having a single node running mainnet and testnet in the same node will be a desired use case, but my understanding was that since we have the chain id in a lot of the peer messages, it seems the original design permits different networks to share the same port. Do we want to limit the scope of what new networks would be added? |
This PR doesn't introduce any type of scope limits, but only a standard between ports, if tomorrow's lightning network will support CatCoin we can standardize the port or you can be free to announce a new port. You are introducing a limit if in the init message will specify Again, this PR suggests only a standard between port numbers |
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🐅
Ack |
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
Complete implementation of BOLT1 port derivation proposal lightning/bolts#968 Changelog-Added: rpc: use the standard port derivation in connect command when the port is not specified. Signed-off-by: Vincenzo Palazzo <[email protected]>
This is an opinionate change proposed where there are reasons to have a default behavior for different networks, but there are also good reasons to have not this behavior.
I found the PR on Bitcoin core bitcoin/bitcoin#23306 very good to have a good summary of pros and cons.
In addition, I think having a default port for different networks on lightning is a good thing to have because introducing some way to detect which network a lightning node is exposing with a particular URL composed by
node_id@ip:port
We introduce a default behavior on c-lighting with the PR ElementsProject/lightning#4900
P.S: As plus we have already a default port for Bitcoin maintet.
Signed-off-by: Vincenzo Palazzo [email protected]