-
Notifications
You must be signed in to change notification settings - Fork 40
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
Stage 1 - Multi-hop payments #14
Comments
I retried the multi-hop payment from scratch and it's still unable to find a path between Alice and Charlie via Bob. My considerations are the following: In Stage 1 Bob is the only peer without any fund. Could he partecipate in a multi-hop payment without having any fund. Moreover, when Charlie open the channel with Bob, he asked to Bob a commitment of 200.000 satoshi, but he has no funds. How could it partecipate in the multi-hop payment? |
At the point where you attempted the multi-hop payment, if you do |
Yep. I discovered it this late afternoon by looking at the logs....But there is still something that IMHO is wrong. Bob has no funds in your scenario and the funding tx by Charlie ask for some fund from him. |
Hi @Roasbeef with 6 confirmations ii works, but I changed the values for the |
Hi @Roasbeef I confirm that if Bob does not have enough funds in his channel, he can't participate as an hop in the route between Charlie and Alice and this behavior seems to be correct to me. So, this mean that the tutorial has to be updated with correct funds for Bob. |
@magomimmo @Roasbeef I saw PR #16 is related to this issue but they are not referenced. What I do now.
The other changes, especially for the amounts are not needed imo. |
@ndeet I'm pretty new to LN, so, I can be deadly wrong. The following are the original values of the tutorial:
Then
In my understanding this is only possible if Bob participates in a channel where his current balance is more than 200K, but in scenario of the tutorial he only has 10K in the channel with Alice. Unless LN requires that the limit amount for Bob to participate to a new opened channel is the sum of the capacity of all the channels he participates in. The other this that's is still obscure to me is Who pays for the funding and the closing txs? |
@ndeet I tested everything from scratch too and you're right even on the fact that Bob does not need to have enough funds on-chain to participate in an off-chain payment channel requiring him funds he does not own neither on_chain and neither off_chain. This is very very weird. I try the following: alice close the channel with bob and charlie close the channel with bob. At the end Bob has 210001K on chain, even if he only received a payment of 10k from Alice. there is something that I do not understand..... |
@magomimmo
The lncli command help shows this:
So this could be the reason why after closing the channel bob got this 200000 into his wallet. Maybe @Roasbeef can clarify the use case for this option. @Roasbeef, can you also give some hints why not both entities are required to make a deposit on opening channels. Bob in our case has no penalty if he acts malicious? |
@ndeet I dont' know what to say. I'll test what happen when the channel between Charlie and Bob is closed by Bob instead of being closed by Charlie and let you know. Tested: when Bob close the channel initiated by Charlie with a push amount for him, he gets all of it as well. Weird. The only limitation I see on the push amount value is that it has to be less than the local amount. BOLT 2 Specification says:
The sender is the funder of the channel and the receiver is the fundee. In my understanding at the moment in the specification there is no an open_channel message able to required that both parties participate with their funds for establishing the payment channel. To me it seems that a very useful scenario.is missing. |
@ndeet @Roasbeef I wrote a major review of the Stage 1 Tutorial thta override the current Stage 1 PR. Could please take a look at it before I push the PR. Here il the link: https://github.com/magomimmo/lightning-dev-site/blob/major-stage-1-review/tutorial/01-lncli.md Thanks so much to be patient |
Hi @magomimmo
This way we can have a working tutorial again without much review needed. And on the other hand your improvements can be checked and discussed in a separate issue + PR. Currently with the changes sitting only in your branch I can't do inline comments (which is possible when there is a PR). I can see the diff here but can't comment: e.g. minor typo like this
--> And some other things like what the |
Hi @ndeet I agree. Regarding your comment and fix, just fork my fork. When we're happy with the result we'll submit a separate issue + PR as you said. Thanks so much for your time and suggestions.... |
Looks like this is resolved. Thanks for the contributions! |
After having opened the channel between Charlie and Bob, mined the funding tx (I generated 3 block instead of just 1), created the invoice as Charlie, when I try to send the payment from Alice to Charlie I get the following error:
If I send a payment from Bob to Charlie, by having an open payment channel between them, the send payment works as expected.
The text was updated successfully, but these errors were encountered: