Comments (7)
In the past, a "permanent failure" meant force close the channel (prior terminology of "fail"). These days, it can just mean disconnect and send a warning
. The old semantics of error
were to always insta force close, but that wasn't uniformly implemented. The thing we're still missing from the warning
message is machine-parseable information that would actually let implementations handle the case progamratically.
Eg: today someone might reject a funding attempt if the amount is too low, then send a warning
. If we add structured data there, then an implementation can know they can retry with a higher amount, or they can be given the explicit min.
from bolts.
As I was digging into BOLT4 I was unable to figure out whether the recommended interpretation of a "permanent" failure means that the node receiving the error should never try this _____ again or if it should just not try it for the lifetime of the next operation (payment/rebalance etc.).
A permanent failure means this shouldn't be retried at all: for a channel failure, it means that channel is closing or has been closed, or the operation uses features that are not supported by this channel or this node.
However, in the event that the closing negotiation fails and the user doesn't choose to retry or force close the channel, we'd like to avoid the channel being permanently blacklisted by the network.
I don't understand how this can happen: if you initiated a shutdown
, there is no going back, ever. There's no way to go back to relaying payments on a channel once one side intents to close? So this should be a permanent failure. Also, once shutdown
has been initiated, both sides must issue a new channel_update
with the disabled
bit set, so that nodes on the network don't try to use this channel for routing.
@Roasbeef I don't understand your answer, it looks like you're talking about error
s and warning
s whereas this issue is dealing with Bolt 4 failures (update_fail_htlc
), which is unrelated?
from bolts.
I don't understand how this can happen: if you initiated a shutdown, there is no going back, ever.
This is far from obvious. What happens if the connection gets dropped during the negotiation process? I looked through the spec and it doesn't really say anything about this situation. I figured naively that the closure process would just get rolled back and we could reconnect and try to shutdown again..
from bolts.
I figured naively that the closure process would just get rolled back and we could reconnect and try to shutdown again..
Yes you're right, that's exactly what happens, but that's something you MUST do. The channel_reestablish
requirements say that:
A node:
- upon reconnection:
- if it has sent a previous shutdown:
- MUST retransmit shutdown.
So once you've sent shutdown
, you're committed to closing the channel: if you disconnect and reconnect, you must re-send shutdown
, which means you cannot go back to a state where you use the channel for HTLCs.
from bolts.
Yes you're right, that's exactly what happens, but that's something you MUST do.
Can you explain why this decision was made? What does this protect against or how does it make implementation easier? It's not obvious to me why this should be a requirement.
from bolts.
Mostly for simplicity, it is much easier to implement and test a state machine that only moves forward. There would also be weird incentives otherwise, where the other side could fail the negotiation intentionally to prevent the channel from closing, which would most likely result in a force-close, but would require more code to detect.
from bolts.
Got it. I don't agree that it's simpler personally but that's a discussion for another day in another forum. Thanks for clarifying.
from bolts.
Related Issues (20)
- Lightning Specification Meeting 2024/01/29 HOT 4
- [feature-req] allow batch closing of multiple channels in one tx
- Lightning Specification Meeting 2024/02/12 HOT 1
- [feature] Allow the recovering of (outgoing) HTLCs in a DLP case. HOT 3
- Lightning Specification Meeting 2024/02/26 HOT 4
- to_self_delay cannot be updated after opening a channel HOT 3
- Lightning Specification Meeting 2024/03/11 HOT 1
- Lightning Specification Meeting 2024/03/25 HOT 2
- Lightning Specification Meeting 2024/04/08 HOT 3
- Lightning Specification Meeting 2024/04/22 HOT 10
- BOLT-4: Decrypt onion using b_i or k_i HOT 2
- Lightning Specification Meeting 2024/05/06 HOT 4
- Lightning Specification Meeting 2024/05/20 HOT 3
- Add support for bundled payments in BOLT12 HOT 1
- Lightning Specification Meeting 2024/06/03 HOT 2
- BOLT-11: add optional feature bit to indicate delayed settlement of invoice HOT 7
- Lightning Dev Summit Topics HOT 9
- Lightning Specification Meeting 2024/06/17 HOT 1
- Discussion: some confusion re blinded path `max_cltv` HOT 2
- Lightning Specification Meeting 2024/07/01 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolts.