Jason Rhinelander
76608b6b90
Logic simplification
5 years ago
Jason Rhinelander
f1aa27e616
fix speeling mistack
5 years ago
Jeff Becker
bf0416cab8
remove Time_t, add operator overload for printing llarp_time_t and add to_json function for serializing llarp_time_t to json
5 years ago
Jeff Becker
d2d109e92c
llarp_time_t is now using std::chrono
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
Stephen Shelton
ea97a8f2ac
Make format
5 years ago
Thomas Winget
fae86281e9
make path short name look nicer
5 years ago
Thomas Winget
74d421ac2d
PathBuildNumber -> NextPathBuildNumber because increment side-effect
5 years ago
Thomas Winget
893ef2b874
const-y-ness and move-y-ness
5 years ago
Thomas Winget
fc56a018e5
path builder prints hops, rest print short name
5 years ago
Jeff Becker
499e346da6
notify delivery of path builds
5 years ago
Jeff Becker
56dce90de9
add trace log level for tracking logic thread jobs
5 years ago
Thomas Winget
ef1a5652ef
remove our paths from outbound queues
5 years ago
Jeff Becker
7ee026fa50
make path builds work again
5 years ago
jeff
14c9ef15ed
try calling stuff in logic thread from event loop
5 years ago
Jeff Becker
bcf9135da6
testnet
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
Michael
094b697b01
Replace StatusObject with underlying JSON type
5 years ago
Michael
a270fe5f33
fixup! Fix gcc trunk warnings
5 years ago
Michael
f9e9227e19
Fix gcc trunk warnings
5 years ago
Jeff Becker
aa0a795689
call path build fail stuff in logic thread
5 years ago
Jeff Becker
60fbeca9d4
const correctness
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
Jeff Becker
b9bcc2b775
make threadpool consice
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
Michael
b6b400baef
Tidy up pathbuilder code
5 years ago
Michael
b89689fec3
Refactor path build code
5 years ago
Jeff
674f272a46
Merge pull request #630 from majestrate/master
...
recent stability stuff
5 years ago
Michael
491fee206b
Port code to use CryptoManager over passing Crypto pointers
5 years ago
Jeff Becker
068fec82fb
set lifetime of paths
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
dd8a93a400
Apply rule of zero to code base
5 years ago
Jeff Becker
a4e90ee769
hax to make it work.
5 years ago
Jeff Becker
d3a98db267
don't resize frames
5 years ago
Jeff Becker
486042511c
log hops
5 years ago
Jeff Becker
540c2e1666
fix previous commit
5 years ago
Jeff Becker
df322e1149
don't include duplicate hops in paths
5 years ago
Jeff Becker
b68f539de6
limit outbound connections
5 years ago
Jeff Becker
7b03b63d13
more sighup code
5 years ago
Jeff Becker
a53da68700
start work on sighup
5 years ago
Jeff Becker
61d42811be
prevent crash
5 years ago
Jeff Becker
34533db620
add urgent build that builds over an existing path for an endpoint
5 years ago
Jeff Becker
b9adf90fb9
remove random timer fuzz
5 years ago
Jeff Becker
6c17bf35b3
decrease minimum path build interval
5 years ago
Jeff
01906c5d94
Merge remote-tracking branch 'origin/master'
6 years ago
Michael
9ee525a006
Fix shadowing warnings
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
57dc6cc965
make bundling rc in path builds configurable on runtime
6 years ago
Jeff Becker
94eb37d490
bundle RC in build record to improve build success rates.
6 years ago
Jeff Becker
87ff9268da
if a router is connected it's fine given it's a boostrap
6 years ago
Jeff Becker
a45d6db0e0
better profiling
6 years ago
Jeff Becker
6220fef2dc
select good first hops
6 years ago
Jeff Becker
c910a2a2fb
more
6 years ago
Jeff
97b9c679b0
don't use bootstrap nodes for first hops in paths
6 years ago
Jeff Becker
965b0957ee
tweaks
6 years ago
Jeff Becker
c23498925c
disable profiling on path fail
6 years ago
Jeff Becker
91298c4819
re-enable profiling
6 years ago
Jeff Becker
8a63533d1a
have service nodes maintain min connections
...
path building more robust selection
6 years ago
Jeff Becker
db17b0fad5
disable profiling
6 years ago
Jeff Becker
c63beae1c6
use std::min not std::max for linear backoff
...
ayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyylmao
this was fucking dumb as shit
6 years ago
Jeff Becker
ce126166af
more logging info
6 years ago
Jeff Becker
0369e42d5e
try harder to select hops
6 years ago
Jeff Becker
5d3833ef1a
fix dumb as shit path building that causes premature termiantion because of duplicate hops
6 years ago
Jeff Becker
6a09348c47
today's work
6 years ago
Jeff Becker
8331449ab9
update profiles on path build
6 years ago
Jeff Becker
591f3c92a9
make build records smaller
6 years ago
Michael
887fb4ac62
Replace insert(make_pair()) with emplace()
6 years ago
Michael
048fa83c39
Finish replacement of Router with AbstractRouter
6 years ago
Jeff Becker
46222df421
refactor
6 years ago
Jeff Becker
66753430ad
fix it
6 years ago
Jeff Becker
e1522faeaa
add introspection rpc endpoint
6 years ago
Michael
729cd045f1
Convert llarp::Router into an abstract base class
6 years ago
Jeff Becker
a953b34a45
fix crash
6 years ago
Michael
47380ba64b
Simplify some code
6 years ago
Michael
f3b0af9d2f
Create CopyableBuffer type
6 years ago
Michael
f24f554a01
Convert llarp::Crypto into an abstract base class
6 years ago
Michael
da6cdfc0b2
More refactoring to continue to make dependency graph acylic
6 years ago
Michael
081d4dfa32
Reorganise source into more folders
6 years ago