Commit graph

3592 commits

Author SHA1 Message Date
Chris Stewart
45a688fd19 Fixing bug where script constants were not being pushed onto the stack as one script constant. I.e. 0x05 was pushing 5 individual script tokens onto the stack instead of one script token with the 5 script tokens inside of it 2016-02-03 10:06:49 -06:00
Chris Stewart
a617615cad Added in parsing for OP_NOTIF and functionality for interpreting OP_NOTIF 2016-02-02 19:25:19 -06:00
Chris Stewart
6587d1dd66 Fixed control operations issue where OP_ELSE expression wasn't being removed if the previous OP_ELSE was evaluated 2016-02-02 17:15:00 -06:00
Chris Stewart
b70580de5a Fixed control operations issue where OP_ELSE expression wasn't being removed if the previous OP_ELSE was evaluated 2016-02-02 17:14:39 -06:00
Chris Stewart
178b9f70ed All control operations interpreter tests are working again with new recursive script parsing algorithm 2016-02-02 14:19:03 -06:00
Chris Stewart
3ef6192476 Successfully parsing binary trees with recursiving parsing algorithm 2016-02-02 12:57:36 -06:00
Chris Stewart
704d0b7365 Successfully parsing binary trees with recursiving parsing algorithm 2016-02-02 12:55:23 -06:00
Chris Stewart
a3337fcc37 Fixing bug wrt to removing the correct OP_ELSE when an OP_IF is evaluated to true 2016-02-01 16:01:35 -06:00
Chris Stewart
32932ca294 adding findFirstDFS function to binary tree 2016-02-01 10:28:50 -06:00
Chris Stewart
7ee5d6f82d Fixing bug with removing OP_IF branch if the stack top is false 2016-01-31 17:04:10 -06:00
Chris Stewart
4c5cee16a5 Parsing binary trees with script tokens before & after OP_IFs and OP_ENDIFs 2016-01-30 10:29:12 -06:00
Chris Stewart
a4ff6cd939 Cleaning up the code base a bit 2016-01-29 14:17:02 -06:00
Chris Stewart
aa5b934ef5 All ControlOperations tests are passing - parsing binary tree correctly 2016-01-29 14:10:33 -06:00
Chris Stewart
07a691fab5 Parsing fixing bug with parsing nested OP_ELSES into binary tree, removing first OP_ELSE in the tree 2016-01-29 10:01:04 -06:00
Chris Stewart
4bd236cf9f Parsing fixing bug with parsing nested OP_ELSES into binary tree, removing first OP_ELSE in the tree 2016-01-29 10:00:53 -06:00
Chris Stewart
171053bf94 Fixing bug where parse tree was only growing to the left 2016-01-28 16:49:23 -06:00
Chris Stewart
caaf98c43e Successfuly parsing a script to a binary tree, then converting it back to a seq 2016-01-28 16:32:57 -06:00
Chris Stewart
25714cd03b Fixing various bugs, still working on ControlOperations 2016-01-27 15:32:37 -06:00
Chris Stewart
c1a439a189 Adding bytesSize function to ScriptTokens, fixing issue with OP_0 byte size 2016-01-27 08:43:07 -06:00
Chris Stewart
b0cf679b88 Solving issue with hashing the wrong hex value for OP_SHA1 - now just had the byte array. Fixed OP_0 corner case where it had an incorrect byte array value 2016-01-26 19:23:50 -06:00
Chris Stewart
7c631a52b7 Fixing bug wrt to script numbers not pushing the correct amount of bytes onto the stack 2016-01-26 11:26:08 -06:00
Chris Stewart
787695dcdf Fixed bug with multiple OP_ELSE 2016-01-25 21:07:12 -06:00
Chris Stewart
355974b853 Adding ArithemeticInterpreter, implementing OP_ADD 2016-01-25 14:04:41 -06:00
Chris Stewart
d79c92cf59 fixing a bug wrt to empty byte vectors and OP_PUSHDATA ops 2016-01-25 12:30:14 -06:00
Chris Stewart
92bb70b8f8 implementation done for OP_PUSHDATA1, OP_PUSHDATA2, and OP_PUSHDATA4 2016-01-25 12:05:46 -06:00
Chris Stewart
ea517312ab Adding arithmetic operations to ScriptNumbers 2016-01-25 08:03:36 -06:00
Chris Stewart
bac228808a Adding ConstantInterpreter 2016-01-24 13:25:38 -06:00
Chris Stewart
10fdcbf849 Fixing issue with parsing test data from script_valid.json - now correctly interpreting all test cases from script_valid.json except last 2 2016-01-23 19:11:20 -06:00
Chris Stewart
a16f732981 Adding unused op codes for tests in bitcoin core's scrip_valid.json tests 2016-01-22 19:30:48 -06:00
Chris Stewart
8039a72dfc Adding reserved operations 2016-01-22 16:25:25 -06:00
Chris Stewart
60bb8e0e6b refactoring the parsing algorithm into functions that can be reused across data types 2016-01-22 13:23:12 -06:00
Chris Stewart
d12cc97e21 Adding Splice operations for bitcoin core test cases 2016-01-22 09:47:42 -06:00
Chris Stewart
e99d253f89 Adding disabled arithmetic operations for parsing the bitcoin core script tests 2016-01-21 20:49:40 -06:00
Chris Stewart
ce57fa5780 Parsing more core test cases, up to parsing test case with very scriptSignature 0x417a7a....a7a7a 2016-01-21 16:50:34 -06:00
Thomas McCabe
910cb6781e add .idea/* to .gitignore 2016-01-21 16:06:08 -06:00
Chris Stewart
eebb604cbb Adding ScalacoinUtil test case 2016-01-21 10:44:38 -06:00
Chris Stewart
55eab41044 fixing issue with matching hex and byte representations in ScriptOperationsFactory 2016-01-20 15:51:37 -06:00
Chris Stewart
d5eff75956 Successfully running the first grouping of tests from bicoin core - the ones to do with whitespaces 2016-01-19 20:20:24 -06:00
Chris Stewart
8a17165d03 fixing bugs relating to ScripBooleans and adding OP_0 to the ScriptNumberFactory, also succesfully passing the first test case from bitcoin core 2016-01-19 18:18:47 -06:00
Chris Stewart
fe149cc0d5 Adding ScriptTrue and ScriptFalse boolean objects for script 2016-01-19 11:00:17 -06:00
Chris Stewart
d0462820e5 Test framework for script tests from bitcoin core successfully setup 2016-01-19 09:15:28 -06:00
Chris Stewart
bb0f4e8821 Adding ScriptPubkeyFactory 2016-01-19 09:02:01 -06:00
Chris Stewart
c621ec9356 Adding ScriptSignatureFactory, working on parsing script json test cases from Bitcoin Core 2016-01-19 08:52:55 -06:00
Chris Stewart
b8ff3836f5 Adding script tests from bitcoin core 2016-01-18 21:18:22 -06:00
Chris Stewart
c2cec26675 Adding HashTypes and unit tests 2016-01-18 13:48:27 -06:00
Chris Stewart
2b642deb32 renaming fromOpCode to fromByte inside of ScriptOperationFactory 2016-01-18 12:46:30 -06:00
Chris Stewart
6f4687c50e Cleaning up the code base a bit, finished writing code to parse and write raw bitcoin transactions 2016-01-15 15:18:15 -06:00
Chris Stewart
40d15cd260 Successfully parsing raw bitcoin transactions, fixing a variety of bugs throughout the raw parsing api, and adding helpers inside of RawBitcoinSerializer 2016-01-15 14:45:01 -06:00
Chris Stewart
472e712daf fixing .toInt bug inside of TransactionInputParser 2016-01-14 14:18:35 -06:00
Chris Stewart
6afe7dcbac Fixing bug in outpoint parser, wasn't correctly parsing vout numbers 2016-01-14 10:56:41 -06:00