Jeff
8cad7fecbd
Merge pull request #1087 from majestrate/dont-flood-dht-2020-02-07
...
dont flood dht with requests, if we know of a router don't look it up
2020-02-08 11:26:07 -05:00
Jeff Becker
00260555bd
logic simplification
2020-02-07 15:28:13 -05:00
Jeff Becker
e4a16dfdd5
fix comment
2020-02-07 15:22:58 -05:00
Jeff Becker
b211450cc8
always recurse to second closest if we don't have it
2020-02-07 15:20:47 -05:00
Jeff Becker
19d91a440f
move declaration of peer
2020-02-07 14:50:02 -05:00
Jeff Becker
3bea7327cb
handle end case by telling requester that it's not there
2020-02-07 14:46:12 -05:00
Jeff Becker
7e1a6236be
if relayed try closer router if we don't have an intro
2020-02-07 14:35:57 -05:00
Jeff Becker
a9331a1431
fix unit test
2020-02-07 13:48:56 -05:00
Jeff Becker
cd27b33849
dont flood dht with requests, if we know of a router don't look it up
2020-02-07 13:19:00 -05:00
Jason Rhinelander
fe8a72750a
Silence unused parameter warning
2020-01-31 16:47:25 -04:00
Jeff Becker
99eb7726ff
initial dht key blinding
2020-01-27 16:30:41 -05:00
Jeff Becker
4f81b913ef
make router version member optional on serialization
2020-01-27 11:55:19 -05:00
Jeff Becker
9efd796145
initial wack at 0.7.0 dht fixes
2020-01-27 11:54:51 -05:00
Jeff Becker
626b2a6196
return true
2020-01-23 12:10:58 -05:00
Jeff Becker
e87b754906
fix recursion depth on introset lookup
2020-01-23 12:10:58 -05:00
Jeff Becker
2c0dc12f39
refactor single char variables in DHT (mostly)
2020-01-23 12:10:58 -05:00
Jeff Becker
ae8bb3751b
connect to closest for RC lookups too
2020-01-23 12:10:58 -05:00
Jeff Becker
49f696de9c
connect to closer nodes for introset lookups
2020-01-23 12:10:57 -05:00
Jeff Becker
3b66cf6e75
dht fixes, disable iterative lookups on clients, revert "fixes" from 0.6.3, pass in recursion depth from introset lookup
2020-01-22 17:08:05 -05:00
Stephen Shelton
c92e7ae5c7
Add warning when we found a null RC for a DHT lookup
2020-01-15 19:37:12 -07:00
Jeff Becker
a17b5f25b5
check for zero'd rc
2020-01-15 10:43:21 -05:00
Jeff Becker
4cb6301e28
use copy not move
2020-01-15 10:41:43 -05:00
Jeff Becker
c5feb07fb9
address feedback from tom
2020-01-14 15:48:39 -05:00
Jeff Becker
6fd714d193
contrib/testnet: fix up testnet config generator to make super centralized topology
...
llarp/context.cpp, llarp/nodedb.{h,c}pp: load netdb AFTER whitelist
llarp/router/router.cpp: explore always
llarp/router/{i,}rc_lookup_handler.{h,c}pp explore with whitelist, update routers with lookup before stale
2020-01-14 15:12:47 -05:00
Jeff Becker
9322df013b
check with rc handler before insert
2020-01-14 13:39:08 -05:00
Jeff Becker
2af64671bf
make it compile
2020-01-14 13:10:10 -05:00
Jeff Becker
0526fef37b
store RCs if valid
2020-01-14 13:08:27 -05:00
Jeff Becker
09f5f6dfa7
disable iterative lookup
2020-01-14 07:07:10 -05:00
Jeff
0e2c5736a8
Merge pull request #1034 from majestrate/dht-timeout-fixes-2020-01-10
...
dht timeout tweak
2020-01-10 17:35:56 -05:00
Jeff Becker
78cdf8f96b
variable lookup timeout on participants
2020-01-10 11:23:30 -05:00
Jeff Becker
8bb492da6e
dht timeout tweak
2020-01-10 10:45:25 -05:00
Jeff Becker
b2784dd5ec
explore faster
2020-01-09 06:14:04 -05:00
Jeff Becker
a3e7324e9a
make it compile
2020-01-07 13:00:03 -05:00
Jeff Becker
c3b14b32b4
relays do profiling and not hand out "shit" routers in explore
2020-01-07 12:59:53 -05:00
Jeff Becker
8b8d636ded
make format
2019-12-22 09:16:28 -05:00
Thomas Winget
e53e3db171
make dht context use new libuv timers
2019-12-18 13:35:18 -05:00
Stephen Shelton
66a058a2af
Make format
2019-12-06 10:13:09 -07:00
Stephen Shelton
93b8832026
Merge branch 'dev' into private-keys-backup-support
2019-12-03 11:20:45 -07:00
Jeff Becker
56dce90de9
add trace log level for tracking logic thread jobs
2019-11-22 16:23:19 -05:00
Stephen Shelton
db56e17c23
Rename bencode function for clarity
2019-11-22 14:14:37 -07:00
Jeff Becker
d54dc7a988
prune dht peers every router tick
2019-09-10 10:16:32 -04:00
Michael
edd0ec398f
Move thread stuff to subdirectory
2019-09-03 20:52:28 +01:00
Michael
1aec0dfa2b
Move logging to subdirectory
2019-09-03 20:52:27 +01:00
Jeff Becker
b904a4ee22
fix explore
2019-08-28 08:44:50 -04:00
Michael
777261cb20
Use ToString over ToHex
2019-08-19 22:26:37 +01:00
Michael
094b697b01
Replace StatusObject with underlying JSON type
2019-08-19 10:33:26 +01:00
Michael
16cdfbd5f0
clang-tidy modernize pass
2019-08-12 16:52:58 +01:00
Michael
f9e9227e19
Fix gcc trunk warnings
2019-08-02 10:29:08 +01:00
Jeff Becker
7e9ef19f69
use std::min
2019-07-30 13:57:23 -04:00
Jeff Becker
f4ac918b7e
remove -1
2019-07-30 13:56:24 -04:00
Jeff Becker
d595b51b0b
fix dht exploration ;~;
2019-07-30 11:59:12 -04:00
Jeff Becker
e1dd7ad97f
revert dht stuff
2019-07-29 18:33:49 -04:00
Jeff Becker
db2206664a
fix crashes in testnet
2019-07-29 11:10:20 -04:00
Jeff Becker
9a8470bcc1
* const correctness
...
* use std::map's upper_bound to find many closer entries
* randomize key for exploration to allow many explore jobs in paralell
2019-07-29 09:08:40 -04:00
Thomas Winget
baf8019fe5
Refactor Router code into more classes
...
This commit refactors functionality from the Router class into separate,
dedicated classes.
There are a few behavior changes that came as a result of discussion on
what the correct behavior should be.
In addition, many things Router was previously doing can now be provided
callback functions to alert the calling point when the asynchronous
action completes, successfully or otherwise.
2019-07-25 14:11:02 -04:00
Jeff Becker
1ee90f8852
do lookup for RC to neighboor even if we have them in our DHT buckets so we get an updated RC in reply
2019-07-19 13:21:20 -04:00
Jeff Becker
f62446e1a4
make it compile
2019-07-17 10:51:42 -04:00
Jeff Becker
a0f32fde13
reduce logging
2019-07-17 08:25:51 -04:00
Jeff Becker
12d4bfc379
always ask peers for next closest
2019-07-15 14:15:53 -04:00
Jeff Becker
16e20a9e79
try fixing bootstrap
2019-07-15 12:56:09 -04:00
Michael
488695047f
Remove redundant else blocks
2019-07-09 22:54:46 +01:00
Michael
d6751e3eeb
Move subset of messages to right directory
2019-06-19 21:35:26 +01:00
Michael
b89689fec3
Refactor path build code
2019-06-18 22:51:41 +01:00
Michael
491fee206b
Port code to use CryptoManager over passing Crypto pointers
2019-05-28 20:45:08 +01:00
Michael
3f53965b71
Remove all use of IBEncodeMessage
2019-05-24 03:01:36 +01:00
Jeff
28623766c1
Merge pull request #617 from majestrate/master
...
changes after consensous
2019-05-22 08:06:26 -04:00
Michael
7ca0927d8f
Replace dict_reader/list_reader with version which doesn't involve indirection
2019-05-22 01:36:03 +01:00
Jeff Becker
73f1d34239
make format and revert stupid alloc changes
2019-05-20 08:19:33 -04:00
Jeff Becker
8bee0a3d5e
fix
2019-05-14 12:41:47 -04:00
Jeff Becker
06be908369
use 1 for dht exploration
2019-05-14 12:15:46 -04:00
Jeff Becker
018dd008ec
add custom single threaded allocator for utp buffers
...
fix up test net stuff
2019-05-09 16:28:56 -04:00
Jeff Becker
e80f7419b0
check for allowed by network
2019-05-09 08:48:21 -04:00
Jeff Becker
15fd9c1bef
explicit not found for non staked nodes
2019-05-09 08:38:21 -04:00
Jeff Becker
779b1f4df5
more timeout tweaks and disable profiling on service nodes
2019-05-06 10:21:47 -04:00
Jeff Becker
69ffef30bb
increase dht request timeout from 5s to 30s
2019-05-05 19:15:58 -04:00
Jeff Becker
d423ee02d2
use shared_ptr
2019-05-03 09:15:03 -04:00
Michael
9ee525a006
Fix shadowing warnings
2019-04-26 00:21:19 +01:00
Michael
4143472a17
Add cmake module to target a library as 'system', and fix a few warnings
2019-04-25 00:27:31 +01:00
Michael
3a8715d8e4
Fix introset tests
2019-04-23 10:25:03 +01:00
Michael
98e691f315
Tidy up more parts of the service/ directory
2019-04-22 22:28:10 +01:00
Michael
e33a33635c
Remove usage of raw new from service classes
2019-04-22 18:38:29 +01:00
Michael
c39c931d03
Remove IStateful virtual inheritance
2019-04-19 16:10:26 +01:00
Jeff Becker
94eb37d490
bundle RC in build record to improve build success rates.
2019-04-17 15:05:54 -04:00
Jeff Becker
0906888bff
fix findrouter
2019-04-16 14:55:47 -04:00
Jeff Becker
5938cec770
fix gotrouter handling
2019-04-16 14:06:12 -04:00
Jeff Becker
05dc2fb679
decay profiles unconditionally
2019-04-16 13:30:07 -04:00
Jeff Becker
66432afdda
proper explore for clients
2019-04-16 13:00:24 -04:00
Jeff Becker
90e92c66c2
insert bootstrap nodes into nodedb and explore more
2019-04-16 12:44:51 -04:00
Jeff Becker
c26145f70e
* fix up integration tests
...
* make recursive router lookup backtrack
2019-04-12 11:29:48 -04:00
Jeff Becker
e08986e457
fix previous commit
2019-03-27 09:53:37 -04:00
Jeff Becker
3a4d8f16a7
more
2019-03-27 08:36:27 -04:00
Jeff
1deafe444a
serve non connected dht nodes
2019-03-27 00:07:57 -04:00
Jeff Becker
6c5a015f4f
unconditional reply
2019-02-23 12:22:34 -05:00
Jeff Becker
1694337cab
ONLY CHECK FOR ACTIVE DHT NODES
2019-02-23 11:46:29 -05:00
Jeff Becker
482dce28bd
make it work
2019-02-22 14:04:47 -05:00
Michael
13a9f65520
Fully define interface for dht::Context
2019-02-22 15:08:08 +00:00
Michael
a00d6afc5e
Convert llarp_buffer_t to be a class with methods
2019-02-17 13:09:48 +00:00
Michael
048fa83c39
Finish replacement of Router with AbstractRouter
2019-02-14 22:31:31 +00:00
Jeff Becker
46222df421
refactor
2019-02-11 12:14:43 -05:00
Jeff Becker
66753430ad
fix it
2019-02-08 16:29:56 -05:00
Jeff Becker
e1522faeaa
add introspection rpc endpoint
2019-02-08 14:43:25 -05:00
Jeff Becker
e24b595191
more dht fixing, only pick the most up to date entity for reply
2019-02-08 08:42:12 -05:00
Jeff Becker
d7f715c632
don't send more than 1 introset in reply
2019-02-08 08:21:55 -05:00
Jeff
f0dc5f2b48
unbreak build
2019-02-07 18:04:28 -05:00
Jeff
0f777d822b
Merge branch 'staging' of ssh://github.com/majestrate/loki-network into staging
2019-02-07 17:49:29 -05:00
Jeff
ba8313e57e
limit replies on introset lookup, pick newest
2019-02-07 17:48:41 -05:00
Michael
729cd045f1
Convert llarp::Router into an abstract base class
2019-02-06 09:59:47 +00:00
Michael
1ba6507a2f
Tests for dht::ServiceAddressLookup
2019-02-05 21:35:46 +00:00
Michael
b1213c7a7c
Tests for dht::TagLookup
2019-02-05 21:18:38 +00:00
Ryan Tharp
4bf4faa956
make format
2019-02-04 16:41:33 -08:00
Michael
f3b0af9d2f
Create CopyableBuffer type
2019-02-02 23:21:35 +00:00
Michael
2de621b0ad
Disable copy constructing llarp_buffer_t
2019-02-01 01:58:13 +00:00
Ryan Tharp
c3bf68b502
Merge branch 'staging' into dht_tests
2019-01-29 13:59:54 -08:00
Michael
f24f554a01
Convert llarp::Crypto into an abstract base class
2019-01-26 15:40:58 +00:00
Michael
1f95f1e78f
More unit tests of dht internals
2019-01-26 00:40:40 +00:00
Michael
3f320009d7
Introduce abstract class for dht::Context
2019-01-26 00:40:40 +00:00
Michael
40449df0f1
Split classes out of dht::Context
2019-01-26 00:40:40 +00:00
Michael
ccb5f6b696
Add tests for dht::TXOwnere
2019-01-19 18:16:40 +00:00
Michael
2d395cc3f9
Move code to correct home
2019-01-19 18:16:10 +00:00
Michael
550669e318
Fix typo in class name
2019-01-19 13:54:50 +00:00
Michael
80bd41916e
More tidying of dht code
2019-01-19 13:49:15 +00:00
Michael
03d56c1591
Add test suites for dht bucket, kademlia and key
2019-01-19 01:41:14 +00:00
Michael
7296ebcbe8
Tidy dht code
2019-01-19 01:41:14 +00:00
Michael
da6cdfc0b2
More refactoring to continue to make dependency graph acylic
2019-01-15 23:15:44 +00:00
Michael
6e38e85a79
Produce hierarchy of 'libraries' inside libllarp
2019-01-15 23:15:43 +00:00
Michael
79157414f3
Split crypto.hpp into 3 different files
2019-01-13 16:32:51 +00:00
Michael
04e0fe3ad7
Move crypto code to a subdirectory
2019-01-13 15:06:16 +00:00
Michael
081d4dfa32
Reorganise source into more folders
2019-01-11 01:19:49 +00:00
Michael
e5eda0fb8f
Move lokinet unspecific components to a util/ library
2019-01-10 20:07:24 +00:00
Michael
167d5aca6d
Add test suite for bencode
2019-01-10 17:43:33 +00:00
Michael
516466f5be
Mark more AlignedBuffer constructors as explicit
2019-01-02 01:04:08 +00:00
Michael
ea19093a20
Remove const byte* conversion operators from llarp::AlignedBuffer
2019-01-02 01:04:04 +00:00
Michael
58364a01c8
Remove array conversion operators from llarp::AlignedBuffer
2019-01-02 01:04:01 +00:00
Michael
334161c9bb
Remove data() conversions from llarp::AlignedBuffer
2019-01-02 01:03:53 +00:00
Michael
8f053106e6
Add tests for llarp::dht::Key_t
2018-12-30 18:56:34 +00:00
Jeff Becker
49c898ed92
Merge remote-tracking branch 'origin/master' into staging
2018-12-26 11:27:11 -05:00
Jeff
4b2a1ea9f3
make format and attempt to fix #158
2018-12-23 08:29:11 -05:00
Jeff Becker
8c8172aeb1
Merge remote-tracking branch 'origin/master' into dev
2018-12-20 12:56:08 -05:00
Jeff Becker
3e37165749
Merge remote-tracking branch 'origin/master'
2018-12-20 12:23:01 -05:00
Jeff Becker
e7f5eeff51
use fewer allocations
2018-12-20 11:49:05 -05:00
Michael
037cb87523
Convert llarp::AlignedBuffer to be backed by std::array
2018-12-20 16:16:18 +00:00
Jeff Becker
6fc42dc7ad
fixes
2018-12-19 12:48:29 -05:00
Jeff Becker
cca19290de
session renegotiation, RC expiration, more utp unit tests, network isolation.
2018-12-19 11:17:41 -05:00
Ryan Tharp
46d488d9ab
improve logging explanation for testnets
2018-12-18 18:53:11 +00:00
Jeff Becker
3115636024
try fixing crash
2018-12-18 13:36:19 -05:00
Michael
4257b62e88
Add .cpp files for all .hpp files
2018-12-15 16:21:52 +00:00
Jeff Becker
be234e4b6e
* make format
...
* snode to snode direct traffic
* wire up dns on service node tun
2018-12-13 11:14:44 -05:00
Michael
85dde7b6b0
Move remaining include/llarp headers to llarp/
2018-12-12 02:53:02 +00:00
Michael
e887b4e9c7
Move service* to llarp/
2018-12-12 02:53:01 +00:00
Michael
5aa7f49470
Move routing* to llarp/
2018-12-12 02:53:01 +00:00