ThomasV
36f32651cc
Define network.try_broadcasting() method.
Use it when rebroadcasting a force-close tx,
because the channel state is already set.
5 years ago
ThomasV
cded582fe9
Start watchtower if run_watchtower is set, even if lightning is not activated ( fix #5896 ).
Fix parameters of sweepstore.add_sweep_tx, rm dead code.
5 years ago
SomberNight
11452722af
network dns hacks: split from network.py into its own file
5 years ago
SomberNight
cb88a3b6e4
dns hacks on windows: resolve A and AAAA records in parallel
5 years ago
SomberNight
0b0139c676
network.get_transaction: move some response validation logic from Synchronizer
5 years ago
SomberNight
37747d7469
split network main_taskgroup: create daemon.taskgroup
network.main_taskgroup restarts every time the proxy settings are changed,
many long-running tasks (some introduced with lightning) are not prepared for and do not want this.
5 years ago
SomberNight
6709ec4117
dns hacks on windows: cache dns when using dnspython
related #4421
related #5337
5 years ago
SomberNight
308517d473
python 3.8: adapt to breaking changes re asyncio.CancelledError
(and TimeoutError)
closes #5798
5 years ago
SomberNight
68dad21fb4
network: make best_effort_reliable smarter and a bit more lenient
related: #5815
5 years ago
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP
6 years ago
ThomasV
90ce9f195b
Allow user to enable lightning in the GUI. Make it a per-wallet setting.
6 years ago
SomberNight
8c1adc2f50
fix dns issue on Windows
closes #5638
6 years ago
SomberNight
b2920db8b8
config: enforce that SimpleConfig is singleton
related: #5629
6 years ago
SomberNight
d1026b5afe
follow-up: SimpleConfig is supposed to be singleton
see cefa4762ba
and #5629
6 years ago
SomberNight
befa8ea771
transaction: kill "name", "csv_delay", "cltv_expiry" fields
6 years ago
ThomasV
e5502a58ba
uncomment breach_remedy in watchtower
6 years ago
SomberNight
9e57a59615
network: handle main_taskgroup dying better. passthrough CancelledError
Previously if a task running in the main_taskgroup raised,
main_taskgroup might have never finished as fx.run (another task running
in main_taskgroup) could not be cancelled (it was swallowing the CancelledError).
Need to be careful with catching all Exceptions or BaseExceptions,
as that might result in a coroutine not being cancellable.
Note that from python 3.8 onwards, CancelledError will inherit from BaseException
instead of Exception, so catching all Exceptions is somewhat less horrible
but this will only really matter if we raise the min py version to 3.8...
Really, all "except BaseException" lines are suspect and at least should be
considered for replacement with "except Exception".
-----
regarding fx.run not being cancellable before, and relevant lines, see:
6197cfbb3b/electrum/network.py (L1171)
0decdffce2/aiorpcx/curio.py (L242)
0decdffce2/aiorpcx/curio.py (L199)
0decdffce2/aiorpcx/curio.py (L208)
0decdffce2/aiorpcx/curio.py (L218)
0decdffce2/aiorpcx/curio.py (L221)
6197cfbb3b/electrum/daemon.py (L194)
6197cfbb3b/electrum/daemon.py (L203)
6197cfbb3b/electrum/exchange_rate.py (L507)
6197cfbb3b/electrum/exchange_rate.py (L79)
6 years ago
SomberNight
ba431495db
lnworker: fix silent TypeError in _calc_routing_hints_for_invoice
6 years ago
ThomasV
f7c05f2602
Synchronize watchtower asynchronously:
- remove remote_commitment_to_be_revoked
- pass old ctns to lnsweep.create_sweeptxs_for_watchtower
- store the ctn of sweeptxs in sweepStore database
- request the highest ctn from sweepstore using get_ctn
- send sweeptxs asynchronously in LNWallet.sync_with_watchtower
6 years ago
SomberNight
4ccfa39fdd
cli: fix add_peer cmd
6 years ago
ThomasV
180f6d34be
separate channel_db module
6 years ago
ThomasV
746dd725c6
follow-up previous
6 years ago
ThomasV
842fff832f
enable lightning through command line option
6 years ago
ThomasV
730be17aba
Use separate lightning nodes for gossip and channel operations.
6 years ago
Janus
dd7c4b3bab
sqlite in lnrouter
6 years ago
SomberNight
9206b6225b
tmp fix for circular imports
6 years ago
SomberNight
bc06ded4b9
persist nodes in channel_db on disk
7 years ago
SomberNight
a5b44d25b0
persist channel db on disk. verify channel gossip sigs.
7 years ago
SomberNight
c1d1826014
start using electrum protocol 1.4
7 years ago
ThomasV
c7e47b74a9
Separate open_channel dialog. In open_channel_coroutine, use host and port from channel announcements
7 years ago
ThomasV
61983c222a
lightning: single shared instance of Watcher, ChannelDB and PathFinder
7 years ago
Janus
98f6f67c6b
lightning: misc patches, launch asyncio loop on separate thread
7 years ago
SomberNight
a10dc04b28
wallet: fix offline hw wallet signing when not specifying --offline
closes #5532
6 years ago
SomberNight
a2bffb9137
network: harden against eclipse attacks
6 years ago
SomberNight
104b8804f7
logging: '-V' cli option can blacklist/whitelist classes with short names
for example, '-V ni' will whitelist the 'Network' and 'Interface' classes
'-V ^ni' will blacklist those instead
6 years ago
SomberNight
2481d708cc
network: sanitize_tx_broadcast_response - new strings in bitcoind 0.18
6 years ago
SomberNight
0c963b0894
network.broadcast_transaction: add "do not trust" text to log messages
6 years ago
SomberNight
6940c424d1
logging: cli options to filter for modules using -v
old style "-v" still works
filtering examples:
-v=debug,network=error,interface=error // effectively blacklists network and interface
-v=warning,network=debug,interface=debug // effectively whitelists network and interface
6 years ago
SomberNight
3385a94753
logging: basics
6 years ago
SomberNight
1110f13c62
network: allow longer timeouts in _run_new_interface
On Windows box with weird networking setup (VPN, no IPv6, many DNS nameservers
but only some working well), the previous timeouts were too low: they were
reached due to DNS resolution.
related: #4421
6 years ago
SomberNight
c49d5f672c
network: fix proxy case
follow-up "healty spread of servers" d8f3ab0917
6 years ago
SomberNight
d8f3ab0917
network: do not connect to multiple servers on same /16
maintain a healthy spread of (IP addresses of) connected servers
6 years ago
SomberNight
7ddc28b0dc
network: cap number of server peers accepted from main server
6 years ago
SomberNight
d07fce0826
windows DNS resolution: handle domain with only AAAA records
this is getting too complicated :/
6 years ago
SomberNight
c4fb58cd74
windows DNS resolution: follow-up 9b0773cf2b
related: #5176 , #4421
prev was failing on systems where
IPv6 is not available but DNS can resolve AAAA records
(my artificial test environment with IPv6 disabled was also filtering AAAA DNS)
6 years ago
SomberNight
1cfac928f9
trustedcoin: longer timeout for server signing
fixes #5221
6 years ago
SomberNight
9b0773cf2b
windows DNS resolution: handle IPv6
related: #5176 , #4421
6 years ago
SomberNight
6702c335e8
network: (trivial) ignore empty string donation address
6 years ago
ThomasV
791e680a96
abstract database away from wallet and address_synchronizer
6 years ago
SomberNight
4b3a285871
exchange_rate: some clean-up and fixes
- generation of currencies.json was broken
- removed some dead exchanges
6 years ago