Commit graph

2147 commits

Author SHA1 Message Date
Chris Stewart
9040e2ccaf
Filter warnings on doc for publishing (#1484) 2020-05-29 07:03:18 -05:00
Chris Stewart
11a635f3be
Add -Xfatal-warnings on Scala 2.13 (#1483)
* Add -Xfatal-warnings on Scala 2.13

* Turn off -Xfatal-warnings in docs/
2020-05-29 06:21:56 -05:00
Chris Stewart
afbce5bc4a
Cache numbers between 0 and 256 to make serialization/deserialization faster (#1482) 2020-05-29 05:00:15 -05:00
Ben Carman
9c17e00139
Implement KeyManagerLogger (#1386) 2020-05-28 13:06:50 -05:00
Chris Stewart
df13a0b313
Drop 2.11 from inThisBuild.sbt and Deps.scala (#1479) 2020-05-28 11:49:53 -05:00
rorp
8350a47bdb
Upgrade Eclair to v0.4 (#1421)
* Upgrade Eclair to v0.4

* fix test binary

* logging

* unquote paths

* fix eclair-node.sh

* OSX fix

* cleanup
2020-05-28 10:50:57 -05:00
Nadav Kohen
13884f5470
Rework Standard Finalizer (into pieces) (#1473)
* Made the standard non-interactive tx finalizer simple using composition of its (reusable) pieces

* Responded to code review and made minor improvements

* Fixed docs
2020-05-27 18:05:37 -05:00
Chris Stewart
1f4227c75c
Add more optimizations, MultSignatureScriptPubKey.isMultiSignatureScr… (#1475)
* Add more optimizations, MultSignatureScriptPubKey.isMultiSignatureScriptPubKey() fails fast if it's not a valid multisig spk, also use more caching inside of Number's (UInt64, UInt32, etc)

* Fix shortChannelidTest

* Cache popular UInt64 numbers that are used in ScriptPubKey's. This reduces allocations which reduces memory usage
2020-05-27 15:47:20 -05:00
Ben Carman
5d276d220f
Attempt to fix database locking errors in process tx test (#1477) 2020-05-27 15:26:49 -05:00
Scala Steward
8a1e1b6c01
Update bcprov-jdk15on to 1.65.01 (#1476) 2020-05-27 15:26:07 -05:00
Ben Carman
5189673a62
Fix FeeUnit match not being exhaustive (#1472) 2020-05-27 06:06:06 -05:00
Ben Carman
c64c1ddfa6
Update docs pertaining to logging (#1471) 2020-05-26 15:33:27 -05:00
Nadav Kohen
2199cfbb28
CryptoContext Refactor (#1469)
* Moved logic to disable use of secp256k1 library into crypto project

* Fixed secp doc
2020-05-26 13:05:21 -05:00
Nadav Kohen
8b62272cb9
Fixed sequence computation for P2PKWithTimeout and RawTxFinalizer composition discovered during DLC rebase (#1461) 2020-05-26 07:54:54 -05:00
Ben Carman
eb37e551e0
Increase Key Manager test coverage (#1465) 2020-05-26 06:13:01 -05:00
Ben Carman
aa885688fd
Implement FeeUnit SatoshisPerKW (#1455) 2020-05-26 06:11:49 -05:00
Chris Stewart
5508af57a2
Create a simplified version of the WalletApi.unmarkUTXOsAsReserved() that just takes in a tx and scans outpoints if they are in our wallet, also move the mark/unmark methods out of Wallet.scala and into UtxoHandling.scala (#1463) 2020-05-25 14:45:38 -05:00
Chris Stewart
0a35cdb6ef
Implement AppConfigFactory (#1462)
* Implement AppConfigFactory

* Fix docs
2020-05-25 14:43:37 -05:00
Ben Carman
7df8451992
Fix fee rate calculation bugs, add tests (#1454)
* Fix fee rate calculation bugs, add tests

* Rounding issues

* Add link

* Change error message
2020-05-25 08:06:37 -05:00
Chris Stewart
01c2759e18
Attempt to optimize block tests more to avoid timeouts (#1459)
* Attempt to optimize block tests more to avoid timeouts

* Fix asm.tail bug

* Make parseRedeemScript just return a ScriptPubKey rather than a Try[ScriptPubKey]

* Make encoding a UInt64 to hex more efficient

* Cache Transaction.bytesSize so we don't need to serialize everything again to estimate the byteSize

* Refactor CryptoBytesUtil.addPadding() and it's usage in UInt64

* Use StringBuilder.append() rather than StringBuilder.addAll() which is not supported in scala 2.11 & 2.12

* Address nadav's code review
2020-05-22 11:15:17 -05:00
Ben Carman
d6978e01bb
Fix balance by account (#1457) 2020-05-22 06:40:23 -05:00
Ben Carman
a1b220a473
Add ability to unreserve utxos (#1458) 2020-05-22 06:29:11 -05:00
Nadav Kohen
a37a7d1629
Implemented (lax) signature parsing in Bitcoin-S (#1446)
* Implemented parseDERLax signature parsing and bumped bouncy castle version to most recent

* implemented using iterators

* Factored out common functionality and added comments, it is readable now! Deleted C-like version in place of this one after property based tests showed them to be equivalent

* Made compatible with scala 2.12

* Make compatible with scala 2.11

* Added tests for lax DER signatures
2020-05-21 15:13:17 -05:00
Nadav Kohen
fec601c8f5
TxBuilder Refactor (#1426)
* Refactored Transaction

Created RawTxBuilder

Created RawTxFinalizer as layer on top of RawTxBuilder

Introduced RawTxSigner and replaced TxBuilder!

Deleted TxBuilder!

* fixed things after rebase

* Made RawTxBuilder compatible with older versions of scala

* Began responding to review

* Made Finalizer take a Builder rather than the other way around

* Added composition for finalizers

* Ran scalafmt

* Updated txbuilder example documentation

* Moved tests from old TxBuilderTest files to relevant new test files

* Added scaladocs
2020-05-21 09:47:08 -05:00
Chris Stewart
b3050c03ad
Update stable version in doc.sbt, add getting started link to README.md (#1453) 2020-05-21 06:17:05 -05:00
Ben Carman
848c4cd36a
Add bitcoind and zmq config options to EclairInstance (#1428) 2020-05-20 15:55:20 -05:00
Ben Carman
c811ccc62a
Add option to correctly use logback config (#1398)
* Logger now uses correct parent logger for all, names appenders correctly

* Set logback to true for tests, rename file

* Fix docs
2020-05-20 15:46:24 -05:00
Ben Carman
7dd1084321
Small optimization for ScriptOperationFactory.operations (#1450)
* Small optimization for ScriptOperationFactory.operations

* Make operations a val
2020-05-20 10:26:00 -05:00
Chris Stewart
606d2fe29a
Add hardcoded jvmopts file that starts with a 2g heap (#1436)
* Add hardcoded sbtopts file that starts with a 2g heap

* Use .jvmopts instead of .sbtopts

* Use .jvmopts rather than .sbtopts
2020-05-20 07:31:58 -05:00
Chris Stewart
920f0c3a20
2020 05 19 improve test performance (#1449)
* Reduce number of property based tests on BIP32PathTest and add a Future to NetworkPayloadTest's property based tests so it hopefully runs faster on CI

* Run scalafmt

* Make a few more property based tests async

* Make forAllParallel, refactor some test cases to use it

* Make BlockMessageTest async

* Bump timeout
2020-05-20 06:55:36 -05:00
Ben Carman
5c7585c629
Fix allowing BytesToPushOntoStack(0) (#1448) 2020-05-19 16:52:58 -05:00
Chris Stewart
29579b52a3
Reduce number of property based tests from 200 -> 100 so we don't time out on CI (#1447) 2020-05-19 07:25:34 -05:00
Ben Carman
9d59acbd9c
Fix spacing in README.md (#1444) 2020-05-18 20:26:09 -05:00
Chris Stewart
5ff7118179
2020 05 17 optimizations (#1435)
* Make ScriptOperationFactory subclasses use a val to cache operaetions rather than operations

* Make ScriptOperation's use a Vector rather than Seq. Seq is a trait that can sometimes be backed by a List which can have some O(n) behavior

* Remove BlockTest benchamarking test case

* Put popular opcodes at beginning of ScriptOperations.operations for an optimization

* Remove Try() allocation on ECPublicKey.isFullyValid()

* Fix how CompactSizeUInt was serialized to be more efficient, move isMultiSig() and isLocktimeSPK() to be inline so we don't evaluate it unless we absolutely need to

* Use Map inside of ScriptOperation.fromByte()

* Update map to look up script operation rather than iterating
2020-05-18 20:23:12 -05:00
Ben Carman
9a7b90c132
Add DLC GUI Docs (#1438) 2020-05-18 19:04:31 -05:00
Nadav Kohen
92ac40c97d
Fixed buggy type inference on Gen.frequency by explicitly passing in type parameter (#1439) 2020-05-18 14:56:57 -05:00
Ben Carman
ab9b0bd88a
Remove GUI unused imports (#1440) 2020-05-18 14:36:45 -05:00
Chris Stewart
f3469f8e28
Remove the clause in Transction.fromHex() where we throw in the case … (#1431)
* Remove the clause in Transction.fromHex() where we throw in the case of a witness transaction, do something smarter and look at bytes in the byte vector

* WIP add test case

* Add back try/catch as it's still necessary for cases of unsigned base transactions

* Add permalink to example test case
2020-05-18 14:28:00 -05:00
Ben Carman
9172aa3206
Add ability to make OP_RETURN commitments (#1417) 2020-05-18 14:27:05 -05:00
Chris Stewart
d0ad497232
Try and improve reliability of UpdateBloomFilterTest, also add getMem… (#1434)
* Try and improve reliability of UpdateBloomFilterTest, also add getMemPoolEntryOpt() that returns an Option indicating if a tx was in the mempool

* Fix nits
2020-05-18 13:01:25 -05:00
Scala Steward
271f7591d2
Update flyway-core to 6.4.2 (#1418) 2020-05-18 11:55:48 -05:00
Scala Steward
2e56c0dc2b
Update flyway-sbt to 6.4.2 (#1424) 2020-05-18 11:31:32 -05:00
Ben Carman
c4382cddb6
Wallet Send with coin selection algorithim (#1409) 2020-05-18 11:26:39 -05:00
Ben Carman
91b2602c70
Add bitcoin-s icon, add dark theme to dialogs (#1425) 2020-05-18 11:16:41 -05:00
Scala Steward
81e3262bc5
Update scalacheck-1-14 to 3.1.2.0 (#1423) 2020-05-18 11:16:16 -05:00
Chris Stewart
a38b77d56a
upgrade Scala to 2.13.2 in places in travis.yml (#1432) 2020-05-15 14:08:13 -05:00
Nadav Kohen
aee88684f2
InputInfo Refactor (#1400)
Added OutputReference and introduced public key computation on SPKs

Made InputInfo into an ADT

Made UTXOSpendingInfo use InputInfo

Replaced UTXOSpendingInfo with NewSpendingInfo and got non-test things compiling

Made aliases for (NewSpendingInfo/NewSpendingInfoFull/NewSpendingInfoSingle)[InputInfo]

Got rid of source code mention of UTXOSpendingInfo

sbt compile passes

tests compile

Fixed all coreTest tests

Renamed to UTXOInfo

Some cleanup

Moved redeem script and script witness accessors to companion object

Responded to code review

Added OutputReference and scaladocs

Moved p2pkhPreImageOpt downstream and generalized to hashPreImages

Fixed adding-spks.md

Fixed psbts.md and txbuilder.md

Renamed UTXOInfo

Apply renaming to docs
2020-05-15 11:14:15 -05:00
Scala Steward
2869c59a85
Update sbt-bloop to 1.4.1 (#1430) 2020-05-15 09:48:50 -05:00
Ben Carman
11fb182c10
Fix Warning in TransactionDb (#1427) 2020-05-15 06:43:57 -05:00
Scala Steward
cb03855afd
Update sbt-bloop to 1.4.0 (#1414) 2020-05-13 07:40:29 -05:00