Commit Graph

1460 Commits

Author SHA1 Message Date
Chris Stewart
90dbb9d9f8 qAddress issue where source and target fields don't work completely for jdk 9+ when trying to target jvm 1.8 (#636) 2019-07-16 14:58:36 -05:00
Chris Stewart
220d8d160e Scope the targetting of code only to compiling code, instead of including things like javadoc generation (#632) 2019-07-16 11:32:27 -05:00
Torkel Rogstad
393a531f8a Merge pull request #630 from torkelrogstad/2019-07-16-false-positives
Remove assertion on irrelevant TX
2019-07-16 17:15:11 +02:00
Torkel Rogstad
5194fb1f8b Merge pull request #594 from torkelrogstad/2019-07-10-bloom
Add all wallet outpoints to bloom filter
2019-07-16 17:07:21 +02:00
Chris Stewart
5bbcc33cb6 Target jvm 1.8 with test files along with source files (#631) 2019-07-16 09:10:50 -05:00
Torkel Rogstad
4b95383020 Merge pull request #612 from scala-steward/update/sbt-mdoc-1.3.1
Update sbt-mdoc to 1.3.1
2019-07-16 15:53:03 +02:00
Torkel Rogstad
19847d4ab4 Merge pull request #604 from scala-steward/update/sbt-api-mappings-3.0.0
Update sbt-api-mappings to 3.0.0
2019-07-16 15:50:06 +02:00
Scala Steward
2b03665fd8 Update sbt-mdoc to 1.3.1 2019-07-16 15:33:28 +02:00
Scala Steward
7fd6078992 Update sbt-api-mappings to 3.0.0 2019-07-16 15:32:58 +02:00
Torkel Rogstad
dcd4cf3132 Remove assertion on irrelevant TX
Due to how bloom filters work (they give false
positives) it's meaningless to assert on _not_
receiving a transaction from our peer. In most
cases we're not going to receive an irrelevant
TX, but if it happens we can't be sure if it's
because we did something wrong or because we
just hit a false positive.
2019-07-16 14:29:01 +02:00
Torkel Rogstad
45a3e93a3d Add all wallet outpoints to bloom filter
This is a workaround for Bloom filters never being
updated for SegWit. See comment in
LockedWallet#getBloomFilter for more context.
2019-07-16 14:18:29 +02:00
Chris Stewart
7a21a8d2ff Make sure our secp256k1jni package is compiled against java 8 (#629)
* Make sure our secp256k1jni package is compiled against java 8

* revert submodule
2019-07-16 07:07:36 -05:00
Torkel Rogstad
98db3def4c Merge pull request #590 from torkelrogstad/2019-07-10-addresses
Add notion of address types in wallet
2019-07-16 14:01:03 +02:00
Scala Steward
50e3a4747a Update sqlite-jdbc to 3.28.0 (#616) 2019-07-16 06:18:40 -05:00
Torkel Rogstad
c9912af46b Merge pull request #598 from torkelrogstad/2019-07-11-bitcoind-exception
Add types for various bitcoind RPC exceptions
2019-07-16 13:08:53 +02:00
Torkel Rogstad
4bdc7966d0 Add notion of address types in wallet
In this commit we
1) Add the notion of address types in the wallet, and remove
    the emphasis on account types. Users now just request
    a segwit/nested-segwit/legacy address, and we take care
    of querying for the correct account
2) Fix a bug where a wallet could only get addresses for
    its default address type. This was a pretty minor bug,
    where a few values that should have been dynamic was
    hard coded.
2019-07-16 12:36:38 +02:00
Torkel Rogstad
eb3fbbb259 Add types for various bitcoind RPC exceptions
In protocol.h (Bitcoin Core) all RPC errors are enumerated. The
exceptions added here are copied directly from that file.
2019-07-16 12:20:24 +02: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
Scala Steward
e8c334da87 Update sbt-bloop to 1.3.2 (#602) 2019-07-15 09:14:42 -05:00
Chris Stewart
a4e574aac3 2019 07 15 rm cli testkit (#625)
* re-add skip publishing for the cli, remove the dependency from the testkit

* Apply common settings to picker project
2019-07-15 08:04:42 -05:00
Chris Stewart
f52ab2d8d7 Favor publishing 2.12 artifacts first in bitcoin-s, so if something fails with the 2.11 build we get the 2.12 artifact first (#624) 2019-07-15 06:27:05 -05:00
Chris Stewart
d67aec8ebb If we don't publish these three subprojects, testkit cannot be used as a dependency for other applications (#621) 2019-07-14 07:27:59 -05:00
Torkel Rogstad
4f4636448c Node cleanup (#591)
* Cleanup

In this commit we cleanup a few Scaladocs and change some
trait/impl pairs into just a case class.

* Node cleanup

In this commit we
1) Rename Client to P2PClient. Client is a very generic name.
2) Clean up some Scaladocs
3) Remove some unecessary objects/traits/classes and replace them
    with case classes
4) Add trace logging of bytes received in P2PClient
2019-07-13 09:26:00 -05:00
Scala Steward
9c61820b90 Update native-lib-loader to 2.3.4 (#614) 2019-07-13 08:08:23 -05:00
Scala Steward
3d8314556a Update slick, slick-hikaricp to 3.3.2 (#607) 2019-07-13 08:06:47 -05:00
Chris Stewart
8bee7b6355 Attempt to fix .get exception in docs.sbt (#620) 2019-07-13 08:06:32 -05:00
Scala Steward
c17d808a90 Update scodec-bits to 1.1.12 (#615) 2019-07-13 07:55:06 -05:00
Scala Steward
2eebe22b44 Update scalatest to 3.0.8 (#613) 2019-07-12 17:38:55 -05:00
Scala Steward
35092d6214 Update play-json to 2.7.4 (#605) 2019-07-12 17:38:20 -05:00
Torkel Rogstad
8297a709bf Merge pull request #599 from torkelrogstad/2019-07-11-cookie
Fix bug where cookie auth threw on isStartedF
2019-07-12 15:02:23 +02:00
Torkel Rogstad
71bc9f47a0 Merge pull request #593 from torkelrogstad/2019-07-10-type-identifier
Add more P2P type identifiers
2019-07-12 14:59:56 +02:00
Torkel Rogstad
56737681ad Fix bug where cookie auth threw on isStartedF 2019-07-12 11:05:17 +02:00
Torkel Rogstad
6c2789135e Add more type identifiers
In this commit we add type identifers for P2P
messages we hadn't previously implemented. Note
that these aren't used anywhere yet.
2019-07-12 11:04:15 +02:00
Torkel Rogstad
efc1ce4405 Merge pull request #596 from torkelrogstad/2019-07-11-sbt
Clean up build config and fix CI errors
2019-07-12 10:45:56 +02:00
Torkel Rogstad
48d7bc6c33 Merge pull request #565 from piu130/master
Remove redundant function checkResult and refactor Numbers
2019-07-11 13:01:36 +02:00
Torkel Rogstad
f225d974bd Merge pull request #595 from rorp/eclair_testkit_fix
Some API changes for Eclair test kit
2019-07-11 12:57:48 +02:00
Torkel Rogstad
57fe05ebd2 Clean up build config
In this commit we:
1) Fix a bug where picklers.sbt did libraryDependencies := ...
    instead of libraryDependencies ++= .... This caused Scoverage
    to error, because a dependency it needed got removed.
2) Remove some unused sbt plugins and tasks/settings
3) Add more comments, that cleary explain what's happening.
2019-07-11 12:06:49 +02:00
rorp
684607f510 Some API changes for Eclair test kit 2019-07-10 14:04:54 -07:00
Ramon Boss
c9e1d5b421 format code 2019-07-10 13:52:55 +02:00
Ramon Boss
e34b79562b add scala doc and remove deprecated methods 2019-07-10 13:50:00 +02:00
Torkel Rogstad
30e6d7030f Somewhat dirty standalone server and CLI binary (#558)
* PoC bitcoin-s-cli

* Add CLI, Server sbt projects, remove Ammonite

In this commit we set up sbt configuration for
CLI, Server (in-work-name) and corresponding
test projects.

We also remove Ammonite shell from sbt, as that
isn't really being used. bloop console offers
the same functionality way more ergonimic.

* Move BitcoinSAppConfig into new server project

Server project depends on node, chain wand wallet
so this is a good time for introducing this class
into main sources. We also introduce
BitcoinSTestAppConfig in testkit, to replace the
functionality in BitcoinSAppConfig related to
tests.

* Type chain in blockchainresult

* MVP server setup for node, chain and wallet

* Extremely dirty CLI for interacting with server

* initial attempt at mimicking Bitcoin Core API

* WalletStorage: add method for checking for seed existance

* Check for seed existance on wallet startup

* Fix bug where MnemonicNotFound was not an error

* Segregate confirmed and unconfirmed balance methods

* Add error handling, improve formatting of CLI output

* Tweak build

Bump Sttp version, downgrade to uPickle 2.11 compat,
skip publish in cli-test and server-test

* Add CLI, server and picklers to root project
2019-07-10 06:33:17 -05:00
Torkel Rogstad
2632e1a628 Change size_on_disk to a Long (#584) 2019-07-10 05:38:11 -05:00
Torkel Rogstad
1394ef3409 Merge pull request #587 from torkelrogstad/2019-07-10-teskit-fix
Fix ImplicitsTest
2019-07-10 12:11:31 +02:00
Torkel Rogstad
8756495685 Fix a test we forgot to update 2019-07-10 11:39:00 +02:00
Torkel Rogstad
b2c7389cd4 Merge pull request #586 from cwaldron97/2019-07-09-Small-Windows-Tweak
Fixed Incorrect Windows Default Datadir
2019-07-10 11:28:41 +02:00
Ramon Boss
512f3ab2f3 use of seperate trait Bounded 2019-07-10 08:40:12 +02:00
Ramon Boss
df4507edef implement isInBound for numbers 2019-07-10 08:39:50 +02:00
cwaldron97
1fec083b0b fixed Default datadir 2019-07-09 17:05:55 -05:00
Torkel Rogstad
a71aecec52 Process outgoing transactions (#555)
* Split wallet functionality into multiple traits

In this commit we refactor LockedWallet into multiple traits
that provide functionality related to a subset of total wallet
functionality. This has the benefit of making it clear which
methods are helper methods that are only intended to be used
in a very specific setting, and which methods are part of the
internal wallet API that other parts of the wallet can use.

* Rework TransactionOutput and TransactionOutPoint to case classes

* Add extension methods for flattening lists of assertions

* Segregate confirmed and unconfirmed balance methods

* Add test for FutureUtil.sequentially

* Add trace logging of balance fetching

* Process outgoing TXOs

Move TX processing into separate trait, add internal API method

Unify DB representation of TXOs

    Prior to this commit we stored TXO information
    across diferent tables, with joins and tuples
    needed a bunch of places to keep track of
    everything we needed. In this commit we unify
    the tables, leaving us with only one table for
    TXOs.
2019-07-09 06:25:24 -05:00
Chris Stewart
b1635bd4ac Fix issue with testkit not being able to be resolved since we could n… (#579)
* Fix issue with testkit not being able to be resolved since we could not find db-commons dep

* Avoid publishing aggregate project
2019-07-09 06:01:52 -05:00