Commit graph

942 commits

Author SHA1 Message Date
Chris Stewart
49b0b1387b Adding property for NumberUtil.convertBits 2017-11-12 12:55:38 -06:00
Chris Stewart
d88c4f22a8 Adding invariant to bech32 address, lower log level 2017-11-09 11:41:49 -06:00
Chris Stewart
69ec84325e Fixing bug where we were only testing witV0 for serialization symmetry in Bech32Spec 2017-11-07 12:33:56 -06:00
Chris Stewart
dba3997b3e Removing useless code, making checkHrpValidity cleaner 2017-11-04 14:05:13 -05:00
Chris Stewart
c7f5bf6017 Adding bip173 test vectors 2017-10-31 17:28:19 -05:00
Chris Stewart
2255115a3b Adding properties for bitwise operations in UInt8,UInt32 2017-10-30 10:20:18 -05:00
Chris Stewart
94c42d814f Adding support to serialize all witSPKs to bech32 addresses 2017-10-30 09:24:04 -05:00
Chris Stewart
e3311b6694 Adding properties to make sure address from string fails if we have mixed case or we replace a random char in the string 2017-10-27 12:47:51 -05:00
Chris Stewart
661b25acbb Adding Bec32Spec, redesigning Address interface 2017-10-26 15:49:03 -05:00
Chris Stewart
ce5ae1a69a Correctly decoding bech32 address to spks 2017-10-26 14:28:54 -05:00
Chris Stewart
4643d46256 Encoding rest of spk -> bech32 examples in BIP173 2017-10-26 08:59:33 -05:00
Chris Stewart
886461d9d7 Successfully encoding and decoding a p2wpkh -> bech32 address in BIP173 2017-10-25 15:58:43 -05:00
Chris Stewart
bee2ad2303 Merge pull request #93 from Christewart/fix_control_flow_bug
Fix control flow bug
2017-09-25 15:58:45 -05:00
Chris Stewart
063632fb9c Refactoring ScriptInterpreter to have 'has a' relationship with sub interpreters instead of inheriting directly from the various interpreters 2017-09-25 13:28:50 -05:00
Chris Stewart
bc9280af1e Implementing OP_NOTIF by inverting the stack top and calling OP_IF afterwards 2017-09-25 11:24:55 -05:00
Chris Stewart
e035a63173 Renaming helper functions, changing logging level 2017-09-22 13:25:12 -05:00
Chris Stewart
c7a0cded92 All tests passing in ControlOperationsInterpreterTest 2017-09-22 12:59:26 -05:00
Chris Stewart
59186e08d5 Adding rule for OP_ENDIFs to 'insertSubTree' so we can correctly parse partial scripts with OP_ENDIFs when their corresponding IF/NOTIF has already been evaluated 2017-09-22 12:45:47 -05:00
Chris Stewart
5901cfe25e Fixing bug in removeFirstOpElse() 2017-09-22 11:35:29 -05:00
Chris Stewart
5caffdc1db Parsing most examples in ControlOperationsInterpreterTest with new control flow in 'parseBinaryTree' 2017-09-21 19:17:51 -05:00
Chris Stewart
63dba1abc8 Reworking control flow into 'parseBinaryTree' instead of doing it inside of the OP_IF case in 'loop' 2017-09-21 14:09:05 -05:00
Chris Stewart
28e455519d refactoring OP_ELSE to be more simple. Now just parses all of the given tokens inserts into the right sub branch 2017-09-20 14:53:11 -05:00
Chris Stewart
bc5e6d8dbc Fixing bug where we weren't accounting for off by 1 index when parsing an even amount of ENDIFs in OP_ELSE 2017-09-18 13:11:11 -05:00
Chris Stewart
4cfcd63257 Refactoring code to insert OP_ENDIF on the opIf recursion instead of doing it after the recursion is complete 2017-09-18 11:29:25 -05:00
Chris Stewart
aa3bfdf61b Refactoring OP_IF parsing code, now it is cleaner 2017-09-14 10:38:34 -05:00
Chris Stewart
5058abac74 Able to parse a List[ScriptToken] -> binary tree -> List[ScriptToken] for one set of test cases inside of ControlOperationsInterpreterTet -- this includes nested OP_IFs 2017-09-07 15:41:01 -05:00
Chris Stewart
78683ed956 Merge pull request #91 from Christewart/refactor_fromBytes_to_ScriptFactory
refactor 'fromBytes' into ScriptFactory for SPK/ScriptSig
2017-08-23 11:55:06 -05:00
Chris Stewart
9ddaa88434 refactor 'fromBytes' into ScriptFactory for SPK/ScriptSig 2017-08-23 11:38:37 -05:00
Chris Stewart
fc1c75ece9 Merge pull request #90 from Christewart/refactor_logger
Refactoring codebase from using BitcoinSLogger as a mixin trait -- re…
2017-08-23 08:45:17 -05:00
Chris Stewart
090d848ebc Refactoring codebase from using BitcoinSLogger as a mixin trait -- refactoring BitcoinSLogger as abstract class 2017-08-22 21:09:08 -05:00
Chris Stewart
60be687211 Merge pull request #89 from Christewart/upgrade_sbt_assembly
Updating sbt assembly plugin to 0.14.5
2017-08-21 15:23:38 -05:00
Chris Stewart
905b3a53ae Updating sbt assembly plugin to 0.14.5
removing discard strategy for library.properties
2017-08-21 15:09:57 -05:00
Chris Stewart
4a128e4d0d Merge pull request #88 from Christewart/fix_channels_amount_bug
Fixing channels amount bug where we weren't able to close chan with e…
2017-08-19 09:02:41 -05:00
Chris Stewart
40f1ac0414 Fixing channels amount bug where we weren't able to close chan with escrow, removing some logging 2017-08-17 14:00:17 -05:00
Chris Stewart
3f6ac709d6 Merge pull request #87 from Christewart/update_channel_code_with_segwit
Update channel code with segwit
2017-08-11 15:52:15 -05:00
Chris Stewart
da94fb95ea Fixing nits 2017-08-11 11:27:12 -05:00
Chris Stewart
beafa86372 refactoring Channel code to use WitnessTransactions instead of BaseTransactions 2017-08-10 13:13:34 -05:00
Chris Stewart
e4a81f0a2f Merge pull request #84 from Christewart/update_readme
Update README.md
2017-07-20 14:58:54 -05:00
Chris Stewart
7f66ff5ca3 Update README.md
Fixing typo, adding fat jar build instructions

