Commit Graph

334 Commits (b3f2c716172c175a56b8f80e6c63caa3d702333a)

Author SHA1 Message Date
Jeff Becker b3f2c71617
add comment 4 years ago
Jeff Becker d8da3f0a83
simplify logic 4 years ago
Jeff Becker 327ab6f178
prune nodedb as client and service node with no whitelist 4 years ago
Jeff Becker 08de84d40b
remove non public routers from nodedb 4 years ago
jeff 49e69d7087 remove uneeded code 4 years ago
Jason Rhinelander df7a173649 Shorten version and prefix with v
So we get `v0.7.0` instead of `lokinet-0.7.0-abcdef12`; the latter is
useful for devs, but not so much for random operators (and you can
always go get the full version from the binary).
4 years ago
Jason Rhinelander d5eed90a3c Fix systemd compilation & enable systemd on travis 4 years ago
Jeff Becker 66181d8a8f
systemd status 4 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 4 years ago
Jeff Becker d2d109e92c
llarp_time_t is now using std::chrono 4 years ago
Jason Rhinelander 089056ca5b Remove all ABSL_ATTRIBUTE_UNUSED uses 4 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
4 years ago
Thomas Winget 74d421ac2d PathBuildNumber -> NextPathBuildNumber because increment side-effect 4 years ago
Thomas Winget fc56a018e5 path builder prints hops, rest print short name 4 years ago
Jason Rhinelander 6a8d4aca38 Fix signed/unsigned comparison warning and make more std::chrono-y 4 years ago
Jeff Becker 28561cd654
use Time_t 4 years ago
Jeff Becker 434ce56553
* get rid of dht explore for service nodes
* add Time_t using std::chrono for future uses
* make decaying hashset constructor with llarp_time_t explicit
* add decaying hashset implicit constructor using Time_t
* add timeouts for gossiper replay
* allow regossip of our RC
4 years ago
Jeff Becker 154be464ea
rc gossiping 4 years ago
Jeff Becker 7ad47f2dba
* get rid of dht explore for service nodes
* add Time_t using std::chrono for future uses
* make decaying hashset constructor with llarp_time_t explicit
* add decaying hashset implicit constructor using Time_t
* add timeouts for gossiper replay
* allow regossip of our RC
4 years ago
Jeff Becker ea3851d15f
rc gossiping 4 years ago
Jeff Becker 9efd796145
initial wack at 0.7.0 dht fixes 4 years ago
jeff 816070be62 dont inherit std::array 4 years ago
jeff f728e6016b router version 4 years ago
jeff 79fd08e559
fix typo 4 years ago
jeff 4a761be52d
use std::chrono 4 years ago
Jeff Becker fe148f7823
merge conflict fix 4 years ago
Stephen Shelton 5c518d6586
Include outbound message queue stats in dumpState API response 4 years ago
Jason Rhinelander ba89df40c8
Merge pull request #1041 from notlesh/dht-fixes-cleanup
Dht fixes cleanup
4 years ago
Jason Rhinelander eadfeefafc
Merge pull request #1038 from majestrate/dht-disable-iterative-lookup-2020-01-14
disable iterative behavior in DHT
4 years ago
Stephen Shelton 8206557ac7
Don't respect whitelist when we haven't received it yet 4 years ago
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
4 years ago
Jeff Becker b56a3528db
periodic nodedb flush 4 years ago
Jeff Becker c3b14b32b4
relays do profiling and not hand out "shit" routers in explore 4 years ago
Jeff Becker 52b13b9f1e
typo fix 4 years ago
Jeff Becker 55e27d36e5
* only profile as client
* only explore churn as relay
4 years ago
Jeff Becker 79badd6714
* clients expore dht faster
* use random path when doing dht lookups for .loki
4 years ago
Jeff Becker a8e6069a93
enable profiling by default 4 years ago
Thomas Winget 71bb0dd520 implement timers using libuv
So far only a bit of the code using timers has been modified to use
the new libuv-based timers.  Also only the non-Windows case has been
implemented.  Seems to be working though, so it's a good time to commit.
5 years ago
Jason Rhinelander 638fb25b47 Put version info into a compiled file
This rewrites the version info using lokid's approach of compiling it
into a .cpp file that gets generated as part of the build (*not* during
the configure stage).

Among other things, this means that changing the version no longer
invalidates ccache or cmake dependencies, and because it depends on
`.git/index` git commits will cause the version to be regenerated,
making the commit tag more reliable (currently if you rebuild without
running cmake your git commit tag doesn't update).
5 years ago
Jeff 22e9223e74
Merge pull request #955 from jagerman/remove-unused-arg
Remove unused argument
5 years ago
Jason Rhinelander 6f92ac9c2b Remove unused argument
Fixed a compiler warning about an unused argument, plus the argument
legitimately appears unused/obsolete now.
5 years ago
Jeff Becker 950006c036
reduce log levels at runtime 5 years ago
Jeff Becker f56e543d75
add deadlock checker and revert bencode change from long ago 5 years ago
Jeff Becker 2eabe98d9b
add systemd watchdog if enabled on compile time 5 years ago
Jeff Becker eb87189514
try fixing router lockup 5 years ago
Jeff 1396b7b857
Merge branch 'dev' into bootstrap-list-2019-12-06 5 years ago
Jeff Becker 0afb3b320b
add bootstrap list functionality and utility 5 years ago
Stephen Shelton 11410a2748 Avoid trivial getters/setters in KeyManager 5 years ago
Stephen Shelton 66a058a2af Make format 5 years ago
Stephen Shelton 23fc2ad042 Init key manager before InitOutboundLinks are configured 5 years ago