Commit graph

70 commits

Author SHA1 Message Date
Jonathan Zernik
1fcd601bac
Fix lnd host config (#52)
* Fix lnd host config to not lookup ip by host

* Fix external lnd host
2020-06-26 02:33:30 -07:00
Jonathan Zernik
7a79f4b569
Change type of port to int in protocol in buy offer (#51) 2020-06-24 00:17:12 -07:00
Jonathan Zernik
7dafb7ce2e
Fix macaroon path in docker config and change log level to info (#50) 2020-06-22 14:35:44 -07:00
Jonathan Zernik
21f3569887
Added lnd to docker compose (#49) 2020-06-22 13:55:20 -07:00
Jonathan Zernik
f939e9c81a
Use BACKEND param in lnd docker for bitcoin.node (#48) 2020-06-22 13:28:40 -07:00
Jonathan Zernik
f09306b493
Simplify itest (#47) 2020-06-13 14:58:45 -07:00
Jonathan Zernik
a7ac6c67ee
Fix closing of connection after use in connection pool (#46) 2020-06-11 23:02:44 -07:00
Jonathan Zernik
e54de2b380
Make docker compose run (#45)
* Organize docker docker-compose file

* Got docker docker-compose working to start server with postgres db
2020-06-11 20:09:02 -07:00
yzernik
cd1f92d297 Remove docker-compose dependency on shared volume for sqkserver 2020-06-11 18:41:17 -07:00
Jonathan Zernik
1e9a81da59
Use connection for for postgres db (#44) 2020-06-11 18:06:18 -07:00
Jonathan Zernik
278fa38db6
Init db on startup (#43)
* Create db tables on startup

* Move createdb script for itest to itest folder

* Fix teardown of dockercompose containers
2020-06-11 17:44:23 -07:00
Jonathan Zernik
a9aabf7633
Organize lnd config (#42)
* Remove lnd folder and use tls cert path and macaroon path in config file

* Remove commented lines in lnd client

* Rename rpc_host to host in lnd config

* Removed lnd_bob and lnd_carol
2020-06-10 12:47:30 -07:00
Jonathan Zernik
63553ca922
Organize lnd config (#41)
* Remove lnd folder and use tls cert path and macaroon path in config file

* Remove commented lines in lnd client

* Rename rpc_host to host in lnd config
2020-06-10 12:44:56 -07:00
Jonathan Zernik
12263cb556
Remove comments from itest script and remove old itest config.ini file (#40) 2020-06-09 23:58:44 -07:00
Jonathan Zernik
6fe55699f4
Add buy request (#39)
* Add buy squeak request

* Add payment of invoice in itest

* Use latest beta release of lnd

* Got connect peer from itest working

* Open channel in itest before trying to pay

* Add list channels and list peers commands

* Got lightning payment working

* Got full itest working with payment and decryption
2020-06-09 23:44:54 -07:00
Jonathan Zernik
30034d35ab
Use config file in docker (#38)
* Use config file mounted in docker container to run squeakserver

* Fix test script to shut down at end

* Expose port in dockerfile

* Update main docker-compose to use config file
2020-06-08 00:10:04 -07:00
Jonathan Zernik
057d9495d4
Clean up validation of squeak requests (#37)
* Move hashing function for squeak requests to util module

* Remove sayHello method from protocol
2020-06-06 19:10:12 -07:00
yzernik
964920bbbb Fix endianness of hash in db 2020-06-06 18:40:43 -07:00
Jonathan Zernik
4c80d01e42
Always use mainnet for squeak code (#36) 2020-06-06 12:46:02 -07:00
Jonathan Zernik
2f30f90a75
Handle lookup requests with empty address list without crashing (#35) 2020-06-05 20:24:18 -07:00
yzernik
26586792ba Use port number that doesn't conflict with android emulator 2020-06-05 18:37:53 -07:00
Jonathan Zernik
cecaeec08f
Expose the squeakserver port to the host machine (#34) 2020-06-04 22:30:07 -07:00
Jonathan Zernik
0157d50064
Fix main docker file (#33)
* Shut down itest after complete, and fix docker compose

* Change squeak server listen port
2020-06-04 22:22:49 -07:00
Jonathan Zernik
4ffe10e131
Add lookup squeaks to api (#32)
* Add lookup squeaks to protocol and add method

* Get the same squeak back in itest after posting

* Got lookup squeaks api working
2020-06-04 20:42:48 -07:00
yzernik
866b1e911d Remove link from server to btcd 2020-06-04 18:44:55 -07:00
Jonathan Zernik
56793d1d61
Fix mising import in dummy blockchain (#31) 2020-06-04 18:34:12 -07:00
Jonathan Zernik
0a47aa0568
Got unit tests passing (#30) 2020-06-04 18:30:48 -07:00
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