Commit Graph

3503 Commits

Author SHA1 Message Date
Thomas Winget
68c1ae52b3 add ShortHex function to AlignedBuffer 2020-03-03 19:57:09 -05:00
Thomas Winget
341d03bcf8 changes 2020-03-03 19:57:09 -05:00
Jeff Becker
e7689b40a7 dht pub intro message router event thiny doo 2020-03-03 19:57:09 -05:00
Thomas Winget
5672c42f20 RouterEvent::ToString in parent class 2020-03-03 19:57:09 -05:00
Thomas Winget
a9882ad475 PathRequestReceivedEvent implemented 2020-03-03 19:57:09 -05:00
Thomas Winget
c9a278c0de some more changes to pybind/hive code, read below
hive.py is currently largely for testing the pybind stuff, so changes to it will likely
be frequent and arbitrary for now.

Added pybind for llarp::path::PathHopConfig, but not every member -- just rc and upstream routerID

Hive now uses std::queue with mutex instead of our lockless queue.

Removed some functions from Hive that will not be necessary as things are being handled from python.
2020-03-03 19:57:09 -05:00
Thomas Winget
5cf35769b4 don't have python try to intercept stdout/stderr 2020-03-03 19:57:09 -05:00
Jeff Becker
32dbe6b1ad more shiz 2020-03-03 19:57:09 -05:00
Jeff Becker
877443d95c more introspection code 2020-03-03 19:57:09 -05:00
Thomas Winget
931ff521d1 working toward full testnet of routers (not clients yet) in hive/pybind setup
Not working yet -- some sort of RC issue.  Checkout the commit prior to this if you want something that 'works' that you can play with.
2020-03-03 19:57:09 -05:00
Thomas Winget
1e04decb66 can ping on lokinet running in python context! 2020-03-03 19:57:09 -05:00
Thomas Winget
5e498e962f working on more pybinds 2020-03-03 19:57:09 -05:00
Thomas Winget
0f34a950a9 pybind config object, working 2020-03-03 19:57:09 -05:00
Thomas Winget
9b3bf833e0 revert nop logging -- un-revert later 2020-03-03 19:57:09 -05:00
Thomas Winget
a5c2b369b7 nop logging on hive build for now
a bunch of routers logging to stdout at the same time is a complete
charlie foxtrot.  until we take the time to make logger not a singleton
(and probably make each router able to log to its own file rather than stdout)
just make it not log.

Note: this is very temporary, as the logs will be annoying for testing the
pybind stuff and shouldn't be necessary for debugging it
2020-03-03 19:57:09 -05:00
Thomas Winget
0007996fde using instead of typedef 2020-03-03 19:57:09 -05:00
Jeff Becker
a5dc41b049 OMG IT DOES STUFF :DDDDDD 2020-03-03 19:57:09 -05:00
Thomas Winget
f712acc486 huzzah it builds, time to test soon! 2020-03-03 19:57:09 -05:00
Jeff Becker
da79b14703 make it compile 2020-03-03 19:57:09 -05:00
Thomas Winget
8dc5dabe49 working toward compilation, still has include issue 2020-03-03 19:57:09 -05:00
Jeff Becker
26c1670af7 make it compile 2020-03-03 19:57:09 -05:00
Jeff Becker
35bea37fd1 make it compile 2020-03-03 19:57:09 -05:00
Jeff Becker
1fdb8b4c94 initial pybind11 introspection code 2020-03-03 19:57:09 -05:00
Thomas Winget
8d03e6dd3c more router hive stuff, read below the fold
Router now has a hive pointer if LOKINET_HIVE is set.
llarp::Context has a method InjectHive to give Router the pointer.
Router has a method NotifyRouterEvent which does:
  - when LOKINET_HIVE is set, passes the event to RouterHive
  - else when LOKINET_DEBUG is set, prints the event at a low log level
  - else NOP
2020-03-03 19:57:09 -05:00
Jeff Becker
61ffbc0643
std::vector reserve does not resize 2020-03-03 15:25:18 -05:00
Stephen Shelton
321314b456
Remove re-propagation of introsets when we are wrong candidate 2020-03-02 15:24:41 -07:00
Jeff Becker
32e768d7dd
change log 2020-03-02 12:33:33 -05:00
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 2020-03-02 12:02:58 -05:00
Jeff Becker
79746e3719
remote lookup limiting of 500ms per address 2020-03-02 12:02:21 -05:00
Stephen Shelton
9be8050854
Make format 2020-03-02 09:57:37 -07:00
Stephen Shelton
886a981997
Consolidate introset publishing constants 2020-03-02 09:57:37 -07:00
Jeff Becker
a09bb89d15
dont put multiple outbound contexts 2020-03-02 11:56:47 -05:00
Jeff Becker
d3f222ddcc
revert relay side dedup parameter 2020-03-02 11:42:26 -05:00
Stephen Shelton
bbee45118e
Remove redundant lookup logic from relays 2020-03-02 09:27:07 -07:00
Jeff Becker
158a9018f3
rename variable 2020-03-02 11:18:26 -05:00
Jeff Becker
9ff31f6402
spelling is hard 2020-03-02 11:17:50 -05:00
Jeff Becker
8f4362f092
fix up introset lookups 2020-03-02 11:12:29 -05:00
Jason Rhinelander
806d43c34e
Merge pull request #1147 from notlesh/diagnose-pubintro-round2-2020-02-28
Diagnose pubintro round2
2020-03-01 20:26:41 -04:00
Jason Rhinelander
d46a880150
Merge pull request #1145 from majestrate/remove-convotags-right-away-2020-02-27
Remove convotags right away when outbound context dies
2020-03-01 20:25:17 -04:00
Jason Rhinelander
b60adc909d Make IntroSet publish confirmed less verbose
Essentially just rate limit the confirmation message to one message per
second.
2020-03-01 14:04:37 -04:00
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.
2020-03-01 13:56:04 -04:00
Jason Rhinelander
c0eb0c4db4 Avoid unnecessary copy 2020-03-01 13:56:04 -04:00
Jeff Becker
45fa9bebbc
wrong txid 2020-03-01 12:33:54 -05:00
Jeff Becker
e3b5fb4dd9
add local publish intro message to send reply down path 2020-03-01 12:30:05 -05:00
Jason Rhinelander
58fe7ac801 De-static constants
We don't need separate copies of these per compilation unit.
2020-03-01 12:40:15 -04:00
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.
2020-03-01 12:37:43 -04:00
Jeff Becker
5b075259e6
revert 2020-03-01 11:21:48 -05:00
Jeff Becker
b4a59a0b1a
make format 2020-03-01 11:20:11 -05:00
Jeff Becker
dd21cba1fe
dedup via txid not keyspace location 2020-03-01 11:17:39 -05:00
Jason Rhinelander
76608b6b90 Logic simplification 2020-03-01 11:58:08 -04:00