Commit graph

1786 commits

Author SHA1 Message Date
Scala Steward
9e7050ee32 Update slf4j-api to 1.7.29 (#848) 2019-11-01 06:11:03 -05:00
Nadav Kohen
3ed4c4aa84 RawScriptPubKey (#843)
* Introduced RawScriptPubKey type

* Responded to code review
2019-10-31 18:34:48 -05:00
Nadav Kohen
20c42795b8 Replace scriptPubKeyToSatisfy with spendingInfoToSatisfy in Signer (#842)
* Replace scriptPubKeyToSatisfy with spendingInfoToSatisfy and made UTXOSpendingInfo ADT nicer

Tightened up types on Signer with a type parameter

Factored out common functionality in Signer

Responded to code review

* More review
2019-10-31 12:17:30 -05:00
Nadav Kohen
ec38acbeb8 GCSTest fix (#845)
* Raised the min p value in GCSTest to avoid large x/2^p values which cause long unary to happen

* Lowered upper bound to 50
2019-10-31 06:21:23 -05:00
Nadav Kohen
310ccbb838 Spending Info ADT use (#840)
* Replaced TxBuilder signAndAddInput match with UTXOSpendingInfo match, tests don't pass

* Fixed tests!
2019-10-30 15:00:41 -05:00
cwaldron97
04edc40b7e (WIP)Changes to client start() (#748)
* changes to client

fixed daemon flag

yielding bitcoindRPCclient

versioned

more implementation

update

fixed yield error and some documentation

docs + compiler error fix

updated

responding to code review

missing bracket

fixed compiler warnings

fixed compiler warning

* scalafmt
2019-10-30 14:59:35 -05:00
rorp
abaa0581c0 Rescan and fetch blocks (#835)
* Rescan and fetch blocks

* unit test

* fix log level

* addessed the PR comments

* fix test timeout

* improve unit tests
2019-10-30 09:51:03 -05:00
Scala Steward
f169a6b1e9 Update sourcecode to 0.1.8 (#841) 2019-10-28 20:11:00 -05:00
Chris Stewart
71c2cff89f
Revert "Update scalafmt-core to 2.2.1 (#833)" (#839)
This reverts commit 8cbf54b8a6.
2019-10-27 17:21:15 -05:00
Nadav Kohen
5454d675f7 Signer UTXOSpendingInfo refactor (#830)
* Refactored Signer interface to use TxSigComponent and UTXOSpendingInfo

Fixed all the broken things

Replaced TxSigComponent with unsigned Transaction in Signer interface to remove illegal states

* Added p2sh throw case in Signer
2019-10-25 15:40:33 -05:00
Nadav Kohen
8dc005a586 UTXOSpendingInfo ADT (#834)
* Create an ADT to represent the various types of utxos we can have. Now we have RawScriptUTXOSpendingInfo, SegwitV0NativeUTXOSpendingInfo, P2SHSpendingInfo, P2SHNestedSegwitV0UTXOSpendingInfo. This hopefully can be used in combination with the P2WSHSigner and LockTimeSigner work to make TxBuilder and the Signers more comprehensible

* Added P2SH nested witness invariants and made BitcoinUTXOSpendingInfo backwards compatible, BitcoinTxBuilderSpec has one failing test

* Fixed testing around UTXOSpendingInfo

* Responded to code review
2019-10-25 13:58:36 -05:00
Chris Stewart
de71eac07b
Revert "Update sbt-mdoc to 1.3.6 (#831)" (#837)
This reverts commit c16e37b339.
2019-10-25 10:32:27 -05:00
Scala Steward
8cbf54b8a6 Update scalafmt-core to 2.2.1 (#833) 2019-10-25 08:56:48 -05:00
Scala Steward
c16e37b339 Update sbt-mdoc to 1.3.6 (#831) 2019-10-25 08:50:35 -05:00
Nadav Kohen
4641e0043c Created LockTimeSigner and delegated LockTimeScriptSignature signing from other places to it (#798)
Remove redundant work on P2WPKH signing

Added scaladoc

Added to OverridesForNestedSigning for LockTime scripts nested in SHs
2019-10-25 06:15:55 -05:00
rorp
2038faf126 Upgrade to ecalir v0.3.2 (#818)
* Upgrade to ecalir v0.3.2

* addressed the PR comments

* some more changes

* and some more

* external payment id
2019-10-24 13:19:59 -05:00
Scala Steward
1dea06abfa Update sbt-bloop to 1.3.5 (#829) 2019-10-24 06:00:51 -05:00
Nadav Kohen
d2b6a836c1 P2WSH Signer! (#797)
* Created P2WSHSigner and removed P2WSHWitnessSPKV0 case from P2PK and P2PKH signers

* Moved P2WSH MultiSig from MultiSigSigner to P2WSHSigner

* Cleaned up P2WSH case of BitcoinTxBuilder.signAndAddInput to exclusively use P2WSHSigner

* Replaced Option[(TxSigComponent, ScriptPubKey)] with an ADT

* Added signing with overrides to super Signer class to simplify delegation code

* Added Scaladocs for OverridesForNestedSigning ADT

* Made naming better for OverridesForNestedSigning ADT and added scaladocs
2019-10-23 15:29:52 -05:00
rorp
6df467d295 Improve EclairRpcClientTest execution time (#826) 2019-10-23 14:29:48 -05:00
Nadav Kohen
eb78d61c58 Removed the ScriptProgram companion object (#811) 2019-10-23 10:12:41 -05:00
dependabot[bot]
0faa3c54b2 Bump mixin-deep from 1.3.1 to 1.3.2 in /website (#822)
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-23 07:19:03 -05:00
dependabot[bot]
cdf9dfaafa Bump lodash.merge from 4.6.1 to 4.6.2 in /website (#821)
Bumps [lodash.merge](https://github.com/lodash/lodash) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-23 07:18:45 -05:00
Scala Steward
d351d04393 Update sttp:core to 1.7.2 (#808) 2019-10-22 14:25:45 -05:00
dependabot[bot]
4c263237f7 Bump lodash from 4.17.11 to 4.17.15 in /website (#819)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.15)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-22 14:25:13 -05:00
Ben Carman
089bb2bd72 Refactor old test cases to use BitcoinSUnitTest (#814) 2019-10-20 02:35:03 -05:00
Scala Steward
d141508b02 Update akka-actor, akka-stream, ... to 2.5.26 (#817) 2019-10-20 01:54:12 -05:00
philbertw4
a91cff0d07 quick fix of link to txbuilder examples in docs (#815) 2019-10-16 07:46:21 -05:00
Chris Stewart
8184f4ace1
Update script_tests.json, fix bugs that were unveiled with that updat… (#799)
* Update script_tests.json, fix bugs that were unveiled with that update. Specifically around handling negative zero in Script, and cleanstack behavior for segwit scripts. We were not checking for equality at the byte level for negative zero. With cleanstack, we were failing the script, but not failing with the correct error. If you look at interpreter.cpp in bitcoin core, cleanstack check is done before checking if the stacktop is true or false

* Address code review
2019-10-15 09:57:47 -05:00
rorp
140702ad42 Increase test coverage (#810)
* Increase test coverage

* more coverage
2019-10-14 19:54:34 -05:00
rorp
ba91c6107c Create removed Neutrino tables (#796) 2019-10-14 14:42:59 -05:00
Scala Steward
78886bef4c Update sbt to 1.3.3 (#809) 2019-10-14 13:56:58 -05:00
Scala Steward
b240b3c4ab Update typesafe:config to 1.4.0 (#803) 2019-10-13 19:30:09 -05:00
Ben Carman
e9c4b10f1c Script Program apply method refactor part 5 (#760) (#801)
* Script Program apply method refactor part 5 (#760)

* Formatting
2019-10-13 13:20:03 -05:00
Ben Carman
cd76bf5455 Script Program apply method refactor part 7 (#760) (#804) 2019-10-13 09:17:28 -05:00
Ben Carman
6d1b3049b5 Script Program apply method refactor part 6 (#760) (#802) 2019-10-13 09:09:56 -05:00
Ben Carman
3ef128f4b3 Script Program apply method refactor part 4 (#760) (#800) 2019-10-12 11:14:56 -05:00
Ben Carman
672446b7a5 Script Program apply method refactor part 3 (#760) (#795)
* Script Program apply method refactor part 3 (#760)

* Remove unsused method

* Documentation

* Fix test case
2019-10-12 11:09:37 -05:00
Ben Carman
25f483104a Script Program apply method refactor part 2 (#760) (#794)
* Script Program apply method refactor part 2 (#760)

* Remove method
2019-10-12 08:18:36 -05:00
Ben Carman
bbe1e87d94 Script Program apply method refactor part 1 (#760) (#793)
* Script Program apply method refactor part 1 (#760)

* Simplification of line

* Typo fix
2019-10-12 08:14:34 -05:00
rorp
3f734a95db Make ChainApi to scan the block filters in order to find matches (#786)
* Make ChainApi to scan the block filters in order to find matches

* performance improvements, unit test

* some parallelization

* addressed comments

* parallelism level

* fix parallelism computation

* Scala 2.11 compatibility

* increased test coverage

* cleanup

* more checks and cleanup

* change ChainApi.getMatchingBlocks signature

* some more changes
2019-10-11 14:19:42 -05:00
Nadav Kohen
7b3e9f747a 2019 10 01 script program cleanup (#791)
* Tightened up types, only allowing ExecutionInProgressScriptPrograms to be executed in Script OPs and having output type that cannot be PreExecutionScriptProgram

* Fixed all tests!

* Replaced all calls to loop and loopOrComplete with a single one at the bottom to retain the tailrec property

* Added a couple docs
2019-10-08 12:28:58 -05:00
Nadav Kohen
c3df666aa5 2019 10 01 script interpreter cleanup (#772)
* Removed all IntelliJ warnings and did some very minor and contained cleanup

* Refactored ScriptInterpreter.run into nicer pieces

* Replaced all calls to isInstanceOf with matches
2019-10-08 10:14:00 -05:00
Chris Stewart
0b75160455
Run scalafmt, i forgot to run on #783 (#788) 2019-10-07 08:16:28 -05:00
Scala Steward
351c60a4e5 Update sbt-ci-release to 1.4.31 (#754) 2019-10-07 06:12:16 -05:00
Scala Steward
bddf1ce44c Update sbt-bloop to 1.3.4 (#787) 2019-10-07 06:11:40 -05:00
Scala Steward
3973b8d2b4 Update sttp:core to 1.7.0 (#785) 2019-10-07 06:10:48 -05:00
Chris Stewart
09ea1fb3cd
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
5cc0b30544 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
b23fa50be6 Update sttp:core to 1.6.8 (#773) 2019-10-06 09:33:31 -05:00
rorp
80c8636308 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