Commit graph

43 commits

Author SHA1 Message Date
Jonathan Zernik
907f535d91
Delete frontend (#29) 2020-06-04 17:51:47 -07:00
Jonathan Zernik
88108f7810
Rename squeaknode to squeakserver (#28)
* Rename server entrypoint

* Updated manifest

* Moved db init.sql file

* Rename module to squeakserver
2020-06-04 17:47:49 -07:00
Jonathan Zernik
1f57374684
Remove static flask files, and rename project in setup.py (#27) 2020-06-04 17:14:38 -07:00
Jonathan Zernik
6b31583cd8
Remove flask as python dependency (#26) 2020-06-04 17:10:00 -07:00
Jonathan Zernik
3c3bca3d3c
Change location of lnd proto in server (#25) 2020-06-04 16:58:48 -07:00
Jonathan Zernik
70cbc6ffac
Remove sqkclient (#24)
* Removed sqkclient

* Remove docker folder for sqkclient

* Upgrade docker images
2020-06-04 16:49:13 -07:00
Jonathan Zernik
733da334a5
Run itest direct connection to server (#23)
* Run itest with direct connection to server

* Add dummy blockchain client

* Got itest working with direct post to server

* Rename lnd rpc proto module

* Making lnd lightning client able to take proto module as param

* Pass ln proto module as param to lnd lightning client

* Able to import lnd client in test container

* Able to get wallet balance in test direct from rpc client
2020-06-04 15:36:50 -07:00
Jonathan Zernik
dd9ca6c753
Add index to db for squeak address (#22) 2020-06-04 13:24:29 -07:00
Jonathan Zernik
f5c4b56765
Clean up client protocol (#21)
* Remove old method from client protocol

* Remove old route_guide files
2020-06-04 11:58:43 -07:00
Jonathan Zernik
740148a287
Add postgres db (#20)
* Add postgres db to server

* Able to connect to postgres

* Connect to postgres successfully without error by omitting database name that doesnt exist

* Create squeak table in initdb script

* Fix data types for columns in squeak table

* Construct server handler with a db connection instance

* Use context manager for db connection and cursor

* Implement insert_squeak method, still not working.

* Updated squeak table schema and insert method

* Got itest working with bob downloading alice's squeak from the server
2020-06-04 02:41:16 -07:00
Jonathan Zernik
82a6c785c0
Bob gets squeak from alice (#19)
* Add failing test for bob getting squeak from alice.

* Update client protocol to send only squeak bytes, not fields

* Improved failing test for bob getting squeak
2020-06-03 18:35:48 -07:00
yzernik
51ec9c160e Successfully post squeak to server 2020-06-03 17:05:55 -07:00
Jonathan Zernik
79b078b44b
Make server address configurable in client (#18)
* Make server address configurable in client

* Made server host and port configurable
2020-06-03 15:45:36 -07:00
yzernik
3ed65464ef Load server port as parameter in rpc client 2020-06-03 15:16:26 -07:00
Jonathan Zernik
61bdccbda2
Load lightning client on server startup (#17) 2020-06-03 15:09:00 -07:00
Jonathan Zernik
c032b5be0f
Fix client server rpc connection (#16)
* Trying to get connection from sqkclient to sqkserver

* Looks like connection from client to sqkserver may be working...

* Got client server rpc request to work
2020-06-03 15:00:57 -07:00
Jonathan Zernik
b78e868f53
Connect client and server (#15)
* Remove threading from uploader.

* Create rpc_client class in client to connect to server (using grpc) and verify that the upload_squeak method in rpc_client gets calleed

* Add main class with entry point in squeaknod/server

* Added sqkserver command and service to docker-compose for test

* Add server handler class, and still trying to load rpc implementation of server proto

* Almost got server grpc proto working, now only lnd client failing with tls cert issue

* Added server service and got it working in itest, it still doesn't do anything.
2020-06-03 02:59:56 -07:00
Jonathan Zernik
003c7faa63
Remove configparser from server. (#14)
* Remove configparser from server.

* Remove windows commands from readme.
2020-04-12 20:14:21 -07:00
Jonathan Zernik
7ae6ea1f08
Upload squeaks to server (#13)
* Include address in squeak database.

* Add tables to db for uploader

* Include address in squeak database.

* Add tables to db for uploader

* Add uploader class.

* Fix foreign key relation in client db.

* Change uploader to check all squeaks based on address and block number.

* Start and stop uploader thread in client.
2020-04-09 17:49:53 -07:00
Jonathan Zernik
890fb68c7c
Speed up docker build by caching rpc file downloads. (#12) 2020-03-22 23:37:02 -07:00
Jonathan Zernik
10227fa1aa Change db schema to allow data key and content to be null. 2020-03-20 19:25:01 -07:00
Jonathan Zernik
2b167948e5
Store squeaks in db (#11)
* Save and query squeak in client db.

* Save and query squeak in client db.

* MakeSqueak and GetSqueak RPC calls both return full squeak info.
2020-03-20 19:10:54 -07:00
Jonathan Zernik
f2f7f2bbd1
Fix installing rpc protocol files. (#10) 2020-03-20 18:44:58 -07:00
Jonathan Zernik
085f5f7419
Add itest test for make squeak in client. (#9)
* Add itest test for make squeak in client.

* Remove print lines.

* Add squeak to db after rpc request to make squeak.

* Got test working for reading blog post from client db.
2020-03-20 01:18:30 -07:00
Jonathan Zernik
88fb0e2ac1
Shut down gracefully on sigterm (#8) 2020-03-19 18:10:46 -07:00
Jonathan Zernik
fc2f783bab
Use config file for client (#7)
* Load configs from config file instead of command line options.

* Get the config object before the subcommand.

* Rename load client function.

* Rename load client function.

* Load client objects from config object

* Update config file templates.

* Rename rpc server start function.
2020-03-19 17:56:44 -07:00
Jonathan Zernik
b2a0bc97be
pass flask configs through cfg file. (#5)
* pass flask configs through cfg file.

* Remove print line

* Add db to client.

* Call the initialize db function before starting the client.

* Add script to install rpc (#6)

* Add script to install rpc

* Remove comment.

* pass flask configs through cfg file.

* Remove print line

* Add db to client.

* Call the initialize db function before starting the client.

* Fix initialize db function.

* Update install rpc script.
2020-03-19 15:35:48 -07:00
Jonathan Zernik
b9aa585799
Add script to install rpc (#6)
* Add script to install rpc

* Remove comment.
2020-03-19 15:02:03 -07:00
Jonathan Zernik
824701a889 Rename server section in config file. 2020-03-17 18:12:32 -07:00
Jonathan Zernik
77bec59911
Allow post squeaks (#4)
* Remove login_required and user id from blog posts.

* Remove login_required for blog endpoints.

* Rename update endpoint to show

* Remove auth.

* Tests passing.

* Remove unused auth fixture

* Remove users table from db
2020-03-17 18:07:47 -07:00
Jonathan Zernik
a2959e5bbd Fix make mypy 2020-03-01 00:29:58 -08:00
Jonathan Zernik
21028f3043 Add private key as config field. 2020-03-01 00:20:45 -08:00
Jonathan Zernik
6851466aed
Itest for squeaknodeclient (#3)
* Add itest for squeaknode client, not passing yet

* Got working itest with get wallet balance

* Change name of squeak node client class.
2020-03-01 00:15:24 -08:00
Jonathan Zernik
9939f9b75b
Add lightning and blockchaing clients (#2)
* Add lightning and blockchaing clients

* Fix import in lnd lighting client

* Added squeakmaker and test.
2020-02-29 19:08:15 -08:00
Jonathan Zernik
46dd7f5287
Use separate modules client server (#1)
* Put server in separate module

* Fix flask app name for server in submodule

* Added common module
2020-02-29 18:30:52 -08:00
Jonathan Zernik
7e0c0c7b49 Update makefile 2020-02-29 17:54:31 -08:00
Jonathan Zernik
5189392f5a Remove maintainer from setup.py 2020-02-28 20:11:12 -08:00
Jonathan Zernik
4b41be6875 Clean up instance directory 2020-02-28 20:07:37 -08:00
Jonathan Zernik
35ed57cc8b Rename to squeaknode 2020-02-28 19:13:19 -08:00
Jonathan Zernik
77e73ba0dc Fix name 2020-02-23 01:14:56 -08:00
Jonathan Zernik
4a4f6a54b5 Update makefile 2020-02-22 20:11:07 -08:00
Jonathan Zernik
b477d6e378 Update makefile. 2020-02-22 19:59:29 -08:00
Jonathan Zernik
cea55d63bd Initial commit 2020-02-22 19:33:40 -08:00