Commit graph

1816 commits

Author SHA1 Message Date
Chris Stewart
72097e31bd
2019 11 30 key manager (#904)
* Segregate key manager from wallet

* More consistent naming in build.sbt, run scalafmt

* Add test case making sure we don't overwrite a mnemonic seed

* Add key-manager.md

* Fix compile issues with older scala versions

* Address code review
2019-12-04 07:43:29 -06:00
Chris Stewart
7e6f489fee
2019 11 28 cli native image doc (#903)
* Add documentation about how the cli can be built with a native image

* Finish rest of documentation on building command line client for bitcoin-s

* Add missing akka actor on walletServer classpath, add plugins to be able to build the walletServer as a standalone jar

* Add server.md

* Rename walletServer -> appServer

* Address code review, add missing main class in server project

* Address code review
2019-12-04 07:25:03 -06:00
Chris Stewart
0f9c349d51
Add documentation on env variable SBT_OPTS and add documentation about it (#914) 2019-12-03 19:01:34 -06:00
Scala Steward
1a9cf577db Update akka-http, akka-http-testkit to 10.1.11 (#908) 2019-12-03 10:07:02 -06:00
Nadav Kohen
3183f17ce2 BitcoinTxBuilderTest Hang (#901)
* Fix hanging bug in BitcoinTxBuilderTest

* Added forAllAsync to BitcoinSAsyncTest
2019-12-02 13:04:58 -06:00
Ben Carman
c7a8a8eadf Add descriptors as toString for script pubkeys (#902) 2019-12-02 09:05:41 -06:00
Chris Stewart
9ae15037d8
Make 'downloadBitcoind' command async, which reduces task time by 3x (#906) 2019-12-02 09:01:21 -06:00
rorp
9e677b602d [Neutrino] Update balances (#888)
* [Neutrino] Update balances

* responded to the comments

* some more changes
2019-11-27 16:00:19 -06:00
Nadav Kohen
b89d20e9a8 Moved BitcoinTxBuilder property tests into ScalaTest context, fixed bug where opPushData was marking valid short P2SH scripts as invalid (#900) 2019-11-27 13:51:49 -06:00
Nadav Kohen
15ec7b89b6 Nicer Satoshis.apply (#899)
* Replaced Satoshis(Int64(_)) with Satoshis(_)

* Fixed SignerTest
2019-11-26 14:43:14 -06:00
rorp
804f18f47f Refactor compact filter matching (#838)
* Refactor compact filter matching

* cleanup

* some more changes

* addressed the PR comments

* cleanup

* cleanup
2019-11-26 13:40:19 -06:00
Chris Stewart
2527354bb8
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
c75a5a4bb1
Try to fix mac osx git submodules (#898) 2019-11-26 08:12:00 -06:00
Scala Steward
6dbc6d9e39 Update sbt to 1.3.4 (#889) 2019-11-24 09:01:49 -06:00
Chris Stewart
39bcfb22b6
Add sanity tests for .hashCode() and .equals() for multiple instances for EclairRpcClient/BitcoindRpcClient (#881) 2019-11-22 07:59:26 -06:00
rorp
43ec85af39 Rescan RPC (#854)
* Rescan RPC

* cleanup

* fix optional args

* cleanup

* unit tests

* fix build error

* fix unit tests

* scalaMock

* cleanup

* more unit tests

* some more validation checks
2019-11-21 08:03:32 -06:00
Nadav Kohen
306699ba8a MultiSignatureWithTimeoutScriptPubKey (#867)
* Added MultiSignatureWithTimeoutScriptPubKey

* Renamed If and NotIf to NonStandardIf and NonStandardNotIf and removed multiple representations

* Added MultiSignatureScriptPubKey to CreditingTxGenerators

* Responded to code review

* Fixed UTXOSpendingInfoTest
2019-11-18 15:08:50 -06:00
Chris Stewart
cbf77119e7
Fix runnable not being cancelled when payment fails (#869) 2019-11-18 15:08:25 -06:00
Nadav Kohen
7fe6604b26 Made ScriptPubKey and ScriptSignature toStrings nicer (#859) 2019-11-18 11:12:38 -06:00
Nadav Kohen
254828e94e OP_NOTIF ScriptPubKey and Signing (#858)
* Implemented OP_NOTIF

* Responded to code review

* Fixed test bug for sampling
2019-11-18 10:45:33 -06:00
Nadav Kohen
4355543709 Conditional Signing Tests (#865)
* Added ConditionalScriptPubKeys to CreditingTxGen so that we are actually testing Conditional signing now

* Responded to code review

* Renamed scriptPubKeyTooBig => redeemScriptTooBig
2019-11-15 14:26:21 -06:00
Nadav Kohen
dd61f1dd8a Increase some Test Coverage (#866)
* Added ScriptTypeTest

* Added ScriptSignature coverage

* Added Signer test coverage

* Added test coverage for UTXOSpendingInfo

* Responded to code review
2019-11-15 12:21:52 -06:00
Nadav Kohen
3c7fd6c34a Nested OP_IF ScriptPubKey and signing (#857)
* Enabled nested conditional parsing

* Added nested conditionals to tests

* Responded to code review
2019-11-13 15:44:35 -06:00
Nadav Kohen
d86acfffed ScriptInterpreter Conditional Refactor (#855)
* Redid conditional interpreting without binary trees

* Fixed ControlOperationsInterpreterTest

* Implemented O(1) conditional handling as proposed here https://github.com/bitcoin/bitcoin/pull/16902 because Ben Carman pointed it out

* Added some docs

* Responded to code review
2019-11-08 13:19:53 -06:00
rorp
73c734ff24 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
Nadav Kohen
38db570e8f OP_IF Signing (#827)
* Introduced ConditionalScriptPubKey

Some more progress

Added Conditional signing infrastracture, tests do not pass and there are no Conditional tests

Fixed tests!

* Redid calcLockTime and calcSequenceForInputs in TxBuilder (added Conditional support)

* Added ScriptGenerators for Conditional scripts, only one test to go!

* Fixed CLTV(Empty) tests

* Responded to code review

* responded to code review

* ScriptSignature only types Policy-compliant script signatures

* Fixed md doc
2019-11-05 18:48:50 -06:00
Chris Stewart
7063b985a1
Bump micro pickle/json to 0.8.0 (#853) 2019-11-05 15:13:54 -06:00
rorp
be8676e198 Fix getsentinfo Eclair Rpc call (#851) 2019-11-04 12:33:44 -06:00
Scala Steward
2719eeaecd Update flyway-sbt to 6.0.7 (#844) 2019-11-01 09:13:12 -05:00
Scala Steward
c237cbbabf Update scalacheck to 1.14.2 (#849) 2019-11-01 09:06:44 -05:00
Scala Steward
9e7050ee32 Update slf4j-api to 1.7.29 (#848) 2019-11-01 06:11:03 -05:00
Nadav Kohen
3ed4c4aa84 RawScriptPubKey (#843)
* Introduced RawScriptPubKey type

* Responded to code review
2019-10-31 18:34:48 -05:00
Nadav Kohen
20c42795b8 Replace scriptPubKeyToSatisfy with spendingInfoToSatisfy in Signer (#842)
* Replace scriptPubKeyToSatisfy with spendingInfoToSatisfy and made UTXOSpendingInfo ADT nicer

Tightened up types on Signer with a type parameter

Factored out common functionality in Signer

Responded to code review

* More review
2019-10-31 12:17:30 -05:00
Nadav Kohen
ec38acbeb8 GCSTest fix (#845)
* Raised the min p value in GCSTest to avoid large x/2^p values which cause long unary to happen

* Lowered upper bound to 50
2019-10-31 06:21:23 -05:00
Nadav Kohen
310ccbb838 Spending Info ADT use (#840)
* Replaced TxBuilder signAndAddInput match with UTXOSpendingInfo match, tests don't pass

* Fixed tests!
2019-10-30 15:00:41 -05:00
cwaldron97
04edc40b7e (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
abaa0581c0 Rescan and fetch blocks (#835)
* Rescan and fetch blocks

* unit test

* fix log level

* addessed the PR comments

* fix test timeout

* improve unit tests
2019-10-30 09:51:03 -05:00
Scala Steward
f169a6b1e9 Update sourcecode to 0.1.8 (#841) 2019-10-28 20:11:00 -05:00
Chris Stewart
71c2cff89f
Revert "Update scalafmt-core to 2.2.1 (#833)" (#839)
This reverts commit 8cbf54b8a6.
2019-10-27 17:21:15 -05:00
Nadav Kohen
5454d675f7 Signer UTXOSpendingInfo refactor (#830)
* Refactored Signer interface to use TxSigComponent and UTXOSpendingInfo

Fixed all the broken things

Replaced TxSigComponent with unsigned Transaction in Signer interface to remove illegal states

* Added p2sh throw case in Signer
2019-10-25 15:40:33 -05:00
Nadav Kohen
8dc005a586 UTXOSpendingInfo ADT (#834)
* Create an ADT to represent the various types of utxos we can have. Now we have RawScriptUTXOSpendingInfo, SegwitV0NativeUTXOSpendingInfo, P2SHSpendingInfo, P2SHNestedSegwitV0UTXOSpendingInfo. This hopefully can be used in combination with the P2WSHSigner and LockTimeSigner work to make TxBuilder and the Signers more comprehensible

* Added P2SH nested witness invariants and made BitcoinUTXOSpendingInfo backwards compatible, BitcoinTxBuilderSpec has one failing test

* Fixed testing around UTXOSpendingInfo

* Responded to code review
2019-10-25 13:58:36 -05:00
Chris Stewart
de71eac07b
Revert "Update sbt-mdoc to 1.3.6 (#831)" (#837)
This reverts commit c16e37b339.
2019-10-25 10:32:27 -05:00
Scala Steward
8cbf54b8a6 Update scalafmt-core to 2.2.1 (#833) 2019-10-25 08:56:48 -05:00
Scala Steward
c16e37b339 Update sbt-mdoc to 1.3.6 (#831) 2019-10-25 08:50:35 -05:00
Nadav Kohen
4641e0043c Created LockTimeSigner and delegated LockTimeScriptSignature signing from other places to it (#798)
Remove redundant work on P2WPKH signing

Added scaladoc

Added to OverridesForNestedSigning for LockTime scripts nested in SHs
2019-10-25 06:15:55 -05:00
rorp
2038faf126 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
Scala Steward
1dea06abfa Update sbt-bloop to 1.3.5 (#829) 2019-10-24 06:00:51 -05:00
Nadav Kohen
d2b6a836c1 P2WSH Signer! (#797)
* Created P2WSHSigner and removed P2WSHWitnessSPKV0 case from P2PK and P2PKH signers

* Moved P2WSH MultiSig from MultiSigSigner to P2WSHSigner

* Cleaned up P2WSH case of BitcoinTxBuilder.signAndAddInput to exclusively use P2WSHSigner

* Replaced Option[(TxSigComponent, ScriptPubKey)] with an ADT

* Added signing with overrides to super Signer class to simplify delegation code

* Added Scaladocs for OverridesForNestedSigning ADT

* Made naming better for OverridesForNestedSigning ADT and added scaladocs
2019-10-23 15:29:52 -05:00
rorp
6df467d295 Improve EclairRpcClientTest execution time (#826) 2019-10-23 14:29:48 -05:00
Nadav Kohen
eb78d61c58 Removed the ScriptProgram companion object (#811) 2019-10-23 10:12:41 -05:00