Commit graph

1008 commits

Author SHA1 Message Date
Chris Stewart
2a48a15e53 Implementing P2SH(P2WPKH) 2016-12-04 16:51:15 -06:00
Chris Stewart
030f75b408 Fixing bug in serialization of tx for signature with P2SH(P2WSH) txs 2016-12-04 16:07:18 -06:00
Chris Stewart
ec2bef7a27 Implementing P2SH(P2WSH) 2016-12-04 11:58:49 -06:00
Chris Stewart
62e63afe39 First P2WPKH script_test.json passing 2016-12-03 12:01:17 -06:00
Chris Stewart
564003abfc Fixing bug in 'buildCreditingTransaction' for script_tests.json 2016-12-02 22:00:39 -06:00
Chris Stewart
f8b15175f8 Fixed all test cases that needed to be change due to moving CompactSizeUInts into ScriptSignature/ScriptPubKey -- now need to implement rest of segwit 2016-12-02 19:04:14 -06:00
Chris Stewart
ed0a1b37e7 Adding 'asmBytes' val to ScriptSignature -- this is the raw byte array from the scriptSig WITHOUT the a CompactSizeUInt bytes at the beginning 2016-12-02 16:32:20 -06:00
Chris Stewart
974829cc2d Successfully passing all ScriptSignature tests with new serialization algorithm 2016-12-02 14:23:14 -06:00
Chris Stewart
50705b3117 Successfully passing all ScriptPubKey tests with new serialization algorithm 2016-12-01 14:44:44 -06:00
Chris Stewart
df47efa634 Refactoring ScriptPubKey to incloude the CompactSizeUInt indicating how long it is, removing it from TransactionOutput 2016-11-30 15:46:07 -06:00
Chris Stewart
f4beb545cc Making WitnessV0TransactionSignatureComponent contain a WitnessTransaction 2016-11-29 14:33:29 -06:00
Chris Stewart
3c1cbf7ac1 Successfully serializing first transaction for a segwit signature 2016-11-28 19:18:40 -06:00
Chris Stewart
2a42c9b3f9 Adding WitnessTransaction serialization symmetry spec 2016-11-28 14:08:50 -06:00
Chris Stewart
600597ee45 Adding property for serialization symmetry for TransactionInputWitness 2016-11-28 13:08:47 -06:00
Chris Stewart
9c3b3f0eb2 Removing 'marker' and 'flag' field from witness tx, as bitcoin core does not stores those in CTransaction 2016-11-25 19:42:00 -06:00
Chris Stewart
badca76e98 Fixing serialization bug, stacks are using a FP convention of prepending to a list, so the first, and to extract from the stack you can use cons to in O(1) time 2016-11-25 11:18:58 -06:00
Chris Stewart
b96d4c32c4 Correctly serializing an example witness tx from script_tests.json 2016-11-24 21:44:22 -06:00
Chris Stewart
886b17a76a Refactoring the main factory function inside of 'Transaction' companion object to allocate WitnessTransactions/BaseTransactions 2016-11-23 10:51:09 -06:00
Chris Stewart
7b0bb21404 Creating two distianct algebraic data types for txs, BaseTransaction and WitnessTransaction 2016-11-22 09:07:25 -06:00
Chris Stewart
215d8a1df2 Modifying data structure inside of ScriptWitness to be a Seq[Seq[Byte]] instead of Seq[ScriptConstant] since BIP141 says the witness is NOT Script 2016-11-21 16:25:11 -06:00
Chris Stewart
e90d5acaa7 Refactoring Hashtypes to be simpler 2016-11-21 12:58:59 -06:00
Chris Stewart
eb2beb9b69 Fixing bug in serialization for p2sh signature 2016-11-18 16:46:13 -06:00
Chris Stewart
a83b04e63b Adding BaseTransactionSignatureComponent type and WitnessV0TransactionSignatureComponent type to differentiate the two signature components 2016-11-18 16:28:31 -06:00
Chris Stewart
26b65aec87 Creating 'SigVersion' type, adding it to TxSignatureComponent 2016-11-18 09:59:57 -06:00
Chris Stewart
a4a17c7cb0 Implemented SigErrorNullFail for OP_CHECKSIG/OP_CHECKSIGVERIFY 2016-11-17 15:10:32 -06:00
Chris Stewart
cea410d09f Passing the first segwit test inside of script_tests.json 2016-11-16 15:51:02 -06:00
Chris Stewart
a6912e49ec fixing a bug with creating the scriptPubKey ScriptProgram 2016-11-15 14:04:21 -06:00
Chris Stewart
78d945ccf4 Refactoring ScriptProgram to remove all 'factory' functions 2016-11-15 13:06:48 -06:00
Chris Stewart
94d3fa9b00 All non witness tests inside of script_tests.json passing now 2016-11-14 21:20:15 -06:00
Chris Stewart
63d7f2c24f Fixing bug with max op count inside an unexecuted OP_IF in script 2016-11-14 20:42:58 -06:00
Chris Stewart
a609c66a06 Successfully parsing witness option in script_tests.json 2016-11-14 19:43:23 -06:00
Chris Stewart
a16e0469e8 Adding WitnessVersion and ScriptWitness types 2016-11-10 15:41:49 -06:00
Chris Stewart
2602125134 Adding new ScriptFlags for segwit 2016-11-10 12:08:34 -06:00
Chris Stewart
d2acae4664 Adding new script error types for segwit 2016-11-10 10:19:41 -06:00
Chris Stewart
f24f2a6f55 Adding new script_test.json for segwit, implmeneting is isWitnessProgram 2016-11-10 09:48:29 -06:00
Thomas McCabe
cf406a5fa6 Merge pull request #40 from Christewart/remove_guards_from_pattern_patches
Remove guards from pattern patches
2016-10-10 08:35:21 -05:00
Thomas McCabe
4a83f1866f Merge pull request #39 from Christewart/remove_spray
Moving spray dependency to 'test' scope
2016-10-10 08:28:46 -05:00
Chris Stewart
aaab11d7f1 Fixing issue on pattern matching exhasutiveness being broken by using guard 2016-10-09 16:38:53 -05:00
Chris Stewart
faafebce7f Moving spray dependency to 'test' scope 2016-10-07 10:06:48 -05:00
Thomas McCabe
3114b0a2c5 Merge pull request #38 from Christewart/master
Adding helper function to P2PKHScriptPubKey
2016-09-23 10:38:26 -05:00
Chris Stewart
bba9797b7e Merging master, fixing merge conflicts 2016-09-22 19:30:27 -05:00
Chris Stewart
72dcefdbf9 Adding function to P2PKHScriptPubKey to retreive the pubKeyHash 2016-09-22 19:16:03 -05:00
Chris Stewart
069832d37b Merge pull request #37 from TomMcCabe/fix_endianness_typo
fix endianness typo
2016-09-21 19:34:24 -05:00
Tom McCabe
f7f388c5ea fix endianness typo 2016-09-21 19:18:28 -05:00
Chris Stewart
9af996df54 Merge pull request #31 from TomMcCabe/cltv_and_csv
Add CLTVScriptPubKey and CSVScriptPubKey
2016-09-21 14:38:33 -05:00
Tom McCabe
9de80f17d3 add CLTV/CSVScriptPubKey test files 2016-09-21 14:07:51 -05:00
Thomas McCabe
7eb9e8f348 Merge pull request #36 from Christewart/master
Adds more flexibility to BlockchainElementsGenerator
2016-09-21 13:31:40 -05:00
Chris Stewart
53201a0dfd Addign difficulty threshold val to NetworkParamters 2016-09-21 10:41:45 -05:00
Tom McCabe
563d901ac6 revise locktime values for CLTV/CSVScriptPubKeys, refactor minimalScriptNumberRepresentation to return a ScriptNumber 2016-09-20 14:38:29 -05:00
Tom McCabe
18745d58e0 fix bug with finding underlying scriptPubKeys and locktime inside CLTV/CSVScriptPubKeys 2016-09-20 11:13:24 -05:00