Commit graph

235 commits

Author SHA1 Message Date
Jonathan Zernik
38a7a1af87
Got itest working for text search (#1287)
* Got itest working for text search

* Use util function to get search results in itest
2021-09-14 20:47:11 -07:00
Jonathan Zernik
220007e5ca
Show error on connect failure (#1281)
* Run connect peer method in peer client synchronously

* Got itest working for failed connect peer command
2021-09-13 18:56:58 -07:00
Jonathan Zernik
5e561e6ec2
Implemented get external address rpc method (#1236)
* Implemented get external address rpc method

* Display external address on peers page in frontend

* Update frontend build
2021-09-08 20:15:32 -07:00
Jonathan Zernik
b2858d714b
Paginate received payments (#1234)
* Add pagination to get received payments rpc

* Add pagination to received payments frontend page

* Comment unused method used for streaming in timeline page

* Run frontend lint

* Update frontend build
2021-09-08 17:54:49 -07:00
Jonathan Zernik
dc524f80ec
Change create time sent payment to integer (#1221)
* Change created time in sent payment to milliseconds integer

* Change time field of sent payment rpc message to ms

* Update frontend for sent payment to get new milliseconds field

* Update frontend build

* Use milliseconds for received offer created time in database

* Use milliseconds for sent offer created time in database

* Change created time to milliseconds for received payment

* Update frontend to use milliseconds for received payment

* Update frontend to use milliseconds for peer and profile in database

* Change created time and liked time to milliseconds for squeak

* Remove use of datetime module from squeak db

* Fix get liked time in milliseconds in frontend

* Update frontend build

* Simplify squeak retention query
2021-09-07 21:14:17 -07:00
Jonathan Zernik
4b76ad832d
Add pagination for sent payments (#1220)
* Add pagination to get sent payments rpc method

* Got frontend mostly working for paginating sent payments

* Fix warning for missing arg in load sent payments effect

* Update frontend build
2021-09-07 09:26:34 -07:00
Jonathan Zernik
3402527f26
Add input for set custom price (#1214)
* Add rpc method for set profile custom sell price

* Got change profile custom price in frontend working

* Run frontend lint

* Update frontend build

* Got send offers with correct custom price working
2021-09-06 19:28:40 -07:00
Jonathan Zernik
b45a37081f
Include secret key invs in getsqueaks response (#1200)
* Refactor get local squeaks method in peer message handler

* Include invs for secret keys in reply to getsqueaks msg

* Handle invs for secret keys in handle inv method

* Got subscription itest working

* Change log level for new squeak worker and new secret key worker

* Got itest for subscription working even without slowing down mining

* Delete old commented lookup method in controller

* Use constants for inv types in new squeak worker and new secret key worker
2021-09-05 18:22:38 -07:00
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
76ad744936
Updrage squeaklib to 0.7.1 (#1194)
* Updrage squeaklib to 0.7.1

* Add case to handle secret key msg in peer msg handler

* Add fields for custom price and use custom price to profile table

* Got itest working with new profile fields

* Use default values for profile struct constructor

* Fix db migration to use use profile columns

* Got itest passing for set use custom price

* Show custom price or default price in profile page

* Change wording of selling with price in profile page

* Got set use custom price toggle working in configure profile dialog
2021-09-05 12:30:58 -07:00
Jonathan Zernik
cb10b2f6c4
Add pagination for replies (#1174)
* Implement pagination for get reply squeaks

* Got replies pagination working

* Remove log lines from requests js

* Update frontend build
2021-09-03 18:56:14 -07:00
Jonathan Zernik
fd9a75b417
Add pagination to get address squeaks rpc (#1173)
* Add pagination to get address squeaks rpc

* Implement frontend pagination for address squeaks page

* Got pagination working on address squeaks page

* Update frontend build

* Run frontend lint

* Update frontend build
2021-09-03 17:00:38 -07:00
Jonathan Zernik
408ec42340
Implement download squeaks rpc (#1168)
* Implement download squeaks rpc

* Handle replyto hash in download squeaks method
2021-09-03 10:45:00 -07:00
Jonathan Zernik
a0129558d4
Implement block subscription client (#1141)
* Got block subscription working in background thread

* Use separate port for hashblock zeromq subscription

* Update subscription on new block

* Enable checking for block range in interest match function

* Remove unused zmq subscriptions

* Fix squeak interest match function
2021-09-01 06:06:11 -07:00
Jonathan Zernik
e2933784ac
Use only ancestors rpc for squeak page (#1118)
* Got squeak page working without get squeak entry rpc, no streaming yet

* Implement subscribe ancestors

* Got subscribe ancestors working in frontend with download squeak click

* Delete old comments

* Update frontend build

* Remove old log lines
2021-08-30 20:08:37 -07:00
Jonathan Zernik
042bac2649
Fix wrong offers show in dialog (#1115)
* Fix loading buy offers from stream

* Loading offers seems to be working now

* Update frontend build
2021-08-30 05:19:57 -07:00
Jonathan Zernik
c801060d35
Add subscribe address display squeaks (#1112)
* Implement rpc command for subscribe address squeak entires

* Got subscription working for address squeaks

* Implemented download squeaks for address rpc

* Fix handling new squeak items from subscription appending to state array

* Update frontend build
2021-08-30 02:43:44 -07:00
Jonathan Zernik
a0d78844da
Download squeaks with custom params (#1108)
* Add rpc method for subscribe squeak entry

* Download squeak without reloading page using squeak entry subscription

* Fix stream termination of component unmount for subscribe squeak entry

* Update frontend build
2021-08-29 22:39:10 -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
0a8d30d5fc
Add pagination (#1073)
* Got tuple comparison for timeline pagination query working

* Include limit parameter in get timeline rpc

* Got view more squeaks frontend button working

* Got basic pagination working

* Include squeak time in display rpc struct

* Got pagination working

* Fix sql query to break ties manually in comparison

* Update frontend build
2021-08-27 05:31:37 -07:00
Jonathan Zernik
e78c2560bb
Make reply to hash nullable (#1057)
* Make reply to hash column nullable

* Add itest for null reply_to field
2021-08-24 17:39:49 -07:00
Jonathan Zernik
dd4ddabb5a
Load squeak display entry without deserializing squeak object (#1052)
* Load squeak display entry without deserializing squeak object

* Use block time column instead of block header in squeak table

* Include block time in squeak display response
2021-08-24 05:09:00 -07:00
Jonathan Zernik
dba7c525e9
Rename core config to node config (#1045) 2021-08-24 01:13:24 -07:00
Jonathan Zernik
21246dd151
Rename sync squeaks to download squeaks (#1036)
* Rename download_squeaks rpc

* Fix proto definition comment

* Rename download_squeak rpc

* Fix proto definition comment
2021-08-23 00:16:36 -07:00
Jonathan Zernik
9023131112
Add subscribe msg (#1016)
* Added subscribe message and send after connection handshake

* Added new squeak worker

* Got itest working for subscribe squeaks peer message

* Update peer squeak subscriptions on follow profile changed.

* Remove sync squeaks worker
2021-08-22 01:46:05 -07:00
Jonathan Zernik
720a8a16f5
Improve itest with more util functions for rpc calls (#1014)
* Add itest for lookup squeak with getsqueaks method

* Simplify itest for download single squeak

* Use util function for get profile rpc method in itest

* Add more util methods for itest rpc calls

* Use util rpc function more in itest

* Add rpc util function for download squeaks

* Add rpc util function for create contact profile

* Add rpc util function for create signing profile

* Use rpc util function for create delete profile

* Use rpc util function for import profile
2021-08-21 20:28:52 -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
4f2f6107fe
Replace host port with peer address object (#1002)
* Delete old offer with peer and sent payment with peer structs

* Use peer_address as field name for all structs

* Use peer address object in proto responses

* Update frontend to use new peer address struct

* Undo change to navigate to peer address page params

* Update frontend build
2021-08-20 22:03:32 -07:00
Jonathan Zernik
8e30af2f2a
Use peer host and peer port for received payment messag (#1000)
* Use peer host and peer port for received payment messag

* Update frontend build
2021-08-20 20:20:19 -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
deb8b1b99b
Remove sharing field profile (#990)
* Remove sharing field from all backend code

* Add db migration to remove sharing field

* Remove profile sharing field from frontend

* Update frontend build
2021-08-20 14:18:04 -07:00
Jonathan Zernik
99f3ff24c4
Add connected peers subscription (#970)
* Add connected peers subscription rpc command

* Got rpc streaming command for subscribe connected peers working
2021-08-19 19:59:14 -07:00
Jonathan Zernik
32bb960f6a
Only download offers on click (#941)
* Only download offers for squeak when rpc method called

* Only download offers after explicit click in frontend

* Update frontend build
2021-08-14 22:14:14 -07:00
Jonathan Zernik
04f4c9f5a1
Return null values in admin proto (#936)
* Use null value for non existent squeak

* Return null value in rpc for get profile when not found

* Return null value in rpc for get peer when not found

* Return null value in rpc for get profile by name when not found

* Return null value in rpc for get profile by address when not found

* Return null value in rpc for get offer and sent payment when not found
2021-08-14 18:52:17 -07:00
Jonathan Zernik
aab50fa287
Add peer address page (#927)
* Go to peer address page on connected peer item click

* Added disconnect button to peer address page

* Add get connected peer rpc method

* Add disconnect button to peer address page

* Add both connect and disconnect button to peer address page

* Update frontend build
2021-08-12 21:59:26 -07:00
Jonathan Zernik
e64289be7d
Use host port to connect peer (#926)
* Use host and port for connect_peer rpc command

* Use host and port for disconnect peer command

* Got connect peer dialog frontend working

* Add disconnect peer request frontend function

* Update frontend build
2021-08-12 19:53:25 -07:00
Jonathan Zernik
fef9625592
Got itest working (#904) 2021-08-10 20:57:59 -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
b935785469
Use timestamp for like field (#896)
* Use a timestamp for like field in database

* Use query to get liked squeaks in order of like
2021-06-04 18:28:42 -07:00
Jonathan Zernik
ad36244587
Remove interested option, use download criteria (#893) 2021-06-02 00:36:07 -07:00
Jonathan Zernik
6a71bf5129
Add liked column (#878)
* Add liked column to squeak table

* Add rpc methods for like and unlike

* Fix migration to add liked column

* Got like squeak working

* Set squeak liked without reloading page

* Download squeak button reloads squeak without reloading page

* Use inconbutton for actions in squeak detail component

* Update static build
2021-02-22 18:54:20 -08:00
Jonathan Zernik
a93025a026
Save host and port of buyer client (#868)
* Save host and port of buyer client

* Show buyer port in frontend for received payments
2021-02-21 20:01:02 -08:00
Jonathan Zernik
4f1272cc26
Add more type hints controller (#843)
* Use more type hints in controller

* Add type hints for squeak entry detail and sent offer
2021-02-13 09:09:04 -08:00
Jonathan Zernik
d30150febc
Fix config name for max squeaks per address per block (#835) 2021-02-13 04:28:36 -08:00
Jonathan Zernik
791b76bd1b
Use single method to save squeak in controller (#834)
* Use single save_squeak method in controller

* Remove new lines from save_squeak method

* Add separate methods for save uploaded, downloaded, created squeak

* Simplify insert squeak method in database

* Add TODO comment for insert squeak method

* Improve code style of parse squeak entry method

* Add itest for failed upload without decryption key
2021-02-13 04:13:11 -08:00
Jonathan Zernik
5604cae842
Use block height for rate limiter (#832)
* Use block height for checking rate limiter limit

* Use block height for rate limiter limit count

* Remove print post squeak exception from itest
2021-02-13 02:35:22 -08:00
Jonathan Zernik
9e15962d1a
Allow reprocess invoice without duplicate (#816)
* Allow reprocessing the same invoice without duplicate insert of received payment

* Use stopped event to stop processing invoices

* Got itest working with payment processor class

* Use payment processor class in squeak controller constructor

* Add rpc method for reprocess received payments

* Add reprocess received payments button

* Add reprocess received payments to admin web app

* Handle processing received payments subscription rpc better

* Add frontend button to reprocess received payments

* Clear settle indices in reprocess received payments

* Update static build
2021-02-12 00:14:45 -08:00
Jonathan Zernik
c8072a0c25
Tear down itest fixtures after yield (#789) 2021-02-06 01:40:25 -08:00