Commit graph

35 commits

Author SHA1 Message Date
Jonathan Zernik
ed360ff3d1
Add clightning backend support (#2205)
* Add c-lightning support

* Got subscribe paid invoices working with c-lightning

* Remove log lines

* Use a single config section for all lightning configs

* Fix itest config

* Update configuration doc with new confis
2022-05-08 12:41:44 -07:00
Jonathan Zernik
bff7bbbc4b
Use squeak store to encapsulate all core fns (#2030)
* Revert "Remove usage of squeak_core from squeak_store (#2029)"

This reverts commit bd15c653aa.

* Add make squeak method to squeak store class

* Add pay offer method to squeak store

* Remove squeak_core from controller constructor

* Remove default port param from controller constructor

* Fix broken itests

* Got download single squeak working synchronously
2022-03-26 20:42:42 -07:00
Jonathan Zernik
68e69e55c8
Use http for peer connection (#2002)
* Got basic web server running for peer

* Got squeak route and lookup route working

* Got secret key route working

* Got offer endpoint working

* Remove old comment

* Move peer server code to server subdir

* Create client subdir for peer client

* Return empty list for lookup when pubkeys is empty

* Add peer client and network controller class

* Remove old network code

* Remove old block subscription worker

* Remove network handler class

* Remove more old classes

* Add back twitter forwarder worker

* Remove download methods from controller

* Add websocket endpoint

* Add websocket subscribe method

* Add websocket client library

* Fetch squeaks from peer (slowly) on UI timeline load

* Fetch squeaks from peer (slowly) on UI pubkey squeaks load

* Got download squeaks working with HTTP requests

* Fixed external address method in controller

* Remove download pubkey squeak button and action

* Remove unused connection displays from peer ana peers page

* Fix 404 not found for offer endpoint

* Better handling of null cases in peer client downloader

* Simplify peer downloader

* Create subclass for range download

* Got single squeak download working

* Fix itest for get external address
2022-03-17 14:38:46 -07:00
Jonathan Zernik
1a159a5f10
Fix max squeaks per public key per block height config (#1896) 2021-12-26 10:08:00 -08:00
Jonathan Zernik
2bbadbd7de
Rename rpc config section (#1716) 2021-10-23 18:45:14 -07: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
dba7c525e9
Rename core config to node config (#1045) 2021-08-24 01:13:24 -07: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
c984d41bcc
Use type hints for controller methods, and use bytes internally for s… (#578)
* Use type hints for controller methods, and use bytes internally for squeak hash

* Change internal representation of squeak_hash to bytes
2021-01-07 23:32:14 -08:00
Jonathan Zernik
a57021ab0c
Use typed config (#566)
* Use typed config

* Use typed config

* Got bitcoin connection working in main config

* Use better defaults for lnd configs

* Got test working for get network using config fixture

* Use sqk_dir_path instead of sqk_dir

* Add logging of bitcoin configs

* Don't use config option when config file doesn't exist
2021-01-05 23:39:04 -08:00
Jonathan Zernik
6e42663c12
Add sync package (#543)
* Move network sync modules to new sync package

* Run sync worker thread from main module

* Got sync worker working in admin handler

* Use squeak_controller in sync_controller

* Use squeak_controller in peer task

* Remove old commented args replaced by squeak_controller

* Use squeak_controller method to get best block height

* Improve constructor for network sync task

* Improve constructor for network sync task
2021-01-02 05:46:49 -08:00
Jonathan Zernik
b2766f5ab0
Add admin rpc enabled config (#535)
* Add config to enable admin rpc server

* Allow squeaknode to run on mainnet

* Clean up main module more

* Clean up configs in main module more
2020-12-31 19:49:26 -08:00
Jonathan Zernik
c62d4229cf
Remove btcd cert shared volume (#486)
* Remove shared volume for btcd cert file

* Got ssl cert working as a config

* Remove old comment about adding ssl certificate in dockerfile
2020-11-24 01:18:53 -05:00
Jonathan Zernik
a43576a10e
Use bitcoincore for bitcoin node (#481)
* Got docker-compose working with bitcoin-core

* Got itest working

* Add bitcoin use_ssl config

* Rename service to bitcoin-core in docker-compose
2020-11-23 14:43:17 -05:00
Jonathan Zernik
6641e64995
Use msat as price unit (#427)
* Use price_msat for config and internally

* Use price_msat in admin protocol for offer message

* Use price_msat in sent payments table and protocol

* Update frontend to use new protocol with price_msat for offer

* Update static build
2020-11-10 02:35:24 -05:00
Jonathan Zernik
724f72f1e5
Use more config defaults (#376)
* Use default configs for webadmin

* Remove sqlite config from config file

* Use default config for sqk dir

* Use derived default lnd tls cert path in config

* Use default config for macaroon path

* Remove macaroon path config from docker config.ini

* Got mainnet working in docker

* Update readme

* Remove unused network param in docker config.ini file

* Update readme
2020-11-04 23:18:04 -05:00
Jonathan Zernik
225cd7fdf1
Use better config defaults (#375)
* Use default ports for bitcoin rpc

* Use default configs for lnd ports

* Use default configs for server host/port and admin host/port
2020-11-04 21:24:04 -05:00
Jonathan Zernik
611e13c07f
New config class (#374)
* Create new config class

* Load lnd configs from new config class

* Use new config class for server and webadmin

* Use new config for webadmin

* Fix boolean configs for webadmin

* Use new config class for squeaknode configs

* Use new config for postgresql configs

* Use configparser get method for all configs

* Remove old configparser from main module
2020-11-04 19:06:49 -05:00
Jonathan Zernik
99ddc2df77
Rename to squeaknode (#342)
* Rename squeakserver to squeaknode and get itest passing

* Fix itest dockerfile

* Rename more squeakserver to squeaknode

* Rename database from squeakserver to squeaknode

* Update readme

* Remove frontend/build from git

* Rename squeakserver to squeaknode in tox and main
2020-10-29 14:35:17 -04:00
Jonathan Zernik
ee27bcb6ee
Add config to enable admin web server (#315) 2020-10-23 21:31:06 -04:00
Jonathan Zernik
b8dfac1e75
Use sqlite db file (#257)
* Use file for sqlite db

* Use squeak as relative path parent for sqlite db file
2020-09-26 01:30:47 -07:00
Jonathan Zernik
fafb89006a
Add config to enable sync (#255)
* Add config to enable sync

* Include block information in logs
2020-09-16 01:47:36 -07:00
Jonathan Zernik
1681776ebe
Use sqlite (#253)
* sqlite db engine works in itest

* Remove unused comment

* Use integer for invoice timestamp and invoice expir

* Fix insert offer

* Remove show tables in queries
2020-08-20 03:33:37 -07:00
Jonathan Zernik
b88dce6146
Move main module (#252)
* Move main module out of server folder

* Check which database is used to load engine

* Remove imported lnd proto modules in lightning client
2020-08-20 00:34:14 -07:00
Jonathan Zernik
80713c94ea
Use network config from config file to set paramas (#182) 2020-07-31 03:06:10 -07:00
Jonathan Zernik
7c4b84056b
Use created time for rate limiter (#178)
* Use created time to rate limit based on last hour

* Delete commented lines in rate limiter
2020-07-30 03:05:21 -07:00
Jonathan Zernik
b207469046
Add max squeak per block config (#159)
* Add max squeaks per block per address config

* Add rate limiter class

* Check rate limiter in squeaknode before saving squeak

* Got working itest with rate-limited requests
2020-07-28 01:10:04 -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
513527cd27
Make squeak with admin rpc (#75)
* Make squeak admin rpc method.

* Get the squeak back after making it through admin rpc make squeak method
2020-07-17 22:12:16 -07:00
Jonathan Zernik
0bef07e133
Add admin rpc server (#72)
* Add admin rpc server

* Use the admin rpc to get the balance of the server in itest
2020-07-16 22:56:37 -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
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
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
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