Commit graph

942 commits

Author SHA1 Message Date
Chris Stewart
94d9bed6a0 Refactoring 'PaymentChannel' -> 'Channel' for conciseness 2017-06-02 10:40:30 -05:00
Chris Stewart
c08d3fc70a Adding EscrowTimeScriptSignature to ScriptSignature.fromAsm -- we can now correctly type EscrowTimeoutScriptSignature from the only the asm 2017-05-31 09:17:53 -05:00
Chris Stewart
c457a957db Refactoring PaymentChannelInProgressClientSigned.serverSign 2017-05-29 11:28:02 -05:00
Chris Stewart
b5619c0e2c Fixing bug in EscrowTimeoutHelper.serverSign where we weren't puting the p2shScriptPubKey as the scriptPubKey we are spending in the TxSigComponent 2017-05-29 10:50:53 -05:00
Chris Stewart
488586914c Adding invariant stating the amount for the server output must be >= Policy.dustThreshold 2017-05-29 10:50:53 -05:00
Chris Stewart
4c304d6dfd Refactoring payment channels to not use witness transactions 2017-05-29 10:50:53 -05:00
Chris Stewart
214e433c97 Creating LockTimeScriptPubKey type to generecize different locktime types, refactoring EscrowTimeout to accept LockTimeScriptPubKeys instead of only CSVScriptPubKeys 2017-05-29 10:50:10 -05:00
Chris Stewart
e817293490 fixing bug to use 'nestedScriptPubKey' 2017-05-29 10:50:10 -05:00
Chris Stewart
cec4a76969 adding hashType parameter to 'serverSign' a payment channel 2017-05-29 10:50:10 -05:00
Chris Stewart
5bfedce8ba Fixing bug with creating witness txs with 0 required signatures spending a EscrowTimeoutScriptPubKey 2017-05-29 10:50:10 -05:00
Chris Stewart
44901cb482 Creating 'PaymentChannelInProgressClientSigned' to represent a payment channel when we have the clients signature, but not the servers. Added 'clientSign' and 'serverSign' functions to sign the new tx according to who needs to sign it 2017-05-29 10:50:10 -05:00
Chris Stewart
8fe60681d7 Adding invariants about payment channels, also adding helper functions to transfer a channel from AwaitingTx -> InProgress -> Closed 2017-05-29 10:50:10 -05:00
Chris Stewart
9762f95379 Adding spec to make sure we can spend from the 'AnchorTransaction' on a payment channel 2017-05-29 10:50:10 -05:00
Chris Stewart
eda7ae59f9 Adding generator for timeout branch of P2WSH(CsvEscrowTimeoutScript) 2017-05-29 10:50:10 -05:00
Chris Stewart
c2641afe31 Adding P2WSH(EscrowTimeoutScriptPubKey) tx generator, adding spec to check the digital signature 2017-05-29 10:50:09 -05:00
Chris Stewart
a338b0f09a Rebasing ontop of new master, adding property for spendableEscrowTimeoutTxs 2017-05-29 10:50:09 -05:00
Chris Stewart
1bf292852c Refactoring Transaction/Script Genertors to be easier to use 2017-05-29 10:50:09 -05:00
Chris Stewart
341451a094 Adding LockTimeScriptSignature type, refactoring generators to be more clean 2017-05-29 10:50:09 -05:00
Chris Stewart
13c8960a04 Creating LockTimeScriptPubKey type to generecize different locktime types, refactoring EscrowTimeout to accept LockTimeScriptPubKeys instead of only CSVScriptPubKeys 2017-05-29 10:50:09 -05:00
Chris Stewart
365c0a698b Adding property to make sure timeout works in CSVEscrowTimeoutScriptPubKey 2017-05-29 10:50:09 -05:00
Chris Stewart
948b0021fe Adding property to make sure multisig works in CSVEscrowTimeoutScriptPubKey 2017-05-29 10:50:09 -05:00
Chris Stewart
02e94ba1b6 Merge pull request #71 from Christewart/p2pkh_script_sig_bug_rd2
P2pkh script sig bug rd2
2017-05-29 10:48:30 -05:00
Chris Stewart
cab77ed835 Hopefully finally fixed the P2PKHScriptSignature bug 2017-05-29 10:18:14 -05:00
Chris Stewart
cfa5baec72 Adding new secp256k1 functionality 2017-05-29 10:18:14 -05:00
Chris Stewart
f089bff810 Merge pull request #69 from Christewart/secp256k1_api_enhancement
Adding new secp256k1 functionality
2017-05-29 10:16:32 -05:00
Chris Stewart
b3bcc1d99d Adding new secp256k1 functionality 2017-05-29 09:50:46 -05:00
Chris Stewart
8d99b4cc65 Merge pull request #76 from Christewart/use_scriptsig_from_scriptPubKey_for_p2sh_scriptsig
Using 'Try' return type when using ScriptSignature.fromScriptPubKey
2017-05-17 18:42:22 -05:00
Chris Stewart
25e5b108c6 Using 'Try' return type when using ScriptSignature.fromScriptPubKey 2017-05-17 18:16:22 -05:00
Chris Stewart
e5f9887db7 Merge pull request #75 from Christewart/add_bitcoin_currency_unit
Add bitcoin currency unit
2017-05-03 13:48:36 -05:00
Chris Stewart
7346bd467e Refactoring defintion of '==' in CurrencyUnit -- now convert to satoshis and then check the underlying Int64s 2017-05-03 10:34:54 -05:00
Chris Stewart
1bf3558cf5 Adding 'Bitconis' Currency unit type, adding unary '-' operator to negate the underlying values of CurrencyUnits / Int32s / Int64s 2017-05-02 12:01:44 -05:00
Chris Stewart
2ca4627ca7 Merge pull request #73 from Christewart/tweak_network_params
Adding 'name' and 'rpcPort' fields to NetworkParameters
2017-05-01 12:25:44 -05:00
Chris Stewart
ba496479ab Adding 'name' and 'rpcPort' fields to NetworkParameters 2017-05-01 12:19:48 -05:00
Chris Stewart
d551c553df Merge pull request #72 from Christewart/refactor_wtxsigcomponent
Refactoring WitnessTransactionSignatureComponent to contain a 'Witnes…
2017-04-17 12:07:32 -05:00
Chris Stewart
8bce413519 Removing unused BitcoinScriptUtil.parseSigVersion, fixing more nits 2017-04-17 10:48:23 -05:00
Chris Stewart
5a45a2b9ee Refactoring ScriptProgram a little more 2017-04-16 17:38:00 -05:00
Chris Stewart
b610ad12b2 Refactoring .get calls on Try, changing logging level 2017-04-16 16:23:23 -05:00
Chris Stewart
5ef34aca80 Remaning TransactionSignatureComponent -> TxSigComponent 2017-04-16 15:08:18 -05:00
Chris Stewart
c92c22cdfe Adding WitnessTxSigComponentRebuilt type, this represents verify a segwit script after rebuilding the witness scriptPubKey into a conventional scriptPubKey 2017-04-16 14:09:54 -05:00
Chris Stewart
78a496d9ac Refactoring WitnessTransactionSignatureComponent to contain a 'WitnessTransaction' type instead of a 'Transaction' type
Uncommenting test cases, adding comment

