Commit Graph

32 Commits

Author SHA1 Message Date
Chris Stewart
6cbbd8825d
2021 10 02 create contract info (#3713)
* WIP createcontractinfo

* Fix ordering issue

* Use existing contract descriptor serializer, begin fixing test case

* Get DLCRoutesSpec createcontrafctinfo passing again

* Finish implementing createcontractinfo

* Add doc

* Fix native image build by adding hard coded static private key for OracleAnnouncementV0TLV.dummy
2021-10-05 06:24:25 -05:00
benthecarman
4f65022472
Fix signet parsing of LnInvoices (#3691) 2021-09-26 07:14:03 -05:00
Chris Stewart
132479d271
Implement ability to provide external entropy to bitcoin-s (#3672)
* Encapsulate initialization of DLCOracle.start() method

* Use internal WalletAppConfig.kmConf rather than passing in custom key manager parameters

* Add KeyManagerAppConfig.defaultAccountType

* Get all tests passing besides TrezorAddressTest

* Get TrezorAddressTest passing with provided entropy

* Add unit test to make sure we can always derive the seed

* Get docs compiling

* Fix dlcWalletTest test cases

* Add more test cases to keymanager

* Add the new configuration to the example configuration

* Add more test cases

* Remove coverage on 2.12 as it isn't accurate

* Rework DLCOracleAppConfig.start() to call kmConf.start() so the oracle can use entropy provided via bitcoin-s.conf
2021-09-18 09:49:11 -05:00
Chris Stewart
902f4aa332
The spaces after the log level cause logging levels not to work (#3545) 2021-08-13 11:07:58 -05:00
benthecarman
621e8e9033
Rescan DLC Tests (#3515) 2021-08-11 07:29:33 -05:00
benthecarman
1051e6365a
DLC P2P Client (#3402)
* DLC P2P WIP

* P2PClient refactor (#10)

* Add to CI

* Remove unused

* Attempt to create DLCNode and Tests

* Full Tor support

* Get DLCNegotiationTest passing

* Config options, connect & send func

* Test for DLCNode

* Add createDLCNode to config

* Fix formatting

* Update DLC state after all other data is set

* Remove unneeded line

* Respond to some review

* 2021 07 26 dlc node code review (#13)

* WIP

* WIP2

* Rewrite tests not use Await.result()

* Skip Tor test on CI

* Cleanup threadpool leaks in tests

* Handle actor pattern matching better

* Respond to review

* Implement DLCNode.stop

* sock5 -> socks5

* Use Tcp.Unbind

* Respond to review

* Implement postStop

* Switch to unbind

Co-authored-by: rorp <rorp@users.noreply.github.com>
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2021-08-02 18:15:56 -05:00
Shreyansh
1426c31483
Multi peer: Sync with random peer (#3454)
* ensure random peer used for sync supports compact filters

* test file

* fix

* refactor

* rerun ci

* rerun ci

* changes from comments

* fix

* fix tests

* changes from comments

* refactor

* remove unintended diffs
2021-07-31 07:54:31 -05:00
benthecarman
9aa9a424c2
Implement init message from BOLT 1 (#3407)
* Implement init message from BOLT 1

* fix compile
2021-07-19 12:39:44 -05:00
Chris Stewart
b7b2a7099f
2021 07 15 dlc oracle pg (#3413)
* WIP

* Get postgres test passing by not allowing 0 byte (NULL character in UTF 8 string) in the utf8 generator
2021-07-17 12:19:49 -05:00
benthecarman
e098aba680
Create and implement OrderedAnnouncements type (#3356)
* Create and implement OrderedAnnouncements type

* Fix docs

* Update scaladoc
2021-07-06 07:58:58 -05:00
benthecarman
78e2fceb90
Use OrderedNonces type in DLC data types (#3352) 2021-06-30 06:35:02 -05:00
benthecarman
cada6fdc63
Fix DLC not storing nSequence for funding inputs (#3342)
* Fix DLC wallet not storing nSequence for funding inputs

* Fix DLCTest
2021-06-29 09:36:30 -05:00
benthecarman
5a79acb59c
Fix DLCStatusPickler (#3190) 2021-05-28 17:27:31 -05:00
Nadav Kohen
ac3bae403b
Pulled down all remaining non-wallet non-gui code on adaptor-dlc (#3101) 2021-05-18 06:29:46 -05:00
Chris Stewart
3205e4e275
Implement createCETsAndCETSigsAsync() to fix performance issue in test (#3089)
* Implement createCETsAndCETSigsAsync(), use this inside of TestDLCClient.setupDLCAccept()

* Switch to lazy val to cache sig point computation

* Add FutureUtil.batchAndParallelExecute() that does not take batchSize parameter, just compute it inside as a sane deafult

* Fix 2.12.x compiler error
2021-05-14 17:59:56 -05:00
Nadav Kohen
58070f4120
Pulled down dlc and dlcTest projects into core and dlcTest (#3068)
* Pulled down dlc and dlcTest projects into core and dlcTest

Added dlcTest to CI runs and fixed compilation issues

* Fixed docs

* loosened fee rate bound assertions to only sanity test
2021-05-14 12:27:21 -05:00
Nadav Kohen
78f4dfb8c6
Pubkey Refactor (#2936)
* Removed ExecutionContext from ECKey

* Refactored ECPublicKey to remove compression state and introduced ECPublicKeyBytes to handle cases where serialization of input is important

* Fixed the rest of bitcoin-s so that it passes all tests

* Made all ECKeys into case classes

* Successfully added isFullyValid invariant to ECPublicKey!

* Fixed docs

* Added scaladocs and fixed a RpcPsbtResult bug

* Reject private keys of length < 32 and fix WIF parsing bug
2021-05-06 13:19:52 -05:00
Nadav Kohen
aacba1c077
Pulled down core diff from adaptor-dlc (#3038) 2021-05-05 09:26:09 -05:00
Chris Stewart
43d9f05d9a
Reduce workers from 2 -> 1 (#3007) 2021-05-02 10:42:24 -05:00
Nadav Kohen
7fd9aca304 Add Schnorr and Adaptor Secp Bindings and Update Adaptor (#2885)
* Replaced secp256k1 with secp256k1-zkp as submodule pointing to my java-bindings branch

* Built new binaries for schnorr signing and adaptor signing and integrated into LibSecp256k1CryptoRuntime

* Added public key compression function with tests, removed old adaptor signature point serializers

* Implemented ECDSA adaptor signatures in scala according to the most recent spec

* Added static test vectors for adaptor signing from spec

* Moved bouncy castle adaptor signing tests to .jvm

* Added scaladocs and responded to nits

* Added scaladocs with legends to spec naming

* Responded to Ben's review

* Fixed scala 2.12 compile issue

* Fixed BouncyCastle secKeyVerify

* Updated add-to-jni build instructions

* Updated secp256k1-zkp to target bitcoin-s-master

* Add windows binary (#14)

* Added Mac OS binaries

Co-authored-by: benthecarman <benthecarman@live.com>
2021-04-21 09:42:43 -05:00
benthecarman
fa80f36d2f Get all of Core working with JS (#2826)
* core-test-js-json

* Add SigPointComputer cross compile
Co-authored-by: Nadav Kohen <nadavk25@gmail.com>

* Fix java.time for scalajs

* InetAddress for scalajs

* Fix linking errors in coreTestJS

* Easy fixes

* InetAddress Tests

* Update micropickle, fix exact functions

* Get BigSizeUIntTest working with upickle

* Fix exact funcs

* Update Base58Test with upickle

* Update ScriptSignatureTest with upickle

* Update TransactionTest with upickle

* Update BlockFilterTest with upickle

* Update ScriptInterpreterTest with upickle

* Update MnemonicCodeTest with upickle

* Add InetAddress unit tests

* Fix compile errors

* Get core tests running, not passing

* Sign with js

* Fix PSBTUnitTest

* Fix PBKDF2 for JS

* Use bcrypto's secp256k1 instead of ecdsa

* Fix 2.12.12 compile

* Core tests passing :)

* Test corejs
2021-03-31 15:04:30 -05:00
Nadav Kohen
e6899b20b1 Made ECPrivateKey signing synchronous and got src compiling (#2652)
Fixed tests

De-futured tx buidling, finalizing and signing

Responded to review
2021-03-23 17:05:58 -05:00
rorp
911fca5825 Schnorr js (#2805)
* Schnorr sigs for Scala.js

* fix build

* put BIP340 test vectors in a shared space

* remove teskit dependency, fix point edge cases

* fix build

* add unit tests for point addition

* scaladoc

* cleanup

* respond to the comments

* Fix usage of BitcoinSLogger

Co-authored-by: christewart <stewart.chris1234@gmail.com>
2021-03-22 12:56:40 -05:00
benthecarman
c6c4e83e9e Remove logging from testkit core (#2813)
* Remove logging from testkit core

* Fixup deps
2021-03-22 11:48:27 -05:00
benthecarman
07514e2348 Remove logging from core (#2810)
* Remove logging from core

* Remove slf4j from testkit core

* Remove logback from coretest
2021-03-21 19:11:55 -05:00
benthecarman
b0f7d6f26b Implement bech32m (#2572)
* Implement bech32m

* Respond to review
2021-03-18 18:04:38 -05:00
Chris Stewart
78448b277c Revert "Schnorr sigs for Scala.js (#2784)" (#2802)
This reverts commit 8e7bde0ed9.
2021-03-16 13:19:16 -05:00
rorp
8e7bde0ed9 Schnorr sigs for Scala.js (#2784) 2021-03-16 10:21:47 -07:00
Chris Stewart
7245eb0ec9 Update all deps that failed because of bad build (#2774)
* Update all deps that failed because of bad build

* Revert jvmopts

* Try bumping jvmopts max heap size to get mac builds to work

* Double up timeout in ScriptGenerators

* Use Future.successful() in signFunction to try and reduce overload on executionContext

* Push to github to force re-run of CI

* Upgrade sbt to 1.4.9
2021-03-10 06:48:21 -06:00
benthecarman
8b6c0652a2 Completely remove range event descriptors (#2764) 2021-03-04 15:18:33 -06:00
Chris Stewart
e59057483f Resturcutre cryptoTest & coreTest to work with scalajs build (#2731)
* Get cryptoTest,coreTest projects working with scala-js

Get build working, now moving onto compile

Move jvm specific cryptoTest's into the .jvm sub project

Rework build definition names to be more concise

Fix missing cryptoTest refactor

Move logback-test.xml into jvm specific resource folder so it doesn't get ignored

Make coreTest a crossProject

Rework ci matrix to work with new project structure

Try to fix CI matrix

CI fix part 2

* Apply commonSettings to all cross projects

* Address part of roman's code review, make coreJS, make cryptoTest.dependOn(crypto)

* WIP to share with scala-js community

* Fix scalac compiler settings to be additive in CommonSettings.settings

* Remove BCryptoTest
2021-03-03 16:52:03 -06:00
Chris Stewart
1959495cec Add testkit-core module (#2726)
* Refactor AsyncUtil to just use an execution context rather than an actor system

* Create testkit-core, start moving data structures over to testkit-core

* WIP, getting rid of the hard dependency on BitcoinSAsyncTest and akka

* Rework test traits to not be dependnent on akka, move BaseAsyncTest into testkitCore, add a test trait that just uses the default scala executionContext

* Get everything compiling

* Move logback-test.xml to testkit-core so it applies to coreTest,cryptoTest as well

* Cleanup rebase issues

* Fix Deps.scala

* Address ben's code review

* Segregate jvm settings and compiler settings

* Filter out -Xfatal-warning for scalajs for now since there is a ton of errors

* Move maintainer settings into CommonSettings.settings
2021-03-02 07:05:21 -06:00