Commit Graph

4672 Commits

Author SHA1 Message Date
Chris Stewart
b5037751bf Fixing bug dealing with storing long script constants. Now if a constant is under 64 bits it is stored as a script number 2016-02-10 10:16:04 -06:00
Chris Stewart
66d25df3ae Implementing negative numbers for script numbers 2016-02-09 17:24:27 -06:00
Chris Stewart
4f9f829d03 Adding functionality to NumberUtil to serialize negative numbers to hex correctly 2016-02-09 11:34:07 -06:00
Chris Stewart
62f0202bb0 Implementing a Number utility to handle endianess and signing of numbers in bitcoin 2016-02-08 19:56:45 -06:00
Chris Stewart
c0f709db37 implementing OP_CHECKLOCKTIMEVERIFY script operation 2016-02-08 09:01:58 -06:00
Chris Stewart
d02f259bc0 Fixing bug where OP_NOP wasn't parent of ReservedOperationsFactory 2016-02-07 14:49:12 -06:00
Chris Stewart
d2cf8df898 Implementing OP_RIPEMD160, OP_SHA256, OP_HASH256 script operations, fixing bug inside of CryptoUtil with serializing to and from hex 2016-02-07 14:04:51 -06:00
Chris Stewart
a9926e6cba Forgot to implement aritmetic operation OP_WITHIN 2016-02-07 11:44:05 -06:00
Chris Stewart
a3594967ea Implementing OP_MIN, OP_MAX script operations. Arithmetic operations done 2016-02-06 18:15:27 -06:00
Chris Stewart
e6f5368e5b Implementing OP_LESSTHAN, OP_GREATERTHAN, OP_LESSTHANOREQUAL, OP_GREATERTHANOREQUAL script operations 2016-02-06 17:39:42 -06:00
Chris Stewart
6d95a38a03 Implementing OP_BOOLOR, OP_BOOLAND, OP_0NOTEQUAL, OP_NOT, OP_NEGATE script operations 2016-02-06 16:41:22 -06:00
Chris Stewart
53d4ff5e8b implementing OP_1ADD, OP_1SUB, OP_SUB and OP_ABS script operations 2016-02-06 14:45:36 -06:00
Chris Stewart
24b79f88b7 Finished implementing OP_SIZE script operation 2016-02-06 14:17:46 -06:00
Chris Stewart
530668b80d Fixing OP_EQUAL issues, changing hexToInt to hexToLong 2016-02-06 13:14:04 -06:00
Chris Stewart
6b04e97196 Fixing merge conflicts 2016-02-06 10:45:15 -06:00
Chris Stewart
0a8b7eaca1 Uncommenting SpliceInterpreter test 2016-02-06 10:12:30 -06:00
Chris Stewart
8a63425f9d Major refactor to differentiate ScriptNumbers and Script numbers that represent a specific amount of bytes that need to be pushed onto the stack 2016-02-06 10:06:22 -06:00
Chris Stewart
a03d40f8d8 Optimizing toSeq inside of BinaryTree 2016-02-05 14:16:09 -06:00
Chris Stewart
372ec28a16 Implementing OP_TUCK, OP_2DROP, OP_2DUP, OP_3DUP, OP_2OVER, OP_2ROT, OP_2SWAP script operations 2016-02-04 09:48:35 -06:00
Chris Stewart
b16b92f057 Implementing OP_SWAP script operation 2016-02-04 08:26:15 -06:00
Chris Stewart
aae9e6c1be Implementing OP_2DROP script operation 2016-02-04 08:10:05 -06:00
Chris Stewart
7c17ae7568 Implementing OP_2ROT for script operations 2016-02-03 21:44:13 -06:00
Chris Stewart
d41da910b7 Implementing OP_ROT 2016-02-03 19:58:11 -06:00
Chris Stewart
6b9092fb5d Implementing OP_ROLL for script operations 2016-02-03 19:36:07 -06:00
Chris Stewart
4aeb30ca6d Implementing OP_PICK script operation 2016-02-03 19:25:02 -06:00
Chris Stewart
09458675a4 implmenting OP_NIP and OP_IFDUP 2016-02-03 15:48:29 -06:00
Chris Stewart
1ca36bfb85 Fixing bug where ScriptNumber and ScriptContants weren't being evaluated correctly by OP_EQUAL 2016-02-03 15:25:09 -06:00
Chris Stewart
09f7e75c61 Changing ScriptProgramImpl from not requiring explicit passing of altStack to requiring the explicit passing of altStack to the constructor 2016-02-03 14:00:53 -06:00
Tom McCabe
81b197764d rename scalacoin package to bitcoins 2016-02-03 13:45:35 -06:00
Chris Stewart
5352b8d53f Adding ScriptProgram to represent the entire script program - major refactor of script code base to use ScriptProgram 2016-02-03 13:32:36 -06:00
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