Commit graph

4215 commits

Author SHA1 Message Date
Chris Stewart
a7a38881db Refacotring NULLFAIL logic into one place 2016-12-27 20:58:06 -06:00
Chris Stewart
72047ebb92 removed redundant signature checks in OP_CHECKSIG implementation 2016-12-27 16:06:13 -06:00
Thomas McCabe
66757cf65a Merge pull request #46 from Christewart/wtxid_and_commitment_structure
Wtxid and commitment structure
2016-12-26 16:38:14 -06:00
Chris Stewart
10bce4eb7f Adding commitmentHeader constant, adding TODO: inside of RawScriptSignatureParser about using .toInt with UInt64 2016-12-26 15:56:30 -06:00
Chris Stewart
5021934824 Adding constant to indicate minimum commitment size 2016-12-24 09:23:07 -06:00
Chris Stewart
7b2714d443 Adding 'WitnessCommitment' scriptPubKey type to represent the new scriptPubKey that commits to all wtxids in the coinbase tx 2016-12-23 15:41:59 -06:00
Chris Stewart
80d843e6a0 Successfully calculating the wtxid merkle root, and the commitment header inside of a coinbase output 2016-12-22 15:41:18 -06:00
Chris Stewart
95cd5df9a9 Implementing wtxid and txid inside of WitnessTransaction 2016-12-21 12:49:32 -06:00
Chris Stewart
2895899660 fixing merge conflicts for merging w/ master 2016-12-21 10:59:50 -06:00
Chris Stewart
250d64a3ae Merge pull request #44 from Christewart/segwit_sighash_tests
Segwit sighash tests
2016-12-20 20:38:12 -06:00
Chris Stewart
b2ff382a38 Merge branch 'segwit' into segwit_sighash_tests 2016-12-20 15:33:58 -06:00
Chris Stewart
713401fe2e Merge pull request #43 from Christewart/segwit_tx_tests
Segwit tx tests
2016-12-20 15:31:01 -06:00
Chris Stewart
f474197f34 Adding some log statements to TransactionSpec 2016-12-20 15:04:20 -06:00
Chris Stewart
6ebf3fab71 Fixing review comments 2016-12-20 14:37:05 -06:00
Chris Stewart
9012c9acc7 merging in segwit branch changes 2016-12-20 12:12:28 -06:00
Thomas McCabe
18a43fa028 Merge pull request #42 from Christewart/segwit
Segwit - script_tests.json passing
2016-12-20 11:53:20 -06:00
Chris Stewart
32b75c9010 Merge pull request #9 from TomMcCabe/segwit
[Minor] more clean up w/ whitespaces and docs
2016-12-20 07:40:45 -06:00
Tom McCabe
1f3bffe4fb more clean up w/ whitespaces and docs 2016-12-19 16:21:53 -06:00
Chris Stewart
4df100b635 Ushing hash type generator inside of signedCSVScriptSig, signedCLTVScriptSig 2016-12-19 11:43:49 -06:00
Chris Stewart
b11a024e0a Using hash type generator inside of signedP2PK, signedP2PKH, and signedMultiSig scriptSigs ScriptGenerators 2016-12-19 10:58:37 -06:00
Chris Stewart
465f42d5f5 All tx_invalid.json tests are passing 2016-12-19 09:02:28 -06:00
Chris Stewart
622c59e50e Implementing max push size of 520 bytes for a segwit script 2016-12-18 18:33:49 -06:00
Chris Stewart
9ae3d12c5b All tx_valid.json test cases passing 2016-12-17 13:51:56 -06:00
Chris Stewart
27d23b1ca9 Refactoring WitnessTransactionSignatureComponent to take in a 'Transaction' type instead of a 'WitnessTransaction' type -- this is needed for the case of trying to spend a witness scriptPubKey with a base transaction. This won't succeed, but should be possible to try and run through the interpreter 2016-12-16 15:21:18 -06:00
Chris Stewart
df18ddec51 Fixing bug inside of hasUnexpectedWitness wrt to BaseTransactionSignatureComponent having a witness tx with non segwit input with a unused witness 2016-12-16 09:46:10 -06:00
Chris Stewart
96a736bf4d Merge branch 'segwit' into segwit_tx_tests 2016-12-16 08:31:02 -06:00
Chris Stewart
8183d3764c Merge pull request #8 from TomMcCabe/segwit
[Minor] Revise/improve doc notes to reduce unnecessary white spaces and add references
2016-12-15 20:06:54 -06:00
Tom McCabe
6c54f53628 add program stack size check to OP_PICK and OP_ROLL 2016-12-15 19:04:37 -06:00
Chris Stewart
a16cb40836 Adding SigVersion parameter to serializeForSignature -- this is needed for witness txs with inputs using old scriptPubKey/scriptSig types 2016-12-15 18:01:22 -06:00
Tom McCabe
eb948328a5 missed some opCode require statements w/ multiple clauses 2016-12-15 17:56:34 -06:00
Chris Stewart
12caa94cd2 Fixing bug with how to handle UnassignedWitness versions when ScriptErrorDiscourageUpgradableNOPs flag is NOT set 2016-12-15 11:05:17 -06:00
Chris Stewart
ab54cdab67 Fixing bug in transaction serialization for SIGHASH_SINGLE|SIGHASH_ALL of segwit txs 2016-12-15 09:02:09 -06:00
Tom McCabe
c1ae07b5a1 change true/false match to if/else in SpliceInterpreter, combine multiple opCode require clauses into a single clause 2016-12-15 08:47:52 -06:00
Tom McCabe
c939fe3d3e throughout script directory: optimize doc notes, add references, remove unneccessary white spaces, refactor 'case true/false' pattern matching to 'if/else' statements 2016-12-14 19:31:58 -06:00
Chris Stewart
9a5864c3bf fixing bug in 'hasUnexpectedWitness' inside of ScriptInterpreter 2016-12-14 14:19:32 -06:00
Tom McCabe
8b1f4db05f Merge branch 'segwit' of https://github.com/Christewart/bitcoin-s-core into segwit 2016-12-14 13:25:56 -06:00
Chris Stewart
2aab5071fe Removing 'TransactionInputWitness' data structure as it is redundant, now a TransactionWitness just contains a sequence of ScriptWitness 2016-12-14 10:20:41 -06:00
Chris Stewart
306c9727fc Removing 'CurrencyUnit' return type from generators were it is irrelevant 2016-12-14 09:30:11 -06:00
Chris Stewart
52103c1d44 Fixing nits/random code redundancies in src 2016-12-13 19:50:45 -06:00
Chris Stewart
b542961ed9 Implementing generator for p2sh(p2wsh) transactions 2016-12-13 13:31:15 -06:00
Chris Stewart
202c5df832 Implementing spec for P2SH(P2WPKH) signature generation 2016-12-13 10:24:13 -06:00
Chris Stewart
3b03138be0 Implementing WitnessScriptPubKey as a redeem script inside of P2SHScriptSignature 2016-12-12 12:55:28 -06:00
Chris Stewart
2be925542a Implementing P2WSH(MultiSig) and fixing bugs in maxSigs/requiredSigs inside of MultiSignatureScriptPubKey 2016-12-11 14:34:49 -06:00
Chris Stewart
899c0e029e Refactoring code for WitnessGenerators 2016-12-10 19:26:55 -06:00
Chris Stewart
e99a9f1602 Adding generator and spec for P2WSH(P2PKH) witness txs 2016-12-10 18:46:03 -06:00
Chris Stewart
05f3b5fefc Implementing ScriptFactory inside of ScriptSignature 2016-12-09 20:01:40 -06:00
Chris Stewart
725dce2da0 Creating ScriptFactory, implementing it inside of ScriptPubKey 2016-12-09 19:42:50 -06:00
Chris Stewart
10892612e2 Wrote property to check all P2WSH(P2PK) txs can be created and verified 2016-12-09 15:50:53 -06:00
Chris Stewart
a106d23610 Implementing a generator to created a signed witness transaction taht spends a P2WPKH output, create a spec that verifies we can spend all of those outputs 2016-12-08 17:12:21 -06:00
Chris Stewart
86d8a92657 Refactoring WitnessTransactionSignatureComponentV0 to remove explicit paramter of 'ScriptWitness' -- this can be derived from the inputIndex 2016-12-07 11:17:44 -06:00