Commit graph

221 commits

Author SHA1 Message Date
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
Jonathan Zernik
387aa13893
Use autoincrement for primary keys (#788)
* Change db model to use bigint with autoincrement

* Add constraint on host and port in peer table

* Use autoincrement in database model
2021-02-06 01:24:31 -08:00
yzernik
aaf6ae975d Revert changes to use natural primary keys 2021-02-04 03:15:02 -08:00
Jonathan Zernik
64cf97dfe9
Try changing peer primary key to hash, not done (#782)
* Try changing peer primary key to hash, not done

* Got backend working with peer hash as primary key

* Got frontend working with peer hash as primary key for peer
2021-02-04 00:09:58 -08:00
yzernik
ebd61823aa Revert back the revert to use address for profile primary key 2021-02-03 20:53:00 -08:00
Jonathan Zernik
855d357ca4
Revert to using integer primary key for profile table (#783) 2021-02-03 01:42:47 -08:00
Jonathan Zernik
7c5734bd86
Use addresss for profile primary key (#779)
* Use address as primary key for profile table

* Delete old sql query comments

* Update frontend to use address for profile primary key

* Fix profiles page data table goto action

* Fix usage of get profile by address in remaining frontend
2021-02-02 20:54:11 -08:00
Jonathan Zernik
7a6a9477ee
Use default name when empty (#774)
* Disallow empty name for contact profile

* Disallow empty name for signing profile

* Disallow empty name for peer
2021-01-31 23:34:42 -08:00
Jonathan Zernik
a07e73faa4
Use nested profile msg in squeak display msg (#767)
* Use nested squeak profile msg inside squeak display entry in rpc proto

* Include author address in squeak display entry msg

* Use nested squeak profile in squeak display message in frontend

* Update static build with nested squeak profile in squeak display msg
2021-01-30 21:29:57 -08:00
Jonathan Zernik
12deeeaaf6
Delete old itest files (#760) 2021-01-30 06:09:02 -08:00
Jonathan Zernik
d0fc4d5c73
Add update profile image dialog (#752)
* Added update profile dialog

* Add select file input for image upload

* Add set and clear profile image rpc methods

* Remove unused bytes field from clear image rpc

* Display selected file name in upload image dialog

* Set profile image rpc uses base64 string field

* Got set profile image working

* Show profile image in timeline

* Update static build with update custom profile image working
2021-01-29 22:01:32 -08:00
Jonathan Zernik
c4ae0835f4
Include network in peer rpc methods (#749) 2021-01-29 17:46:13 -08:00
Jonathan Zernik
627acea07c
Add custom profile image (#745)
* Add profile image field to db

* Add set profile image rpc

* Got clear profile image working

* Add has custom profile image field in profile rpc respones
2021-01-29 01:27:59 -08:00
Jonathan Zernik
930c1ff20c
Show custom user avatar (#740)
* Use material avatar in timeline avatar

* Load default profile image from static file

* Include base64 image in squeak display entry response

* Got default profile image working
2021-01-28 22:37:55 -08:00
Jonathan Zernik
555d6eea61
Add get payment summary rpc (#704)
* Get received payment summary rpc

* Rename get received payment summary function

* Get sent payment summary in rpc

* Add itest case for sent payment summary

* Add web endpoint for get payment summary

* Remove old fields from received payment summary
2021-01-25 21:06:48 -08:00