Commit Graph

67 Commits

Author SHA1 Message Date
Aris
85087b0f70 Refactoring chain (#2662) 2021-02-13 14:10:40 -06:00
Chris Stewart
8f958bf5d9 Update scalafmt (#2619) 2021-02-03 16:37:12 -06:00
rorp
05e21b1200 Bump Eclair version (#2405)
* Bump Eclair version

* cleanup

* Bump JVM version for CI

* Update docs

* Fix docs
2021-01-22 10:47:19 -06:00
Chris Stewart
6eff248f3d Add officially supported version of bitcoind by eclair, also add the ability to specify which version of bitcoind you are using for EclairRpcTestUtil.getBitcoindRpc (#2490) 2021-01-08 11:43:48 -06:00
Chris Stewart
4e1a6c69f0 2020 12 18 enable lint options (#2454)
* Enable -Xlint:adapted-args,nullary-unit on our for compile scope

* Add Xlint:infer-any compiler option

* Fix build so test compiler options are actually enabled

* Enable more scalac linting options

* Add '-Xlint:eta-sam'

* Add 'Xlint:inaccessible,Xlint:missing-interpolator'
2021-01-03 08:01:26 -06:00
Chris Stewart
9b09b04230 Upgrade to scalac 2.13.3 (#2115) 2020-10-04 07:42:44 -05:00
Chris Stewart
39ef35b9ee Rename parameter names from 'duration' -> 'interval' just like our ActorSystem.schedule() names the parameter (#2005) 2020-09-11 11:10:59 -05:00
Chris Stewart
955978f635 Apply string factory to a bunch of easy things (#1891)
* Apply string factory to a bunch of easy things

* Refactor HDPath, ExtKey, and LnTagPrefix to use StringFactory

* Implemen StringFactory on LnHumanReadablePart, ScriptType, ServiceIdentifier

* Implement StringFactory on AesCrypt, NodeUri, AddressTag, PSBT, TxoState

* Fix failing tests, fix website compile

* Apply StringFactory to all ScriptOperations, ChannelState, Script Parsing
2020-08-25 10:48:37 -05:00
Scala Steward
bef9c2648e Update scalafmt-core to 2.6.4 (#1686)
* Update scalafmt-core to 2.6.4

* Format everything

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-08-24 14:24:16 -05:00
Chris Stewart
620fa7f3c9 Add synchronous version of StartStop (#1771)
* Add synchronous version of StartStop

* Use ben's suggestion of StartStopAsync extending StartStop
2020-08-06 18:24:12 -05:00
rorp
43b6349758 Eclair RPC 0.4.1 (#1627)
* Eclair RPC 0.4.1

* channelstats

* remove the launch script editing code

* getinfo

* sendonchain, onchainbalance, onchaintransactions

* cleanup

* repond to the comments
2020-07-07 13:22:44 -07:00
Scala Steward
97a4886c6e Update scalafmt-core to 2.6.0 (#1579)
* Update scalafmt-core to 2.6.0

* Upgrade scalafmt, fix all formatting errors

* Scalafmt on 2.12

* fix test

* More fixes

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-06-19 10:38:12 -05:00
Nadav Kohen
e5bd6e53a3 Added compile scope scalafmtCheck to travis runs (#1563) 2020-06-16 15:16:43 -05:00
Chris Stewart
c54d6dcbdc 2020 06 09 addr invoice string factory (#1538)
* Implement StringFactory with Address and LnInvoice

* Address code review

* Run scalafmt
2020-06-11 10:44:12 -05:00
Chris Stewart
5aeb8ebdd1 Bump akka to 2.6.4, fix deprecated things (#1374)
* Bump akka to 2.6.4, fix deprecated things

* Bump to 2.6.5 akka

* Clean up imports

* Remove materializer from FeeProviders
2020-05-30 08:49:28 -05:00
rorp
932c7ede76 Upgrade Eclair to v0.4 (#1421)
* Upgrade Eclair to v0.4

* fix test binary

* logging

* unquote paths

* fix eclair-node.sh

* OSX fix

* cleanup
2020-05-28 10:50:57 -05:00
Nadav Kohen
dfd3353cc4 TxBuilder Refactor (#1426)
* Refactored Transaction

Created RawTxBuilder

Created RawTxFinalizer as layer on top of RawTxBuilder

Introduced RawTxSigner and replaced TxBuilder!

Deleted TxBuilder!

* fixed things after rebase

* Made RawTxBuilder compatible with older versions of scala

* Began responding to review

* Made Finalizer take a Builder rather than the other way around

* Added composition for finalizers

* Ran scalafmt

* Updated txbuilder example documentation

* Moved tests from old TxBuilderTest files to relevant new test files

* Added scaladocs
2020-05-21 09:47:08 -05:00
Ben Carman
47787d6765 Add bitcoind and zmq config options to EclairInstance (#1428) 2020-05-20 15:55:20 -05:00
Nadav Kohen
a503441619 Crypto Project Refactor (#1380)
* Added crypto project and decoupled BitcoinSLogger from NetworkElement

Decoupled BitcoinSLogger from Factory

Moved NetworkElement into crypto project

Moved Factory and BitcoinSUtil (renamed to BytesUtil) to crypto project

Moved MaskedToString to crypto project

Added BytesUtil to imports and cleaned up CryptoUtil.recoverPoint

Moved the rest of crypto stuff to the crypto project

Moved crypto tests to crypto-test project

* Added documentation for crypto project
2020-04-30 12:34:53 -05:00
Ben Carman
aa8a2e14a6 Move Json Reader, Writers, and Serializers to App Commons (#1328)
* Move Json Reader, Writers, and Serializers to App Commons

* Move app-commons outside of app/
2020-04-10 14:33:37 -05:00
Chris Stewart
2279313eb9 Move binaries to be stored inside of the HOME/.bitcoin-s/binaries instead of usrdir/binaries. This makes it so different projects that use bitcoin-s can re-use binaries instead of having to download them for every project (#1128) 2020-02-17 12:07:04 -06:00
rorp
25dae68238 Use java.time.Instant to represent timestamps in EclairApi (#1118) 2020-02-13 06:47:20 -06:00
rorp
53f4750a8d Support for Eclair 0.3.3 (#1097) 2020-02-12 11:30:31 -08:00
rorp
74fa1e61af some more changes 2020-01-14 13:53:12 -08:00
rorp
2f9d3606ca Merge branch 'master' into eclair_bench 2020-01-07 16:52:58 -08:00
rorp
c854a96b2a Eclair Web Socket client (#1006)
* Eclair Web Socket client

* fix build error

* unit test
2020-01-07 18:25:35 -06:00
rorp
b1e42e07a9 Eclair performance tests 2020-01-07 10:02:08 -08:00
Chris Stewart
effa0aab1f Add comments indicating what time unit eclair sends things in for the… (#884)
* Add comments indicating what time unit eclair sends things in for the various rpc calls

* Add missing comment

* Make sure time units returned by eclair rpc are correct
2019-11-26 12:25:45 -06:00
Chris Stewart
94161b718b Fix runnable not being cancelled when payment fails (#869) 2019-11-18 15:08:25 -06:00
rorp
7fcab8948a Fix monitorInvoice unit test (#846)
* Fix monitorInvoice unit test

* more logs

* even more logging

* fix build error

* custom eclair jar

* custom eclair

* more logging

* remove println's

* more logging

* more logging

* fix 'payment expiry is too close to the current block height'

* pobably the final fix

* cleanup

* fix download URL

* responded to PR comments
2019-11-06 12:42:38 -06:00
rorp
507a55fe90 Fix getsentinfo Eclair Rpc call (#851) 2019-11-04 12:33:44 -06:00
cwaldron97
96476e56b3 (WIP)Changes to client start() (#748)
* changes to client

fixed daemon flag

yielding bitcoindRPCclient

versioned

more implementation

update

fixed yield error and some documentation

docs + compiler error fix

updated

responding to code review

missing bracket

fixed compiler warnings

fixed compiler warning

* scalafmt
2019-10-30 14:59:35 -05:00
rorp
06d210ba80 Upgrade to ecalir v0.3.2 (#818)
* Upgrade to ecalir v0.3.2

* addressed the PR comments

* some more changes

* and some more

* external payment id
2019-10-24 13:19:59 -05:00
Chris Stewart
67ead0bc7e 2019 09 05 scalafmt update (#735)
* Update scalafmt to 2.0.1

* Scalafmt

In this commit we
1) Reconfigure the .scalafmt.conf file
2) Add a scalafmt binary (same version as specified in conf file)
3) Use said binary on CI to check that everything is formatted correctly

* Ran scalafmt

* Update scalafmt ignore

* Add scalafmt plugin to project/plugins.sbt, run it

* run scalafmt
2019-09-05 20:02:58 -05:00
Chris Stewart
d4ccc2c441 2019 09 05 v18 rpc (#734)
* This is for colin

* Fix remaining errors on V18 RPC calls

* remove unused code final formatting fix

* implemented fixed listwalletdir rpc test

* responding to code review and replacing flatmaps
2019-09-05 09:15:00 -05:00
Torkel Rogstad
8a58d7dde8 Make it possible to construct RPC client without ActorSystem (#725) 2019-08-30 15:12:18 -05:00
Torkel Rogstad
f6ed565c14 Refactor sbt and make Eclair tests download bitcoind (#727) 2019-08-30 15:11:52 -05:00
Torkel Rogstad
2f7fb05f96 Build and CI improvements (#710)
* Build and CI improvements

In this commit we:

1) Parallelize the Travis CI config, by splitting
    each project into its own Travis task
2) Download bitcoind binaries through sbt

* Use binaries downloaded by sbt task

* Make BitcoindRpcTestUtil work on Travis without bitcoind on PATH

* Add new downloadEclair task to sbt

* use sbt downloaded binaries in tests

* Fix Eclair and Bitcoind tests
2019-08-27 10:48:48 -05:00
Torkel Rogstad
c2f37335b8 Bump Scala versions (#697)
* Bump Scala versions

Support Scala 2.12.9
and 2.13.0.

To make this easier, we delete the `scripts` project. Everything
that was in here was covered by content on the website. We also
delete the `doc` folder, as that was a remnant from when `scripts`
was called `doc`.

* Crib uPickle akka-http support while we wait for publish

* Fix compiler warnings

* Add note on test logging to contribution guide

* Reduce duplication in Blockchain implementation

* Use Scala 2.12 for website

* Introduce compat package object for collections converters

* Fix Either compiler warnings

* Add sync-chain and create-wallet docs from deleted scripts

* Fix rebase goofup
2019-08-23 13:53:00 -05:00
Chris Stewart
db18a4bfa4 fix monitor invoice timing out in #693 (#718)
* fix monitor invoice timing out in #693

* Bump timeout more
2019-08-23 11:57:53 -05:00
cwaldron97
e6dcd1cfb4 Cleaning up Publish Logs (#634)
* This PR is attempting to remove the publishing errors when publish
locally many of which are incorrectly linked things in scaladocs which
there are some differences in formatting. Hopefully this removes alot
if not all of the "link not found for ..." warning messages that show
up.
2019-07-31 12:28:22 +02:00
Chris Stewart
a378838a8a implement ability to monitor a invoice that we are generated (#649)
* implement ability to monitor a invoice that we are generated

* reorganize tests to get them to pass
2019-07-19 13:03:43 -05:00
rorp
b6b4431935 Revert payment monitor (#600)
* Revert payment monitor

* Revert payment monitor

* expose EcecutionContext in EclairApi

* more configurable payment monitoring

* cleanup, more tests

* addressed comments
2019-07-15 11:18:48 -05:00
rorp
d74a0560b8 [WIP] New Eclair RPC client (#535)
* [WIP] New Eclair RPC client

* channel, close, connect, getinfo, open, peers

* allchannels, allnodes, allupdates

* audit, channels, findroutetonode, forceclose, updaterelayfee

* Initial version of createinvoice

* ShortChannelId: improved error handling and scaladoc

* addressed the PR comments

* parseinvoice, payinvoice, getsentinfo, getreceivedinfo, sendtonode, sendtoroute

* unit tests

* addressed the PR comments

* ws, usablebalances, channelstats, networkfees, getinvoice, listinvoices

* addressed PR comments

* change eclair URL

* cleanup

* addressed comments

* fidex compiler warnings

* Eclair 0.3.1

* scaladoc

* cleanup
2019-07-03 13:38:56 -05:00
Chris Stewart
8bede3fddc Give sbt-api-mappings plugin a concrete version, fix compiler warnings with unused imports (#485) 2019-05-30 09:47:21 -05:00
Torkel Rogstad
fb178eb295 Add proper parsing of bitcoin.conf, rework auth credentials (#478)
* Add proper parsing of bitcoin.conf, remove datadir

Somewhat recently a new config format was introduced
in Bitcoin Core. Options can now be specified under
section headers ([regtest], [main], [test]), as
well as with network prefixes (regtest.rpcport,
main.prune) and the traditional format. In this commit
we introduce a new type BitcoindConfig that parses
this format. We also make the necessary changes in
the bitcoind/Eclair RPC clients to accomodate this new
type.

We also remove the datadir field from
BitcoindAuthCredentials. This is not strictly necessary
to connect to a bitcoind, so this is a bad separation
of concerns. The datadir field is instead moved into
the BitcoindInstance.

Finally we go over some places in tests and test
utils and assert that we are operating in the
user temporary directory. This is a safety measure
so that other developers/users won't do the same
mistake I did while working on this and accidentally
blow up their $HOME/.bitcoin directory.

* Add BitcoindRpcClient.fromDatadir

* Address code review from Chris
2019-05-28 11:33:16 -05:00
Torkel Rogstad
6bc6378f96 WIP: Docusaurus website (#465)
* Docs: Introduce new Docusaurus-based website

This commit is the result of running
npx docusaurus-init, and nothing more.
Further changes will happen on top of
this, to make it easier to review changes
and update to newer versions of Docusaurus
in the future.

* WIP: Add Bitcoin-S website

Change the default Docusaurus template to a custom website. Goes
off of existing documentation, and moves it into the new docs and
website directories. Deletes some unused files, such as
BUILD_README.md

* Initial mdoc support

* Add Scaladoc to website

* Add SVG assets

* Change colors, flesh out pages, correct Scaladoc links

* Rename doc project to scripts, move security doc to website

* Add copy buttons to website code snippets

* Add doc and tasks for publishing website

* Refactor how paths get copied after generating Scaladocs

* Add Get Started button

* Replace bitcoin-s logo with white text

* Add Montserrat font for headers

* flesh out user showcase and landing page

* Change Scaladoc URL to bitcoins package
2019-05-14 18:05:14 -05:00
Nadav Kohen
a0c1ab91b4 testkit refactor (rename and repackage) (#355)
* Refactored testkit to have a package called testkit and renamed AsyncUtil and TestUtil, ran scalafmt

* Updated internal file names list
2019-02-21 10:04:31 -06:00
Chris Stewart
cf4d80626a Clean up compiler warnings (#349) 2019-02-19 14:44:44 -06:00
Chris Stewart
88e6450c5a Reduce number of requests we send to eclair in testkits, add commandN… (#343)
* Reduce number of requests we send to eclair in testkits, add commandName param to parseResult in EclairRpcClient

* Factor our EclairRpcClient error message

* Make jvm opts more sane, refactor error message code again

* Add error message on EclairRpcTestUtil.sendPayments, scalafmt
2019-02-19 14:18:37 -06:00