Fixing a few more nits
2017-04-12 11:02:59 -05:00
Chris Stewart
93cf0f6c25 Merge pull request #67 from Christewart/fix_calc_pushop_script_num_op
Fixing bug in calculating pushops for ScriptNumberOperations
2017-03-14 12:51:46 -05:00
Chris Stewart
3835148f05 Fixing bug in pushing constants onto the stack whose op codes are ScriptNumberOperations -- for instance pushing an 83 byte transaction (whose op code is OP_3) -- whose script looks like OP_PUSHDATA1 OP_3 <83 byte tx> would fail before this 2017-03-08 10:59:20 -06:00
Chris Stewart
d8ee3ddb61 Fixing bug in calculating pushops for ScriptNumberOperations 2017-03-08 09:06:59 -06:00
Chris Stewart
abb8d2ae5b Update README.md 2017-02-23 19:29:33 -06:00
Chris Stewart
f6bc61c7cd Merge pull request #60 from Christewart/libsecp256k1
Libsecp256k1 integration
2017-02-23 19:27:52 -06:00
Thomas McCabe
1207b1814b Merge pull request #61 from Christewart/p2pkh_script_sig_bug
Implementing fix to p2pkh script sig bug
2017-02-23 17:42:17 -06:00
Chris Stewart
16c131e595 Fixing merge conflict with master 2017-02-23 15:15:42 -06:00
Thomas McCabe
f9b52c6d59 Merge pull request #52 from Christewart/refactor_dependencies
Refactoring dependencies to only include scalacheck & spongycastle in…
2017-02-23 10:45:40 -06:00
Chris Stewart
eaecb5181f Removing comment from P2PKHScriptSig 2017-02-22 15:19:24 -06:00
Chris Stewart
082bfa909c Implementing fix to p2pkh script sig bug 2017-02-22 14:57:05 -06:00