Commit graph

32 commits

Author SHA1 Message Date
Jonathan Zernik
b5b3b9f1f3
Rename entrypoint script (#2171) 2022-04-25 16:32:31 -07:00
Jonathan Zernik
ecf3d8cecb
Use docker tor simple (#1847)
* Got docker-compose working with tor-simple tor proxy

* Got itest working with simple-tor docker image

* Delete old commented containers for tor
2021-12-13 11:36:25 -08:00
Jonathan Zernik
411f050c93
Got itest working with lnd using tor for both listen and connect (#1495)
* Got itest working with lnd using tor for both listen and connect

* Got itest working with configurable target address for lnd tor config

* Update development doc with tor service in background services
2021-10-04 18:33:16 -07:00
Jonathan Zernik
985d160372
Raise custom error when inserting duplicate squaek in db. (#1478)
* Raise custom error when inserting duplicate squaek in db.

* Don't raise error in insert db method, return optional primary key

* Update the docstring for insert squeak

* Insert received offer db method returns optional primary key

* Use optional return type for insert received payment method

* Comment out unused db exceptions for duplicate inserts
2021-10-03 01:09:35 -07:00
Jonathan Zernik
138ef7d984
Add squeak core module (#587)
* Add squeak_core module

* Remove unused import

* Delete squeakblockverifier

* Use squeak_core to make squeak

* Remove blockchain client from controller

* Move create offer method to squeak core

* Add some type hints

* Move get buy offer method to squeak_core

* Delete commented old get buy offer block

* Add pay_offer to squeak_core

* Add get received payments generator function to squak core

* Add get_offer method to squeak_core

* Remove lightning_client property from peer_task

* Remove old comments from payment verifier class

* Use bytes internally for payment_hash

* Represent secret_key as bytes internally
2021-01-10 09:31:41 -08:00
Jonathan Zernik
cede35ed55
Fix serialization of payment hash db (#579)
* Use postgres for db in itest

* Fix serialization of payment hash in db tables
2021-01-08 00:48:16 -08:00
Jonathan Zernik
98d9b5a87d
Make dockerfile run with cmd (#529)
* Add cmd to dockerfile

* Remove waiting for cert file in start script

* Output docker container dirs before starting script

* Remove failing ls line

* Add lnd tls cert path and macaroon path env vars

* Add env vars for webadmin congis
2020-12-31 00:05:20 -08:00
Jonathan Zernik
9b14c8016b
Package for umbrel (#528)
* Switch dockerfile base image to buster

* Try to make build work for umbrel

* Remove libs from Dockerfile

* Add build-essential to dockerfile

* Make sqk_dir configurable with environment variable

* Use new env var names
2020-12-30 16:46:48 -08:00
Jonathan Zernik
34ec5deee8
Use python slim docker base image (#516)
* Use python slim image for both squeaknode and test

* Clean up dockerfiles

* Reorder dockerfile for squeaknode

* Load alembic config file from packaged module

* Alembic directory is now loaded from packaged module

* Got multi-stage docker build working

* Removed old app directory from docker config

* Remove commented package data arg from setup.py

* Remove unused alembic graft from manifest

* Fix extra space in alembic revision
2020-12-27 04:59:59 -08:00
Jonathan Zernik
8c4db6f85a
Rename squeaknode docker container (#377) 2020-11-04 23:35:32 -05:00
Jonathan Zernik
8ebdc754ca
Add pay offer dialog and backend method (#296)
* Add insert sent payment method

* Delete db container from itest

* Add other container in itest

* Connect to other squeak node in itest

* Use client lightning container for itest to get offers from main node

* Get offers itest working

* Open channel to buy offer in itest

* Successfully pay offer

* Remove old print statements from itest

* Successfully unlock squeak in pay offer method

* Assert that decrypted content is correct in pay offer itest
2020-10-18 00:27:49 -04:00
Jonathan Zernik
5f482bf9be
Fix ipv6 in lnd docker itest (#256)
* Fix ipv6 in lnd docker itest

* Clean up itest.sh
2020-09-21 01:00:48 -07:00
Jonathan Zernik
bac577b792
Use volume for postgres db (#122) 2020-07-23 01:02:57 -07:00
yzernik
86f96dbdb8 Add missing links and volumes to sqkserver docker-compose 2020-07-23 00:37:00 -07:00
Jonathan Zernik
3d8a77cdaa
Run in main docker (#113)
* Docker-compose in main docker folder working

* Fix rpc host in start lnd script

* Remove link alias for btcd in btcctl

* Remove docker-compose links alias for btcd in lnd container

* Remove unused open ports in itest docker-compose

* Remove unused environment variabls from itest docker-compose

* Fix port conflicts between itest and docker docker foler docker-compose containers
2020-07-21 20:48:52 -07:00
Jonathan Zernik
a45c3b62be
Add envoy proxy (#95)
* Add envoy proxy

* Add frontend, still not working

* Open port to frontend

* Fix static html page

* Fix url in client js code, but CORS is still blocked

* Successfully make request from browser to sqkserver through proxy

* Expose ports for sqkserver in docker

* Remove unused frontend files

* Remove duplicate envoy config file
2020-07-19 20:20:34 -07:00
Jonathan Zernik
404772372f
Add btcd credentials to sqkserver config (#81)
* Add btcd credentials and rpc cert to sqkserver configs

* Start the squeak block verifier worker thread on startup

* Btcd request still failing because of cert

* Got btcd client working

* Use valid block hash and height in itest
2020-07-18 17:19:43 -07:00
Jonathan Zernik
6fd4940a0a
Use btcd btcctl test containers (#63)
* Use containers with test in name for btcd and btcctl

* Remove duplication of createdb script
2020-07-02 22:45:12 -07:00
Jonathan Zernik
2a88b51ec0
Simplify container names (#62)
* Rename docker lnd container

* Rename itest containers to avoid conflict with main containers
2020-07-02 22:28:26 -07:00
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
yzernik
cd1f92d297 Remove docker-compose dependency on shared volume for sqkserver 2020-06-11 18:41:17 -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
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
yzernik
866b1e911d Remove link from server to btcd 2020-06-04 18:44:55 -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
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
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
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
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