Commit graph

51 commits

Author SHA1 Message Date
Chris Stewart
ab95053af8 version 0.0.3 (#290)
* version 0.0.3

* Fix cross compile issues so we can now compile and publish a dependency for the scala 2.11 series

scalafmt

* bump versions on readme, try to fix scoverage crossversion issue

* Downgrade scoverage to try and get it to work with ci

* Tinker with scoverage versions

* Add suggestion from scoverage people to exclude secp256k1jni from build coverage
2019-01-10 09:07:18 -06:00
Chris Stewart
268e235b4d Add secp256k1jni readme, start working main project readme, move old readme to core/README.md (#276)
Add documentation for TxBuilder

Try to fix links on core/README.md

add readme badges for bintray

Nits and formatting of README (#23)

ran scalafmt, fixed format in secp readme
2019-01-08 09:29:06 -06:00
Nadav Kohen
cc04732e41 RpcRetryException (#274)
* Created RpcRetryException for better error messages on RpcUtil timeouts

* De-duplicated RpcUtil

* Ran scalafmt

* Fixed an import and a version
2019-01-07 16:49:17 -06:00
Torkel Rogstad
1301336231 Adds typesafe-config parsing of bitcoin.conf (#279)
* Adds typesafe-config parsing of bitcoin.conf

Adds ZmqConfig trait

* Only add datadir if not present

* Use old and new config settings
2019-01-07 09:30:59 -06:00
Nadav Kohen
4b8cebf3a4 Added scalafmt and ran it (#264) 2018-12-09 14:43:31 -05:00
Chris Stewart
18986b620d Lightning Network (#256)
* Implementation of LnCurrencyUnit

Fix unary and unneeded comments.

Refactor and change arithmetic to use PicoBitcoins.

Add property based testing for LnCurrencyUnits

Refactor LnCurrencyUnits after code review

Fix case and change LnPolicy to val

Remove division and add Unit tests

* Add additional unit tests and deserialization

* WIP: Implement LnHumanReadablePart (#190)

* Initial Implementation of LnHumanReadablePart

* Add unit tests and improve deserialization from string

* Refactor LnParams and LnHrp. Add requirements for instantiating LnHrp.

* Clean up and re-organize things

Re-working LnHumanReadablePart.fromString

Fix unnecessary pattern match

Removing test case

* Created eclairRpc project (#193)

Added getinfo functionality

Added connect functionality

Added most of the rpcs

Added send and checkpayment functionality

Added updaterelayfee functionality

Fixed compile errors

Ran scalafmt

Added DaemonInstance and start/stop methods

Added TestUtil

Added open test

Fixed typo in allUpdates

Fixed ChannelResult

Add eclair prefix to rpc stuff

open channel unit test passing

Adding instructions to grab default eclair in build

Add zmq config to bitcoin.conf

rename test log files, bump timeouts on connections

Add eclair-rpc README, rework some RpcUtil/TestUtil stuff for async

fixing bug in precious block, addressing code review

Address more code review comments

* Add NodeId, NodeUri, ChannelId (#196)

refactor json serializing methods to SerializerUtil, add more types

* Adding LnCurrencyUnit types to rpc api, fixing bug where eclair tests were not binding to a random port for zmq (#198)

Remove start stuff

* Adding more rpc tests, testing open, payment over channel, and closing of the channel (#199)

Add checkpayment tests

Address code review, create EclairTestUtil.createNodPair

* Two way eclair transactions sanity test (#200)

* Added a test for sending payments in both directions

* Updated travis bitcoin core version

* Initial LnInvoice Implementation (#194)

Start typing some ln invoice stuff

Add support for Fallback Address encoding

Part 1: Breaking out Bech32 specific functions into a util class, don't embed in Bech32Address

re-naming fromBase8ToBase5 -> from8BitTo5bit

Part 1: Breaking out Bech32 specific functions into a util class, don't embed in Bech32Address

rework ln invoices tags

fix more method names in Bech32

Rename ScriptPubKeyTag -> NodeIdTag

All invoice tags tests passing except weird serialization order one

Address code review, add some more comments

rename 'LnInvoiceTags' -> 'LnInvoiceTaggedFields'

create a UInt5 type to represent all of the bech32 data structures

Passing all serialization in the BOLT11 examples

First cut at deserialization

* Adding bitcoin-s types to the eclair-rpc, fixing bug with decoding numbers, refactoring more things (#204)

* Switch bech32 p2wpkh hash from RipdeMd160 -> Sha256Hash160Digest (#206)

* Add testkit project / dependency (#209)

fix core-gen build.sbt name

* add correct dependencies to testkit (#210)

* Get dep name right (#211)

* Add serialization symmetry property for LnInvoice, fixing various bugs in LnInvoice data structures, adding generators for various LnInvoice data structures (#217)

* Reworking AuthCredentials and Instances so that we can read from config files (#218)

add core files that were missing

* Reworking a lot of testkit data structures to be more helpful for testing (#219)

Add missing EclairApi file

remove noisy log

* Rebase onto master, fix testkit compile issues

* Simplify LnCurrencyUnit, add MilliSatoshis, refactor EclairRpc to use… (#226)

* Simplify LnCurrencyUnit, add MilliSatoshis, refactor EclairRpc to use MilliSatoshis

* Add some helper functions around millisatoshis for comparing them to other things

* more tests / helper methods, at generator for millisatoshis

* Fix typo

* Fix comparison operators for millisatoshis, add Writes for MilliSatos… (#227)

* Fix comparison operators for millisatoshis, add Writes for MilliSatoshis in JsonWriters

* re-add comparison operators to LnCurrencyUnit for convinience

* Add millisatoshi reads (#228)

* Updating version of eclair to https://github.com/ACINQ/eclair/releases/download/v0.2-beta8/eclair-node-0.2-beta8-52821b8.jar (#229)

* Derive nodeId from ln invoice signature, move nodeid case class into … (#230)

* Derive nodeId from ln invoice signature, move nodeid case class into the core project

* Add missing assert

* Fix null pointer exception that could occurred during requiring the invoice's signature to valid. This could occurr if a user tried to construct an invoice with an invalid signature (#233)

* Turn down logging / remove logging (#235)

* Cleaned up eclair conf (#237)

* Cleaned up eclair conf

* Added test for bad auth and Reads for LnInvoice

* WIP: rebase onto master with new compiler opts

fix more compiler warnings with testkit

* fix new compiler warnings for scalac 2.12.x on ln (#253)

* fix new compiler warnings for scalac 2.12.x on ln

* fix missing p2wpkhoutput in rawoutput testkit/CreditingTxGen.scala

* First cut at code review for the ln branch (#258)

Fix bug in parsing the LnTagPrefix.CltvExpiry, add properties that check if the NodeIdTag is given explicitly to the invoice

remove dumb invariants

revert version

* 2018 12 4 ln code review rd2 (#259)

* Amend EclairRpc test case for confirming that channel is closed

* Add final check to test case to make sure the bitcoind wallet received funds when closing channel

* Address Torkel's code review

* Addresses some review on #256 (#260)

* Docstring cleanup, small nits

* Refactors some redudant data, nested if => switch

* Fixes SO error by reversing remowal of `new`

* Fixes a couple of bugs

* map.get instead of list.find

* StringBuilder in HRP

* Rework NetworkParam to LnParam

* Cleanup

* Renames file to match trait/object name

* Docstring cleanup, pure formatting

* Simplifies a few expressions, doesn't change semantics

* Adds overloaded findRoute method instead of Either[NodeId, LnInvoice]

* Eclair cleanup

* Address concerns from Chris

* Type annotation to match case

* Address nadav's code review
2018-12-08 11:03:24 -05:00
Chris Stewart
88e9b0b1df Add compiler options for the Compile scope 2018-11-18 18:37:26 -05:00
Torkel Rogstad
fc6498c0fb Bitcoind spawn tweaks (#221)
* Test for single node creation

* Passes parameters explicitly to bitcoind
2018-10-17 17:49:40 -04:00
Nadav Kohen
6a3eb80bfc Moved TestUtil in test to RpcUtil in main, added alternative to awaitCondition that uses the ActorSystem scheduler instead of Thread.sleep (#191)
Altered awaitCondition to use scheduler instead of Thread.sleep

Added initial tests and fixed initial bugs

Added tests for awaitCondition and createNodePair/deleteNodePair

Minor tweaks to RpcClientTest

Moved some code back into TestUtil and got rid of TestUtil and RpcUtil actor systems

Refactor retryUntilSatisfied, make duration parameters have type FiniteDuration

Made timeouts configurable and added docs

Fixed dumb bug
2018-09-07 07:16:02 -04:00
Chris Stewart
2d72eb5459 Add 'Bitcoind' prefix to all bitcoind specific rpc stuff (#192) 2018-09-06 16:12:55 -04:00
Daniel James
5b5852bf72 scodec
Migration to scodec

Src is compiling

tests compiling

All unit tests passing now

fix compiler issue in ScriptParser

bump timeout to run on travis ci

Fixing two unit tests that had types failing

Turn down excessive logging

Uncomment rpc tests

fixing nits
2018-08-09 21:32:17 -05:00
nkohen
e2d92a18e3 Fixed endianness bugs 2018-06-25 13:53:59 -05:00
nkohen
8ee3aab58a added travis integration, added awaitSync to createNodePair, cleaned up RpcAddressReads and TransactionInputReads, added ScripSignatureReads, made sure all tests run all assertions as intended 2018-06-25 13:38:40 -05:00
nkohen
e682e23449 Made AddressType an ADT instead of an Enumeration, made datadir a File instead of a String, fixed listSinceBlock (allowing for no header hash to be given), cleaned up signRawTransaction, factored out checkUnitError function in parseResult, removed unused imports, fixed getBlockHash test, ran scalafmt, and responded to some minor changes from code review 2018-06-25 09:56:37 -05:00
nkohen
a9162a3f4d Began work on replacing bad uses of Thread.sleep 2018-06-25 09:56:37 -05:00
nkohen
04bace39d0 Added implementation and test for getBlockTemplate, replaced filter(...).head with find(...).get (performs better), and ran scalafmt 2018-06-25 09:56:37 -05:00
nkohen
0198124259 Added tests for bumpFee and combineRawTransaction 2018-06-25 09:56:37 -05:00
nkohen
e9d6d6410a Refactored JsonModels to follow bitcoind's organization as specified by the help rpc 2018-06-25 09:56:37 -05:00
nkohen
1718e04f00 Removed remaining unsafe cases in JsonReaders 2018-06-25 09:56:37 -05:00
nkohen
79a3917adc Added tests for abortRescan, getAccount, getAccountAddress, getChainTxStats, getReceivedByAccount, listAccounts, listReceivedByAccount, listWallets, logging, move, rescanBlockChain, saveMemPool, setAccount, and uptime 2018-06-25 09:56:37 -05:00
nkohen
b4c3e2ac57 Added implementations (and not tests yet) for getchaintxstats, savemempool, logging, uptime, combinerawtransaction, estimatefee, abortrescan, getaccount, getaccountaddress, getreceivedbyaccount, importpubkey, listaccounts, listreceivedbyaccount, listwallets, move, rescanblockchain, and setaccount 2018-06-25 09:56:37 -05:00
nkohen
61148955b3 Added tests for importAddress, listAddressGroupings, listLockUnspent, listReceivedByAddress, listUnspent, and lockUnspent 2018-06-25 09:56:37 -05:00
nkohen
3c9e52e881 Fixed some test failures (client.generate(200) from beforeAll was interfering with some tests), made debug info better, and added tests for getMemPoolAncestors and getMemPoolDescendants 2018-06-25 09:56:37 -05:00
nkohen
6938a882f7 Added tests for fundRawTransaction, sendFrom, sendToAddress, sendMany, abandonTransaction, getRawTransaction, getTxOut, getTxOutProof, verifyTxOutProof, and getAddressesByAccount 2018-06-25 09:56:37 -05:00
nkohen
00c2abcd48 Added tests for createMultiSig, addMultiSig, decodeScript, importPrivKey, signMessage, signMessageWithPrivKey, verifyMessage, importMulti 2018-06-25 09:56:37 -05:00
nkohen
e7ad9500da Added tests for getPeerInfo, getAddedNodeInfo, setBan, listBanned, and clearBanned 2018-06-25 09:56:37 -05:00
nkohen
88779365d3 Replaced InetAddress and InetSocketAddress with URI 2018-06-25 09:56:37 -05:00
nkohen
a537a7ef91 Added tests for encryptWallet, walletLock, dumpWallet, and backupWallet 2018-06-25 09:56:37 -05:00
nkohen
b3be4d2a14 RpcClient now depends on a DaemonInstance and the tests start up their own bitcoind instance, test, and then shut it down; all in a tmp directory (which gets deleted) 2018-06-25 09:56:37 -05:00
nkohen
c5362b1495 Added tests for getNetTotals and getRawMemPoolWithTransactions 2018-06-25 09:56:37 -05:00
nkohen
7f0412a784 Cleanup: Got rid of dummy variables (they are hardcoded for backwards compatibility now), replaced JsArray(vector.map(Json.toJson(_)) pattern with Json.toJson(vector.map), and ran scalafmt 2018-06-25 09:56:37 -05:00
nkohen
3630bf1b00 Added functionality for importmulti, getpeerinfo, getrawmempool (verbose), getnettotals, getmempooldescendants, getmempoolancestors, and sendmany 2018-06-25 09:56:37 -05:00
nkohen
a6dd90ef5f Aaaaaand more tests 2018-06-25 09:56:37 -05:00
nkohen
0b06370d65 Formatted using scalafmt 2018-06-25 09:56:37 -05:00
nkohen
bce491f5ec Added a bunch of tests 2018-06-25 09:56:37 -05:00
nkohen
53a617fea6 Made many changes as requested by Chris Stewart in code review 2018-06-25 09:56:37 -05:00
nkohen
2a7c19b4dc Split signRawTransaction into signRawTransactionWithKeys and signRawTransactionWithWallet and added tests for decodeRawTransaction and signRawTransactionWIthWallet 2018-06-25 09:56:37 -05:00
nkohen
33f57f4a3e Added getblockchaininfo and createrawtransaction functionality with tests (also fixed bug where bip125-replaceable needed to be read into field called bip125_replaceable) 2018-06-25 09:56:37 -05:00
nkohen
1df9efe464 Created separate Payment objects for listTransactions and listSinceBlock to avoid Scala's limit of 22 parameters 2018-06-25 09:56:37 -05:00
Nadav Kohen
e392c5c9b6 Added functionality for many rpc calls (still no tests for them though) 2018-06-25 09:56:37 -05:00
Nadav Kohen
9238f46d31 Added functionality for getrawmempool, getrawtransaction, gettransaction, importaddress, importprunedfunds, listaddressgroupings and listlockunspent 2018-06-25 09:56:37 -05:00
Nadav Kohen
344c6fc47b Added fundrawtransaction functionality 2018-06-25 09:56:37 -05:00
Nadav Kohen
c24d61c41a Cleanup and type fixes 2018-06-25 09:56:37 -05:00
Nadav Kohen
260f554ced Added setban, getblock and decodescript functionality. Changed all Arrays to Vectors 2018-06-25 09:56:37 -05:00
Nadav Kohen
8d56ebdcda Cleanup: Fixed some types, bitcoindCall now takes a List instead of a JsArray(List(_)) 2018-06-25 09:56:37 -05:00
Nadav Kohen
11b469e36f Cleanup: Moved all case classes out of RpcClient and made implicit ActorMaterializer and ExecutionContext be given when instantiating the client instead of with every call. 2018-06-25 09:56:37 -05:00
Nadav Kohen
9db6436573 Cleanup 2018-06-25 09:56:37 -05:00
Nadav Kohen
6589bf495f Added (untested) implementations of a ton of rpc calls 2018-06-25 09:56:37 -05:00
Nadav Kohen
7f0d82c307 Cleanup of RpcClient, now every call is a single line of code! 2018-06-25 09:56:37 -05:00
Nadav Kohen
192cad120e Added generate and getblockheader functionality 2018-06-25 09:56:37 -05:00