Commit graph

154 commits

Author SHA1 Message Date
Chris Stewart
4e93ff3e37 Adding comments as to why TransactionInput's parsed from JSON cannot be reserialized into bitcoin hex format as of now 2016-02-15 09:51:06 -06:00
Chris Stewart
06e7decf56 Fixing major serialization/parsing issues with TransactionInputs - TransactionInput now contains a scriptSigVarInt field that indicates how large the scriptSig of a tx is - this is needed for correct serialization of inputs 2016-02-14 16:35:26 -06:00
Chris Stewart
327e6fa72b Fixing bug for parsing VarInts 2016-02-14 08:57:48 -06:00
Chris Stewart
dc0c8775fd Implementing VarInt class for parsing bitcoin scriptSignatures and scriptPubKey's correctly 2016-02-13 19:30:06 -06:00
Chris Stewart
5c8d915755 Adding transaction test utilility functions to build transactions for tests 2016-02-12 10:50:28 -06:00
Chris Stewart
0c486b303b Fixing issues inside of OP_PUSHDATA, now the script items for OP_PUSHDATA are pushed onto the stack by the ScriptInterpreter 2016-02-12 09:02:22 -06:00
Chris Stewart
ee932cd55a Fixing bug with OP_PUSHDATA operations where it couldn't push zero bytes onto stack as well as fixing parsing algorithm to recognize the bytes after an OP_PUSHDATA operation as BytesToPushOntoStack types instead of ScriptNumbers 2016-02-11 18:33:27 -06:00
Chris Stewart
2e9965c5ba Fixing bug in OP_CHECKMULTISIG where the correct number of pubkeys weren't being pushed onto the stack 2016-02-11 09:36:27 -06:00
Chris Stewart
0ff2022c6d Implementing OP_CHECKMULTISIG for base case of 0 signatures required 2016-02-10 20:06:05 -06:00
Chris Stewart
fb995616e6 Implementing OP_CODESEPARATOR script operation, adding more flexibility to ScriptProgramFactory 2016-02-10 17:17:49 -06:00
Chris Stewart
aa4195c13b Refactoring code base from using constructor for ScriptProgramImpl to utilize ScriptProgramFactory function 2016-02-10 15:40:28 -06:00
Chris Stewart
c2d669d1db Fixing negative zero parsing for hex numbers, using context sensitive grammar for parsing the type of a byte after a ByteToPushOntoStack op, fixing various bugs inside of parsing algorithm 2016-02-10 12:39:33 -06:00
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
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