Skip to content
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

Support for hacking... #2665

Closed
ZmnSCPxj opened this issue May 23, 2019 · 8 comments
Closed

Support for hacking... #2665

ZmnSCPxj opened this issue May 23, 2019 · 8 comments

Comments

@ZmnSCPxj
Copy link
Collaborator

The old #614 was already hopelessly buried in page 8 of issues.

So, I remake this thread here.

For those contributing now, if you have any questions about the architecture of lightningd and so on, please feel free to post them here.

@m-schmoock @darosior @trueptolemy @niftynei @bisoge

@darosior
Copy link
Collaborator

darosior commented May 27, 2019

Thanks for that; is there a way to quiet the deprecation warnings when running tests ?

@ZmnSCPxj
Copy link
Collaborator Author

is there a way to quiet the deprecation warnings when running tests ?

Did not #2681 fix?

Sorry, I am not python expert, maybe @cdecker can field this question.

@darosior
Copy link
Collaborator

darosior commented May 28, 2019

Some of them but some are from the dependencies (cheroot, jinja2), they might be resolved soon but until then I wanted to know if there is a way to avoid the endless scroll on pytest error.
EDIT: as of now the last pytest version fixed most of the DeprecatedWarnings

cdecker added a commit to cdecker/lightning that referenced this issue Jul 13, 2019
This is an issue that was raised in ElementsProject#2665: some of the dependencies where
causing warnings to be added to the logs about deprecated dependencies. Since
I did not get these warnings I just blanket updated all the dependencies in
the hopes of getting the warnings to resolve.

Signed-off-by: Christian Decker <@cdecker>
@jdabs
Copy link

jdabs commented Jul 23, 2019

Is there an official API reference for lightning-cli ? Or is the README on this repo the main one?

The README was helpful and I was able to set up my node easily with it. The main draw back is that it is not great as a full reference doc because it switches between different command lines tools, such as bitcoind, bitcoin-cli, and lightningd

@ZmnSCPxj
Copy link
Collaborator Author

They are in the docs directory; every docs/lightning-*.txt file describes a command. If you make install they should be available as man pages e.g. man 7 lightning-pay

cdecker added a commit to cdecker/lightning that referenced this issue Aug 28, 2019
This is an issue that was raised in ElementsProject#2665: some of the dependencies where
causing warnings to be added to the logs about deprecated dependencies. Since
I did not get these warnings I just blanket updated all the dependencies in
the hopes of getting the warnings to resolve.

Signed-off-by: Christian Decker <@cdecker>
cdecker added a commit to cdecker/lightning that referenced this issue Aug 31, 2019
This is an issue that was raised in ElementsProject#2665: some of the dependencies where
causing warnings to be added to the logs about deprecated dependencies. Since
I did not get these warnings I just blanket updated all the dependencies in
the hopes of getting the warnings to resolve.

Signed-off-by: Christian Decker <@cdecker>
cdecker added a commit to cdecker/lightning that referenced this issue Sep 2, 2019
This is an issue that was raised in ElementsProject#2665: some of the dependencies where
causing warnings to be added to the logs about deprecated dependencies. Since
I did not get these warnings I just blanket updated all the dependencies in
the hopes of getting the warnings to resolve.

Signed-off-by: Christian Decker <@cdecker>
cdecker added a commit that referenced this issue Sep 2, 2019
This is an issue that was raised in #2665: some of the dependencies where
causing warnings to be added to the logs about deprecated dependencies. Since
I did not get these warnings I just blanket updated all the dependencies in
the hopes of getting the warnings to resolve.

Signed-off-by: Christian Decker <@cdecker>
@trueptolemy
Copy link
Collaborator

trueptolemy commented Sep 14, 2019

@ZmnSCPxj Hi, when I study the route, I meet a question....
In this test:

def test_pay_limits(node_factory):
"""Test that we enforce fee max percentage and max delay"""
l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True)
# FIXME: pylightning should define these!
PAY_ROUTE_TOO_EXPENSIVE = 206
inv = l3.rpc.invoice("any", "any", 'description')
# Fee too high.
with pytest.raises(RpcError, match=r'Route wanted fee of .*msat') as err:
l1.rpc.call('pay', {'bolt11': inv['bolt11'], 'msatoshi': 100000, 'maxfeepercent': 0.0001, 'exemptfee': 0})
assert err.value.error['code'] == PAY_ROUTE_TOO_EXPENSIVE
# It should have retried (once without routehint, too)
status = l1.rpc.call('paystatus', {'bolt11': inv['bolt11']})['pay'][0]['attempts']
# Excludes channel, then ignores routehint which includes that, then
# it excludes other channel.
assert len(status) == 2
assert status[0]['strategy'] == "Initial attempt"
assert status[1]['strategy'].startswith("Excluded expensive channel ")

For my understanding, this pay attempt will generate a piece of routehint, that includes the channel from l2 to l3?
So why not 3 attempts here?
One for normal attempt, one excluding the channel between l1 and l2, and one with the routehint?

For this test, I find there are 2 attempts, one is the normal attempt, and another one is exluding the channel from l2 to l3.

So...my question is if there's an error?
Because we should exclude channel l1->l2 other than the channel l2->l3?

I find the find_worst_channel interface in pay plugin may be wrong, but I'm not sure...

@ZmnSCPxj
Copy link
Collaborator Author

I am uncertain myself --- I have not looked deeply into the pay plugin very much yet. I will try to check some time "soon", possibly, for some definition of "soon".

@darosior
Copy link
Collaborator

darosior commented Oct 29, 2019

I have a question regarding #3217. I struggled to recover the to_remote output to me, after an unilateral close from remote and a dataloss from my side, before I notice that it was actually not possible without the first_per_commitment_point from the other side.

(without option_static_remotekey)
How comes that we derive the remotepubkey, for the to_remote output, from OUR commitment point ? It means that in order to recover a to_remote output to us we need to know the peer per_commitment_point (at least the first one) .. Would it not make more sense to derive the remote_pubkey from the remote's per_commitment_point ?..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants