Commit Graph

55 Commits

Author SHA1 Message Date
jeff
b0bb0b7609
initial route poking 2020-08-24 20:21:55 -04:00
jeff
75f9643776
attempt to fix snode traffic ip rewrite bug 2020-08-24 20:19:52 -04:00
Stephen Shelton
607d04a314
Use str instead of lokimq::ConnectionID in pybind 2020-07-23 10:52:53 -06:00
Stephen Shelton
56e2bc2c47
Acquire python's Global Interpreter Lock in callbacks 2020-07-06 17:40:42 -06:00
Stephen Shelton
a88dc9f026
Prevent pybind from deleting HiveRouter pointers 2020-07-06 17:39:22 -06:00
Stephen Shelton
305795315b
Specify disabling RC gossiping (testing only) properly 2020-07-06 17:38:41 -06:00
Stephen Shelton
0e99f5bc86
Configure HiveContext it pybind correctly 2020-07-06 16:10:42 -06:00
Stephen Shelton
343252c48d
Use HiveContext and HiveRouter properly 2020-07-02 10:26:53 -06:00
Stephen Shelton
552dcce5fd
Use inheritance to handle Hive injection 2020-07-02 10:25:10 -06:00
Stephen Shelton
b0d8568452
Remove llarp C API usage from RouterHive 2020-07-02 10:24:19 -06:00
Stephen Shelton
84c83a2400
Add specialized subclass of Router for Hive 2020-07-02 10:22:57 -06:00
Stephen Shelton
aeb0c2be3a
Remove ability to stop routers from gossiping for now 2020-07-02 10:22:03 -06:00
Stephen Shelton
bdac43e19f
Peer stats test which artificially stops a router from gossiping its RC 2020-07-02 10:22:03 -06:00
Stephen Shelton
3b6f84c68c
Peek at peer stats db in test_peer_stats 2020-07-02 10:22:02 -06:00
Stephen Shelton
d1b629f494
RouterHive ConnectionAttemptEvent 2020-07-02 10:22:02 -06:00
Stephen Shelton
d69d538f1a
Add missing files 2020-07-02 10:16:19 -06:00
Stephen Shelton
b2a72dd46a
Initial test_peer_stats hive test 2020-07-02 10:16:19 -06:00
Jeff Becker
26f62bc260
make pybind compile 2020-07-02 11:13:32 -04:00
Jason Rhinelander
a7c42ab2bd
Use lokimq's hex/base32z encoding/decoding 2020-07-02 11:13:31 -04:00
Jeff Becker
6984cda3a6
add pybind and router hive to ci 2020-06-08 15:50:12 -04:00
Jeff Becker
635dc4fe13
unbreak router hive
llarp/config/config.cpp:
respect [network]:type option

llarp/handlers/exit.cpp:
when [network]:type is null dont init tun interface

llarp/service/context.cpp:
respect [network]:type option
change endpoint name back to "default"

llarp/tooling/router_hive.cpp:
dont use LogicCall for obtaining RCs from underlying relays, it crashes the mainloop and it's probably safe to readonly access RCs.

pybind/common.hpp:
remove typecasters as we use C++17 now

pybind/llarp/config.cpp:
remove SnappConfig
wire up NetworkConfig

pybind/llarp/handlers/pyhandler.hpp:
remove SnappConfig from constructor

pybind/llarp/handlers/pyhandler.cpp:
update constructor implementation to match header

test/hive/hive.py:
remove broke endpoint related code
wire up null endpoint option using NetworkConfig
use index at 0 for relays and clients instead of 1
dont add a python endpoint to all clients
2020-05-06 10:45:30 -04:00
Stephen Shelton
93b35c92a7
Eradicate service::Config 2020-05-04 11:05:51 -04:00
Stephen Shelton
526b1320b7
Some maybe-fixes for RouterHive post config cleanup 2020-04-24 11:18:25 -06:00
Stephen Shelton
dfcf8fb62e
Update RouterHive to reflect config changes 2020-04-07 17:50:50 -06:00
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.
2020-04-07 12:38:56 -06:00
Stephen Shelton
8a12da8bd5
Remove some .cpp files related to RouterEvents
The motivation is to reduce the raw amount of code required to create
and maintain events.
2020-03-12 13:51:57 -06:00
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.
2020-03-12 11:50:46 -06:00
Stephen Shelton
6664202868
Add FindRouterSentEvent and FindRouterReceivedEvent to RouterHive 2020-03-10 12:12:11 -06:00
Thomas Winget
84a1d7dbcc clang format....... 2020-03-06 20:20:11 -05:00
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
2020-03-04 00:57:26 -05:00
Thomas Winget
6fc05ca1ff RCGossipSentEvent 2020-03-03 19:57:09 -05:00
Thomas Winget
c8c66f0a5f some refactoring of tooling code, added RCGossipReceivedEvent 2020-03-03 19:57:09 -05:00
Thomas Winget
df0380e746 LRSM RouterEvent, added to hive test and test passes. 2020-03-03 19:57:09 -05:00
Thomas Winget
771d0b4489 hive pytest framework in place (and path build test works)! 2020-03-03 19:57:09 -05:00
Thomas Winget
04c1f67f78 more structure to python hive code 2020-03-03 19:57:09 -05:00
Thomas Winget
ee7b7e917d hive can now instantiate and start relays/clients separately 2020-03-03 19:57:09 -05:00
Stephen Shelton
4741d81051 Add GotIntro event to RouterHive 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
Jeff Becker
22ed47ca12 better tostring 2020-03-03 19:57:09 -05:00
Thomas Winget
309569628e change some to_string functions 2020-03-03 19:57:09 -05:00
Thomas Winget
db2a0ef7f7 git add because I'm dumb 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
85e510c89b add router_event pybind file 2020-03-03 19:57:09 -05:00
Thomas Winget
0f34a950a9 pybind config object, working 2020-03-03 19:57:09 -05:00