lightningd / plugins

Community curated plugins for core-lightning
BSD 3-Clause "New" or "Revised" License
269 stars 129 forks source link

summary: NO PUBLIC ADDRESSES #369

Open jsarenik opened 2 years ago

jsarenik commented 2 years ago

On recent lightningd (there was no recent change to the plugins) I see following when calling lightning-cli summary:

...
warning_no_address=NO PUBLIC ADDRESSES
num_utxos=0
utxo_amount=0.00000000btc
...

I have the latest pyln-* modules from master branch of lightning repository. At the moment this version is running and showing the error above: v0.11.0.1-144-g2fe17a5 (ElementsProject/lightning@2fe17a5)

FYI (kind of recent commits to summary directory, nothing really fresh so you did not break it) @laanwj @m-schmoock @vincenzopalazzo

jsarenik commented 2 years ago

It still worked well 2 commits back: https://web.archive.org/web/20220628100400/https://ln.anyone.eu.org/bitcoin.html (scroll to the bottom or search for "summary") so CC @rustyrussell

EDIT: It does not have anything to do with those two last commits, but I have not updated pyln-* modules for months, just yesterday. See below, the reason for the error is known.

jsarenik commented 2 years ago

This is from the debug logs of lightningd:

DEBUG   plugin-summary.py: Reopened summary.dat shelve with 21749 runs and 64 entries
INFO    plugin-summary.py: Traceback (most recent call last):
INFO    plugin-summary.py:   File \"/home/nsm/.local/lib/python3.10/site-packages/pyln/client/plugin.py\", line 631, in _dispatch_request
INFO    plugin-summary.py:     result = self._exec_func(method.func, request)
INFO    plugin-summary.py:   File \"/home/nsm/.local/lib/python3.10/site-packages/pyln/client/plugin.py\", line 616, in _exec_func
INFO    plugin-summary.py:     return func(*ba.args, **ba.kwargs)
INFO    plugin-summary.py:   File \"/home/nsm/.local/lib/python3.10/site-packages/pyln/client/plugin.py\", line 957, in _init
INFO    plugin-summary.py:     return self._exec_func(self.child_init, request)
INFO    plugin-summary.py:   File \"/home/nsm/.local/lib/python3.10/site-packages/pyln/client/plugin.py\", line 616, in _exec_func
INFO    plugin-summary.py:     return func(*ba.args, **ba.kwargs)
INFO    plugin-summary.py:   File \"/home/nsm/src/plugins/summary/summary.py\", line 307, in init
INFO    plugin-summary.py:     config = plugin.rpc.listconfigs()
INFO    plugin-summary.py:   File \"/home/nsm/.local/lib/python3.10/site-packages/pyln/client/lightning.py\", line 882, in listconfigs
INFO    plugin-summary.py:     return self.call(\"listconfigs\", payload)
INFO    plugin-summary.py:   File \"/home/nsm/.local/lib/python3.10/site-packages/pyln/client/lightning.py\", line 363, in call
INFO    plugin-summary.py:     resp, buf = self._readobj(sock, buf)
INFO    plugin-summary.py:   File \"/home/nsm/.local/lib/python3.10/site-packages/pyln/client/lightning.py\", line 306, in _readobj
INFO    plugin-summary.py:     obj, _ = self.decoder.raw_decode(parts[0].decode(\"UTF-8\"))
INFO    plugin-summary.py:   File \"/usr/lib/python3.10/json/decoder.py\", line 353, in raw_decode
INFO    plugin-summary.py:     obj, end = self.scan_once(s, idx)
INFO    plugin-summary.py:   File \"/home/nsm/.local/lib/python3.10/site-packages/pyln/client/lightning.py\", line 468, in millisatoshi_hook
INFO    plugin-summary.py:     obj = LightningRpc.LightningJSONDecoder.replace_amounts(obj)
INFO    plugin-summary.py:   File \"/home/nsm/.local/lib/python3.10/site-packages/pyln/client/lightning.py\", line 459, in replace_amounts
INFO    plugin-summary.py:     obj[k] = Millisatoshi(v)
INFO    plugin-summary.py:   File \"/home/nsm/.local/lib/python3.10/site-packages/pyln/client/lightning.py\", line 69, in __init__
INFO    plugin-summary.py:     elif int(v) == v:
INFO    plugin-summary.py: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
INFO    plugin-summary.py: 
jsarenik commented 2 years ago

I verified that ~/.local/lib/python3.10/site-packages/pyln/client/lightning.py is the same as lightning/contrib/pyln-client/pyln/client/lightning.py from master.

vincenzopalazzo commented 2 years ago

this is a breaking change introduced by https://github.com/ElementsProject/lightning/pull/5306

carboncls commented 2 years ago

I have the same issue and was very confused, but people can connect to my node, so only minor inconvenience.