Commit Graph

1323 Commits

Author SHA1 Message Date
cwaldron97
a457717eb4 scalafmt 2019-06-24 14:12:47 -05:00
cwaldron97
4288014f68 Changes applied from PR Review 2019-06-24 11:51:50 -05:00
cwaldron97
5ccc025f2e added .map to have SipHashKey Constructor 2019-06-21 17:08:33 -05:00
cwaldron97
0e97ff6ed4 fixed GCSTest file 2019-06-21 16:53:41 -05:00
cwaldron97
276a6701f6 fixed all compiler errors and warning 2019-06-21 16:06:44 -05:00
cwaldron97
bea1cd04fb fixing compilation errors 2019-06-21 15:40:39 -05:00
cwaldron97
67683a7131 added ByteVector import statement 2019-06-21 15:08:47 -05:00
cwaldron97
934e89e662 fixed toArray def 2019-06-21 14:54:58 -05:00
cwaldron97
9aa0c7bc1c SipHashKey case class added 2019-06-21 14:48:47 -05:00
Torkel Rogstad
5cb439df57 Merge pull request #544 from bitcoin-s/torkelrogstad-patch-1
Update bug report template
2019-06-20 18:39:10 +02:00
Torkel Rogstad
c4a8ff506e Update bug report template 2019-06-20 17:26:02 +02:00
Torkel Rogstad
bd98017e61 Merge pull request #543 from torkelrogstad/2019-06-20-cname
Add CNAME to website config
2019-06-20 17:17:38 +02:00
Torkel Rogstad
7b38a74c22 Add CNAME to website config 2019-06-20 17:16:50 +02:00
Torkel Rogstad
98b0a6de08 Merge pull request #542 from torkelrogstad/2019-06-20-website-search
Docs: Add Algolia search to website
2019-06-20 16:46:00 +02:00
Torkel Rogstad
29893019ff Merge pull request #541 from torkelrogstad/2019-06-20-versioned-website
Docs: Versioned website
2019-06-20 16:45:39 +02:00
Torkel Rogstad
d17e3eed1d Docs: Add Algolia search to website 2019-06-20 16:28:55 +02:00
Torkel Rogstad
0fb5af2899 Clean up versions.js 2019-06-20 13:55:29 +02:00
Torkel Rogstad
b0bb5adf22 Add website version for 0.1.0 2019-06-20 13:48:12 +02:00
Torkel Rogstad
0ffee0097e Add versions.js to website 2019-06-20 13:48:12 +02:00
Chris Stewart
a716d374ca Attempt to sync with sendheaders (#537)
* Attempt to sync with sendheaders

Fix sync with headers by generating one block in regtest to get out of IBD

Fix comment

Add more comments

Add missing actor system import

more clean up

* refactor test case to avoid sleeping the thread
2019-06-20 05:58:25 -05:00
Nadav Kohen
67fb821b00 Implemented BIP 157 Block Filter Headers (#532) 2019-06-17 14:52:10 -05:00
Torkel Rogstad
a87858247c Service identifier and node cleanup (#522)
* Log messages more granularely in node

* Add pong message

* Rework P2P service identifier

The old implementation didn't catch the notion
that service identifiers was a bit field where
multiple services could be set at the same time.

* Make Peer take InetSocketAddress

Previously it took NetworkIpAddress.
This doesn't make any sense, as we
need to know the services bitfield
to construct a NetworkIpAddress.

* Clean up logs and toString methods

* Clean up node README and main method

* Make all networks final case objects

* Skip publishing of wallet, node and chain

* Clean up logging of node and chain modules

* Add logging of max height in SpvNodeMain

* Clean up Scaladoc and toStrings

* Add logging configuration as symlinks in node

We'll have to figure out a more stable solution to
configure logging for the SPV node, but for the time
being this is an acceptable solution.

* Fix 2.11 compiler error
2019-06-17 14:27:51 -05:00
Nadav Kohen
c89104bfda BIP 158 Golomb-Rice Coded Sets and block filters (#481)
* Implemented GCS (WIP)

Added some of Chris' tests for golombEncode and golombDecode

Fixed GCS.golombDecodeSet

Separated GCS object from GolombFilter class

Added hanging test for set encoding

Fixed property test for encoding and decoding arbitrary sets

Added test for GCS.buildGCS and hashing function consistency

Added method to construct a Block Filter from a Block

Added scaladocs in GCS.scala

Added TempUtxoProvider to make BlockFilter testable

Wrote a test for GolombFilter.matchesHash

Added test for arbitrary data matching in bip 158 filter

Added optional right-padding on GCS BitVector, BlockFilter.fromHex, and got started on BlockFilterTest

Cleaned up Bip158TestCase.fromJsArray

Fixed parsing of test vectors for bip 158

Wrote test for BlockFilter (doesn't pass)

Responded to some code review

Included CompactSizeUInt in filter

Created BitcoinScriptUtil.getDataTokens for output serialization

Wrote test for BitcoinScriptUtil.getDataTokens

Added test for BitcoinScriptUtil on the genesis block

Fixed name

:(

* Fixed SipHash and block serialization!

* Fixed bugs relating to empty scripts, all tests passgit push --force-with-lease nadav 2019-05-28-bip158 !

* Cleaned up BitcoinScriptUtil.getDataTokens and its test

* Responded to code review

* Factored out common code from BlockFilter apply methods

* Some cleanup
2019-06-17 11:17:20 -05:00
Torkel Rogstad
435aef7b0b Pass bloom filter to SPV node (#514)
* Add getAddressInfo to Wallet API

* Add Bloom filter and event callbacks to SPV node

* Move wallet test trait to testkit

* Test for connecting SPV node with wallet

* Tune logging in SPV node

* Clean up BloomFilter

* Proper toString in inventory and inventorymessage

* Actually pass in callbacks to SPV node

* Fix rebase screwup and partially respond to code review

* Default to file based databases in tests

This is due to issues with deadlocks with
in-memory based databases. We need DBs
to stay alive between connections, but
not across tests.

In DB intensive chain validation tests we
use in-memory databases instead. This
seems like a reasonable tradeoff between
simplicity and speed.

* Make SpvNodeCallbacks contain sequence of functions within

* Make Bloom filter non-optional in SpvNode
2019-06-17 06:48:26 -05:00
Torkel Rogstad
d30a03a50e Revamp README (#513)
* Revampt README

Users are now deferred to Bitcoin-S.org for instructions
on how to use the library. Added a logo that'll hopefully
appear in social media sharing posts.

* Remove IRC, add Maven Central badge to README
2019-06-17 05:53:58 -05:00
Torkel Rogstad
f525f5b53e Merge pull request #519 from rorp/kill_all_bitcoind_instances_after_running
[Tests] Kill all bitcoind instances after running
2019-06-17 09:38:13 +02:00
rorp
aa7f9012af Fixed ClientTest 2019-06-14 10:28:44 -07:00
Torkel Rogstad
fa84c11f52 Default to file based databases in tests (#517)
This is due to issues with deadlocks with
in-memory based databases. We need DBs
to stay alive between connections, but
not across tests.

In DB intensive chain validation tests we
use in-memory databases instead. This
seems like a reasonable tradeoff between
simplicity and speed.
2019-06-14 11:10:36 -05:00
Torkel Rogstad
8fb3d4542b Fix issue where bloop didn't pick up test resources' (#518) 2019-06-14 10:25:58 -05:00
rorp
3a1c9284dc [Tests] Kill all bitcoind instances after running 2019-06-13 19:22:56 -07:00
Torkel Rogstad
6f003e09fb Merge pull request #508 from Christewart/2019-06-10-bump-deps
Bump various dependencies versions for our libraries
2019-06-13 15:06:38 +02:00
Torkel Rogstad
8d141ac450 Generate bloom filters from wallet (#501)
* Add findAll() to CRUD

* Add getAddressInfo to Wallet API

* Insert pubkey into bloomfilter also inserts hash

In this commit we also simplify parts of
BloomFilterTest, and move what used to be in
BloomFilterSpec into BloomFilterTest.

* Add bloom filter generation to wallet

* Add bloom false positive rate to wallet config

* Add logging to SQL errors

* Fix a bug where HDPath.next returned the wrong path

* Add FutureUtil.sequentially

* Make bloom filter size calculation more explicit

* Return Vector of pubkeys instead of Seq

* Verbose handling of address fetching in test
2019-06-12 09:29:20 -05:00
Torkel Rogstad
35b1d726fb Merge pull request #511 from torkelrogstad/2019-06-11-website-guides
Website guides on HD key and address generation
2019-06-11 18:06:13 +02:00
Torkel Rogstad
34a06258ed Cleanup TransactionTest 2019-06-11 18:01:50 +02:00
Torkel Rogstad
6e5ca0eeeb Add sections on generating addresses and expand HD section in website 2019-06-11 18:01:44 +02:00
Torkel Rogstad
6de0ba268e Bump P2P + crypto test coverage (#506)
* Rename P2P tests and move generators into correct package

* Add more tests for P2P messages

* Add note on coverage to contributing guide

* Replace network in P2P header with typed network

* Add more P2P tests

* Add more tests for ECPriv and ECPub
2019-06-11 10:01:46 -05:00
Chris Stewart
e2ec692779 bump play-json version to 2.7.2 2019-06-11 08:47:34 -05:00
Chris Stewart
adfeff504f Bump various dependencies versions for our libraries 2019-06-11 06:39:28 -05:00
Torkel Rogstad
2723ef6f5d Move Logback config into test resources (#509)
I though I had solved our logging problem:
    We want projects to pick up logging config
    in core, without it being published.

The previous attempt was filtering out XML files
from unmanagedResources. That caused the XML
files to not get published, and when running
tests through Bloop everything worked fine.
However, when running them through sbt the
config did not get picked up. I suspect this
is because of a bug in how Bloop exports sbt
builds.

In this attempt we instead move the XML files
to test resources in core, and then make the
test projects depend on test sources in core,
with the awkward syntax 'core % "test->test"'.
2019-06-11 06:38:42 -05:00
Torkel Rogstad
36766089f6 Merge pull request #510 from torkelrogstad/2019-06-11-blog
Docs: removes blog from website
2019-06-11 13:17:33 +02:00
Torkel Rogstad
6b5c5e581c Docs: removes blog from website 2019-06-11 12:59:58 +02:00
Torkel Rogstad
03be955717 Refactor logback configuration to reduce repetition (#499) 2019-06-07 07:29:40 -05:00
Torkel Rogstad
af47809300 Add Scaladoc title and version number (#502)
* Add version and name to Scaladoc

* Compile website on Travis as part of CI
2019-06-07 07:23:32 -05:00
Torkel Rogstad
1ff0dee934 Reshuffle package location of P2P messages (#495)
* Reshuffle package location of P2P messages

Previously the companion objects for P2P messages
and the actual messages were in different pacakges.
This made them more awkward to use than necessary.

We also clean up some Scaladocs in this commit.

* Move all P2P messages to core
2019-06-06 09:13:32 -05:00
Torkel Rogstad
bd10f1c35e Merge pull request #497 from torkelrogstad/2019-06-05-legacy-addresses
Legacy addresses
2019-06-06 16:08:49 +02:00
Torkel Rogstad
5dbfefc7ed Respond to code review on legacy address generation 2019-06-06 15:10:20 +02:00
Torkel Rogstad
346a8a2bcb Merge pull request #498 from torkelrogstad/2019-06-06-bitcoind-debug
Add debug prints to bitcoindCall when not on mainnet
2019-06-06 13:25:27 +02:00
Torkel Rogstad
15da0d3b4c Add debug prints to bitcoindCall when not on mainnet 2019-06-06 13:25:09 +02:00
Torkel Rogstad
8a338d542f Create all root level accounts on wallet creation 2019-06-05 20:01:59 +02:00
Torkel Rogstad
42c161d3e3 Fix bug when overriding configurations
This commit fixes (and adds a test for) a bug
where overriding a value in our configuration
reset the rest of the configuration to the
default values.
2019-06-05 18:37:38 +02:00