Commit Graph

1249 Commits

Author SHA1 Message Date
Ramon Boss
6944f948ab added test and fixed code (#435) 2019-04-23 13:44:27 -05:00
Chris Stewart
e5f9885312 Rename root project to 'bitcoins' (#420) 2019-04-15 14:38:25 -05:00
Torkel Rogstad
db15731b93 Add Bloop config, documentation (#412) 2019-04-15 13:08:51 -05:00
Chris Stewart
4572a9e9c2 Bump sbt version to 1.2.8 (#411) 2019-04-12 06:00:53 -05:00
Torkel Rogstad
78fc13c43e Fix bug in how addresses are passed to bitcoind (#404) 2019-04-10 13:37:46 -05:00
Torkel Rogstad
2e9c524652 Add AES encryption and decryption (#395) 2019-04-08 09:47:43 -05:00
sken
ad910d8c51 fix issue where it ECPubkey validation returns false positive (#397) 2019-03-29 14:17:25 -05:00
Torkel Rogstad
fb16d6b200 Add support for Bitcoin Core 0.17 (#384) 2019-03-26 12:41:05 -05:00
Chris Stewart
4d88354073 Implement nbits compression encoding for the difficulty threshold in … (#390)
* Implement nbits compression encoding for the difficulty threshold in a block header

* Create BlockHeader.TargetDifficultyHelper to pass around meta info about the difficulty, implement rest of test cases in arith_uint256_tests.cpp related to pow difficulty

* Address torkel's code review
2019-03-26 11:07:27 -05:00
Chris Stewart
3b8d6af4c6 2019 03 20 chainparams add mining consensus rules (#388)
* Add mining parameters to bitcoin-s chain params

* Add allowMinDifficultyBlocks and noRetargeting to ChainParams

* Add basic unit tests for new chain params vals

* Add powLimit tests

* Address torkel's code review
2019-03-21 09:10:18 -05:00
Chris Stewart
c0672bcfb1 Reduce number of payments sent from 5 to 2 in gossiping channel updat… (#385)
* Reduce number of payments sent from 5 to 2 in gossiping channel updates messages

* Try to reduce EclairRpcTestUtil.sendPayments to just one payment
2019-03-20 06:28:36 -05:00
Torkel Rogstad
06e5b6b450 Add BIP44 and BIP32 path support (#379)
* Add BIP44 and BIP32 path support

Make paths from strings, indexes/coins/chains,
BIP32 children types.

Derive xprivs and xpubs from paths.

* Address code review on BIP44 from Chris

* Rename children -> path, bip32child -> bip32node

* update README with bip44 name changes
2019-03-19 13:09:11 -05:00
Torkel Rogstad
e83b40ea93 Add doc on generating coverage report (#380) 2019-03-14 11:39:45 -05:00
Chris Stewart
35493249cc Implement difficulty calculation from nBits (#377)
* Implement difficulty calculation from nBits

* Torkel's suggest to use bitvector indexing rather than bitmasks

* Explicitly import BitcoinSUnitTest
2019-03-12 07:49:51 -05:00
Chris Stewart
eaa87b1e2b Move BitcoinSUnitTest abstract class to the testkit project so it can be reused across our codebase (#375) 2019-03-07 14:48:34 -06:00
Chris Stewart
9fceb5266b Fix compilation problem on scala 2.11.x wrt trezor test cases (#372) 2019-03-04 15:53:18 -06:00
Chris Stewart
7e9f4362bf Make the doublesha256digest generator more random (#371) 2019-03-04 15:21:38 -06:00
Torkel Rogstad
1ffeb73cd8 Fix Ammonite compile errors (#368) 2019-03-01 06:36:13 -06:00
Chris Stewart
201e52f32d Integrate big endian hashes, integrate them into the bitcoind-rpc project (#364) 2019-02-28 13:27:06 -06:00
Chris Stewart
c78ab5b860 Bump dependencies (#366) 2019-02-28 07:24:10 -06:00
Chris Stewart
a7920b7512 Fix package path for CryptoGenerators (#365) 2019-02-28 06:46:58 -06:00
Torkel Rogstad
db5a7254b9 BIP39 support (#353)
* Adds SHA256 hashing of BitVector

* Add BIP39 support
2019-02-28 06:13:37 -06:00
Torkel Rogstad
25fa009b95 Rework Bech32 (#360)
Refactor commonalities between LN and BTC
Add support for RegTest
2019-02-27 15:55:41 -06:00
Torkel Rogstad
bad37db6fa Adds Ammonite REPL in test scope (#323) 2019-02-26 06:16:12 -06: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
Torkel Rogstad
0e9e021ad7 Updates READMEs for root, testkit and zmq (#356) 2019-02-21 07:44:33 -06:00
Chris Stewart
3e7d1d4461 Update readme with new version (#350) 2019-02-19 18:53:10 -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
Nadav Kohen
abc6f55a08 transformRetryToTestFailure in scala 2.11.12 (#346)
* Made transformRetryToTestFailure compile in scala 2.11.12

* Fixed RpcUtilTest

* Replaced match with if/else because match wasn't working
2019-02-19 13:00:43 -06:00
Chris Stewart
7633bf6179 Add more tests to bump test coverage (#345) 2019-02-19 10:34:23 -06:00
Nadav Kohen
8a491022fa Better test error messages (#336)
* Improves error messages in with testkit

* Added the changes to BitcoindRpcTestUtil and EclairRpcTestUtil

* Responded to code review
2019-02-18 19:28:54 -06:00
Chris Stewart
0c4556a301 Put tests for bitcoind-rpc and eclair-rpc into a separate project to … (#341)
* Put tests for bitcoind-rpc and eclair-rpc into a separate project to get rid of circular dependency

* Modify travis yml file to get rid of all testkit stuff

* rename rpc project to bitcoind-rpc project

* Add bitcoind-rpc test cases that got deleted accidentally

* Add more files missing from bitcoind-rpc-test

* Remove circular deps part on CONTRIBUTING.md
2019-02-18 09:57:18 -06:00
Chris Stewart
2879d9c25c 2019 02 14 fix digital signature bug ln invoice (#337)
* Fix bug of sign issue when serializing r,s ln invoice signatures, we weren't using the proper sign in some rare cases. We always want the BigInteger to be non-negative for r,s

* Fixing initialization problem with EmptyDigitalSignature

* revert default Deps.scala bitcoinsV to published version

* Address code review nits

* remove negative ln currency unit test case
2019-02-16 16:04:31 -06:00
Torkel Rogstad
696e9f4c45 Add BasicArithmetic trait (#329)
* Add BasicArithmetic to MilliSatoshis

* Add BasicArithmetic

* Add LnCurrencyUnit, CurrencyUnit, Number to BasicArithmetic

* Add tests for BasicArithmetic

* Make logger in unit test class protected and annotated

* Use BitcoinSUnitTest class

* Address code review
2019-02-16 15:19:00 -06:00
Chris Stewart
15160eccc6 Fix bench project configuration (#338) 2019-02-16 14:54:17 -06:00
Chris Stewart
dc4def1d7f Bump scalac to 2.12.8 (#340)
* Bump scalac to 2.12.8

* Bump scalac in .travis.yml
2019-02-16 14:52:04 -06:00
Chris Stewart
fe4d26858c Add bitcoin-s unit test class, all unit tests going forward should extend this (#335) 2019-02-15 07:13:33 -06:00
Chris Stewart
614efece23 Fix initialization problem with LnInvoice and the separator char (#334) 2019-02-14 07:16:15 -06:00
Chris Stewart
e3a99f085f Add explicit test cases for parsing an htlc (#333) 2019-02-13 08:56:24 -06:00
Chris Stewart
50aa66404c Change Factory to an abstract class (#330) 2019-02-07 19:58:39 -06:00
Chris Stewart
b44c7af53d Make start methods return Future[Unit] (#328)
WIP: Refactoring EclairTestUtil to use Futures

Finished refactor EclairTestUtil to use futures

Address code review

fix async bug in chan opening

Change snapshot version to something that should compile
2019-02-07 19:58:18 -06:00
Torkel Rogstad
065a2a45d6 Get Eclair data dir from config in EclairAuthCredentials (#326)
* Get Eclair data dir from config in EclairAuthCredentials

* Removes faulty datadir opt

* Include datadir in EclairInstance.fromDatadir
2019-02-04 10:05:40 -06:00
Chris Stewart
77d0f98f95 remove response trace log (#325) 2019-02-04 06:27:36 -06:00
Torkel Rogstad
9fd5f52b98 Default param in Eclair RPC fromDatadir, tweaks ChannelUpdate RPC type (#324)
* Add default param to fromDatadir, fromConfigFile method, default bitcoind rpc port

* Set ChannelUpdate.htclMaximumUpdate to Option
2019-02-04 06:02:30 -06:00
Chris Stewart
6dce938f06 rm usage of getSimpleName, as it breaks logback logging schemes (#322) 2019-02-03 10:51:31 -06:00
Chris Stewart
375acfd65e add logs in eclair rpc client for requests and responses (#321) 2019-02-02 17:22:13 -06:00
Torkel Rogstad
8a203e881f Fixes conversion bug when sending with Eclair RPC (#318)
* Improved toString for LnCurrencyUnit

* Test for amount equality in RPC send methods

* Fix conversion bug in Eclair RPC client

* Version bump
2019-02-01 09:13:25 -06:00
Chris Stewart
4fa376eac9 Make timestamp a lazy val outside of versioning code (#317)
* Make timestamp a lazy val outside of versioning code

* revert bitcoin-s snapshot to something that is published
2019-01-30 04:38:15 -06:00
Torkel Rogstad
8bbd4e0631 Adds audit RPC call + test (#314) 2019-01-28 18:15:02 -06:00