* Pull over scala3 compatible code for crypto/ project from https://github.com/bitcoin-s/bitcoin-s/pull/3497
* Pull over scala3 compatible code for core/ project from https://github.com/bitcoin-s/bitcoin-s/pull/3497
* Add -Xsource:3 to core/
* Get coreJVM/compile working
* restore files lost from master when checking out core/ from 2021-06-30
* Get entire codebase compiling
* Get bitcoindRpcTest/test:compile working
* Restore P2SHDescriptor constructor
* scalafmt
* Fix UInt8.toByte
* Get all merkle block tests working
* Fix GCS bug
* Add -Xsource:3 to cryptoTest/
* Update scalafmt-core to 3.8.1
* Update .scalafmt.conf settings to be factory default settings
* Fix typo
* scalafmt
* Empty commit to re-run CI
* Revert some scalafmt back to original scalafmt.conf
---------
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* Add DescriptorType, OutputDescriptor
* Get unit test passing for a descriptor with a xpub and bip32 path
* WIP: Implement checksum algo
* WIP: Implement polyMod
* Get checksum unit test case passing
* Get basic serialization test case passing
* Revert Bech32.scala
* WIP: Implement KeyExpression
* WIP: KeyOriginExpression
* Get basic KeyExpression test case passing
* Get basic unit tests workign for parsing Private/Public key descriptor expressions
* Add examples
* Get all key expression unit tests passing
* Get negative test vectors passing
* WIP: Get P2WPKHDescriptor tests working
* Get all serizliation tests passing for non-derivation path BIP382 descrioptors
* Get BIP382 derivation test cases passing
* Implement BIP382 failure test cases
* Get BIP381 test vectors passing
* Split key expressions into SingleKeyExpression,MultisigKeyExpression
* WIP: Multisig descriptors
* Remove custom building of scripts now that we have #5502
* Get BIP383 test vectors passing
* Get BIP384 test vectors passing
* Fix bug in runFailTest()
* Add RawSPKScriptExpression, use it with P2WSHExpression to ensure underlying spk is a RawScriptPubKey
* Get all negative test vectors working after fixing bug in runFailTest()
* Implement BIP385 raw() test vectors, skip addr() descriptor
* Get everything working up to dealing with taproot pubkey types
* Begin working on type hierarchy for different pubkeys
* Get things to the point of needing a custom pubkey type
* Get things compiling w/ PubKeyTypeExpression
* Get tr(WIF) example working
* WIP: Key reworking type hierachy to be PublicKey type specific
* WIP: Taproot helpers
* Get taproot descriptor working with both keypath and single level scriptpath
* Get recursive tapscript tree test vector working
* Implement negative test vectors for BIP386
* Add BIP386 derivation test
* Get extkey tr() descriptor test working
* Rename InternalPublicKeyExpression -> RawPublicXOnlyPublicKeyExpression
* Fix keyOrigin for tr() descriptors
* Cleanup comments
* Add comments
* Move leafVersion TapscriptControlBlock -> TapLeaf
* Add taproot wallet test vectors
* Get parsing logic working
* Get first test case passing
* Add TapLeaf
* Get test cases working with two TapLeaf
* Add TapscriptTree as the top level type for a recursive data structure for TapscriptPath's
* Remove control block parsing for now until we actually test control blocks
* scalafmt
* Get dependencies resolving, get tor module compiling
* Get everything compiling with pekko
* Rework configs/logging to use pekko namespace
* Rename AkkaUtil -> PekkoUtil, BitcoinSAkkaAsyncTest -> BitcoinSPekkoAsyncTest
* Add LargeTransactionTest
* Remove unused ByteArrayOutputStream
* Add block test case for 00000000ce4a4666cce2205d760d37b5579cdedf3ac9e4295557e8ac962cde55
* Cache txId to avoid re-computing txids which can take alot of resources
* Cache WitnessTransaction.toBaseTx, remove println
* remove BlockTest as it didn't capture the bug
* Add OrderedSchnorrSignatures, use it in OracleAttestment, propagate it threw the codebase
* Small cleanups
* Add SortedVecFactory
* Fix test case with out of order nonces
* 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>
* Add FutureUtilTest for both FutureUtil.batchAndParallelExecute and FutureUtil.batchAndSyncExecute
* Make Vector same size as available processors as CI machines don't have as many processors as I have locally
* Try to fix test case
* Add processors to the log
* Replace java scheduler with a scalajs scheduler called monix
* Make asyncUtilsTest compatible with Scalajs, add them to the CI matrix
* Add more missing runs of asyncUtilsTestJS/test
* Removed type parameter from PublicKey
* Deduplicated call to public key decompression in isFullyValid
* Fixed FieldElement
* Added CurveCoordinate to replace FieldElement in places where it was being misused
* Added edge case tests
* 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