author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
630,870
24.02.2021 20:40:49
-3,600
16f0b30cedb0ece43769cbed0cff537918bf4180
lnpeer: MPP recv: only fulfill htlc if amt sum exact-matches total_msat
[ { "change_type": "MODIFY", "old_path": "electrum/lnchannel.py", "new_path": "electrum/lnchannel.py", "diff": "@@ -1051,7 +1051,9 @@ class Channel(AbstractChannel):\nif is_sent:\nself.lnworker.htlc_fulfilled(self, payment_hash, htlc.htlc_id, htlc.amount_msat)\nelse:\n- self.lnworker.htlc_received(sel...
Python
MIT License
spesmilo/electrum
lnpeer: MPP recv: only fulfill htlc if amt sum exact-matches total_msat
630,896
25.02.2021 08:08:47
-3,600
5081a832456246fec5b7e23c59ce135a154b54fd
mpp_split: undo side effect in tearDown
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_mpp_split.py", "new_path": "electrum/tests/test_mpp_split.py", "diff": "@@ -13,8 +13,6 @@ class TestMppSplit(ElectrumTestCase):\nsuper().setUp()\n# to make tests reproducible:\nrandom.seed(0)\n- # undo side effect\n- mpp_split.PART_PENALTY ...
Python
MIT License
spesmilo/electrum
mpp_split: undo side effect in tearDown
630,896
25.02.2021 08:37:39
-3,600
bf87169469a7fb4057e6e9a798d46decf54d7436
mpp_split: tweak split parameters Increases STARTING_CONFIGS to sample more starting configurations. Reduces CANDIDATES_PER_LEVEL to reduce computational effort. Increases REDISTRIBUTE. The time it takes for a typical suggest_split call is about 2 msec a desktop machine.
[ { "change_type": "MODIFY", "old_path": "electrum/mpp_split.py", "new_path": "electrum/mpp_split.py", "diff": "@@ -12,9 +12,9 @@ REDISTRIBUTION_FRACTION = 10\nSPLIT_FRACTION = 10\n# these parameters affect the computational work in the probabilistic algorithm\n-STARTING_CONFIGS = 30\n-CANDIDATES_PER_...
Python
MIT License
spesmilo/electrum
mpp_split: tweak split parameters Increases STARTING_CONFIGS to sample more starting configurations. Reduces CANDIDATES_PER_LEVEL to reduce computational effort. Increases REDISTRIBUTE. The time it takes for a typical suggest_split call is about 2 msec a desktop machine.
630,870
25.02.2021 12:12:44
-3,600
31bdb5c344f9bd2dc1f0885513302756f79b040f
lnpeer.maybe_fulfill_htlc: follow BOLTs re some errors related:
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1507,13 +1507,21 @@ class Peer(Logger):\nasyncio.ensure_future(forward_trampoline_payment())\n-\ndef maybe_fulfill_htlc(\nself, *,\nchan: Channel,\nhtlc: UpdateAddHtlc,\nprocessed_onion: Proce...
Python
MIT License
spesmilo/electrum
lnpeer.maybe_fulfill_htlc: follow BOLTs re some errors related: https://github.com/lightningnetwork/lightning-rfc/pull/608
630,870
25.02.2021 12:49:06
-3,600
254f57bce55e11811408d710932dabfb9a1696b9
lnpeer.maybe_fulfill_htlc: fix error case FINAL_INCORRECT_HTLC_AMOUNT follow-up
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1553,7 +1553,7 @@ class Peer(Logger):\nif not is_trampoline and amt_to_forward != htlc.amount_msat:\nraise OnionRoutingFailure(\ncode=OnionFailureCode.FINAL_INCORRECT_HTLC_AMOUNT,\n- data=tota...
Python
MIT License
spesmilo/electrum
lnpeer.maybe_fulfill_htlc: fix error case FINAL_INCORRECT_HTLC_AMOUNT follow-up ef5a26544981a426945b1d32b22b170272cb0671
630,870
15.02.2021 06:59:08
-3,600
8fe7d750f7d6706e252c27dab62000f8e18fc752
qt: move RBF dialog out of main_window.py into its own file
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/main_window.py", "new_path": "electrum/gui/qt/main_window.py", "diff": "@@ -100,6 +100,7 @@ from .update_checker import UpdateCheck, UpdateCheckThread\nfrom .channels_list import ChannelsList\nfrom .confirm_tx_dialog import ConfirmTxDialog\nfro...
Python
MIT License
spesmilo/electrum
qt: move RBF dialog out of main_window.py into its own file
630,870
15.02.2021 10:03:08
-3,600
058d9ab6bbabe0862d5136b48b5df217c2c7d006
wallet.bump_fee: add new strategy: decrease payment amounts Rename bump_fee "methods" to "strategies". Refactor strategies so that bump_fee can use any subset of them in any permutation. Adds a new strategy which decreases the payment outputs (instead of change).
[ { "change_type": "MODIFY", "old_path": "electrum/coinchooser.py", "new_path": "electrum/coinchooser.py", "diff": "@@ -238,7 +238,7 @@ class CoinChooserBase(Logger):\nassert is_address(change_addrs[0])\n# This takes a count of change outputs and returns a tx fee\n- output_weight = 4 * Transaction.est...
Python
MIT License
spesmilo/electrum
wallet.bump_fee: add new strategy: decrease payment amounts - Rename bump_fee "methods" to "strategies". - Refactor strategies so that bump_fee can use any subset of them in any permutation. - Adds a new strategy which decreases the payment outputs (instead of change).
630,870
15.02.2021 10:06:14
-3,600
4c36c456649708dd2cb25802acf7e9aea75bc3cc
qt bump fee: add "advanced" button, allow choosing strategy
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/rbf_dialog.py", "new_path": "electrum/gui/qt/rbf_dialog.py", "diff": "from typing import TYPE_CHECKING\n-from PyQt5.QtWidgets import QCheckBox, QLabel, QVBoxLayout, QGridLayout\n+from PyQt5.QtWidgets import (QCheckBox, QLabel, QVBoxLayout, QGri...
Python
MIT License
spesmilo/electrum
qt bump fee: add "advanced" button, allow choosing strategy
630,870
15.02.2021 10:15:30
-3,600
d2019fd928bcb46590f128ae6b11eaaa1f6814af
qt bump fee: rename "Final" checkbox to "Keep Replace-By-Fee enabled" Now that the checkbox is hidden behind an advanced option, there is no need to be brief about it, better to be explicit. (terminology unchanged for kivy.)
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/rbf_dialog.py", "new_path": "electrum/gui/qt/rbf_dialog.py", "diff": "@@ -115,20 +115,21 @@ class _BaseRBFDialog(WindowModalDialog):\nvbox.addWidget(adv_widget)\ndef _add_advanced_options(self, adv_vbox: QVBoxLayout) -> None:\n- self.cb_is_fina...
Python
MIT License
spesmilo/electrum
qt bump fee: rename "Final" checkbox to "Keep Replace-By-Fee enabled" Now that the checkbox is hidden behind an advanced option, there is no need to be brief about it, better to be explicit. (terminology unchanged for kivy.)
630,929
25.01.2021 23:16:02
-3,600
e01a2014b146a346b79d17629cba558d65d4154a
qt tx dialog: also display fiat amounts
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/main_window.py", "new_path": "electrum/gui/qt/main_window.py", "diff": "@@ -885,6 +885,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):\ntext += ' (%s)'%x\nreturn text\n+ def format_fiat_and_units(self, amount):\n+ # amount is ...
Python
MIT License
spesmilo/electrum
qt tx dialog: also display fiat amounts
630,870
26.02.2021 15:53:01
-3,600
fc3009918cd2d6f058b4d5447e1fa53bd20fb95a
follow-up prev: some clean-up
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/main_window.py", "new_path": "electrum/gui/qt/main_window.py", "diff": "@@ -873,21 +873,27 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):\nself.payto_e.resolve()\nself.notify_transactions()\n- def format_amount(self, x, is_diff=...
Python
MIT License
spesmilo/electrum
follow-up prev: some clean-up
630,870
26.02.2021 19:02:24
-3,600
f9f49daad7a9eee80abccd49ce43bee07258fd99
tx dialog: uniform high fee warnings between GUIs
[ { "change_type": "MODIFY", "old_path": "electrum/gui/kivy/uix/dialogs/confirm_tx_dialog.py", "new_path": "electrum/gui/kivy/uix/dialogs/confirm_tx_dialog.py", "diff": "+from decimal import Decimal\n+from typing import TYPE_CHECKING\n+\nfrom kivy.app import App\nfrom kivy.factory import Factory\nfrom...
Python
MIT License
spesmilo/electrum
tx dialog: uniform high fee warnings between GUIs
630,969
27.02.2021 11:48:14
-3,600
7f61f22857e54954dfe1132ceb91f8006e055a57
MPP receive: allow payer to retry after mpp timeout
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1576,10 +1576,10 @@ class Peer(Logger):\ninvoice_msat = info.amount_msat\nif not (invoice_msat is None or invoice_msat <= total_msat <= 2 * invoice_msat):\nraise exc_incorrect_or_unknown_pd\n-...
Python
MIT License
spesmilo/electrum
MPP receive: allow payer to retry after mpp timeout
630,870
27.02.2021 12:27:26
-3,600
d85e910262df4cf0c29a4620102d1fb51850c290
logging: eliminate "fee_estimates" log spam only log fee estimates if they changed, instead of ~10 times per minute
[ { "change_type": "MODIFY", "old_path": "electrum/network.py", "new_path": "electrum/network.py", "diff": "@@ -36,6 +36,7 @@ from typing import NamedTuple, Optional, Sequence, List, Dict, Tuple, TYPE_CHECK\nimport traceback\nimport concurrent\nfrom concurrent import futures\n+import copy\nimport aior...
Python
MIT License
spesmilo/electrum
logging: eliminate "fee_estimates" log spam only log fee estimates if they changed, instead of ~10 times per minute
630,870
27.02.2021 15:15:09
-3,600
2f223cdf467962cb53fdf43d8cf856ad541920c6
qt channels dialog: fix for channel backups
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/channels_list.py", "new_path": "electrum/gui/qt/channels_list.py", "diff": "@@ -11,7 +11,7 @@ from PyQt5.QtGui import QFont, QStandardItem, QBrush\nfrom electrum.util import bh2u, NotEnoughFunds, NoDynamicFeeEstimates\nfrom electrum.i18n import...
Python
MIT License
spesmilo/electrum
qt channels dialog: fix for channel backups
630,969
27.02.2021 20:26:58
-3,600
b6b13217b4929c5701e18a1310b20caf01fb61e5
lnworker: keep invoice status INFLIGHT as long as HTLCs are inflight
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -657,8 +657,8 @@ class LNWallet(LNWorker):\nself._channels[bfh(channel_id)] = Channel(c, sweep_address=self.sweep_address, lnworker=self)\nself.sent_htlcs = defaultdict(asyncio.Queue) # typ...
Python
MIT License
spesmilo/electrum
lnworker: keep invoice status INFLIGHT as long as HTLCs are inflight
630,969
27.02.2021 20:48:15
-3,600
38652cffb05233a8ea113a9891bf7496f7279562
fix test_lnpeer (follow-up prev commit)
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_lnpeer.py", "new_path": "electrum/tests/test_lnpeer.py", "diff": "@@ -134,7 +134,7 @@ class MockLNWallet(Logger, NetworkRetryManager[LNPeerAddr]):\nself.enable_htlc_settle.set()\nself.received_htlcs = dict()\nself.sent_htlcs = defaultdict(a...
Python
MIT License
spesmilo/electrum
fix test_lnpeer (follow-up prev commit)
630,969
28.02.2021 09:01:31
-3,600
f32d49b8cad25ff653a940e6c7fda1d86c88e17c
revert 'keep invoice INFLIGHT', check HTLCs before payment attempt
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1042,6 +1042,8 @@ class LNWallet(LNWorker):\nraise PaymentFailure(_(\"This invoice has been paid already\"))\nif status == PR_INFLIGHT:\nraise PaymentFailure(_(\"A payment was already init...
Python
MIT License
spesmilo/electrum
revert 'keep invoice INFLIGHT', check HTLCs before payment attempt
630,969
28.02.2021 09:43:46
-3,600
5175a976711101a29f9c3710f7eda5b1cfa04229
test_payment_race: increase delay
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_lnpeer.py", "new_path": "electrum/tests/test_lnpeer.py", "diff": "@@ -519,7 +519,7 @@ class TestPeer(ElectrumTestCase):\n)\np2.maybe_send_commitment = _maybe_send_commitment2\n# sleep a bit so that they both receive msgs sent so far\n- awai...
Python
MIT License
spesmilo/electrum
test_payment_race: increase delay
630,969
28.02.2021 13:34:24
-3,600
bc1ec6ac3499b64001aef2900e56dcea2cc99627
Qt: fix running GUI offline
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/main_window.py", "new_path": "electrum/gui/qt/main_window.py", "diff": "@@ -2260,7 +2260,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):\ndef update_lightning_icon(self):\nif self.lightning_button is None:\nreturn\n- if self.ne...
Python
MIT License
spesmilo/electrum
Qt: fix running GUI offline
630,870
28.02.2021 13:58:31
-3,600
2b693d3498e79463aa48043c27906f7ccc6d03e2
tests: fix test_lnpeer.test_payment_race broke in see changes to lnworker.htlc_fulfilled
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_lnpeer.py", "new_path": "electrum/tests/test_lnpeer.py", "diff": "@@ -492,6 +492,9 @@ class TestPeer(ElectrumTestCase):\nlnaddr2 = lndecode(pay_req2, expected_hrp=constants.net.SEGWIT_HRP)\npay_req1 = await self.prepare_invoice(w1)\nlnaddr1...
Python
MIT License
spesmilo/electrum
tests: fix test_lnpeer.test_payment_race broke in https://github.com/spesmilo/electrum/commit/b6b13217b4929c5701e18a1310b20caf01fb61e5 see changes to lnworker.htlc_fulfilled
630,870
28.02.2021 16:53:21
-3,600
b83f7159a9dd635a7a6f12d479e8704f6d7ae4b2
bech32: around 5% speedup for bech32_decode useful for lnaddr.lndecode
[ { "change_type": "MODIFY", "old_path": "electrum/segwit_addr.py", "new_path": "electrum/segwit_addr.py", "diff": "CHARSET = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\"\n+_CHARSET_INVERSE = {x: CHARSET.find(x) for x in CHARSET}\ndef bech32_polymod(values):\n@@ -72,7 +73,7 @@ def bech32_decode(bech, ignore_l...
Python
MIT License
spesmilo/electrum
bech32: around 5% speedup for bech32_decode useful for lnaddr.lndecode
630,870
01.03.2021 13:08:01
-3,600
bf7129d57e26709288e052c7649e96e8534b806d
synchronizer/verifier: ensure fairness between wallets (follow-up) follow-up to It's not just about the Synchronizer, the Verifier should not starve other jobs either... (previously I thought the Verifier is not too important as it only makes requests if there are new txs; however with LNWatcher its progress is not per...
[ { "change_type": "MODIFY", "old_path": "electrum/lnverifier.py", "new_path": "electrum/lnverifier.py", "diff": "@@ -110,6 +110,7 @@ class LNChannelVerifier(NetworkJobOnDefaultServer):\n# we are verifying channel announcements as they are from untrusted ln peers.\n# we use electrum servers to do this...
Python
MIT License
spesmilo/electrum
synchronizer/verifier: ensure fairness between wallets (follow-up) follow-up to https://github.com/spesmilo/electrum/commit/4346d2fc765f40a9388108c06cf1ee132d663923 It's not just about the Synchronizer, the Verifier should not starve other jobs either... (previously I thought the Verifier is not too important as it o...
630,870
01.03.2021 16:28:18
-3,600
dd37151d65c628271d0161b315a81741ef2ce27b
qt ChannelsList: (trivial) format_fields should not know column order
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/channels_list.py", "new_path": "electrum/gui/qt/channels_list.py", "diff": "# -*- coding: utf-8 -*-\nimport traceback\nfrom enum import IntEnum\n-from typing import Sequence, Optional\n+from typing import Sequence, Optional, Dict\nfrom PyQt5 im...
Python
MIT License
spesmilo/electrum
qt ChannelsList: (trivial) format_fields should not know column order
630,870
01.03.2021 16:41:54
-3,600
7d7dcf07956fcc1ae32b76feecb58bee9913ef19
qt/kivy ChannelsList: if node alias is unknown, display node id instead of "unknown"
[ { "change_type": "MODIFY", "old_path": "electrum/gui/kivy/uix/dialogs/lightning_channels.py", "new_path": "electrum/gui/kivy/uix/dialogs/lightning_channels.py", "diff": "@@ -594,7 +594,7 @@ class LightningChannelsDialog(Factory.Popup):\nitem.active = not i.is_closed()\nitem.is_backup = i.is_backup()...
Python
MIT License
spesmilo/electrum
qt/kivy ChannelsList: if node alias is unknown, display node id instead of "unknown"
630,870
01.03.2021 17:09:04
-3,600
6094f2751e658dbc2cc44b04455961a7046aaa3f
kivy channel dialog: fix unit of displayed feerate The amount shown was in sat/kw, incorrectly labeled as sat/kbyte. Show sat/vbyte instead.
[ { "change_type": "MODIFY", "old_path": "electrum/gui/kivy/uix/dialogs/lightning_channels.py", "new_path": "electrum/gui/kivy/uix/dialogs/lightning_channels.py", "diff": "@@ -12,8 +12,8 @@ from electrum.lnutil import LOCAL, REMOTE, format_short_channel_id\nfrom electrum.lnchannel import AbstractChann...
Python
MIT License
spesmilo/electrum
kivy channel dialog: fix unit of displayed feerate The amount shown was in sat/kw, incorrectly labeled as sat/kbyte. Show sat/vbyte instead.
630,870
01.03.2021 20:45:52
-3,600
c3ae1c09656d5e599a9d260c8b0e5ab9d78c94a7
android build: (trivial) build arm64 apk first Build the apk I use to test with first :P This is also the one mentioned in the README copy-paste code snippets.
[ { "change_type": "MODIFY", "old_path": "contrib/android/make_apk", "new_path": "contrib/android/make_apk", "diff": "@@ -47,10 +47,10 @@ else\n-keypass \"$P4A_DEBUG_KEYALIAS_PASSWD\"\nfi\n# build two apks (only one on Travis CI)\n- export APP_ANDROID_ARCH=armeabi-v7a\n+ export APP_ANDROID_ARCH=arm64-...
Python
MIT License
spesmilo/electrum
android build: (trivial) build arm64 apk first Build the apk I use to test with first :P This is also the one mentioned in the README copy-paste code snippets.
630,870
01.03.2021 20:56:45
-3,600
b3b87555dcaae777486c5f8c36f9451682f03a7e
qt/kivy: lightning_tx_dialog: show LN invoice
[ { "change_type": "MODIFY", "old_path": "electrum/gui/kivy/main.kv", "new_path": "electrum/gui/kivy/main.kv", "diff": "touched: False\npadding: '10dp', '10dp'\nbackground_color: .3, .3, .3, 1\n- touch_callback: lambda: app.on_ref_label(self)\n+ show_text_with_qr: True\n+ touch_callback: lambda: app.o...
Python
MIT License
spesmilo/electrum
qt/kivy: lightning_tx_dialog: show LN invoice
630,870
01.03.2021 21:26:05
-3,600
1139720b58034a4e8dd190faade7fc68665e05bd
lnworker: fix handle_error_code_from_failed_htlc for private channels if the last (private) edge of the route errors, we need to try other route hints (if any)
[ { "change_type": "MODIFY", "old_path": "electrum/channel_db.py", "new_path": "electrum/channel_db.py", "diff": "@@ -610,12 +610,20 @@ class ChannelDB(SqlDB):\nself.update_counts()\nself.logger.info(f'Deleting {len(orphaned_chans)} orphaned channels')\n- def add_channel_update_for_private_channel(sel...
Python
MIT License
spesmilo/electrum
lnworker: fix handle_error_code_from_failed_htlc for private channels if the last (private) edge of the route errors, we need to try other route hints (if any)
630,870
01.03.2021 21:51:17
-3,600
6f894b9f8885f03203fa4ddf50da795c0c5c6fd1
_calc_routing_hints_for_invoice: also incl chans < invoice amount now that we can receive MPP
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1800,17 +1800,12 @@ class LNWallet(LNWorker):\nrandom.shuffle(channels) # not sure this has any benefit but let's not leak channel order\nscid_to_my_channels = {chan.short_channel_id: chan...
Python
MIT License
spesmilo/electrum
_calc_routing_hints_for_invoice: also incl chans < invoice amount now that we can receive MPP
630,870
01.03.2021 21:55:41
-3,600
06ea06f7d37a02d7d242d84eca89da3d85191c1b
_calc_routing_hints_for_invoice: incl max 15 chans to avoid qr overflow Prioritise channels that are likely to be able to receive the payment.
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1797,15 +1797,17 @@ class LNWallet(LNWorker):\n\"\"\"calculate routing hints (BOLT-11 'r' field)\"\"\"\nrouting_hints = []\nchannels = list(self.channels.values())\n- random.shuffle(channe...
Python
MIT License
spesmilo/electrum
_calc_routing_hints_for_invoice: incl max 15 chans to avoid qr overflow Prioritise channels that are likely to be able to receive the payment.
630,969
02.03.2021 10:23:30
-3,600
693583edc5010ece804e312626c7c40157613ff1
lnworker: amount passed in HtlcLog must be without fees
[ { "change_type": "MODIFY", "old_path": "electrum/lnchannel.py", "new_path": "electrum/lnchannel.py", "diff": "@@ -993,7 +993,7 @@ class Channel(AbstractChannel):\nif self.lnworker:\nsent = self.hm.sent_in_ctn(new_ctn)\nfor htlc in sent:\n- self.lnworker.htlc_fulfilled(self, htlc.payment_hash, htlc.h...
Python
MIT License
spesmilo/electrum
lnworker: amount passed in HtlcLog must be without fees
630,969
02.03.2021 14:26:16
-3,600
2da90add8f3df5f4302631abcecc46100d0cc53f
maybe_fulfill_htlc: add failure reason to logs
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1512,8 +1512,8 @@ class Peer(Logger):\nchan: Channel,\nhtlc: UpdateAddHtlc,\nprocessed_onion: ProcessedOnionPacket,\n- is_trampoline: bool = False,\n- ) -> Optional[bytes]:\n+ is_trampoline: b...
Python
MIT License
spesmilo/electrum
maybe_fulfill_htlc: add failure reason to logs
630,969
27.02.2021 09:45:19
-3,600
259dacd56f8d272738682875f7a88b037981fecd
Trampoline MPP aggregation: - trampoline node is the final recipient of MPP - each trampoline receives a bucket of HTLCs - if a HTLC from a bucket fails, wait for the entire bucket to fail - move trampoline route and onion code into trampoline module
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1195,9 +1195,16 @@ class Peer(Logger):\nsig_64, htlc_sigs = chan.sign_next_commitment()\nself.send_message(\"commitment_signed\", channel_id=chan.channel_id, signature=sig_64, num_htlcs=len(ht...
Python
MIT License
spesmilo/electrum
Trampoline MPP aggregation: - trampoline node is the final recipient of MPP - each trampoline receives a bucket of HTLCs - if a HTLC from a bucket fails, wait for the entire bucket to fail - move trampoline route and onion code into trampoline module
630,870
02.03.2021 12:10:17
-3,600
4445cef033b1c60e05e19ff4dae43d0a026105da
lnutil: turn global forwarding fee params into Channel attributes useful for unit testing, and it is the conceptually correct thing anyway
[ { "change_type": "MODIFY", "old_path": "electrum/lnchannel.py", "new_path": "electrum/lnchannel.py", "diff": "@@ -503,6 +503,11 @@ class Channel(AbstractChannel):\n# they are ambiguous. Use \"oldest_unrevoked\" or \"latest\" or \"next\".\n# TODO enforce this ^\n+ # our forwarding parameters for forw...
Python
MIT License
spesmilo/electrum
lnutil: turn global forwarding fee params into Channel attributes useful for unit testing, and it is the conceptually correct thing anyway
630,870
02.03.2021 18:35:07
-3,600
9310e9023efa3015c677790a9d092df915e82755
test_lnpeer: add test: multihop payment that routes around failure This would have caught the overpayment bug fixed in
[ { "change_type": "MODIFY", "old_path": "electrum/lnutil.py", "new_path": "electrum/lnutil.py", "diff": "@@ -251,7 +251,7 @@ class Outpoint(StoredObject):\nclass HtlcLog(NamedTuple):\nsuccess: bool\n- amount_msat: int\n+ amount_msat: int # amount for receiver (e.g. from invoice)\nroute: Optional['LNP...
Python
MIT License
spesmilo/electrum
test_lnpeer: add test: multihop payment that routes around failure This would have caught the overpayment bug fixed in https://github.com/spesmilo/electrum/commit/693583edc5010ece804e312626c7c40157613ff1
630,870
02.03.2021 18:53:08
-3,600
44059ec116ec32fca88348d4001fe94aef3e72c0
lnpeer: more detailed logging in maybe_fulfill_htlc
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1471,10 +1471,14 @@ class Peer(Logger):\n\"\"\"As a final recipient of an HTLC, decide if we should fulfill it.\nReturns the preimage if yes, or None.\n\"\"\"\n+ def log_fail_reason(reason: st...
Python
MIT License
spesmilo/electrum
lnpeer: more detailed logging in maybe_fulfill_htlc
630,969
03.03.2021 10:03:29
-3,600
51f3c613a5acad42268f10356ca74e6c47bc2b18
(minor) fix typos and indentation
[ { "change_type": "MODIFY", "old_path": "electrum/lnonion.py", "new_path": "electrum/lnonion.py", "diff": "@@ -261,15 +261,18 @@ def new_onion_packet(payment_path_pubkeys: Sequence[bytes], session_key: bytes,\nhmac=next_hmac)\n-def calc_hops_data_for_payment(route: 'LNPaymentRoute', amount_msat: int,...
Python
MIT License
spesmilo/electrum
(minor) fix typos and indentation
630,969
03.03.2021 10:45:46
-3,600
222c70ada62cb49ab0949f4097e5819049bf7ede
qt swap_dialog: use a single button to toggle direction
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/swap_dialog.py", "new_path": "electrum/gui/qt/swap_dialog.py", "diff": "@@ -8,7 +8,7 @@ from electrum.lnutil import ln_dummy_address\nfrom electrum.transaction import PartialTxOutput, PartialTransaction\nfrom .util import (WindowModalDialog, Bu...
Python
MIT License
spesmilo/electrum
qt swap_dialog: use a single button to toggle direction
630,969
03.03.2021 11:19:41
-3,600
6cf79dcfb299420afa4c45fd4a03d3187bb484fe
qt: update all tabs when base_unit changes
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/settings_dialog.py", "new_path": "electrum/gui/qt/settings_dialog.py", "diff": "@@ -215,9 +215,7 @@ Use this if you want your local watchtower to keep running after you close your\namounts = [edit.get_amount() for edit in edits]\nself.config.se...
Python
MIT License
spesmilo/electrum
qt: update all tabs when base_unit changes
630,969
03.03.2021 11:20:24
-3,600
1adde4c54aea2fbc71dedb93b51b7a24d1563a8f
qt channels_list: use monospace font for channel capacity
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/channels_list.py", "new_path": "electrum/gui/qt/channels_list.py", "diff": "@@ -87,7 +87,7 @@ class ChannelsList(MyTreeView):\nclosed = chan.is_closed()\nnode_alias = self.lnworker.get_node_alias(chan.node_id) or chan.node_id.hex()\nif isinstan...
Python
MIT License
spesmilo/electrum
qt channels_list: use monospace font for channel capacity
630,969
03.03.2021 12:30:29
-3,600
ca6ecd56f2568220143e92250796d557244e06a8
fix route for non-trampoline MPP
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1422,7 +1422,6 @@ class LNWallet(LNWorker):\nself.logger.info('not enough margin to pay trampoline fee')\nraise NoPathFound()\nelse:\n- # then we need bucket_amount_msat that includes the ...
Python
MIT License
spesmilo/electrum
fix route for non-trampoline MPP
630,969
03.03.2021 12:52:52
-3,600
3fa1aed8cdc426ae4c929c5160e345e8826854ac
add unit test for basic mpp
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_lnpeer.py", "new_path": "electrum/tests/test_lnpeer.py", "diff": "@@ -716,6 +716,34 @@ class TestPeer(ElectrumTestCase):\nwith self.assertRaises(PaymentDone):\nrun(f())\n+ @needs_test_with_all_chacha20_implementations\n+ def test_multipart_...
Python
MIT License
spesmilo/electrum
add unit test for basic mpp
630,870
03.03.2021 14:10:57
-3,600
95b7c976e001e0ab16185e5b61c257906fe2ca18
lnrouter.get_distances: fix exception due to rare race if the graph is being updated while the pathfinding is running, channel_info might be None here
[ { "change_type": "MODIFY", "old_path": "electrum/lnrouter.py", "new_path": "electrum/lnrouter.py", "diff": "@@ -275,6 +275,8 @@ class LNPathFinder(Logger):\ncontinue\nchannel_info = self.channel_db.get_channel_info(\nedge_channel_id, my_channels=my_channels, private_route_edges=private_route_edges)\...
Python
MIT License
spesmilo/electrum
lnrouter.get_distances: fix exception due to rare race if the graph is being updated while the pathfinding is running, channel_info might be None here
630,870
03.03.2021 16:57:54
-3,600
1aec982b27a7b12d51493a393849da4f4bccd10d
kivy: SendScreen: reliably show LN payment attempt progress for invoice
[ { "change_type": "MODIFY", "old_path": "electrum/gui/kivy/uix/screens.py", "new_path": "electrum/gui/kivy/uix/screens.py", "diff": "@@ -219,24 +219,21 @@ class SendScreen(CScreen, Logger):\n_list = self.app.wallet.get_unpaid_invoices()\n_list.reverse()\npayments_container = self.ids.payments_contain...
Python
MIT License
spesmilo/electrum
kivy: SendScreen: reliably show LN payment attempt progress for invoice
630,870
03.03.2021 17:31:08
-3,600
920e1e94fab9d1a39f8e5412bf4677bf9b63ef50
kivy: InvoiceDialog: make LN invoice QR code scannable Don't show the text and the QR code together, only the QR code: the text takes up too much space, which make the QR hard to scan.
[ { "change_type": "MODIFY", "old_path": "electrum/gui/kivy/uix/dialogs/invoice_dialog.py", "new_path": "electrum/gui/kivy/uix/dialogs/invoice_dialog.py", "diff": "@@ -40,7 +40,9 @@ Builder.load_string('''\ntext: _('Invoice data')+ ':'\nRefLabel:\ndata: root.data\n+ text: root.data[:40] + \"...\"\nnam...
Python
MIT License
spesmilo/electrum
kivy: InvoiceDialog: make LN invoice QR code scannable Don't show the text and the QR code together, only the QR code: the text takes up too much space, which make the QR hard to scan.
630,870
03.03.2021 20:35:48
-3,600
adbfb2dcc84f015225c63bd239153314bbec05d5
lnworker.pay_to_node: (fix) pass correct total_msat to pay_to_route
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -977,6 +977,7 @@ class LNWallet(LNWorker):\ndef create_routes_from_invoice(self, amount_msat: int, decoded_invoice: LnAddr, *, full_path=None):\nreturn self.create_routes_for_payment(\namou...
Python
MIT License
spesmilo/electrum
lnworker.pay_to_node: (fix) pass correct total_msat to pay_to_route
630,870
03.03.2021 22:05:09
-3,600
f84f13529af30a9175f7011dde9bdca96e7f6f8d
lnhtlc: fix deadlock
[ { "change_type": "MODIFY", "old_path": "electrum/lnhtlc.py", "new_path": "electrum/lnhtlc.py", "diff": "@@ -41,7 +41,13 @@ class HTLCManager:\nif not log[sub]['fee_updates']:\nlog[sub]['fee_updates'][0] = FeeUpdate(rate=initial_feerate, ctn_local=0, ctn_remote=0)\nself.log = log\n- self.lock = threa...
Python
MIT License
spesmilo/electrum
lnhtlc: fix deadlock
630,969
04.03.2021 08:50:22
-3,600
253907fb606f131a9cbd76743b137d744421b2f3
lnworker: move buckets logic inside first branch of if statement (refactoring commit)
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1378,6 +1378,7 @@ class LNWallet(LNWorker):\nself.logger.info(f\"trying split configuration: {s[0].values()} rating: {s[1]}\")\nroutes = []\ntry:\n+ if not self.channel_db:\nbuckets = defa...
Python
MIT License
spesmilo/electrum
lnworker: move buckets logic inside first branch of if statement (refactoring commit)
630,969
04.03.2021 10:05:09
-3,600
ba4d6bc8b34d17a998c011276ef57aab7f0c5106
trampoline MPP: fix total_msat in trampoline onion, and bucketing
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1145,6 +1145,9 @@ class LNWallet(LNWorker):\nkey = (payment_hash, short_channel_id, htlc.htlc_id)\nself.sent_htlcs_routes[key] = route, payment_secret, amount_msat, total_msat\n+ # if we s...
Python
MIT License
spesmilo/electrum
trampoline MPP: fix total_msat in trampoline onion, and bucketing
630,969
03.03.2021 20:36:48
-3,600
738411e32bacbb6d2859cbbc782634e3d5dff7d2
Trampoline forwarding: - fix regression in create_routes: fwd_trampoline_onion was not added to the tuple - fix onion structure for e2e - maybe_fulfill_htlc: check the mpp_status of the outer onion, return trampoline_onion to be forwarded
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1328,11 +1328,10 @@ class Peer(Logger):\nutil.trigger_callback('htlc_added', chan, htlc, RECEIVED)\ndef maybe_forward_htlc(\n- self,\n- *,\n+ self, *,\nhtlc: UpdateAddHtlc,\n- processed_onion:...
Python
MIT License
spesmilo/electrum
Trampoline forwarding: - fix regression in create_routes: fwd_trampoline_onion was not added to the tuple - fix onion structure for e2e - maybe_fulfill_htlc: check the mpp_status of the outer onion, return trampoline_onion to be forwarded
630,870
04.03.2021 12:14:47
-3,600
785fe6aeeacef8b88cb2b8adb19df6d1612b9a1a
lnutil: (trivial) add ShortChannelID.from_str() method for console use atm
[ { "change_type": "MODIFY", "old_path": "electrum/lnutil.py", "new_path": "electrum/lnutil.py", "diff": "@@ -1265,6 +1265,18 @@ class ShortChannelID(bytes):\noi = output_index.to_bytes(2, byteorder='big')\nreturn ShortChannelID(bh + tpos + oi)\n+ @classmethod\n+ def from_str(cls, scid: str) -> 'Short...
Python
MIT License
spesmilo/electrum
lnutil: (trivial) add ShortChannelID.from_str() method for console use atm
630,870
04.03.2021 13:20:49
-3,600
e25602ab3be4c43f883d427cdad1d3071b010437
wallet: don't put partial tx as UTXO into psbt if there is a chain of unsigned txs, we cannot populate NON_WITNESS_UTXO closes closes closes
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_wallet_vertical.py", "new_path": "electrum/tests/test_wallet_vertical.py", "diff": "@@ -13,7 +13,8 @@ from electrum.address_synchronizer import TX_HEIGHT_UNCONFIRMED, TX_HEIGHT_UNCON\nfrom electrum.wallet import (sweep, Multisig_Wallet, Sta...
Python
MIT License
spesmilo/electrum
wallet: don't put partial tx as UTXO into psbt if there is a chain of unsigned txs, we cannot populate NON_WITNESS_UTXO closes #7080 closes #7009 closes #6482
630,969
04.03.2021 14:08:31
-3,600
5a2a724cb998bf414f3d3213138ac5385c64aaa0
Receive MPP: Use persisted payment status to decide whether to fulfill HTLCs. Without this commit, we might timeout a part of a payment if the client is shut down before all parts are fulfilled.
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1614,27 +1614,26 @@ class LNWallet(LNWorker):\ndef add_received_htlc(self, short_channel_id, htlc: UpdateAddHtlc, expected_msat: int) -> Optional[bool]:\n\"\"\" return MPP status: True (ac...
Python
MIT License
spesmilo/electrum
Receive MPP: Use persisted payment status to decide whether to fulfill HTLCs. Without this commit, we might timeout a part of a payment if the client is shut down before all parts are fulfilled.
630,870
04.03.2021 14:25:41
-3,600
859f8ccf8e5c784d9c2e307f5ff4f8cc293ee27d
fix wallet.clear_history() it would result in "wallet.get_history() failed balance sanity-check" maybe related:
[ { "change_type": "MODIFY", "old_path": "electrum/address_synchronizer.py", "new_path": "electrum/address_synchronizer.py", "diff": "@@ -458,6 +458,7 @@ class AddressSynchronizer(Logger):\nwith self.transaction_lock:\nself.db.clear_history()\nself._history_local.clear()\n+ self._get_addr_balance_cach...
Python
MIT License
spesmilo/electrum
fix wallet.clear_history() it would result in "wallet.get_history() failed balance sanity-check" maybe related: https://github.com/spesmilo/electrum/issues/6792
630,870
04.03.2021 16:44:13
-3,600
ff485cee62d33c5f6f95a425839026fa8872cd02
use functools.wraps() for some wrappers to help debugging
[ { "change_type": "MODIFY", "old_path": "electrum/interface.py", "new_path": "electrum/interface.py", "diff": "@@ -35,6 +35,7 @@ from ipaddress import IPv4Network, IPv6Network, ip_address, IPv6Address, IPv4Add\nimport itertools\nimport logging\nimport hashlib\n+import functools\nimport aiorpcx\nfrom ...
Python
MIT License
spesmilo/electrum
use functools.wraps() for some wrappers to help debugging
630,870
04.03.2021 17:47:49
-3,600
064670bd75a67cb41ce42e03ea24f4583e9d1725
network: close interfaces more aggressively (abort after 2 seconds) fixes
[ { "change_type": "MODIFY", "old_path": "electrum/interface.py", "new_path": "electrum/interface.py", "diff": "@@ -686,12 +686,17 @@ class Interface(Logger):\nself.network.update_fee_estimates()\nawait asyncio.sleep(60)\n- async def close(self):\n+ async def close(self, *, force_after: int = None):\n...
Python
MIT License
spesmilo/electrum
network: close interfaces more aggressively (abort after 2 seconds) fixes #7083
630,870
04.03.2021 17:50:52
-3,600
ec6baa12f81065ee5b110d6c277a24d752acb11d
follow-up prev oops, that was just for local testing
[ { "change_type": "MODIFY", "old_path": "electrum/network.py", "new_path": "electrum/network.py", "diff": "@@ -1221,7 +1221,7 @@ class Network(Logger, NetworkRetryManager[ServerAddr]):\nself.logger.info(\"stopping network\")\ntry:\n# note: cancel_remaining ~cannot be cancelled, it suppresses Cancelle...
Python
MIT License
spesmilo/electrum
follow-up prev oops, that was just for local testing
630,969
05.03.2021 10:07:02
-3,600
2e4f45ec7446f43e2861cc971bf70ed189590bac
use two trampolines: fix blacklisting, use local variables for trampoline_fee_level and use_two_trampolines
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -142,27 +142,7 @@ FALLBACK_NODE_LIST_MAINNET = [\n]\n-# hardcoded list\n-# TODO for some pubkeys, there are multiple network addresses we could try\n-TRAMPOLINE_NODES_MAINNET = {\n- 'ACINQ'...
Python
MIT License
spesmilo/electrum
use two trampolines: fix blacklisting, use local variables for trampoline_fee_level and use_two_trampolines
630,969
05.03.2021 10:14:26
-3,600
16554afa1b62c0ea5d759add7bdb640a0a059f95
follow-up previous commit (this was for testing)
[ { "change_type": "MODIFY", "old_path": "electrum/trampoline.py", "new_path": "electrum/trampoline.py", "diff": "@@ -55,8 +55,7 @@ TRAMPOLINE_FEES = [\n# TODO for some pubkeys, there are multiple network addresses we could try\nTRAMPOLINE_NODES_MAINNET = {\n'ACINQ': LNPeerAddr(host='34.239.230.56', p...
Python
MIT License
spesmilo/electrum
follow-up previous commit (this was for testing)
630,969
05.03.2021 12:47:18
-3,600
eda9097e894b4e94b17160701cf242ad8da76635
trampoline forwarding: return UNKNOWN_NEXT_PEER if we cannot find a route
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1460,7 +1460,7 @@ class Peer(Logger):\nself.lnworker.trampoline_forwarding_failures[payment_hash] = e\nexcept PaymentFailure as e:\n# FIXME: adapt the error code\n- error_reason = OnionRouting...
Python
MIT License
spesmilo/electrum
trampoline forwarding: return UNKNOWN_NEXT_PEER if we cannot find a route
630,969
05.03.2021 13:00:24
-3,600
1f60d5d8eee3a908ae22f58c29391ef0bab87c64
test_lnpeer: add test for trampoline
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_lnpeer.py", "new_path": "electrum/tests/test_lnpeer.py", "diff": "@@ -117,9 +117,7 @@ class MockLNWallet(Logger, NetworkRetryManager[LNPeerAddr]):\nNetworkRetryManager.__init__(self, max_retry_delay_normal=1, init_retry_delay_normal=1)\nsel...
Python
MIT License
spesmilo/electrum
test_lnpeer: add test for trampoline
630,969
05.03.2021 13:18:44
-3,600
f397b315ac437d47e1583d3320c5c5058ba820f7
remove trampoline and forwarding regtests, as they are covered by unittests
[ { "change_type": "MODIFY", "old_path": "electrum/tests/regtest.py", "new_path": "electrum/tests/regtest.py", "diff": "@@ -55,11 +55,5 @@ class TestLightningAB(TestLightning):\nclass TestLightningABC(TestLightning):\nagents = ['alice', 'bob', 'carol']\n- def test_forwarding(self):\n- self.run_shell([...
Python
MIT License
spesmilo/electrum
remove trampoline and forwarding regtests, as they are covered by unittests
630,870
05.03.2021 16:12:01
-3,600
762ebb12b253dd53517dbd99b13efcc0e0168b05
lnpeer: increase max_accepted_htlcs (5->30) Counter-intuitively, the motivation is to be able to *send* more htlcs, for MPP trickery. We don't offer more htlcs than this limit, to be conservative with what we send, and to interoperate with clightning. defaults of other clients: eclair: 30 clightning: 30 lnd: 483
[ { "change_type": "MODIFY", "old_path": "electrum/lnchannel.py", "new_path": "electrum/lnchannel.py", "diff": "@@ -781,6 +781,7 @@ class Channel(AbstractChannel):\nif len(self.hm.htlcs_by_direction(htlc_receiver, direction=RECEIVED, ctn=ctn)) + 1 > chan_config.max_accepted_htlcs:\nraise PaymentFailur...
Python
MIT License
spesmilo/electrum
lnpeer: increase max_accepted_htlcs (5->30) Counter-intuitively, the motivation is to be able to *send* more htlcs, for MPP trickery. We don't offer more htlcs than this limit, to be conservative with what we send, and to interoperate with clightning. defaults of other clients: eclair: 30 clightning: 30 lnd: 483
630,969
05.03.2021 17:04:06
-3,600
59547d05138b0e90413ac4f60f81d5af8564516b
test_lnpeer: variables must be declared in MockLNWallet.__init__
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_lnpeer.py", "new_path": "electrum/tests/test_lnpeer.py", "diff": "@@ -139,6 +139,8 @@ class MockLNWallet(Logger, NetworkRetryManager[LNPeerAddr]):\nself.sent_htlcs_routes = dict()\nself.sent_buckets = defaultdict(set)\nself.trampoline_forwa...
Python
MIT License
spesmilo/electrum
test_lnpeer: variables must be declared in MockLNWallet.__init__
630,969
05.03.2021 17:02:10
-3,600
5207c40cc3ef782765e2a413248025d42c156edc
fix trampoline forwarding: add_received_htlc must be indexed by payment_secret
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1536,7 +1536,8 @@ class Peer(Logger):\n# TODO fail here if invoice has set PAYMENT_SECRET_REQ\npayment_secret_from_onion = None\n- mpp_status = self.lnworker.add_received_htlc(chan.short_chann...
Python
MIT License
spesmilo/electrum
fix trampoline forwarding: add_received_htlc must be indexed by payment_secret
630,870
05.03.2021 20:11:54
-3,600
34413a9c306a297c833ed2b5e267e61ca297a225
python 3.6 compat: asyncio.Task.set_name was added in 3.8
[ { "change_type": "MODIFY", "old_path": "electrum/interface.py", "new_path": "electrum/interface.py", "diff": "@@ -380,6 +380,7 @@ class Interface(Logger):\nasync def spawn_task():\ntask = await self.network.taskgroup.spawn(self.run())\n+ if sys.version_info >= (3, 8):\ntask.set_name(f\"interface::{s...
Python
MIT License
spesmilo/electrum
python 3.6 compat: asyncio.Task.set_name was added in 3.8
630,870
05.03.2021 20:46:41
-3,600
1dbff51fce762c212913c2c446d6e5945f283f75
synchronizer: fix rare race where synchronizer could get stuck
[ { "change_type": "MODIFY", "old_path": "electrum/lnverifier.py", "new_path": "electrum/lnverifier.py", "diff": "@@ -74,8 +74,9 @@ class LNChannelVerifier(NetworkJobOnDefaultServer):\nself.unverified_channel_info[short_channel_id] = msg\nreturn True\n- async def _start_tasks(self):\n- async with self...
Python
MIT License
spesmilo/electrum
synchronizer: fix rare race where synchronizer could get stuck
630,870
05.03.2021 21:04:20
-3,600
529e96aaf9a90be5c7d48db704c43eaeb751263b
synchronizer: (trivial) add comment
[ { "change_type": "MODIFY", "old_path": "electrum/synchronizer.py", "new_path": "electrum/synchronizer.py", "diff": "@@ -93,10 +93,11 @@ class SynchronizerBase(NetworkJobOnDefaultServer):\nasyncio.run_coroutine_threadsafe(self._add_address(addr), self.asyncio_loop)\nasync def _add_address(self, addr:...
Python
MIT License
spesmilo/electrum
synchronizer: (trivial) add comment
630,969
06.03.2021 00:29:37
-3,600
31919d0425b1f5828d202f1bfb095eb8c5dfcff2
lnworker: add assert amount_inflight <= amount_to_pay
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1084,6 +1084,7 @@ class LNWallet(LNWorker):\nmin_cltv_expiry=cltv_delta,\ntrampoline_onion=trampoline_onion)\namount_inflight += amount_msat\n+ assert amount_inflight <= amount_to_pay, f\"...
Python
MIT License
spesmilo/electrum
lnworker: add assert amount_inflight <= amount_to_pay
630,969
06.03.2021 00:31:30
-3,600
d3d476f44c57cc9c545f9dabddf32897b84c784c
lnpeer: fix error code in logs
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1891,7 +1891,7 @@ class Peer(Logger):\npreimage = self.lnworker.get_preimage(payment_hash)\nerror_reason = self.lnworker.trampoline_forwarding_failures.pop(payment_hash, None)\nif error_reason...
Python
MIT License
spesmilo/electrum
lnpeer: fix error code in logs
630,969
06.03.2021 10:45:52
-3,600
5663e598637d5cf8aba6b2be8c2b3ccc609fd692
lnworker: fix amount_inflight. (amount with routing fees were used on htlc failures)
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -601,7 +601,7 @@ class LNWallet(LNWorker):\nself.sent_htlcs = defaultdict(asyncio.Queue) # type: Dict[bytes, asyncio.Queue[HtlcLog]]\nself.sent_htlcs_routes = dict() # (RHASH, scid, htlc_id...
Python
MIT License
spesmilo/electrum
lnworker: fix amount_inflight. (amount with routing fees were used on htlc failures)
630,969
06.03.2021 00:26:55
-3,600
83993768e5309c504ae6c419d40986d5e374b9d2
trampoline: do not add node in trampoline hints if it already is the last trampoline of the route
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_lnpeer.py", "new_path": "electrum/tests/test_lnpeer.py", "diff": "@@ -763,7 +763,7 @@ class TestPeer(ElectrumTestCase):\ngraph.w_a.network.channel_db.stop()\ngraph.w_a.network.channel_db = None\n# Note: first attempt will fail with insuffic...
Python
MIT License
spesmilo/electrum
trampoline: do not add node in trampoline hints if it already is the last trampoline of the route
630,969
06.03.2021 10:59:29
-3,600
6ddd02506eefcbef358c18bcb5fb8106400a3c2b
test_lnpeer: add missing parameter in pay_to_route
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_lnpeer.py", "new_path": "electrum/tests/test_lnpeer.py", "diff": "@@ -529,11 +529,13 @@ class TestPeer(ElectrumTestCase):\nq2 = w2.sent_htlcs[lnaddr1.paymenthash]\n# alice sends htlc BUT NOT COMMITMENT_SIGNED\np1.maybe_send_commitment = lam...
Python
MIT License
spesmilo/electrum
test_lnpeer: add missing parameter in pay_to_route
630,870
06.03.2021 14:23:00
-3,600
edb214aeca91de2d0f3719c0258e98592bef6481
lnworker.pay_to_node: re overpayment, raise before actually it happens
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1051,7 +1051,7 @@ class LNWallet(LNWorker):\ntrampoline_fee_level = 0 # only used for trampoline payments\nuse_two_trampolines = True # only used for pay to legacy\n- amount_inflight = 0 #...
Python
MIT License
spesmilo/electrum
lnworker.pay_to_node: re overpayment, raise before actually it happens
630,870
06.03.2021 14:42:01
-3,600
7698ab4ccb11451a1964ac03e00e258f431c2a41
android build: update kivy, and python
[ { "change_type": "MODIFY", "old_path": "contrib/android/buildozer.spec", "new_path": "contrib/android/buildozer.spec", "diff": "@@ -37,14 +37,13 @@ version.filename = %(source.dir)s/electrum/version.py\n# (list) Application requirements\nrequirements =\n- # note: re python3.8, see #6147\n- hostpytho...
Python
MIT License
spesmilo/electrum
android build: update kivy, and python
630,870
07.03.2021 16:21:42
-3,600
e07f615bbbddfa28181ca8ede15c403210d7c702
windows binaries: update pyinstaller to 4.2
[ { "change_type": "MODIFY", "old_path": "contrib/build-wine/prepare-wine.sh", "new_path": "contrib/build-wine/prepare-wine.sh", "diff": "@@ -10,8 +10,8 @@ LIBUSB_COMMIT=\"c6a35c56016ea2ab2f19115d2ea1e85e0edae155\"\n# ^ tag v1.0.24\nPYINSTALLER_REPO=\"https://github.com/SomberNight/pyinstaller.git\"\n...
Python
MIT License
spesmilo/electrum
windows binaries: update pyinstaller to 4.2
630,870
07.03.2021 14:28:16
-3,600
f1f584c4c43586a265f11291da0ddbb4ab1a2f79
windows build: separate 32/64 bit build caches specify which architecture to target by setting WIN_ARCH env var
[ { "change_type": "MODIFY", "old_path": "contrib/build-wine/build.sh", "new_path": "contrib/build-wine/build.sh", "diff": "@@ -5,31 +5,43 @@ set -e\nhere=\"$(dirname \"$(readlink -e \"$0\")\")\"\ntest -n \"$here\" -a -d \"$here\" || exit\n-export CONTRIB=\"$here/..\"\n-export PROJECT_ROOT=\"$CONTRIB/...
Python
MIT License
spesmilo/electrum
windows build: separate 32/64 bit build caches specify which architecture to target by setting WIN_ARCH env var
630,870
07.03.2021 22:12:26
-3,600
dded25f39874223b0d5d6c94ca9824542f4f4584
windows build: cache pip downloads
[ { "change_type": "MODIFY", "old_path": "contrib/build-linux/appimage/build.sh", "new_path": "contrib/build-linux/appimage/build.sh", "diff": "@@ -9,6 +9,7 @@ DISTDIR=\"$PROJECT_ROOT/dist\"\nBUILDDIR=\"$CONTRIB_APPIMAGE/build/appimage\"\nAPPDIR=\"$BUILDDIR/electrum.AppDir\"\nCACHEDIR=\"$CONTRIB_APPIM...
Python
MIT License
spesmilo/electrum
windows build: cache pip downloads
630,870
07.03.2021 22:58:44
-3,600
41233a4bc72d5551a197b02167a0fd0cf98fe50f
windows build: minor clean-up
[ { "change_type": "MODIFY", "old_path": "contrib/build-wine/build-electrum-git.sh", "new_path": "contrib/build-wine/build-electrum-git.sh", "diff": "NAME_ROOT=electrum\n-# These settings probably don't need any change\n-export WINEPREFIX=/opt/wine64\n-export WINEDEBUG=-all\nexport PYTHONDONTWRITEBYTE...
Python
MIT License
spesmilo/electrum
windows build: minor clean-up
630,870
08.03.2021 03:03:31
-3,600
cf5bf5d1afbd785b24e90b2457d4f7cc82c902df
windows build: skip building pyinstaller if already there
[ { "change_type": "MODIFY", "old_path": "contrib/build-wine/prepare-wine.sh", "new_path": "contrib/build-wine/prepare-wine.sh", "diff": "@@ -100,6 +100,17 @@ info \"Building PyInstaller.\"\n# we build our own PyInstaller boot loader as the default one has high\n# anti-virus false positives\n(\n+ if [...
Python
MIT License
spesmilo/electrum
windows build: skip building pyinstaller if already there
630,969
08.03.2021 13:30:51
-3,600
5df4466812b011b2d16e0be0aac5c56631ac712b
rm fixme; it was for intermediate stage, between commits.
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1401,7 +1401,7 @@ class LNWallet(LNWorker):\nfor chan_id, part_amount_msat in bucket:\nchan = self.channels[chan_id]\nmargin = chan.available_to_spend(LOCAL, strict=True) - part_amount_msa...
Python
MIT License
spesmilo/electrum
rm fixme; it was for intermediate stage, between commits.
630,969
08.03.2021 17:23:52
-3,600
308b02ca7dc2427583a32784f6bde4dec08d1069
lnworker: fix amount in htlc_log after mpp bucket failure
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -601,7 +601,7 @@ class LNWallet(LNWorker):\nself.sent_htlcs = defaultdict(asyncio.Queue) # type: Dict[bytes, asyncio.Queue[HtlcLog]]\nself.sent_htlcs_routes = dict() # (RHASH, scid, htlc_id...
Python
MIT License
spesmilo/electrum
lnworker: fix amount in htlc_log after mpp bucket failure
630,870
08.03.2021 18:51:52
-3,600
0491da2c662fdf74c1470acdb2bb856640780245
lnpeer: (trivial) log htlc in on_update_add_htlc
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1315,22 +1315,22 @@ class Peer(Logger):\ndef on_update_add_htlc(self, chan: Channel, payload):\npayment_hash = payload[\"payment_hash\"]\nhtlc_id = payload[\"id\"]\n- self.logger.info(f\"on_up...
Python
MIT License
spesmilo/electrum
lnpeer: (trivial) log htlc in on_update_add_htlc
630,969
08.03.2021 18:49:52
-3,600
196b4c00a35b288f28885c0ceb8afdd5ffbd9a0f
Use new value of option_trampoline_routing flag, add it to our invoices. Keep supporting old value for Eclair/Phoenix. Do not add trampoline_routing_hints in invoices.
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1453,7 +1453,6 @@ class Peer(Logger):\namount_to_pay=amt_to_forward,\nmin_cltv_expiry=cltv_from_onion,\nr_tags=[],\n- t_tags=[],\ninvoice_features=invoice_features,\nfwd_trampoline_onion=next_...
Python
MIT License
spesmilo/electrum
Use new value of option_trampoline_routing flag, add it to our invoices. Keep supporting old value for Eclair/Phoenix. Do not add trampoline_routing_hints in invoices.
630,870
08.03.2021 21:36:27
-3,600
4069b455d0059dd3ba26adbad5389255fcac84f0
lnaddr: add get_features method
[ { "change_type": "MODIFY", "old_path": "electrum/lnaddr.py", "new_path": "electrum/lnaddr.py", "diff": "@@ -6,7 +6,7 @@ import time\nfrom hashlib import sha256\nfrom binascii import hexlify\nfrom decimal import Decimal\n-from typing import Optional\n+from typing import Optional, TYPE_CHECKING\nimpor...
Python
MIT License
spesmilo/electrum
lnaddr: add get_features method
630,870
08.03.2021 21:46:56
-3,600
f662859e5c7745eccaa7af195c9915035e38eb94
test_lnpeer: (trivial) prepare_invoice to return both LnAddr and str
[ { "change_type": "MODIFY", "old_path": "electrum/tests/test_lnpeer.py", "new_path": "electrum/tests/test_lnpeer.py", "diff": "@@ -8,7 +8,7 @@ import logging\nimport concurrent\nfrom concurrent import futures\nimport unittest\n-from typing import Iterable, NamedTuple\n+from typing import Iterable, Na...
Python
MIT License
spesmilo/electrum
test_lnpeer: (trivial) prepare_invoice to return both LnAddr and str
630,870
08.03.2021 22:18:06
-3,600
a125cd5392d8aa873b15663e59b5d3c269977afc
tests: test payreq status after getting paid via LN The test failures corresponding to single-part (non-MPP) payments expose a bug. see `lnworker.add_received_htlc` is not called for single-part payments...
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1473,7 +1473,7 @@ class Peer(Logger):\nchan: Channel,\nhtlc: UpdateAddHtlc,\nprocessed_onion: ProcessedOnionPacket,\n- is_trampoline: bool = False) -> Tuple[Optional[bytes], Optional[bytes]]:\...
Python
MIT License
spesmilo/electrum
tests: test payreq status after getting paid via LN The test failures corresponding to single-part (non-MPP) payments expose a bug. see https://github.com/spesmilo/electrum/blob/196b4c00a35b288f28885c0ceb8afdd5ffbd9a0f/electrum/lnpeer.py#L1538-L1539 `lnworker.add_received_htlc` is not called for single-part payments....
630,969
09.03.2021 09:35:43
-3,600
ef661050c8da36b7b2b73bec47dbaeddb38301f5
lnworker: set request status after LN payment
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -49,6 +49,7 @@ from .interface import GracefulDisconnect\nfrom .lnrouter import fee_for_edge_msat\nfrom .lnutil import ln_dummy_address\nfrom .json_db import StoredDict\n+from .invoices import ...
Python
MIT License
spesmilo/electrum
lnworker: set request status after LN payment
630,969
09.03.2021 09:55:55
-3,600
652d10aa5f810d6db00ce4870ea7c779f9ff35a4
Remove LNBackups object: no longer needed since LNWorker is instantiated by default.
[ { "change_type": "MODIFY", "old_path": "electrum/gui/kivy/uix/dialogs/lightning_channels.py", "new_path": "electrum/gui/kivy/uix/dialogs/lightning_channels.py", "diff": "@@ -410,11 +410,12 @@ Builder.load_string(r'''\nclass ChannelBackupPopup(Popup, Logger):\n- def __init__(self, chan: AbstractChann...
Python
MIT License
spesmilo/electrum
Remove LNBackups object: no longer needed since LNWorker is instantiated by default.
630,969
09.03.2021 12:28:25
-3,600
ce88b36e81a533810b08ccf8796120951265da8a
lnworker: simplify request_force_close_from_backup
[ { "change_type": "MODIFY", "old_path": "electrum/lnworker.py", "new_path": "electrum/lnworker.py", "diff": "@@ -1990,11 +1990,5 @@ class LNWallet(LNWorker):\nasync def request_force_close_from_backup(self, channel_id: bytes):\ncb = self.channel_backups[channel_id].cb\n# TODO also try network address...
Python
MIT License
spesmilo/electrum
lnworker: simplify request_force_close_from_backup
630,870
09.03.2021 17:52:36
-3,600
3c019c2f9c4d2fdefe52d84444632b54d421e140
daemon/wallet/network: make stop() methods async
[ { "change_type": "MODIFY", "old_path": "electrum/address_synchronizer.py", "new_path": "electrum/address_synchronizer.py", "diff": "@@ -28,6 +28,8 @@ import itertools\nfrom collections import defaultdict\nfrom typing import TYPE_CHECKING, Dict, Optional, Set, Tuple, NamedTuple, Sequence, List\n+from...
Python
MIT License
spesmilo/electrum
daemon/wallet/network: make stop() methods async
630,870
09.03.2021 18:22:30
-3,600
8de52bf523bff8280de02e8015d31ccd525f3c0e
wallet: (trivial) use kwargs for get_tx_item_fiat
[ { "change_type": "MODIFY", "old_path": "electrum/gui/qt/history_list.py", "new_path": "electrum/gui/qt/history_list.py", "diff": "@@ -356,10 +356,11 @@ class HistoryModel(CustomModel, Logger):\ndef update_fiat(self, idx):\ntx_item = idx.internalPointer().get_data()\n- key = tx_item['txid']\n+ txid =...
Python
MIT License
spesmilo/electrum
wallet: (trivial) use kwargs for get_tx_item_fiat
630,870
10.03.2021 16:23:49
-3,600
d4de25a8cde35ee47a7594194eef794a1b4f7b2b
crash reports: fix get_git_version for kivy
[ { "change_type": "MODIFY", "old_path": "electrum/base_crash_reporter.py", "new_path": "electrum/base_crash_reporter.py", "diff": "@@ -23,15 +23,13 @@ import asyncio\nimport json\nimport locale\nimport traceback\n-import subprocess\nimport sys\n-import os\nfrom .version import ELECTRUM_VERSION\nfrom ...
Python
MIT License
spesmilo/electrum
crash reports: fix get_git_version for kivy
630,969
10.03.2021 17:09:07
-3,600
549b9a95df6fedbf0880df139a99f419931150e1
test_lnpeer: add test for mpp_timeout
[ { "change_type": "MODIFY", "old_path": "electrum/lnpeer.py", "new_path": "electrum/lnpeer.py", "diff": "@@ -1820,7 +1820,7 @@ class Peer(Logger):\nerror_reason = e\nelse:\ntry:\n- preimage, fw_info, error_bytes = self.process_unfulfilled_htlc(\n+ preimage, fw_info, error_bytes = await self.process_u...
Python
MIT License
spesmilo/electrum
test_lnpeer: add test for mpp_timeout
630,870
10.03.2021 17:13:42
-3,600
9740744d70461d9b0f02a78f836784bc91ff2d1a
crypto: add chacha20_decrypt; unused for now
[ { "change_type": "MODIFY", "old_path": "electrum/crypto.py", "new_path": "electrum/crypto.py", "diff": "@@ -338,6 +338,8 @@ def chacha20_poly1305_encrypt(\nassert isinstance(nonce, (bytes, bytearray))\nassert isinstance(associated_data, (bytes, bytearray, type(None)))\nassert isinstance(data, (bytes...
Python
MIT License
spesmilo/electrum
crypto: add chacha20_decrypt; unused for now
630,870
10.03.2021 17:31:02
-3,600
151a45911f028b1b466e001a0fd8fad467d60bf1
follow-up prev: too much copy-paste
[ { "change_type": "MODIFY", "old_path": "electrum/crypto.py", "new_path": "electrum/crypto.py", "diff": "@@ -338,7 +338,7 @@ def chacha20_poly1305_encrypt(\nassert isinstance(nonce, (bytes, bytearray))\nassert isinstance(associated_data, (bytes, bytearray, type(None)))\nassert isinstance(data, (bytes...
Python
MIT License
spesmilo/electrum
follow-up prev: too much copy-paste
630,870
10.03.2021 17:38:53
-3,600
eaa4de33541a56af049b8d48b92f206ed47f785a
kivy crash_reporter: a bit more logging
[ { "change_type": "MODIFY", "old_path": "electrum/gui/kivy/uix/dialogs/crash_reporter.py", "new_path": "electrum/gui/kivy/uix/dialogs/crash_reporter.py", "diff": "@@ -122,13 +122,15 @@ class CrashReporter(BaseCrashReporter, Factory.Popup):\n# FIXME network request in GUI thread...\nresponse = json.lo...
Python
MIT License
spesmilo/electrum
kivy crash_reporter: a bit more logging
630,870
10.03.2021 18:07:15
-3,600
de6f5a8e0357b201b5f0ffe20195b36cad66824d
{daemon,wallet}|.stop: small clean-up
[ { "change_type": "MODIFY", "old_path": "electrum/daemon.py", "new_path": "electrum/daemon.py", "diff": "@@ -32,13 +32,11 @@ import threading\nfrom typing import Dict, Optional, Tuple, Iterable, Callable, Union, Sequence, Mapping, TYPE_CHECKING\nfrom base64 import b64decode, b64encode\nfrom collectio...
Python
MIT License
spesmilo/electrum
{daemon,wallet}|.stop: small clean-up
630,870
10.03.2021 19:01:30
-3,600
5339e0054c6e473ec4b5858ea9bb11aeb37be109
network.stop: clean-up
[ { "change_type": "MODIFY", "old_path": "electrum/network.py", "new_path": "electrum/network.py", "diff": "@@ -39,13 +39,14 @@ from concurrent import futures\nimport copy\nimport aiorpcx\n-from aiorpcx import TaskGroup\n+from aiorpcx import TaskGroup, ignore_after\nfrom aiohttp import ClientResponse\...
Python
MIT License
spesmilo/electrum
network.stop: clean-up