Commit Graph

1541 Commits

Author SHA1 Message Date
Torkel Rogstad
09caeb4854 Merge pull request #516 from torkelrogstad/2019-06-12-trezor-test
Generate test vectors from Trezor
2019-06-25 13:08:49 +02:00
Torkel Rogstad
505d3cbaa1 Fix Scala 2.11 complaints 2019-06-25 11:58:18 +02:00
Torkel Rogstad
1b2a959d54 Make AesSalt a factory object 2019-06-25 11:39:20 +02:00
Torkel Rogstad
161db9ff92 Add toBase64/fromBase64 to AesEncryptedData 2019-06-25 11:39:17 +02:00
cwaldron97
4345ddbb1e fixed compiler errors 2019-06-24 15:50:51 -05:00
Nadav Kohen
95dad1fc1d Made GolombFilter extend NetworkElement (#549) 2019-06-24 14:43:04 -05:00
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
Torkel Rogstad
334d410220 Fix CoinSelectorTest after rebase 2019-06-24 17:45:31 +02:00
nkohen
269d3c8f21 Implemented simple greedy coin selection
Added tests for current coin selection algorithm options

Responded to code review

Implemented fee estimation calculation in coin selection

Updated tests after rebase

Fixed CoinSelectorTest

Fixed CoinSelectorTest after rebase
2019-06-24 17:41:43 +02:00
Torkel Rogstad
77d056e5fa Add REPL.it link to AesCryptTest 2019-06-24 17:37:03 +02:00
Torkel Rogstad
f93b8cadbe Update wallet project to work new AES changes 2019-06-24 17:25:11 +02:00
Torkel Rogstad
d58f3dc715 Update AesCrypt to work with keys
In this commit we update our AesCrypt
functionality to work with AES keys rather
than passphrases that are extended to keys.
This makes it easier to integrate with other
languages, as the key stretching introduces
a bunch of additional parameters to the
actual AES encryption.

We also include tests that verify that we're
able to encrypt/decrypt using Bitcoin-S,
Crypto-JS (JavaScript), pycrypto (Python)
and OpenSSL CLI.
2019-06-24 17:21:41 +02: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
1f363b4586 Merge pull request #545 from torkelrogstad/2019-06-21-ga
Add GA tag
2019-06-21 09:54:52 +02:00
Torkel Rogstad
255f016585 Add GA tag 2019-06-21 09:53:14 +02: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
89e3f7dc38 Add explanatory comment about account creation process 2019-06-20 14:55:06 +02:00
Torkel Rogstad
4eb5aacae6 Remove ??? from GetAddresses 2019-06-20 14:53:07 +02:00
Torkel Rogstad
0621088f41 Refactor TrezorAddressTest 2019-06-20 14:52:13 +02:00
Torkel Rogstad
5819f4016e Trezor test vectors
In this commit we add:

1) A program for dumping a bunch of address
   information from a running Trezor
2) A test in the wallet module that verifies
   that our addresses line up with the ones
   Trezor generates
2019-06-20 14:29:50 +02:00
Torkel Rogstad
3fe9a466b1 Add createNewAccount to wallet 2019-06-20 14:26:49 +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