* Add test case for reorg on bitcoin network for NeutrinoNodeTest
* Get unit tests passing
* Refactor findNextHeader() to not take an Option[BlockHeaderDb], not it just takes BlockHeaderDb
* Explicity return None in the case where we don't need sync filter headers
* Fix off by one bug when starting filter header sync
* Fix bug in DataMessageHandler.isFiltersSynced()
* Try alternative implementation to fix bug
* Fix valid states for CompactFilterMessage, revert PeerFinder delay
* WIP: Try to move byte streaming/parsing of p2p messages out of P2PClient
* WIP2: Work on killing the actor, replace it with a steram
* Get basic ability to send/receive version message working
* Transition PeerMessageReceiverState to Initializing inside of PeerMessagesender.connect()
* Refactor things out of PeerMessageSender.connect(), add some flow logs
* Get NeutrinoNodeTest be able to sync passing
* Fix some bugs, create ConnectionGraph helper class
* Use killswitch rather than Source.maybe to disconnect peer
* WIP: Debug
* Switch halfClose to false on Tcp.outgoingConnection() to not keep lingering connections
* Delete P2PClientActorTest
* Delete all P2PClient stuff
* Attempt implementing reconnection logic in PeerMessageSender
* remove supervisor
* Empty commit to re-run CI
* Small cleanups
* Implement sendResponseTimeout()
* Restore logback-test.xml
* Add callback to log error message on reconnect
* Increase queueSize/maxConcurrentOffers size
* Network notifications
* add more tests
* don't drop futures on the floor
* Improve logging, don't drop futures on floor
* scalafmt
* add error messages to the failure notifications
* update unit tests
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* Get unit tests passing for unordered nonces/signatures
* Get v0 oracle announcements working again on listannouncements
* Add unit test to make sure we can still validate signatures for attestments with nonces out of order
* Add OrderedSchnorrSignatures, use it in OracleAttestment, propagate it threw the codebase
* Small cleanups
* Add SortedVecFactory
* Fix test case with out of order nonces
* implement chain callbacks for compact filter headers / compact filters
* Wire it up through the websocket
* Fix type for compactfilterprocessed
* Fix bug to write json rather than write a string
* Fix bug where no exception was thrown if the acceptor did not have enough money
* Revert ContractInfo.max definition, fix bug in acceptDLCOffer
* Fix incorrect usages of ContractInfo.max
* Refactor ContractInfo.max -> ContractInfo.maxOfferorPayout
* Fix dlc.md
* Implement isinitialblockdownload flag in databaes
* Change to IsInitialBlockDownload to be less confusing
* Fix missing refactors, add ChainApi.isIBD()
* Implement logic for ChainApi.isIBD(), add configuration flag to toggle whether to emit websocket events while IBD is ongoing or not, add isinitialblockdownload field to getinfo endpoint
* Remove confusing ChainApi.isIBD() that didn't accurately account for the case where IBD wasn't set in the database
* Fix bug around emitting the websocket events
* Add some documentation
* Add more JSON serializers
* use PicklerKeys for consistent field names across codebase
* scalafmt
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* Implement RescanTerminatedEarly exception to terminate the stream, implement ArgumentSource to understand where arguments passed into bitcoin-s are coming from
* Bump timeout
* Refactor WalletRoutes to take DLCWalletLoaderApi as a parameter, use the walletHolder inside of DLCWalletLoaderApi to fulfill requests
Fix rebase
Reduce parallelism in fetchFiltersFlow to 1 to reduce chance of hitting akka's max open requests
* Try fix loader test by catching RejectedExecutionException
* Add println to see if catching excpetion gets hit
* WIP: Try to fix recursive rescan
* Don't map on recursiveRescan so we don't block on it
* Refactor syncWalletToBitcoind impl to be completely stream based
* Add getParallelism, refactor usages in BitcoindRpcBackendUtil to use it
* Fix compile
* Replace usages of 'WalletApi with NeutrinoWalletApi' with NeutrinoHDWalletApi
* Revert wallet sync height logic
* Refactor to make things cleaner
* Move MockChainQueryApi/NodeApi out of BaseWalletTest
* refactor BitcoinSServerMain.start() to return WalletHolder
* Add walletConfig to WalletWithBitcoind
* Move findOutputsBeingSpent into WalletApi
* Add WalletApi.clearAllAddresses(), HDWalletApi.{findAccount, getnewaddress(account)}
* Add HDWalletApi.fundRawTransaction() with an account as parameter
* Add WalletApi.findByScriptPubKey()
* Fix lots of tests in WalletIntegrationTest
* Create WalletApi.processOurTransaction()
* Get things compiling
* Fix tag integration test
* Refactor AnyDLCHDWalletApi -> DLCNeutrinoHDWalletApi
* Fix docs
* Get postgres tests passing locally
* Move initBalance map before calling callback in CallBackUtilTest
* Get compile working, rename to destroyOnlyWalletWithBitcoindCached
* Fix docs
* Fix missing destroyWalletAppConfig
* Fix scalafmt
* Fix bug in dlcWalletTest where wallet db thread pools weren't being shutdown after unit test completes
* Empty commit
* Create a helper case class called FundRawTxHelper to encapsulate the values returned by fundRawTransactionInternal
* Return FundRawTxHelper[ShufflingNonInteractiveFinalizer]
* make FundRawTxHelper.signedTx be a lazy val
* Implement rescan with akka streams
Get basic stream working with rescan
Fix bug where we weren't using rescan specific threadpool
Implement killswitch for rescan
* WIP: Expose promise to allow external completion of rescan stream
* Rework RescanStarted.RescanStarted to contain a promise to complete the stream early, and a future that represents the completed streams materialized value
* Comment cleanup
* Fix compile errors, remove killswitch
* Fix 2.12.x compile
* Introduce ActorSystem into wallet, refactor rescans to use that ActorSystem
* Fix import
* Fix bug where we were prepending instead appending to batched Vector
* Propogate RescanState upwards into WalletRoutes
* Refactor fetching of filters to be a Flow
* Add `sync` JSON field to the `getinfo` endpoint output
* improve test coverage
* update docs
* rename sync flag
* WebSocket notifications
* fix unit tests
* fix unit tests
* increase test timout
* Represent and handle SIGHASH_DEFAULT correctly in TaprootKeyPath
* Prevent construction of invalid TaprootKeyPath, fix tests
* Have SIGHASH_DEFAULT be SIGHASH_ALL in preTaproot cases
* Add static test vectors for Taproot and the ability to parse those test cases
Add TaprootWitness data structure, get parsing working for first static test case
WIP: Distinguish between TaprootKeyPath and TaprootScriptPath
Remove invariants and make val to method in TaprootScriptPath so we can parse test cases
Add TaprootTestCase.{txSigComponents, programs} methods
Try to run test case
WIP
Wrap failure case in Try
Get first test case passing
Fix building of sig component for p2sh
WIP test case legacy/pk-wrongkey
Get more test cases passing
Move where MAX_PUSH_SIZE is checked for segwit
Get another test case passing
Add links to bitcoin core in test case
Fix stack parsing for witness
Get success test cases passing (without signature verification?)
Add failure test cases
Fix basic compile failures except in javascript projects
Get basic TaprootKeyPath parsing working from ScriptWitness
Get invariants implemented correctly for TaprootScriptPath
WIP
WIP
Get first taproot signature serialization test working
Get tagged hash working correctly
Rework test framework, get 2nd success test case passing
Get compile working with rebase
Implement computeTapleafHash with a unit test case
Add scaffolding of computing merkle root test case
Implement computeTaprootMerkleRoot() with a unit test
Implement computeTapTweakHash() with a unit test
WIP: checkTapTweak()
WIP
Implement computeTapTweakHash() unit test
Rebase onto master
Get verifyTaprootCommitment() passing unit test
Refactors to be more readable
* WIP: Tapscript signature checking
* Get taproot script path signature serialization working for unit test
* Add carve out for unknown public key types
* WIP: OP_CHECKSIGADD
* Add test case to detect annex and compute its hash
* Get test case passing when using upgradable public keys with an annex on the stack
* Fix missing pattern match
* Fix bug with tapscript SIGHASH_ALL and add test case
* Add check if taproot flag is enabled
* Get signature verification working with annex hash
* Implement correct handling of fail case for OP_CHECKSIGADD
* Get test case passing
* DRY
* Fix bug, now we only allow tapscript sig checking when pubkey is 32 bytes in size
* Refactor evalChecksigTapscript to use XOnlyPubKey
* Get signature serialization working with OP_CODESEPARATOR
* Get SIGHASH_ANYONECANPAY|SINGLE example working
* Fix bug in BIP342 impl where we don't count op codes if the version is taproot
* Fix OP_CODESEPARATOR bug
* Implement calculating of OP_CODESEPARATOR idx relative to other opcodes, not push operations
* Fix OP_CHECKSIG tapscript bug where we didn't push OP_FALSE onto stack in case of signature validation failure
* Add annex to TaprootKeyPath
* Get signature chcking working with tapscript keypath annex
* Cleanup test framework code a bit to avoid casting exceptions
* Implement handling of OP_SUCCESS
* WIP: Segwit v0 serialization with nonstandard sighash flag
* Fix hash bug in segwit v0 serialization
* WIP
* Fix bug where we weren't defaulting to SIGHASH_DEFAULT when using tapscript
* Add disabled opcodes to OP_SUCCESS case
* Fix parsing for witnesses in test case
* Get a SIGHASH_SINGLE test case working
* Clean up rebase
* Fix default hash type in TaprootKeyPath
* Implement opCodeSeparator counting that does NOT work when OP_CODESEPARATOR is is not executed inside of an OP_IF, otherwise is very simple for the base case
* Cherry-pick ben's commits & rebase
* Remove script size limit for tap scripts
* Fix incorrect handling of unassigned spk
* Fix invariant
* get correct test case failing
* WIP: SIGHASH_ALL_ANYONECANPAY test case
* Cleanup logging/println
* Refactors & fix regressions in some simple unit tests
* Remove logback in core to get the entire project compiling again
* Make TapscriptPath.hasAnnex() more robust against exceptions
* Add validation of XOnlyPubKey to control block
* Implement known leaf versions in the control block
* Add TaprootUnknownPath and UnknownControlBlock
* Fix rebase
* Fix interpreter bug where v0 segwit wasn't failing when a wrong program was used
* Cleanup println
* Clean up println pt2
* Re-enable -Xfatal-warnings
* Turn off logback-test.xml
* Parallelize taproot success test cases
* Try to bump timeout
* Optimization: Reduce number of intersections in ScriptInterpreter.run()
* Ben's code review
* Take ben's clean stack bugfix
Co-authored-by: benthecarman <benthecarman@live.com>
* Get simple serialization symmetry working for taproot keypath
* Implement generators for TaprootScriptPath, check serialization symmetry
* Make sure bytes are symmetrical too
* Add check in TaprootScriptPath.hasAnnex() to make sure therer is more than one stack element
* Cleanup
* Address ben's review
* Fix pattern match
* Add TaprootUnknownPath and UnknownControlBlock
* Fix small bugs and make validation more resilient against exceptions
* Take ben's suggestion and use abstract class
* Fix bug in TaprootKeyPath's default hash type
* Fix comment
* add support to find and switch peers
* fix compile on 2.12
* allow empty config peers in regtest
* fix test
* minor fixes
changes timeouts, fix issue with ipv6 dns seeds, initDisconnect when disconnected bug, dbPeers order fix
* fix: not removing peers on initialization timeout
* fix: query again when previous failed
* fix: wrong condition for deferred peers
* restore log levels
* clean up
* add PeerStack to allow trying peers based on priority values
* fix migrations
* changes from comments
* use StartStopAsync
* changes from comments
* fix switch if peer down test
* changes from comments
* Implement BIP341
Get coreTest working
* REmove logger
* scalafmt
* Cleanup
* Make checkSigTapScrip() take a SchnorrPublicKey
* Address ben's code review
* Adjust error type on WitenssVersionV1.rebuild()
* Rework WitnessVersion.rebuild() to take WitnessScriptPubKey as a parameter rather than the raw asm
* Fix bug when calculating witness program length
* Fix witnessProgram bug in ScriptInterpreter.rebuildV0()
* remove invariant, fix type
* Renamed ECPublicKey.tweakMultiply to just multiply and added CryptoParams.getG
* Used decompressed G in FieldElement.G
* Removed G from FieldElement altogether
* DLC <-> contact mapping
* updated docs
* populate dlc/contact mapping automatically
* typo
* respond to the PR comments
* rename `contact` to `peer`
* fix unit tests
* create a contact when an incoming offers gets created
* drop dlc_contact_mapping table
* fix build
* update the docs
* Revert "update the docs"
This reverts commit 2386adadcd.
* revert dlc-contact-* endpoints
t Please enter the commit message for your changes. Lines starting