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

Rework router data structures #902

Merged
merged 153 commits into from
Aug 28, 2019
Merged
Changes from 1 commit
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
6e2d30f
Add extended query messages
sstone Sep 10, 2018
14e7255
Add a feature bit for extended channel range queries
sstone Sep 11, 2018
90a0393
Merge branch 'master' into wip-channel-update-queries
sstone Sep 14, 2018
ada3bbb
Peer connection: let users specify a custom init message
sstone Sep 14, 2018
6cedaeb
Correctly handle multiple channel_range_replies
sstone Sep 16, 2018
1f9025f
Merge branch 'fix-channel-queries-sync' into wip-channel-update-queries
sstone Sep 16, 2018
b5f53ce
RoutingSync: remove peer entry properly
sstone Sep 17, 2018
03c45bb
Routing Sync: rename Sync.count to Sync.totalMissingCount
sstone Sep 17, 2018
5a4b554
Merge branch 'fix-channel-queries-sync' into wip-channel-update-queries
sstone Sep 17, 2018
837dd97
Merge branch 'master' into wip-channel-update-queries
sstone Sep 17, 2018
338cf7d
Merge branch 'master' into wip-channel-update-queries
sstone Sep 17, 2018
0da9136
Do not send channel queries if we don't want to sync
sstone Sep 18, 2018
f7b3409
Router: clean our sync state when we (re)connect to a peer
sstone Sep 19, 2018
e740523
Router: fix syncing of outdated channels
sstone Sep 19, 2018
19f0c81
Routing: don't request their channel ids if we don't want a routing t…
sstone Sep 19, 2018
ebcd58c
Router: fix indentation
sstone Sep 19, 2018
c345b2f
Router: reset sync state on reconnection
sstone Sep 19, 2018
830f963
Revert "Routing: don't request their channel ids if we don't want a r…
sstone Sep 19, 2018
668f172
Merge branch 'routing-sync-fixes' into wip-channel-update-queries
sstone Sep 19, 2018
3e47d5f
Merge branch 'master' into wip-channel-update-queries
sstone Sep 19, 2018
28383fa
Merge branch 'master' into wip-channel-update-queries
sstone Sep 20, 2018
da012f9
add extended query flag to our log message
sstone Sep 21, 2018
2744613
Merge branch 'master' into wip-channel-update-queries
sstone Sep 24, 2018
e70043d
Merge branch 'master' into wip-channel-update-queries
sstone Oct 11, 2018
71a4542
Merge branch 'master' into wip-channel-update-queries
pm47 Oct 18, 2018
da25696
Merge branch 'master' into wip-channel-update-queries
sstone Oct 23, 2018
eb44823
Router: implement new extended queries
sstone Oct 26, 2018
f22728c
Merge branch 'master' into wip-channel-update-queries
sstone Oct 26, 2018
4f513c4
Extended channel queries: refactor handlers, add more tests
sstone Oct 29, 2018
7e74e14
Merge branch 'master' into wip-channel-update-queries
pm47 Nov 20, 2018
7367313
Merge branch 'master' into wip-channel-update-queries
sstone Dec 2, 2018
a263200
Extended channel queries: clean up
sstone Dec 2, 2018
cbb951c
Merge branch 'master' into wip-channel-update-queries
pm47 Dec 13, 2018
515461f
Merge branch 'master' into wip-channel-update-queries
pm47 Jan 10, 2019
9e9c3c8
Merge branch 'master' into wip-channel-update-queries
pm47 Jan 11, 2019
22455c0
Merge branch 'master' into wip-channel-update-queries
pm47 Jan 14, 2019
aa6c930
Merge branch 'master' into wip-channel-update-queries
sstone Jan 16, 2019
e17ef25
added checksum prototype
pm47 Jan 20, 2019
928d165
major refactoring
pm47 Jan 21, 2019
5ffabe9
enable extended queries in flags
pm47 Jan 21, 2019
a16d3d7
only send updates if explicitely asked
pm47 Jan 21, 2019
6a41ce5
Merge branch 'master' into wip-channel-update-queries-pm
pm47 Jan 21, 2019
430823a
always return channel+updates in deprecated mode
pm47 Jan 21, 2019
fdbaf5d
fixed QueryChannelRange handler
pm47 Jan 21, 2019
21359e2
fixed sync progress calculation
pm47 Jan 21, 2019
919bad7
set feature bits 22/23 for extended channel queries
pm47 Jan 22, 2019
27c21a9
better logs + refactoring
pm47 Jan 22, 2019
3ba1f15
removed temporary test
pm47 Jan 22, 2019
428fd0a
fixed sync count
pm47 Jan 22, 2019
366507e
fixed numBlocks calculation
pm47 Jan 22, 2019
7685c7d
don't request stale channel_updates
pm47 Jan 23, 2019
0d9f285
cleaned function signature (removed unused args)
pm47 Jan 29, 2019
de866e2
fixed sync progress calculation
pm47 Jan 29, 2019
c04af36
Merge branch 'master' into wip-channel-update-queries-pm
pm47 Feb 6, 2019
304f12d
Merge branch 'master' into extended-queries-optional
pm47 Mar 10, 2019
c068b93
wip (tests not passing)
pm47 Mar 10, 2019
deb0708
fixed tests
pm47 Mar 11, 2019
7d72600
formatting
pm47 Mar 11, 2019
d3a1d19
fixed `QueryFlagTypes`
pm47 Mar 11, 2019
81023a2
rework feature bits
pm47 Mar 11, 2019
564c1c5
send extended queries if available
pm47 Mar 11, 2019
5bbbebb
better logs
pm47 Mar 11, 2019
7b40799
typed EncodingType
pm47 Mar 12, 2019
4ba355e
removed extended feature bit
pm47 Mar 12, 2019
4a2eb07
Merge branch 'master' into extended-queries-optional
pm47 Mar 14, 2019
f5951cc
wip
pm47 Mar 14, 2019
c2ebcac
wip
pm47 Mar 14, 2019
7a6acd9
Merge branch 'master' into extended-queries-optional
pm47 Mar 15, 2019
4f3e15f
Use ignoredVertices in route computation, adapt 'makeGraph' to new Pu…
araspitzu Mar 15, 2019
01c9b38
Fix test in route calculation spec
araspitzu Mar 15, 2019
0031f3b
reworked network db
pm47 Mar 15, 2019
76765ac
Merge branch 'master' into rework-router-data
pm47 Mar 17, 2019
bf54d36
fixed some tests
pm47 Mar 17, 2019
6d8d052
removed duplicate call
pm47 Mar 18, 2019
1544f43
re-enabled events
pm47 Mar 18, 2019
ee1f3a5
simplified helper function declaration
pm47 Mar 18, 2019
eeb5886
fixed migration and updated sqlite
pm47 Mar 18, 2019
b0c67e7
added default value to Graph
pm47 Mar 18, 2019
553acce
Revert "added default value to Graph"
pm47 Mar 18, 2019
f5ced64
Extract graph edges creation operations in a function
araspitzu Mar 19, 2019
94711a8
added test vectors
pm47 Mar 19, 2019
149deb7
Merge branch 'master' into extended-queries-optional
pm47 Mar 19, 2019
a18ec55
ignore fake test vector test
pm47 Mar 19, 2019
dc6031a
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Mar 19, 2019
90eaafe
Merge remote-tracking branch 'origin/rework-router-data' into rework-…
pm47 Mar 19, 2019
f2a18be
added tests on query flags
pm47 Mar 19, 2019
d39807b
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Mar 19, 2019
79d9aa0
Merge branch 'master' into extended-queries-optional
pm47 Mar 21, 2019
521ca1d
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Mar 21, 2019
e6a2805
cleanup in codecs
pm47 Mar 24, 2019
9ebfb5f
Merge branch 'master' into extended-queries-optional
pm47 Mar 25, 2019
0ac1449
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Mar 25, 2019
0ace8da
fixed and improved tests
pm47 Mar 26, 2019
eb30c3b
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Mar 26, 2019
faa9a8c
tweak test
pm47 Mar 26, 2019
b488701
Merge branch 'master' into extended-queries-optional
pm47 Mar 26, 2019
fdd6798
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Mar 26, 2019
ffa6183
Merge branch 'master' into extended-queries-optional
pm47 Apr 17, 2019
d4b6a07
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Apr 17, 2019
96e1c87
Merge branch 'master' into extended-queries-optional
pm47 Apr 24, 2019
e696116
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Apr 24, 2019
3cf840e
Merge branch 'master' into extended-queries-optional
pm47 Apr 26, 2019
823cee0
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Apr 26, 2019
b282581
Merge branch 'master' into extended-queries-optional
pm47 May 9, 2019
db40dbf
Merge branch 'extended-queries-optional' into rework-router-data
pm47 May 9, 2019
640144b
Merge branch 'master' into extended-queries-optional
pm47 May 14, 2019
00d75eb
Merge branch 'extended-queries-optional' into rework-router-data
pm47 May 14, 2019
c97cfc5
Merge branch 'master' into extended-queries-optional
pm47 Jun 4, 2019
c69cdd9
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Jun 4, 2019
ddcf2d4
Merge branch 'master' into extended-queries-optional
pm47 Jun 14, 2019
3033696
fixed ddcf2d418732e4023fbec4875d9e00b2c3382ec3
pm47 Jun 14, 2019
31c900b
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Jun 14, 2019
5a1a58a
Merge branch 'master' into extended-queries-optional
pm47 Jul 3, 2019
91df205
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Jul 3, 2019
1240166
Merge branch 'master' into extended-queries-optional
pm47 Jul 10, 2019
c4eb812
Merge branch 'master' into extended-queries-optional
pm47 Jul 16, 2019
b40f683
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Jul 16, 2019
3db77b4
Merge branch 'master' into extended-queries-optional
sstone Jul 29, 2019
a60048d
Update list of commands in eclair-cli help (#1091)
araspitzu Jul 29, 2019
7582402
Documentation update (#1092)
t-bast Jul 31, 2019
f53b770
Typed amounts (#1088)
araspitzu Aug 7, 2019
436afea
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Aug 12, 2019
8be2227
Merge branch 'master' into extended-queries-optional
pm47 Aug 13, 2019
a16e942
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Aug 13, 2019
d321a21
Merge branch 'master' into extended-queries-optional
sstone Aug 22, 2019
0780fc2
Extended Queries: use TLV format for optional data (#1072)
sstone Aug 22, 2019
4b67e41
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Aug 26, 2019
92d9f2a
Channel range queries: send back node announcements (#1108)
sstone Aug 26, 2019
c8b41c9
better naming
pm47 Aug 26, 2019
d404e5d
Router: fix tests and rework computeFlags
sstone Aug 26, 2019
9947887
Router: better naming
sstone Aug 26, 2019
e43d884
Merge branch 'master' into extended-queries-optional
sstone Aug 26, 2019
ea11036
Update comment [skip ci]
sstone Aug 26, 2019
217a8f7
Router: format code
sstone Aug 27, 2019
5d070d3
Include chain hash in ChannelUpdate checksum
sstone Aug 27, 2019
d3f283d
Extended Channel Queries: add CL interop test
sstone Aug 27, 2019
b937ac7
Channel Queries: update test checksums
sstone Aug 27, 2019
57abd93
minor log update
pm47 Aug 28, 2019
b2b1506
made encoding type configurable
pm47 Aug 28, 2019
bd86b06
renamed updateSync -> addToSync
pm47 Aug 28, 2019
361460d
added rationale for split size
pm47 Aug 28, 2019
14e7203
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Aug 28, 2019
69f2048
fixed tests
pm47 Aug 28, 2019
fd3682d
do nonreg on our own test vectors
pm47 Aug 28, 2019
aff66c9
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Aug 28, 2019
11c12be
fixes as per @t-bast review
pm47 Aug 28, 2019
b0c45b6
fixed previous merge
pm47 Aug 28, 2019
cd90287
increased test timeout
pm47 Aug 28, 2019
310b9ba
inceased more timeouts
pm47 Aug 28, 2019
0d407d5
Merge branch 'extended-queries-optional' into rework-router-data
pm47 Aug 28, 2019
b1039d2
naming as per @sstone's remarks
pm47 Aug 28, 2019
d63c106
Merge branch 'master' into rework-router-data
pm47 Aug 28, 2019
1a3804e
fixed merge error in 14e720336c8f18a264941015a453f3efeb063e31
pm47 Aug 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Router: fix syncing of outdated channels
sstone committed Sep 19, 2018
commit e740523698b5cbed04c677c04a7959538478db6e
12 changes: 0 additions & 12 deletions eclair-core/src/main/scala/fr/acinq/eclair/router/Router.scala
Original file line number Diff line number Diff line change
@@ -569,18 +569,6 @@ class Router(nodeParams: NodeParams, watcher: ActorRef) extends FSMDiagnosticAct
// we already have a pending query with this peer, add outdated ids to our "sync" state
d.copy(sync = d.sync + (remoteNodeId -> sync.copy(outdated = sync.outdated ++ outdated, totalOutdatedCount = sync.totalOutdatedCount + outdated.size)))
}
// they may send back several reply_channel_range messages for a single query_channel_range query, and we must not
// send another query_short_channel_ids query if they're still processing one
d.sync.get(remoteNodeId) match {
case None =>
// we don't have a pending query with this peer
val (slice, rest) = missing.splitAt(SHORTID_WINDOW)
transport ! QueryShortChannelIds(chainHash, ChannelRangeQueries.encodeShortChannelIdsSingle(slice, format, useGzip = false))
d.copy(sync = d.sync + (remoteNodeId -> Sync(rest, missing.size)))
case Some(sync) =>
// we already have a pending query with this peer, add missing ids to our "sync" state
d.copy(sync = d.sync + (remoteNodeId -> Sync(sync.missing ++ missing, sync.totalMissingCount + missing.size)))
}
} else d
context.system.eventStream.publish(syncProgress(d1))
stay using d1