Commit Graph

398 Commits

Author SHA1 Message Date
benthecarman
4bf4f0a027 Add signed outcome to getevent rpc, fix other small api bugs (#2757)
* Add signed outcome to get event rpc, fix other small api bugs

* Create separate type for decomp DLCAttestationType

* Add DLCOutcomeType to Oracle Event

* Calculate dlcOutcome, add invariant

* Fix test
2021-03-08 10:55:47 -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
5ba7b553b0 2021 02 27 dersignatureutil mv (#2730)
* Move CryptoParams to shared crypto project, make BouncyCastleCryptoParams for bouncy castle specific things

* Rework build structure to work better with scalajs

* Add unit test to make sure CryptoParams & BouncyCastleCryptoParams are consistent
2021-02-28 07:09:22 -06:00
rorp
c90f318fd7 Refactor crypto module to be compatible with Scala.js part 1 (#2719)
* Refactor crypto module to be compatible with Scala.js

* more changes

* some more changes

* abstract out Schnorr stuff

* abstract out adapter stuff

* cleanup

* some more cleanup

* fix build

* Removed references to ECPoint outside of .jvm scope

* remove references to ECPoint from the shared code

* cleanup

* remove cirlular dependencies

* more cleanup

* cleanup

* move SipHash to CryptoContext

* scaladoc

* scalafmt

Co-authored-by: nkohen <nadavk25@gmail.com>
2021-02-27 05:58:20 -06:00
Chris Stewart
bf4afd63d1 Begin re-introducing parallelism in the wallet to make everything faster (#2705) 2021-02-24 07:10:46 -06:00
benthecarman
86566c575d Simplify oracle server RPC api (#2656) 2021-02-23 13:17:20 -06:00
Chris Stewart
f322a74ab0 2021 02 21 cheap redeemscript check (#2707)
* Add more cheap checks to see if a given script token is a redeemScript

* Make cheap witness version check before deserializing to a bytevector
2021-02-23 10:37:40 -06:00
Chris Stewart
63e44974f7 2021 02 20 number byte representation (#2703)
* Optimize unsigned numbers to use byte representation rather than hex representation

* Do the same thing with Int32/Int64

* Cleanup
2021-02-20 13:51:34 -06:00
benthecarman
b30fdf88ca Fix normalized string comparison (#2695)
* Fix normalized string comparison

* Add test
2021-02-19 12:09:55 -06:00
Nadav Kohen
bcd2df6051 Compute sigPoints eagerly but asynchronously (#2642)
* OracleOutcome sigPoints are now eagerly but asynchronously computed

* Increased the timeout for sigpoint computation just to be paranoid
2021-02-15 09:28:22 -06:00
Aris
85087b0f70 Refactoring chain (#2662) 2021-02-13 14:10:40 -06:00
benthecarman
e68ffb49da Use specific functions for Oracle Signing version (#2659) 2021-02-12 13:31:37 -06:00
saguywalker
d1cc5e0ade Refactor HDCoinType to be ADT (#2657) 2021-02-12 09:53:43 -06:00
Aris
f8694eb097 Fix/typos (#2633)
* Fix typos

* Collection minor fixes

Removes redundant .headOption on options
Replaces .exists(_ == ???) with .contains(???)
Replaces option == None with option.isEmpty
2021-02-07 15:00:25 -06:00
Chris Stewart
097fa24e58 Create ScriptFactory.isValidAsm() to standardize how check validity o… (#2629)
* Create ScriptFactory.isValidAsm() to standardize how check validity of a script

* Fix compile

* Fix docs
2021-02-06 08:43:17 -06:00
Chris Stewart
ea75d62571 Add number cache trait, use it in all number types (u8,u32,etc) and S… (#2627) 2021-02-05 17:59:48 -06:00
Chris Stewart
bbd1dbc15d Do cheap checks in predicates first before more expensive ones (#2628) 2021-02-05 17:59:19 -06:00
Nadav Kohen
0d38721b3d Added utilities to created linear approximations of Long => Long functions (#2537) 2021-02-05 13:24:33 -06:00
Nadav Kohen
e417ac94a4 Re-wrote CETCalculator.splitIntoRanges (#2621)
Added some docs

Responded to review
2021-02-05 13:24:24 -06:00
Chris Stewart
8f958bf5d9 Update scalafmt (#2619) 2021-02-03 16:37:12 -06:00
Chris Stewart
16cb38e876 Make contract info lazy so native image works (#2606) 2021-02-02 08:43:21 -06:00
Nadav Kohen
93f33d26b6 Update dlc before release (#2543)
* Pulled down DLC data structure work

* Responded to Ben's review

* Gave Vector types names

* Pulled down Chris' work
2021-02-02 08:14:24 -06:00
benthecarman
03ca6f617e Optimize filter sync and fetching filter heights (#2568) 2021-01-30 14:56:47 -06:00
Chris Stewart
546a8c55b3 Add better Block.toString that doesn't blow up logs (#2585)
* Add better Block.toString that doesn't blow up logs

* Use .toLong as ben suggested
2021-01-29 10:23:18 -06:00
benthecarman
fa27fb3fb1 Create BlockSyncState type (#2567) 2021-01-27 14:15:07 -06:00
benthecarman
33245b500e Bech32 address improvements (#2571)
* Bech32 address improvements

* Respond to review
2021-01-27 13:22:17 -06:00
benthecarman
e10e278aa4 Add walletinfo rpc (#2546)
* Add walletinfo rpc

* Move rootXpub to key manager obj

* Make configuration keys for getinfo the same as the ones in our configuration files

* Cleanup

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2021-01-22 13:55:21 -06:00
rorp
05e21b1200 Bump Eclair version (#2405)
* Bump Eclair version

* cleanup

* Bump JVM version for CI

* Update docs

* Fix docs
2021-01-22 10:47:19 -06:00
benthecarman
523f1098fc Implement OracleAttestmentV0TLV, save outcome to db (#2516)
* Implement oracleAttestmentV0TLV, save outcome to db

* Update with tlv changes

* Update tlv to not have 2 list sizes

* small change

* Update OracleEvent.verifyAttestations

* Use correct pub key

* Verify correct outcomes
2021-01-22 09:45:45 -06:00
benthecarman
2291bf0eae Create isChange function for wallet (#2535)
* Create isChange function for wallet

* Scaladocs
2021-01-20 12:11:24 -06:00
Chris Stewart
1ec3092b2f 2021 01 15 dlc refactors (#2518)
* Kill DigitDecomp.isSigned

* Create TLVEndpoint, TLVMidpoint ADT. Also add helper method OutcomePayoutPoint.toTlvPoint
2021-01-16 07:55:42 -06:00
Chris Stewart
2048cc0bbb Make ChainApi.processHeaders() return a failed future in the case we … (#2436)
* Rename NodeUnitTest.confg -> NodeUnitTest.getFreshConfig()

* Rename CachedBitcoinSAppConfig.config -> CachedBitcoinSAppConfig.cachedConfig

* Make CachedChainAppConfig extend CachedBitcoinSAppConfig

* Make ChainApi.processHeaders() return a failed future in the case we have no valid headers

* Run scalafmt

* Fix test case to check if promise is completed yet

* WIP: Get something working that isn't network specific

Start putting things back in place

Add comment

Revert logback file

Remove BitcoinSLogger object

* Fix unused import

* Get rid of annoying diff

* Fix spacing nit
2021-01-12 06:11:19 -06:00
benthecarman
84cde975d8 Add createmultisig cli command (#2495) 2021-01-09 09:54:34 -06:00
Chris Stewart
98ace6f14e 2021 01 02 issue 2457 (#2461)
* WIP

* Get neutrino node with wallet 'receive information about received payments' working again

* Fix compile

* Remove initial sync logic from test case

* Remove sync logic in NeutrinoNodeWithWallet test cases

* Improve logging and rename a few things

* WIP2

* WIP3

* Get NeutrinoNodeWithWallet tests working

* Implement WalletSync, which allows you to sync a wallet from a arbitrary data source

* Get all tests passing again

* Use spv.appConfig in DataMessageHandlerTest rather than caching the config

* Modify cleanup to hopefully get CI passing

* Fix postgres tests by cleaning the table during the destroy phase of the test fixture. This is needed because the same postgres database is shared between tests in the same test suite

* Revert logback-test.xml

* Get sqlite/postgres tests passing pt 2

* syncHeight -> syncDescriptorOpt()

* Add case for genesis block hash in WalletSync

* Fix SpvNodeWithWallet test case to actually test spv functionality

* Remove nodeCallbacks parameters, callbacks should be registered on nodeAppConfig
2021-01-09 09:33:37 -06:00
Chris Stewart
72ee201c1f Make allFactories lazy so we don't hit NPE exceptions (#2491) 2021-01-08 14:35:55 -06:00
Chris Stewart
b4a1d31f5c Add explicit signing version associated with a EventDescriptor (#2487) 2021-01-07 11:31:00 -06:00
benthecarman
6b441631f3 Limit bech32 addresses to segwitv0 (#2471)
* Limit bech32 addresses to segwitv0

* extend ScriptFactory, make check exhuastive
2021-01-07 08:13:31 -06:00
Nadav Kohen
680ed4b58a Modified rounding on DLCPayoutCurve interpolation to match spec (#2470) 2021-01-07 06:42:01 -06:00
benthecarman
be06fb13ab Update DLC Oracle Signing Algo (#2465) 2021-01-05 08:19:53 -06:00
benthecarman
b436f6cd2f Version Number in logs & Cli Command (#2467) 2021-01-05 07:27:40 -06:00
Chris Stewart
4e1a6c69f0 2020 12 18 enable lint options (#2454)
* Enable -Xlint:adapted-args,nullary-unit on our for compile scope

* Add Xlint:infer-any compiler option

* Fix build so test compiler options are actually enabled

* Enable more scalac linting options

* Add '-Xlint:eta-sam'

* Add 'Xlint:inaccessible,Xlint:missing-interpolator'
2021-01-03 08:01:26 -06:00
Nadav Kohen
20af4a3cda OutcomePayoutPoint now has the correct types and deffers rounding due to extra_precision in serialized points (#2441) 2020-12-29 13:55:39 -06:00
Nadav Kohen
493673c68b Outstanding DLC branch diff (#2432) 2020-12-23 18:13:57 -06:00
Ben Carman
f10bdce179 Add getblockheader cli command (#2424) 2020-12-23 07:15:35 -06:00
Nadav Kohen
d6f27f5bbe Made TLV serialization and deserialization uniform under a succinct and expressive API (#2420) 2020-12-23 02:42:30 -06:00
Nadav Kohen
1e394737c6 Added length prefixes to contract_info and cet_signatures TLVs (#2419) 2020-12-22 14:13:55 -06:00
Ben Carman
8996be43ec Add extra checks for RBF transactions (#2416)
* Add extra checks for RBF transactions

* Move to util function, don't allow CPFP of confirmed txs
2020-12-22 14:12:15 -06:00
Ben Carman
67e7426260 Windows Secp Update & fix for parsing Windows paths (#2398)
* Windows Secp Update

* Add docs about errors

* Fix paths in config

* Bump timeout
2020-12-21 16:34:53 -06:00
Ben Carman
f7671a4f99 Add wallet function to bump fee with CPFP (#2399)
* Add wallet function to bump fee with CPFP

* Add bump fee integration tests
2020-12-21 07:04:01 -06:00