Re adding EnvironmentPaths.md
2017-07-20 14:10:35 -05:00
Chris Stewart
42aa9c7489 Merge pull request #82 from Christewart/master
Creating 'BaseInProgress'
2017-06-23 16:13:41 -05:00
Chris Stewart
4e60ecd4ec Fixing bug in EscrowTimeoutHelper.closeWithTimeout where we weren't wrapping the escrowTimeSPK in a P2SHSPK in the TxSigComponent that is returned 2017-06-16 23:36:07 -05:00
Chris Stewart
0bf30dab89 Merge pull request #81 from Christewart/channel_close_with_timeout
Channel close with timeout
2017-06-15 12:46:40 -05:00
Chris Stewart
c855851ca6 Adding invariant to EscrowTimeoutHelper.closeWithTimeout to require that the escrowTimeoutSPK.timeout branch has a nested SPK of P2PKH 2017-06-15 11:25:11 -05:00
Chris Stewart
98bc0d01b0 Fixing nits, adding invariant to 'ClosedChannelWithTimeout' that requires the funds to be paid to the clientSPK 2017-06-14 19:46:19 -05:00
Chris Stewart
056b53c159 Adding 'closeWithTimeout' function to Channel, refactoring 'spendableCSVValues' in TransactionGenerator, refactoring LockTimeInterpreter 2017-06-13 20:10:38 -05:00
Chris Stewart
b9817d0a14 Add companion object helper for 'Address' 2017-06-12 10:48:46 -05:00
Chris Stewart
d6717dc8e2 Adding 'scriptPubKey' field to address so it easy to recreate the script the address represents 2017-06-12 09:57:08 -05:00
Chris Stewart
8af8cff73c Adding payment_channel invariants, now double check the fee and that the full amounts add up 2017-06-06 20:46:55 -05:00
Chris Stewart
f132c3b959 Merge pull request #78 from Christewart/payment_channels_sighash_refactor
Unidirectional Payment Channels
2017-06-04 16:24:26 -05:00
Chris Stewart
3ab85b47dc Fixing bug in ScriptSignature.fromScriptPubKey function wrt EscrowTimeoutSPK, refactoring BaseTxSigComponent -> TxSigComponent in Channels 2017-06-04 13:44:32 -05:00