Commit Graph

1595 Commits

Author SHA1 Message Date
Chris Stewart
00eafd9970 Use the fact that network headers specify the number of bytes in the … (#783)
* Use the fact that network headers specify the number of bytes in the payload rather than just parsing from bytes.size, this should allow us to be more precise when parsing NetworkPayloads rather than _hoping_ that bytes.size does not land on pseudo-valid NetworkPayload. This hopefully resolves #782

* Add safety check around HeadersMessage.toString()

* Add invariant to NetworkMessage saying payloadSize in header must be the actual payload size
2019-10-06 09:48:53 -05:00
rorp
d390de323c Optimize org.bitcoins.chain.blockchain.BaseBlockChain (#781)
* Optimize org.bitcoins.chain.blockchain.BaseBlockChain

* remove toStream calls

* cleanup

* fix IndexOutOfBoundsException
2019-10-06 09:47:02 -05:00
Scala Steward
fd91fc37e2 Update sttp:core to 1.6.8 (#773) 2019-10-06 09:33:31 -05:00
rorp
f4cedece68 Disable OSX neurtino tests in CI (#777)
* Disable OSX neurtino tests in CI

* fix command line

* fix travis config

* revert .travis and mark NeutrinoNodeTest as @DoNotDiscover
2019-10-06 09:30:08 -05:00
Chris Stewart
56107ac13e Add a log at INFO level to indicate we are making progress while syncing (#780)
* Add a log at INFO level to indicate we are making progress while syncing

* Adjust sync log message to INFO in p2p code

* Fix off by one error

* Run scalafmt
2019-10-03 14:57:02 -05:00
rorp
f4b21043eb Fix bitcoind version for eclair tests (#778) 2019-10-03 13:16:23 -05:00
Chris Stewart
e819baf0dd Reduce GCSTest by more, remove unused warnings when using scala console from sbt (#779) 2019-10-03 09:46:43 -05:00
Scala Steward
2fb9d163f3 Update sbt-bloop to 1.3.3 (#775) 2019-10-03 08:37:10 -05:00
rorp
dac3b0091c Remove bitcoind dependency from node (#770)
* Remove bitcoind dependency from node

* addded some comments
2019-10-01 14:11:47 -05:00
Chris Stewart
9b1caa6561 Remove isInitialized() check in sendMsg, which was causing a deadlock (#763)
* Remove isInitialized() check in sendMsg, which was causing a deadlock

* Enable akka logging to help debug NeutrinoNodeTest

* Revert to bypassing the isInitialized() check in sendMsg()

* Run scalafmt again
2019-10-01 06:25:03 -05:00
rorp
7e19a706de Make tests to not require pre-installed bitcoind (#766)
* Make tests to not require pre-installed bitcoind

* update docs
2019-10-01 06:19:11 -05:00
Chris Stewart
eefbc37a81 2019 09 28 common test trait (#767)
* Create base traits for async tests called BaseAsyncTest, and then create two subtypes, BitcoinSAsyncTest and BitcoinSAsyncFixtureTest to make it easier to manage resources related to test cases. Now it is easier to shutdown things like an actor system in a structured manner

* Remove two bitcoind tests that don't make sense, 'duration' in the parameter is _really_ an interval (bad naming by usTesting an interval does not make sense inside of TestRpcUtilTest

* Turn log off for ChainAppConfigTest we expect to fail

* Bump timeout for BitcoinSUnitTest, use builtint sbt scalafmtCheck

* Remove hardcoded scalafmt binary

* reduce generator size to attempt to fix #768
2019-09-30 14:55:25 -05:00
Chris Stewart
97472930d0 2019 09 27 logging refactor pt2 (#765)
* Remove AKKA_CONFIG that was preventing sane logging for akka, move db-commons reference.conf to testkit so we can control testkit applications, and then rename app/server/.../application.conf to reference.conf like good libraries should do

* Update contributing.md

* update a few more links inside of contributing.md

* Run scalafmt
2019-09-28 09:50:42 -05:00
Chris Stewart
f65f11aead Add akka logging documentation to our contributing.md (#764) 2019-09-27 10:56:16 -05:00
Nadav Kohen
0611f27c25 Removed the sealed trait and private case class Impl pattern from ScriptPrograms (#759) 2019-09-26 07:31:54 -05:00
Chris Stewart
a945131af9 Run scalafmt (#762) 2019-09-26 07:31:30 -05:00
Chris Stewart
09ebdcea66 Remove hard coded log level in test app config (#757)
* Remove hard coded log level in test app config

* Change log level in default reference.conf to WARN so we have the same log level as before
2019-09-25 15:47:27 -05:00
rorp
74a44d1c4d Initial BIP157 support (#695)
* WIP: Initial BIP157 support

* store block hash and hetgh along with its compact filter header

* download and parse block filters

* getcfilters/cfilter

* cfilter table

* rescan full filter chain

* improved rescan performance

* optimize compact headers download

* addressed the PR comments

* split SVP and Neutrino node implementations

* configurable filter batch sizes

* initial filter sync

* addressed comments

* chage filter table's primary key

* fix Golomb filter deserialization

* batch database inserts

* neutrino node test

* fixed node test

* addressed the PR comments

* serializers tests

* cleanup

* fix compilation errors

* fix unit tests

* increase test coverage

* enable NeutrinoNodeTest

* make scalafmt happy

* don't cache experimental binaries

* inclease test coverage

* fix unit tests

* more granular CI tests

* disable NeutrinoNodeTest

* refactor tests

* addressed comments

* test coveage

* fix formatting

* responded to the comments

* some more changes

* fix the build

* test coverage

* revert testnet3 config parameter

* minor changes

* cleanup
2019-09-25 13:18:51 -05:00
Chris Stewart
3500978bae Fix bug where we were sending messages before we were fully initialized (#755)
* Fix bug where we were sending messages before we were fully initialized

* Move the pattern match out of isInitialized() future in sendMsg()
2019-09-24 09:43:27 -05:00
Scala Steward
fe6d0e637b Update sbt to 1.3.2 (#752) 2019-09-22 17:21:07 -05:00
Scala Steward
42c1097a15 Update akka-http, akka-http-testkit to 10.1.10 (#751) 2019-09-22 16:11:21 -05:00
Chris Stewart
3860bb16dc bump scalac version to 2.12.10 (#743)
* bump scalac version to 2.12.10

* bump scalac version to 2.12.10 in .travis.yml
2019-09-17 04:08:20 -05:00
Scala Steward
ff703592d2 Update sbt-scalafmt to 2.0.5 (#744) 2019-09-17 03:45:36 -05:00
Scala Steward
ae62136b22 Update sbt-ci-release to 1.3.2 (#745) 2019-09-17 03:45:18 -05:00
Scala Steward
99bf83d852 Update sttp:core to 1.6.6 (#741) 2019-09-10 01:27:38 -05:00
Scala Steward
a979fd1b7e Update sbt-scalafmt to 2.0.4 (#738) 2019-09-06 08:13:18 -05:00
Chris Stewart
67ead0bc7e 2019 09 05 scalafmt update (#735)
* Update scalafmt to 2.0.1

* Scalafmt

In this commit we
1) Reconfigure the .scalafmt.conf file
2) Add a scalafmt binary (same version as specified in conf file)
3) Use said binary on CI to check that everything is formatted correctly

* Ran scalafmt

* Update scalafmt ignore

* Add scalafmt plugin to project/plugins.sbt, run it

* run scalafmt
2019-09-05 20:02:58 -05:00
rorp
244b4863ba Fix WalletRpcTest (#736) 2019-09-05 16:09:11 -05:00
Chris Stewart
642a3366b1 Add receiver param to BitcoindRpcTestUtil.fundBlockChainTransaction() (#737)
* Add receiver param to BitcoindRpcTestUtil.fundBlockChainTransaction()

* Actually implement awaiting for the hash to be seen
2019-09-05 13:18:32 -05:00
Chris Stewart
d4ccc2c441 2019 09 05 v18 rpc (#734)
* This is for colin

* Fix remaining errors on V18 RPC calls

* remove unused code final formatting fix

* implemented fixed listwalletdir rpc test

* responding to code review and replacing flatmaps
2019-09-05 09:15:00 -05:00
Scala Steward
3aec12df6b Update sbt to 1.3.0 (#732) 2019-09-05 07:55:03 -05:00
rorp
4613d500e2 Make WalletRpcTest more determenistic (#731) 2019-09-04 06:51:33 -05:00
Torkel Rogstad
de39caf174 Add rudimentary docs for node, chain and wallet (#726) 2019-09-02 08:16:44 -05:00
Torkel Rogstad
e0a5646258 Deprecate generate (#728) 2019-09-01 07:46:38 -05:00
Torkel Rogstad
8a58d7dde8 Make it possible to construct RPC client without ActorSystem (#725) 2019-08-30 15:12:18 -05:00
Torkel Rogstad
f6ed565c14 Refactor sbt and make Eclair tests download bitcoind (#727) 2019-08-30 15:11:52 -05:00
Chris Stewart
d810e17324 Remove BlockchainBuilder, speed up ChainHandler test that processes m… (#723)
* Remove BlockchainBuilder, speed up ChainHandler test that processes mainnet headers, add test for ChainAppConfig

* Add test for BlockHeaderDAO.getAncestorAtHeight()

* Consolidate ChainAppConfigTest, add ScalaTestUtil to help with working with scalatest, speed up ChainHandlerTest a bit more
2019-08-27 12:29:22 -05:00
Torkel Rogstad
2f7fb05f96 Build and CI improvements (#710)
* Build and CI improvements

In this commit we:

1) Parallelize the Travis CI config, by splitting
    each project into its own Travis task
2) Download bitcoind binaries through sbt

* Use binaries downloaded by sbt task

* Make BitcoindRpcTestUtil work on Travis without bitcoind on PATH

* Add new downloadEclair task to sbt

* use sbt downloaded binaries in tests

* Fix Eclair and Bitcoind tests
2019-08-27 10:48:48 -05:00
Torkel Rogstad
5e9b26bbab Remove untyped CryptoUtil methods (#722)
Types are our friends:-)
2019-08-27 06:32:50 -05:00
Scala Steward
2ced3b1bf9 Update sttp:core to 1.6.4 (#664) 2019-08-26 13:54:56 +02:00
Scala Steward
7260789812 Update sbt-mdoc to 1.3.2 (#720) 2019-08-26 13:39:02 +02:00
Scala Steward
d50225d010 Update flyway-sbt to 6.0.0 (#719) 2019-08-23 18:44:42 -05:00
Torkel Rogstad
c2f37335b8 Bump Scala versions (#697)
* Bump Scala versions

Support Scala 2.12.9
and 2.13.0.

To make this easier, we delete the `scripts` project. Everything
that was in here was covered by content on the website. We also
delete the `doc` folder, as that was a remnant from when `scripts`
was called `doc`.

* Crib uPickle akka-http support while we wait for publish

* Fix compiler warnings

* Add note on test logging to contribution guide

* Reduce duplication in Blockchain implementation

* Use Scala 2.12 for website

* Introduce compat package object for collections converters

* Fix Either compiler warnings

* Add sync-chain and create-wallet docs from deleted scripts

* Fix rebase goofup
2019-08-23 13:53:00 -05:00
Scala Steward
b6a73d01ef Update flyway-sbt to 5.2.4 (#715) 2019-08-23 12:55:14 -05:00
Chris Stewart
db18a4bfa4 fix monitor invoice timing out in #693 (#718)
* fix monitor invoice timing out in #693

* Bump timeout more
2019-08-23 11:57:53 -05:00
Torkel Rogstad
2f5d4db1b2 Bump test coverage (#713)
* Bump test coverage

* Lower test coverage requirement for chain
2019-08-23 18:32:55 +02:00
Chris Stewart
2238308201 2019 08 16 process header optimization (#701)
* WIP: implement processHeaders() in ChainHandler instead of processHeader()

* Create ConnectTipResult which is returned from Blockchain.connectTip(), this decouples 'BlockchainUpdate' and Blockchain.connectTip(). This was needed because it doesn't make sense to have a Vector[BlockHeaderDb] returned from Blockchain.connectTip() as we are validating one header. However, to execute batch inserts, we need to accumulate headers somewhere. I choose to do this in BlockchainUpdate with the 'successfulHeaders' field.

* make chain-verification log level INFO

* Add unit test for benchmarking ChainHandler.processHeaders() that cuts out extraneous noise in another test case

* Address code review
2019-08-23 05:48:09 -05:00
Scala Steward
61fc6e16e3 Update sbt-native-packager to 1.4.0 (#711) 2019-08-22 09:56:34 -05:00
cwaldron97
47644b7910 (WIP) Createwallet rpc from V17 (#712)
* create wallet rpc

* fixed test

* change to createwallet test

* create wallet test
2019-08-21 16:34:11 -05:00
Chris Stewart
cf3c63e780 Use transactionally when inserting data into our database with createAll (#708) 2019-08-21 06:28:28 -05:00