* 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
* 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()
* HashType now uses Int instead of Int32
* Moved HashType from core to crypto
* Added HashType helper functions to ECDigitalSignature
* Added tests
* Fixed compile
* DLCMessage.totalCollateral -> DLCMessage.collateral
* Fix bad names of {DLCOfferTLV,DLCAcceptTLV}.totalCollateralSatoshis, its not the total collateral, rather the collateral being contributed by the offerer and acceptor
* Fix rebase
* Fix appServerTest
* Fix docs
* Try fixing a stic wix productId so the windows OS can understand installations of bitcoin-s are the same product
* Add this branch to release.yml
* Use 1.9.0 windows product id
* Add EnvUtil.parseCommitsSinceLastTag, make last number on windows version be the number of commits since last tag
* Add ability to parse the version from a string
* use upgradeId rather than productId
* Remove feature branch from release.yml
* Remove test
* Get refactor working where we decouple CETSignatures and the partial refund signature
* Add DLCAcceptWithCetSigs() for the case where we have a refund sig, but no cet signatures
* Fix bugs
* Fix sighash parsing bugs
* Implemented general payout curves including hyperbola curve piece support
WIP
Get GUI compiling
* WIP
* Get backward compatible serialization working, everything is equivalent except for in memory Scala data structures
* Get numeric contracts backward compatible
* Get rest of codebase compiling
* Add test case for old contract info
* Add sanity test vector for old enum contract descriptors
* Fix docs
* Remove comment
* Scalafmt
* Add DLCSerializationVersion, replace isOldSerialization
* Remove ValueIterator.takeNoSkip()
* Fix docs
Co-authored-by: nkohen <nadavk25@gmail.com>
* Add block 0000000000000000000593310d3b0cdc082af49f38b8a1611239072aef8433a8 test vector
* Add test cases
* wip
* Fix bug where we were classifying taproot txs as P2WPKHWitnessV0
* revert logging level
* Some cleanup
* Add logback.xml for scripts, remove scheduler in scan bitcoind
* Fix imports
* Take ben's suggestion and add check to CryptoUtil.isValidPubKey
* Implemented Disjoint Union DLC related data structures with dlcTest passing
Broke DLCClientTest up into multiple test files
Optimized DLC execution unit tests by checking all outcomes on a single setup DLC
Refactored DLCTest to allow for Disjoint Union DLC construction and validation, added tests
Responded to review
Fixed after cherry-pick
Fixed docs
* Fixed things after rebase
* Rebase
* Fix json serializer
* Finish fixing compile
* Start trying to make APIs better for multi oracle contract infos
* Clean things up in the GUI, try to make failures on disjoint union contracts as explicit as possible
* Use less numDigits as optimization for non secp CI test cases
* Fix compile
* Refactor BroadcastDLCDialog
* Fix test case optimization
* Clean up comment
Co-authored-by: nkohen <nadavk25@gmail.com>