SomberNight
46d8080c76
ln gossip: don't put own channels into db; always pass them to fn calls
...
Previously we would put fake chan announcement and fake outgoing chan upd
for own channels into db (to make path finding work). See Peer.add_own_channel().
Now, instead of above, we pass a "my_channels" param to the relevant ChannelDB methods.
6 years ago
SomberNight
b99add59c3
lnworker: introduce PaymentAttemptLog NamedTuple
6 years ago
SomberNight
d4da4aa56c
lnrouter: fix off-by-one in NUM_MAX_EDGES_IN_PAYMENT_PATH
6 years ago
SomberNight
509df9ddaf
create class for ShortChannelID and use it
6 years ago
ThomasV
246cda2928
fix Flake8 tests
6 years ago
SomberNight
beeb81e179
lnpeer: use correct failure codes in _maybe_forward_htlc
6 years ago
SomberNight
d955285808
lnrouter/channeldb: small import clean-up
6 years ago
ThomasV
e43a3bc63a
follow-up prev commit: pass is_mine to _edge_cost
6 years ago
ThomasV
b55f9e9e6a
Do not route through channels for which we did not receive
...
both updates, because this often means one of the nodes is
offline.
6 years ago
ThomasV
f2d58d0e3f
optimize channel_db:
...
- use python objects mirrored by sql database
- write sql to file asynchronously
- the sql decorator is awaited in sweepstore, not in channel_db
6 years ago
ThomasV
180f6d34be
separate channel_db module
6 years ago
ThomasV
115113f492
remove expensive sql request, python set comparison is faster
6 years ago
SomberNight
9a0ba7fa79
ChannelDB: trivial bugfix for get_channels_for_node
6 years ago
SomberNight
62f58c18fe
ChannelDB.on_node_announcement: some speed-up
...
(e.g. for 100 node anns, was ~5 seconds, now 0.7 sec; so still slow)
6 years ago
SomberNight
cffb89002c
fix ChannelDB.compare_channels: was raising "too many SQL variables"
...
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) too many SQL variables
6 years ago
ThomasV
0acd0c23d3
fix: key must be unique (sql)
6 years ago
ThomasV
eb4e6bb0de
improve filter_channel_updates
...
blacklist channels that do not really get updated
6 years ago
ThomasV
b055eeace2
prune channels older than two weeks from database
6 years ago
ThomasV
522ce5bb9f
verify channel updates in peer's TaskGroup
6 years ago
ThomasV
308dc6aa6b
use a single queue for gossip messages, so that they are processed in the correct order
6 years ago
ThomasV
e68f318b12
verify node and channel announcements before entering sql lock
6 years ago
ThomasV
0e42fd9f17
parallelize short_channel_id requests
6 years ago
ThomasV
1011245c5e
LNGossip: sync channel db using query_channel_range
6 years ago
ThomasV
31684abb51
do not SPV channel announcements; this is too resource intensive
6 years ago
SomberNight
cc57da704b
logging: adapt lightning branch to logging changes
6 years ago
ThomasV
34f22e6681
lnrouter: load data before finding path
6 years ago
ThomasV
b76728d459
lnrouter: fix get_last_good_address: one_or_none -> all
6 years ago
ThomasV
93e8d4f953
channel_db: fix timestamp_range, reduce verbosity
6 years ago
ThomasV
aa398993cf
lnrouter fixes:
...
- use gossip_queries_req instead of initial_routing_sync
- add connected nodes to recent peers only after successful init
- derive timestamp used with gossip_timestamp_filter from channel_db
- fix query_short_channel_ids:
1. channel IDs must be sorted with zlib
2. limit request to 100
3. do not abuse this to request node_announcements; it is fine not to have all nodes.
- fix get_recent_peers:
1. do not set last_connected_date to 'now' if we never connected a node
2. sql query was misconstructed and was returning only one peer
- populate FALLBACK_NODE_LIST_MAINNET with nodes that have the requested flags
6 years ago
ThomasV
e7888a50be
fix sql conflicts in lnrouter
6 years ago
ThomasV
2c80996fbf
lnrouter: fix primary key conflict in Policy update
6 years ago
ThomasV
02d013421a
lnwatcher: store transactions as binary
6 years ago
ThomasV
d8e9a9a49e
create parent class for sql databases
6 years ago
ThomasV
29afe52b4c
sqlite: do not use scoped_session
6 years ago
ThomasV
436c313790
follow-up previous commit
6 years ago
ThomasV
46aa5c1958
lnrouter: perform SQL requests in a separate thread. persist database.
6 years ago
ThomasV
9f188c087c
Flatten the structure of lnrouter, so that DBSession is not used outside of ChannelDB
6 years ago
Janus
95a2174789
sqlite in lnrouter: lnpeer: introduce _gossip_loop for gossip handling separated from message handling
6 years ago
Janus
3442e51fac
sqlite in lnrouter: remove useless InDB suffix
6 years ago
Janus
945e1dc4ee
sqlite in lnrouter: request missing channel_announcements and node_announcements
6 years ago
Janus
d2d67f1fe1
sqlite in lnrouter: avoid exceptions on shutdown
6 years ago
Janus
dd7c4b3bab
sqlite in lnrouter
6 years ago
ThomasV
3dce65dc73
Rename lnchan, lnchannel_verifier, lnbase
...
Auto-completions are a pain if files share a long prefix
6 years ago
Janus
56853da391
qt main_window: do not unregister on shutdown
...
this is handled differently in lightning, see commit
commit 6e355601261a60d143561f15760cc48f9c81d000
Author: ThomasV <thomasv@electrum.org>
Date: Sun Jun 3 10:07:56 2018 +0200
integrate channels_list with existing framework
6 years ago
ThomasV
3222e26e01
format message
6 years ago
ThomasV
f4b9d2f47c
show lightning network capacity in GUI
6 years ago
SomberNight
5b7c801ca4
after rebase fixes
6 years ago
SomberNight
c0ae7b5534
after rebase clean-up
6 years ago
SomberNight
f70e679aba
some more type annotations that needed conditional imports
6 years ago
SomberNight
bd48072e04
lnrouter: can_pay for own channels should use amount_to_forward
6 years ago