Commit graph

18 commits

Author SHA1 Message Date
Jonathan Zernik
c9b88ffd4a
Send secret key when profile configured to free (#1197)
* Set up itest for sending free secret key

* Got itest working for download and unlock free squeak

* Simplified getting offer or free secret key from controller

* Rename get offer method of controller
2021-09-05 14:38:52 -07:00
Jonathan Zernik
512129b8ec
Implement per address rate limit (#1102)
* Add check for per address rate limit in controller

* Delete rate limiter class

* Add check for interest and rate limit to save received squeak

* Got single squeak download working using temporary interest

* Use polymorphic interest classes for temporary interest manager

* Change order of checking temporary interests before permanent interests

* Used timed dict for temporary interests

* Include check for limit in temporary interest
2021-08-29 06:36:14 -07:00
Jonathan Zernik
620cdae96c
Add license headers (#1080)
* Add pre-commit hook for license headers

* Configure pre-commit hook for license headers only for python

* Add license headers to python files
2021-08-27 18:31:53 -07:00
Jonathan Zernik
dba7c525e9
Rename core config to node config (#1045) 2021-08-24 01:13:24 -07:00
Jonathan Zernik
b9ac4b86b4
Use peer address struct in requests (#1004)
* Update connect peer and disconnect peer rpc to use peer addrss struct

* Update get connected peer rpc to use peer addrss struct

* Use peer address struct in create saved peer rpc

* Use peer address struct in squeak peer struct

* Use peer address for requests functions in frontend

* Update frontend build
2021-08-21 00:54:48 -07:00
Jonathan Zernik
f9197f7035
Remove uploading and downloading fields and add autoconnect field in … (#993)
* Remove uploading and downloading fields and add autoconnect field in all backend code

* Remove uploading and downloading fields and add autoconnect in frontend

* Update frontend build
2021-08-20 15:46:54 -07:00
Jonathan Zernik
4cc617a94c
Refactor network commands into network manager (#949)
* Refactor network commands into network manager

* Start and stop peer server and peer client inside network manager

* Pass handle connection fn to peer handler instead of self object

* Remove old comments
2021-08-15 22:15:42 -07:00
Jonathan Zernik
78b7f9a7f1
Fix default port for create peer command (#905) 2021-08-10 21:29:24 -07:00
Jonathan Zernik
7d266cdf5e
Split peer server client (#901)
* Split peer server and peer client

* Got itest passing

* Catch exception when closing peer socket

* Reconfigure all itests to run
2021-08-10 02:16:46 -07:00
Jonathan Zernik
f652915355
Use tcp peer connection (#900)
* Got basic tcp connection working

* Got passing itest for open tcp connection

* Got most of protocol working. still need to send offer correctly

* Got offer from peer over tcp connectrion

* Got single squeak download working on tcp connection

* Remove rpc peer client

* Remove old rpc clients

* Remove old squeak client modules

* Got sharesqueaks peer message working

* Remove peer rpc server

* Remove server rpc fixtures

* Remove old itests

* Remove old sync modules

* Run worker background task to keep peers synced

* Add peer connection worker

* Add test for disconnect peer

* Remove old itest util

* Delete old peer rpc client helpers.

* Handle insert duplicate received offer

* Use more specific exception handling for duplicate offer insert
2021-07-09 21:07:46 -07:00
Jonathan Zernik
c77bc943e8
Use host and port to identify peer in received offer and sent payment (#866) 2021-02-21 15:29:00 -08:00
Jonathan Zernik
00c8bd9769
Move controller to node directory (#841)
* Move squeak controller class to node directory

* Move test squeak controller to test node directory
2021-02-13 07:46:00 -08:00
Jonathan Zernik
0b6b609864
Add unit tests for squeak controller (#557)
* Move squeak controller to core package

* Use config object in squeak controller to access configs

* Remove old comments in squeak controller

* Update unit test

* Add unit test for getting network with squeak_controller
2021-01-03 22:02:55 -08:00
Jonathan Zernik
173130ab31
Use mypy precommit hook (#537)
* Add mypy precommit hook

* Add mypy precommit hook
2021-01-01 21:39:33 -08:00
Jonathan Zernik
22f6b4fc3c
Add precommit hooks (#526) 2020-12-28 23:52:32 -08:00
Jonathan Zernik
293cbc4db5
Got all flake8 checks passing (#514)
* Got all flake8 checks passing

* Remove reorder imports from codecheck tox env
2020-12-26 04:56:46 -08:00
Jonathan Zernik
62f21874f1
Autoformat python code with tox command (#510) 2020-12-26 02:01:22 -08:00
Jonathan Zernik
00fc72514f
Use squeaklib with ptlc (#502)
* Rename secret_key

* More work to convert to using PTLC

* Updated most code for PTLC

* More work to use ptlc with secret key

* Got itest passing

* Remove unused import

* Use version 0.5.0 of squeaklib

* Added simple unit test for squeak controller

* Use modular addition subtraction for secret key nonce tweak

* Move util to core folder

* Store secret key as hex in database

* Store nonce as hex in db
2020-12-25 20:17:54 -08:00