Jason Rhinelander
3c6aa002b8
Fix errors and warnings compiling on mac
5 years ago
Stephen Shelton
273270916e
The Great Wall of Blame
...
This commit reflects changes to clang-format rules. Unfortunately,
these rule changes create a massive change to the codebase, which
causes an apparent rewrite of git history.
Git blame's --ignore-rev flag can be used to ignore this commit when
attempting to `git blame` some code.
5 years ago
Jeff
d3091cf9fc
Merge pull request #1167 from tewinget/tooling
...
RouterHive initial PR
5 years ago
Stephen Shelton
ea835405c5
Refactor NotifyRouterEvent() to forward args, event code cleanup
...
This template-ifies Router::NotifyRouterEvent() up so that it accepts
the arguments to instantiate the specified event type, forwarding them
to std::make_unique. This would allow (in the future) the function to
no-op the call and avoid memory allocation. It also slightly reduces
the amount of code required to fire an event.
This commit also simplifies some of the RouterEvent code to reduce
redundancy.
5 years ago
Stephen Shelton
6664202868
Add FindRouterSentEvent and FindRouterReceivedEvent to RouterHive
5 years ago
Jeff
f3d23d6fb6
strip rr from dns reply for .snode and .loki ( #1172 )
...
fix dns replies so that extra RR for edns are not included.
5 years ago
Thomas Winget
84a1d7dbcc
clang format.......
5 years ago
Thomas Winget
695784b2b6
more hive things
...
DHT PubIntroSentEvent
some helper functions added to RouterHive (C++ class) as well as RouterHive(Python class)
hive.py main() continues to be a testbed for new event types
some more internal classes in pybind
5 years ago
Jason Rhinelander
c87fd66386
Fix lookup filter to filter second, not first, lookup
5 years ago
Jeff Becker
877443d95c
more introspection code
5 years ago
Jeff Becker
d4ccf895e3
Merge branch 'fix-up-introset-lookup-fails-2020-03-02' of ssh://github.com/majestrate/loki-network into fix-up-introset-lookup-fails-2020-03-02
5 years ago
Jeff Becker
79746e3719
remote lookup limiting of 500ms per address
5 years ago
Stephen Shelton
9be8050854
Make format
5 years ago
Stephen Shelton
886a981997
Consolidate introset publishing constants
5 years ago
Jeff Becker
a09bb89d15
dont put multiple outbound contexts
5 years ago
Jeff Becker
158a9018f3
rename variable
5 years ago
Jeff Becker
9ff31f6402
spelling is hard
5 years ago
Jeff Becker
8f4362f092
fix up introset lookups
5 years ago
Jason Rhinelander
806d43c34e
Merge pull request #1147 from notlesh/diagnose-pubintro-round2-2020-02-28
...
Diagnose pubintro round2
5 years ago
Jason Rhinelander
b60adc909d
Make IntroSet publish confirmed less verbose
...
Essentially just rate limit the confirmation message to one message per
second.
5 years ago
Jason Rhinelander
cfee824a79
Don't republish when we have extra paths
...
This caused some unwanted behaviour:
- on initial startup we often get two publishes in quick succession
because we're publishing and building paths at the same time
- at the 10m mark we enter a publish loop every 5 seconds because we
have paths with lifetimes < 10min that was triggering this condition,
and yet those paths will never actually be included in the introset
because they are expiring in <10m.
5 years ago
Jason Rhinelander
823c17206f
Add min intro set paths, slightly increase spread speed
...
This should ensure that we have enough shortly after startup for initial
path builds.
The spread speed here gets slightly increased to lifetime/5 (=4min)
instead of lifetime/4 (=5min) so that our "normal" number of paths is 5
with occassional momentary drops to 4, but should always keep us >= the
new minimum of 4.
Because the path spread happens over time, this shouldn't result in a
rebuild of several paths: we'll build 4 quickly, then another at +4m,
another at +8m, etc. When the initial 4 expire, we'll be dropping from
9 to 5 established but that's still above the minimum (4) so we won't
need to reconnect to several at once, and the spread builds should keep
us at 5 all the time.
5 years ago
Jason Rhinelander
27b8743107
Add warns for introset publish failures
5 years ago
Stephen Shelton
62014de91c
Handle PubIntro relayOrder logic on client-side
5 years ago
Stephen Shelton
61d19179f7
Remove dead code
5 years ago
Jeff Becker
ce335dc47d
remove convotags on dead outbound context
5 years ago
Jeff
19a751c41b
Merge pull request #1127 from notlesh/spread-snapp-path-builds-evenly-2020-02-24
...
Spread snapp path builds evenly
5 years ago
Jeff
4f29405e9e
Merge pull request #1115 from majestrate/handle-multiple-responses-per-lookup-2020-02-20
...
handle multiple responses per hidden service lookup
5 years ago
Stephen Shelton
abe4015986
Use constants for path build timing
5 years ago
Stephen Shelton
230037b9f3
Increase default path timeout from 10min to 20min
5 years ago
Stephen Shelton
f0374eb2b7
Use existing 'lastBuild' var for spacing path builds
5 years ago
Stephen Shelton
c2c010dbad
Make format
5 years ago
Stephen Shelton
c1b5e453c7
Big I, little i, what begins with I?
5 years ago
Stephen Shelton
1db6c6ae3b
Make format
5 years ago
Stephen Shelton
c2f719c996
Build endpoint paths at even[ish] intervals
5 years ago
Jeff Becker
d2d109e92c
llarp_time_t is now using std::chrono
5 years ago
Jason Rhinelander
089056ca5b
Remove all ABSL_ATTRIBUTE_UNUSED uses
5 years ago
Jason Rhinelander
b4440094b0
De-abseil, part 2: mutex, locks, (most) time
...
- util::Mutex is now a std::shared_timed_mutex, which is capable of
exclusive and shared locks.
- util::Lock is still present as a std::lock_guard<util::Mutex>.
- the locking annotations are preserved, but updated to the latest
supported by clang rather than using abseil's older/deprecated ones.
- ACQUIRE_LOCK macro is gone since we don't pass mutexes by pointer into
locks anymore (WTF abseil).
- ReleasableLock is gone. Instead there are now some llarp::util helper
methods to obtain unique and/or shared locks:
- `auto lock = util::unique_lock(mutex);` gets an RAII-but-also
unlockable object (std::unique_lock<T>, with T inferred from
`mutex`).
- `auto lock = util::shared_lock(mutex);` gets an RAII shared (i.e.
"reader") lock of the mutex.
- `auto lock = util::unique_locks(mutex1, mutex2, mutex3);` can be
used to atomically lock multiple mutexes at once (returning a
tuple of the locks).
This are templated on the mutex which makes them a bit more flexible
than using a concrete type: they can be used for any type of lockable
mutex, not only util::Mutex. (Some of the code here uses them for
getting locks around a std::mutex). Until C++17, using the RAII types
is painfully verbose:
```C++
// pre-C++17 - needing to figure out the mutex type here is annoying:
std::unique_lock<util::Mutex> lock(mutex);
// pre-C++17 and even more verbose (but at least the type isn't needed):
std::unique_lock<decltype(mutex)> lock(mutex);
// our compromise:
auto lock = util::unique_lock(mutex);
// C++17:
std::unique_lock lock(mutex);
```
All of these functions will also warn (under gcc or clang) if you
discard the return value. You can also do fancy things like
`auto l = util::unique_lock(mutex, std::adopt_lock)` (which lets a
lock take over an already-locked mutex).
- metrics code is gone, which also removes a big pile of code that was
only used by metrics:
- llarp::util::Scheduler
- llarp:🧵 :TimerQueue
- llarp::util::Stopwatch
5 years ago
Jeff Becker
748be8eec8
handle multiple responses per hidden service lookup
5 years ago
Stephen Shelton
0429bafbb3
Merge pull request #1111 from notlesh/redundant-introset-propagation-2020-02-19
...
Redundant introset propagation
5 years ago
Jeff
6ac5f19b3a
Merge pull request #1110 from jagerman/no-abseil-optional
...
De-abseil, part 1: remove absl::optional
5 years ago
Stephen Shelton
4c499fb076
Make format
5 years ago
Stephen Shelton
dff9aeb250
Propagate Introset publishing redundantly
5 years ago
Jeff Becker
dc7828941f
add log statement
5 years ago
Jason Rhinelander
ac1486d0be
Replace absl::optional with optional-lite
...
Step 1 of removing abseil from lokinet.
For the most part this is a drop-in replacement, but there are also a
few changes here to the JSONRPC layer that were needed to work around
current gcc 10 dev snapshot:
- JSONRPC returns a json now instead of an optional<json>. It doesn't
make any sense to have a json rpc call that just closes the connection
with returning anything. Invoked functions can return a null (default
constructed) result now if they don't have anything to return (such a
null value won't be added as "result").
5 years ago
Jeff
20bc168d1c
Merge pull request #1093 from majestrate/toggle-publishing-introsets-2020-02-11
...
make publishing introsets optional
5 years ago
Jeff Becker
e907d2ae19
handover fixes
5 years ago
Jeff Becker
02228ded08
spread out path builds
5 years ago
Jason Rhinelander
c3637c81fd
Remove another unused randomize parameter
5 years ago
Jason Rhinelander
24469daefb
Remove unused parameter
...
We always randomize now.
5 years ago
Stephen Shelton
906803e387
Refactor DHT introset lookups to use redundant lookup strategy
5 years ago
Jeff Becker
4d4b33607f
dont use optional
5 years ago
Jeff Becker
23bcfa4abb
revert change
5 years ago
Jeff Becker
df8c56343d
refactor GetManyPathsWithUniqueEndpoints to go into service/endpoint_util.hpp
5 years ago
Jeff Becker
fc5e6b4d77
log location
5 years ago
Jeff Becker
3cc2adae31
paralell publish and lookups
5 years ago
Jeff Becker
e30c720446
redundant publish for service endpoint
5 years ago
Jeff Becker
2b6f27d60d
remove connect back logic for dead inbound sessions
5 years ago
Jeff Becker
70eb353c42
make publishing introsets optional using reachable=false to disable
5 years ago
Jeff Becker
99eb7726ff
initial dht key blinding
5 years ago
Jeff Becker
2c0dc12f39
refactor single char variables in DHT (mostly)
5 years ago
Jeff Becker
a17b5f25b5
check for zero'd rc
5 years ago
Jeff Becker
2d82e931da
try doing lookup from close router, randomize when above lookup threshold
5 years ago
Jeff Becker
8a5365d9a6
diversify endpoints
5 years ago
Jeff Becker
5ae428a114
Revert "remove call to link manager"
...
This reverts commit 3dd36fa11a
.
5 years ago
Jeff Becker
a5121c346c
remove call to link manager
5 years ago
Jeff Becker
d1a29884df
client side perf improvement
5 years ago
Jeff Becker
79c3c748e4
limit number of snode sessions client side
5 years ago
Stephen Shelton
2c6226f54a
Backup SNApp keys when migrating to new ed25519 crypto
5 years ago
Jeff Becker
0828307906
fix address mapping bug
5 years ago
Jeff Becker
8849173112
try async decrypt then verify
5 years ago
Jeff Becker
ba0fd223d9
reduce number of jobs we put onto the logic thread
5 years ago
Jeff Becker
56dce90de9
add trace log level for tracking logic thread jobs
5 years ago
Jeff Becker
2c5561fc3c
make format
5 years ago
Jeff Becker
7ee026fa50
make path builds work again
5 years ago
jeff
32ed821763
Merge remote-tracking branch 'upstream/dev' into multithreaded-cryptography
5 years ago
jeff
7c691cf334
handover should be fixed now
5 years ago
jeff
6c2ebbb925
try fixing handover and add snapp traffic to multithreaded crypto workers
5 years ago
Jeff Becker
327c545530
finish multithread cryptography first pass
5 years ago
jeff
14c9ef15ed
try calling stuff in logic thread from event loop
5 years ago
Jeff Becker
1adae338ce
Merge remote-tracking branch 'origin/master'
5 years ago
Michael
edd0ec398f
Move thread stuff to subdirectory
5 years ago
Michael
4d8fe2a8a8
Move meta programming to subdirectory
5 years ago
Jeff Becker
c01112e4b7
tracy lock contention testing and other fun things
5 years ago
Jeff Becker
eabbb83149
use estimated build time instead of expiration time for delta when determining when to space out builds
5 years ago
Jeff Becker
e0424a91a7
bump path build handover window, check cooldown on build.
5 years ago
Jeff Becker
3c3338e801
Merge remote-tracking branch 'origin/master' into memlink
5 years ago
Michael
094b697b01
Replace StatusObject with underlying JSON type
5 years ago
Michael
16cdfbd5f0
clang-tidy modernize pass
5 years ago
Jeff Becker
c1f33bb1ac
initial mempipe implementation
5 years ago
Michael
f9e9227e19
Fix gcc trunk warnings
5 years ago
Jeff Becker
db2206664a
fix crashes in testnet
5 years ago
Jeff Becker
f48754c45d
make hop count and length configurable
5 years ago
Michael
e52492911d
Refactor endpoint state management to a new class
5 years ago
Jeff Becker
1fd6b5ae74
Merge remote-tracking branch 'origin/master' into ipv6-tun
5 years ago
Michael
488695047f
Remove redundant else blocks
5 years ago
Jeff Becker
b9bcc2b775
make threadpool consice
5 years ago
Jeff Becker
fd911d0c52
make format
5 years ago
Jeff Becker
6467d21ba0
* fix testnet codepath
...
* add packet info for osx
5 years ago
Jeff Becker
81cab62bb9
* fix testnet codepath
...
* add packet info for osx
5 years ago
Jeff Becker
5874c38b38
swap path on inbound convo if expires soon
5 years ago
Jeff Becker
f211ff182a
pick ready paths for reply
5 years ago
Jeff Becker
d6ec528a72
start work on seperating ips out of endpoint
5 years ago
Jeff Becker
64e9622270
start seperating tun and endpoint
5 years ago
Jeff Becker
0146a967d0
fix convotag inbound state setting
5 years ago
Jeff Becker
6bca652182
choose first timestamp
5 years ago
Jeff Becker
0b90acff75
handle reply intro
5 years ago
Jeff Becker
b0612e2ee1
Merge remote-tracking branch 'origin/master' into ipv6-tun
5 years ago
Michael
b6b400baef
Tidy up pathbuilder code
5 years ago
Jeff Becker
5c61df08b5
Merge remote-tracking branch 'origin/master' into ipv6-tun
5 years ago
Michael
08609f9e5a
Rename message files
5 years ago
Michael
8a058fcb34
Move other messages
5 years ago
Michael
d6751e3eeb
Move subset of messages to right directory
5 years ago
Jeff Becker
cd05fa6150
Merge remote-tracking branch 'origin/master' into ipv6-tun
5 years ago
Rick V
c6c31efec9
make format
5 years ago
Jeff Becker
30f6a8ccd2
make format
5 years ago
Jeff Becker
9c24fc15a8
try not spamming network with builds
5 years ago
Jeff Becker
5853e5e3f4
pass in path
5 years ago
Jeff Becker
a323003824
differentiate between inbound and outbound convos
5 years ago
Jeff Becker
2403ab8f86
ipv6
5 years ago
Jeff Becker
9ec41b8831
update RC expiration logic, lookup more often and remove stale entries
5 years ago
Jeff Becker
73c1538518
fix
5 years ago
Jeff Becker
f7ccbf0c78
eh
5 years ago
Jeff Becker
f8e2edae28
fix
5 years ago
Jeff Becker
223f2702d3
Merge branch 'fix-big-ooooofff'
5 years ago
Jeff Becker
a33dbce680
try switching logic
5 years ago
Jeff Becker
f8026b8a2d
use latest tag not oldest tag in inbound convos
5 years ago
Jeff Becker
39b1f104a8
revert
5 years ago
Jeff Becker
471a4bf6dd
use reply intro for inbound sessions
5 years ago
Michael
75430a234c
Convert to use memFn
5 years ago
Michael
491fee206b
Port code to use CryptoManager over passing Crypto pointers
5 years ago
Michael
d49e57aa8d
Fix thread safety issue in service::Endpoint::ProcessDataMessage
5 years ago
Jeff Becker
e85cc1bc8a
fix
5 years ago
Jeff Becker
64c7ed42fc
make format
5 years ago
Jeff Becker
9c96aecf3f
move llarp::Logic to std::shared_ptr
...
add sequence numbers to HSD messages
begin work on network isolation code
add more docs
5 years ago
Michael
a83be769e2
More explicit error when keyfile is not a valid file
5 years ago
Jeff Becker
8da3b51589
more hax
5 years ago
Jeff Becker
f832c9a593
use shared_ptr
5 years ago
Jeff
e21f1020ee
don't std::move
5 years ago
Jeff
06f8bb2f42
add blacklist-snode option
5 years ago
Jeff Becker
018dd008ec
add custom single threaded allocator for utp buffers
...
fix up test net stuff
5 years ago
Jeff Becker
85fcb4bd84
fix it up
5 years ago
Jeff Becker
1d74585637
don't crash when we get no routers from lookup
5 years ago
Jeff Becker
7b03b63d13
more sighup code
5 years ago
Jeff Becker
a53da68700
start work on sighup
5 years ago
Michael
1744ae7686
Tidy up service endpoint a bit more
5 years ago
Jeff Becker
d423ee02d2
use shared_ptr
6 years ago
Jeff Becker
986e831579
make bundle-rc option configurable on snode tld
6 years ago
Jeff Becker
e0892f7d23
gfdi
6 years ago
Jeff Becker
407f895c86
ooff
6 years ago
Jeff Becker
5b49008bca
more
6 years ago
Jeff Becker
a97e1e37a7
dont filter intros they are already good
6 years ago
Jeff Becker
e060082441
hook every dns for .loki and .snode when applicable
...
make {n,h}uint{32,16}_t templated type.
6 years ago
Jeff
59e6a4bc3d
make snode work again probably
6 years ago
Jeff Becker
20ba2c7b8c
try not to die
6 years ago
Jeff Becker
cde4fcc00a
queue pending traffic
6 years ago
Jeff Becker
bb47d612b3
more
6 years ago
Jeff Becker
0b68d3db5d
move stuff arround so that flushing queues are done in the correct event loops
...
TODO: locking
6 years ago
Jeff Becker
2a7ebce8f4
Merge remote-tracking branch 'origin/master'
6 years ago
Jeff Becker
5e0acc1197
separate upstream/downstream flush
6 years ago
Jeff Becker
d50b18d7b0
try fixing leak also make format
6 years ago
Michael
725ee293c1
Refactor well named functionality in service::Endpoint into new struct
6 years ago
Jeff
27fac68716
fix
6 years ago
Jeff
01906c5d94
Merge remote-tracking branch 'origin/master'
6 years ago
Michael
0b4d787042
More work on router docker image
...
- Multi-stage docker build (final image only 15MB!)
- Build in release mode
- Fix bug with release mode
- Fix compiler being dumb AF
- Disable FORTIFY for now
- Enable LTO when making a staticly linked release
- Fix some gcc specific warnings
- Refactor cmake stuff into multiple files
6 years ago
Jeff Becker
0529e45ebe
more
6 years ago
Jeff Becker
6711296b26
finish converting to shared_ptr
6 years ago
Jeff Becker
99c29cf05a
prepare for ios/android jazz
...
move to use std::shared_ptr instead of bare pointers so we can
multithread everything.
6 years ago
Jeff Becker
5872573e91
rename Logic and Crypto functions to GetLogic and GetCrypto
6 years ago
Jeff Becker
a2912ff860
Merge remote-tracking branch 'origin/master'
6 years ago
Michael
e33a33635c
Remove usage of raw new from service classes
6 years ago
Jeff Becker
3a8cb0bfb5
add shell based hooks for service::Endpoint, also make format
6 years ago
Michael
94ad84363a
Move CachedTagResult and TagLookupJob to its own component
6 years ago
Michael
6bf54e0925
Remove AsyncKeyExchange, HiddenServiceAddressLookup and OutboundContext to their own components
6 years ago
Michael
3db6d80928
Remove unnecessary llarp:: qualifiers
6 years ago
Michael
2412ed59ee
Move SendContext to its own component
6 years ago
Jeff Becker
57dc6cc965
make bundling rc in path builds configurable on runtime
6 years ago
Jeff Becker
2be3401e08
* refactor profiling function names
...
* utp link layer make ping less active, pre-emptive pump faster
6 years ago
Jeff Becker
9503cc66f0
add disk worker based file flusher logger
...
make format
remove package.json
6 years ago
Jeff Becker
a45d6db0e0
better profiling
6 years ago
Jeff
c64fbf7cc5
Merge branch 'master' of ssh://github.com/majestrate/loki-network
6 years ago
Jeff Becker
28e07903b6
put reply intro
6 years ago
Jeff
95119a0fe1
always use random paths for lookups
6 years ago
Jeff Becker
e178a70929
use shared_ptr for event loop
6 years ago
Jeff
3783fb0e14
fix inbound sessions
6 years ago
Jeff Becker
c910a2a2fb
more
6 years ago
Jeff
60a42a83a3
better introset publish logic
6 years ago
Jeff Becker
aea9944c3d
mark success on profiles and remove pending lookup
6 years ago
Jeff Becker
b9207ce3e0
unconditionally update introset on dead path
6 years ago
Jeff Becker
24e7151ff5
log and don't remove path on died
6 years ago
Jeff Becker
b849ff9a94
handle path death better
6 years ago
Jeff Becker
74f9949537
aaaaaa
6 years ago
Jeff
aa08d20480
ensure router is known
6 years ago
Jeff
ed10ef0b7d
don't shift only build
6 years ago
Jeff Becker
714f5c6b5e
more
6 years ago
Jeff Becker
9e531c026c
fix warning on hop selection
6 years ago
Jeff Becker
8e2b99907f
mark nodes timeout on lookup timeout
6 years ago
Jeff Becker
1882ffc016
don't publish or use bad routers with endpoints
6 years ago
Jeff Becker
f5b9bd40ed
track lookup fails and kill outbound context if too many
6 years ago
Jeff Becker
5d3833ef1a
fix dumb as shit path building that causes premature termiantion because of duplicate hops
6 years ago