Commit Graph

249 Commits

Author SHA1 Message Date
Christopher Jeffrey
d53050993c better witnessSize. 2016-02-28 10:34:10 -08:00
Christopher Jeffrey
8755b16235 more witness size. 2016-02-28 08:10:25 -08:00
Christopher Jeffrey
16f6a1b5e2 witness size. 2016-02-28 07:33:12 -08:00
Christopher Jeffrey
326ef521ff calculate vsize. other misc fixes. 2016-02-28 07:05:16 -08:00
Christopher Jeffrey
8a8b664061 more fixes. cleanup debugging. 2016-02-28 06:07:04 -08:00
Christopher Jeffrey
3fcc7d5b07 segwit wallet support. segwit chain improvements. 2016-02-28 04:12:51 -08:00
Christopher Jeffrey
bd868cda7a segwit things 2016-02-27 05:51:48 -08:00
Christopher Jeffrey
77c9348824 get segnet working. 2016-02-26 21:53:39 -08:00
Christopher Jeffrey
8467f339c1 segwit. misc. 2016-02-26 18:06:08 -08:00
Christopher Jeffrey
5a8e2b80f3 segwit parsing and framing. 2016-02-26 15:04:34 -08:00
Christopher Jeffrey
4c653683b7 segregated - goddamn - witness... and docs update. 2016-02-26 03:54:26 -08:00
Christopher Jeffrey
afd6ee15c9 getblocks. parser/framer fixes. add profiler. 2016-02-24 23:45:45 -08:00
Christopher Jeffrey
1f0f9eb59e version packet. 2016-02-24 22:24:00 -08:00
Christopher Jeffrey
a8e6eda850 refactor framer and parser. 2016-02-24 20:48:08 -08:00
Christopher Jeffrey
4cea71fe65 keep all pending blocks off the heap. 2016-02-24 20:05:06 -08:00
Christopher Jeffrey
e64a366400 refactor framer 2016-02-24 05:58:05 -08:00
Christopher Jeffrey
0fac957da3 utils. merkle tree. 2016-02-23 16:53:05 -08:00
Christopher Jeffrey
f4f6c79bfd more framing. 2016-02-23 03:25:18 -08:00
Christopher Jeffrey
68f3ef599d fixes. 2016-02-23 00:26:19 -08:00
Christopher Jeffrey
b473ca7d18 coin method for framer and parser. 2016-02-23 00:14:09 -08:00
Christopher Jeffrey
73d3291ee9 more buffer work. 2016-02-22 21:25:01 -08:00
Christopher Jeffrey
78e9be11c3 switch to buffers. 2016-02-22 20:37:15 -08:00
Christopher Jeffrey
c81770c2b1 move some deps around. drop inherits. 2016-02-21 06:31:15 -08:00
Christopher Jeffrey
10804959d5 add wrapper for elliptic vs secp256k1. see #52. 2016-02-21 04:37:50 -08:00
Christopher Jeffrey
050d801849 standardness. chain. pool. 2016-02-18 15:26:03 -08:00
Christopher Jeffrey
d0d0378f3e queue. fixes. 2016-02-16 21:01:31 -08:00
Christopher Jeffrey
997f0acbb0 more refactoring. 2016-02-16 16:13:34 -08:00
Christopher Jeffrey
2a20e56f7b get coin parsing working. 2016-02-15 01:27:00 -08:00
Christopher Jeffrey
7175f81d59 fullnode 2016-02-14 18:05:37 -08:00
Christopher Jeffrey
6cc4c866dc wallet refactor. fixes. 2016-02-10 16:42:02 -08:00
Christopher Jeffrey
bad5250983 serialization formats. 2016-02-07 03:36:07 -08:00
Christopher Jeffrey
2deccde29e wallet work. consistency. 2016-02-02 16:09:48 -08:00
Christopher Jeffrey
6ad621cace api: rename methods, properties. add legacy support. 2016-02-01 11:50:09 -08:00
Christopher Jeffrey
5dce1427ba raw blocks. pool fixes. 2016-01-25 15:40:53 -08:00
Christopher Jeffrey
b98640b27e drop preload constants. 2016-01-25 13:46:40 -08:00
Christopher Jeffrey
704c95c90d add tx.getPriority and tx.isFree. 2016-01-20 12:31:47 -08:00
Christopher Jeffrey
47af5987ae better system to prevent DOSing. 2016-01-20 02:46:25 -08:00
Christopher Jeffrey
46b2983eb3 update preload. 2016-01-17 17:15:13 -08:00
Christopher Jeffrey
3745577837 standard opcodes. remove tx methods. 2016-01-17 15:52:09 -08:00
Christopher Jeffrey
6f4609792f regtest support. tx methods. 2016-01-16 23:48:18 -08:00
Christopher Jeffrey
e5a82c7195 sighash. tx signing. testnet. 2016-01-15 15:53:57 -08:00
Christopher Jeffrey
46295b3c08 cleanup. misc. 2016-01-15 02:23:22 -08:00
Christopher Jeffrey
bfca638025 more packet improvements. 2016-01-14 01:59:33 -08:00
Christopher Jeffrey
4f8d24ba36 more int and packet work. 2016-01-13 18:31:07 -08:00
Christopher Jeffrey
5c1b136117 revert back to old output value writing. 2016-01-13 04:31:20 -08:00
Christopher Jeffrey
37803d178d use write64 for output values. 2016-01-13 04:15:14 -08:00
Christopher Jeffrey
10bd983899 version and addr packets. 2016-01-13 03:38:23 -08:00
Christopher Jeffrey
de455fa3e9 improve int functions and usage in parser and framer. 2016-01-12 18:13:32 -08:00
Christopher Jeffrey
9c2b0015d1 checkmultisig fixes. misc. 2016-01-11 00:40:16 -08:00
Christopher Jeffrey
eb1a3ea6d2 transaction improvements. 2016-01-10 04:58:03 -08:00
Christopher Jeffrey
d56f7a3733 even more bufffer work. 2016-01-08 04:11:46 -08:00
Christopher Jeffrey
465b23013d temporarily use buffers. coinbase fixes. script/tx fixes. 2016-01-08 03:34:55 -08:00
Christopher Jeffrey
df420a4a8b refactor. work. 2016-01-08 02:22:35 -08:00
Christopher Jeffrey
8d120a4fd6 more block verification. 2016-01-06 19:15:41 -08:00
Christopher Jeffrey
e1ec89fe7d sigops 2016-01-06 01:41:06 -08:00
Christopher Jeffrey
680bf01e98 add tx.isFinal. refactor chain usage. 2016-01-05 21:32:31 -08:00
Christopher Jeffrey
d0d5ab2c3b add mempool packet. miner refactor. 2016-01-05 12:46:30 -08:00
Christopher Jeffrey
019ecf4f2a switch to fullchain for both spv and fullnode. 2016-01-04 20:13:06 -08:00
Christopher Jeffrey
74b1562a87 network: fix checkpoints. 2016-01-04 16:33:11 -08:00
Christopher Jeffrey
d1595c0ec4 use getheaders by default. fix header parsing and handling. 2016-01-04 13:14:09 -08:00
Christopher Jeffrey
0f8819c78e minor fixes. refactor timestamps. 2016-01-04 04:12:26 -08:00
Christopher Jeffrey
a20cd7edbe refactor pool. improve chains. 2016-01-04 03:04:09 -08:00
Christopher Jeffrey
5a26b7b71e add pow retargeting to full chain. 2016-01-01 19:53:57 -08:00
Christopher Jeffrey
08320fd3fb update preload.js. 2016-01-01 17:58:54 -08:00
Christopher Jeffrey
43b0533a18 minor improvements and fixes. 2015-12-27 23:54:53 -08:00
Christopher Jeffrey
f3ae1c517a send block and merkleblock packets correctly. 2015-12-23 19:56:33 -08:00
Christopher Jeffrey
f68750991d add block.reward. add coinbase data to into. failsafe for getFee. 2015-12-23 05:33:48 -08:00
Christopher Jeffrey
b900d706c0 move varint and readIntv to utils. 2015-12-20 02:01:19 -08:00
Christopher Jeffrey
f25d69f30f put user agent in constants. 2015-12-20 01:57:47 -08:00
Christopher Jeffrey
1db84a0528 wallet json and prefix. style. cleanup. 2015-12-20 01:43:09 -08:00
Christopher Jeffrey
61699cca3a style: function names. 2015-12-19 15:43:28 -08:00
Christopher Jeffrey
a18a501c37 refactor hd keys. 2015-12-19 15:14:56 -08:00
Christopher Jeffrey
1a6633bade style consistency - again. 2015-12-19 02:05:46 -08:00
Christopher Jeffrey
7cae4c4eb5 remove uint8array check for now. minor style. 2015-12-18 22:57:39 -08:00
Christopher Jeffrey
8746248c2c addr packet parsing. 2015-12-18 22:55:06 -08:00
Christopher Jeffrey
1e802c152f comments. more style consistency. 2015-12-18 22:53:31 -08:00
Christopher Jeffrey
5ece45091b style consistency. 2015-12-18 22:37:02 -08:00
Christopher Jeffrey
5942209f41 pass size into block and tx for maxsize checks. 2015-12-18 15:41:34 -08:00
Christopher Jeffrey
d109eaba6c handle reject packet. 2015-12-17 19:47:20 -08:00
Christopher Jeffrey
3e608c2cc6 script and standard transaction types. prefixes. 2015-12-17 16:06:08 -08:00
Christopher Jeffrey
07a6788831 optimize block and tx rendering. script maxes. sync. 2015-12-17 16:06:08 -08:00
Christopher Jeffrey
88ddb3620c get blockchain sync working. fix pushdata ops. 2015-12-17 16:05:48 -08:00
Christopher Jeffrey
c44ea0090f implement sighash_single bug. 2015-12-15 01:41:44 -08:00
Christopher Jeffrey
c68ab4ee7d implement all sighash types. add hasUnspent(). 2015-12-15 01:22:24 -08:00
Christopher Jeffrey
3dec18c2c7 wallet/tx/script: n limit. refactor multisig options. 2015-12-10 02:25:44 -08:00
Christopher Jeffrey
57491aaadc add network.js and testnet support. see #40. 2015-12-09 16:25:55 -08:00
Christopher Jeffrey
2fd1d171f2 handle op_1negate. 2015-12-09 12:15:02 -08:00
Christopher Jeffrey
a9a9cf0879 add more opcodes to script.execute. handle codesep properly. 2015-12-08 14:06:10 -08:00
Christopher Jeffrey
adbb0099a1 add checklocktimeverify. pass in tx and input to execute() instead of using hasher callback. 2015-12-08 11:24:22 -08:00
Christopher Jeffrey
505aad8729 improve/fix p2sh. move input signing functionality to tx object. 2015-12-05 03:01:37 -08:00
Christopher Jeffrey
87eea1e398 fixes and minor style changes 2015-12-04 22:50:13 -08:00
Christopher Jeffrey
ea9af49f4b hd and p2sh 2015-12-04 18:01:31 -08:00
Christopher Jeffrey
3bfd10d0d0 work 2015-12-01 22:59:26 -08:00
Christopher Jeffrey
fcc9d661c1 satoshi: fix blockchain download. 2015-11-30 18:15:57 -08:00
Stanislas Marion
70608ae2a3 parser: put the exact raw data in tx._raw 2014-11-25 18:44:45 +03:00
Christopher Jeffrey
4e7dbae829 fix: minor fixes to block framer and block. 2014-06-24 01:08:44 -05:00
Christopher Jeffrey
5e3e72ba4c minor: more style concerns. 2014-06-24 00:57:46 -05:00
Christopher Jeffrey
c6bafbcb48 fix: ensure user agent is less than 0xfd in length. we can assume the varint is 1 byte. 2014-06-24 00:43:37 -05:00
Christopher Jeffrey
005c11e967 parser: fix version parsing. check user agent in tests. 2014-06-06 15:47:29 -05:00
Christopher Jeffrey
4dd8a54501 framer: another style fix. 2014-06-03 09:46:19 -05:00
Christopher Jeffrey
566b2e9916 parser: fix minimum block size. 2014-06-02 03:14:44 -05:00
Fedor Indutny
013a85c6a5 Merge pull request #16 from chjj/version-packet
Version packet
2014-05-26 22:12:36 +04:00
Christopher Jeffrey
6d2c1bd9f1 framer: fix undefined var typo. 2014-05-25 08:02:33 -05:00
Christopher Jeffrey
9dc0063ea9 test/parser: add version test for height and relay / fix typo. 2014-05-24 02:16:59 -05:00
Christopher Jeffrey
a5f20114e8 framer: version packet options, relay and height. 2014-05-24 02:16:59 -05:00
Christopher Jeffrey
60a9e556f8 framer: frame regular blocks with transactions correctly. 2014-05-23 23:27:54 -05:00
Christopher Jeffrey
44774e7c6b block: follow the behavior of bitcoind's CheckBlock(). 2014-05-23 23:12:46 -05:00
Christopher Jeffrey
f4dbc0ee33 parser: parse transactions in regular blocks. 2014-05-23 10:05:46 -05:00
Christopher Jeffrey
faca3454b2 framer: fix array length, assuming user-agent is below 0xfd in length.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-23 14:39:51 +04:00
Christopher Jeffrey
9981835df4 framer: includer user-agent in version packet.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-23 14:35:22 +04:00
Christopher Jeffrey
793fed1974 framer: refactor.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-20 13:36:20 +04:00
Christopher Jeffrey
44fab2b58a peer: handle address timestamp better.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-20 13:36:20 +04:00
Christopher Jeffrey
2aabef9a6d getaddr: fix framer. add addr to protocol-test.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-20 13:36:19 +04:00
Christopher Jeffrey
2edfdd8b36 peer: style fixes.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-20 13:36:18 +04:00
Christopher Jeffrey
5c5762a000 framer: fix 32 and 64 bit support for varint().
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-20 13:36:18 +04:00
Christopher Jeffrey
e89eb925e6 framer: use varint function for addr packet.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-20 13:36:18 +04:00
Christopher Jeffrey
6e8b03df96 peer: keep ips as arrays.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-20 13:36:18 +04:00
Christopher Jeffrey
d0b14008d0 peer: implement response to getaddr.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-20 13:36:17 +04:00
Christopher Jeffrey
db69c882f2 block: add block tests. frame correct version for blocks.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-19 00:21:41 +04:00
Christopher Jeffrey
f3c9ebd9a5 framer: fix block framing.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-18 21:00:56 +04:00
Christopher Jeffrey
6d9c150134 framer: fix typo.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-18 21:00:56 +04:00
Christopher Jeffrey
2b5f8693bf framer: add tx, block, and merkleblock packet sending to the framer.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-18 21:00:56 +04:00
Christopher Jeffrey
d331cfbb9e fix: take into account var_int for addr. move to parser.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-17 21:03:51 +04:00
Fedor Indutny
3b2fd8e168 parser: support Uint8Array's 2014-05-12 20:54:51 +04:00
Fedor Indutny
3fe7d097ec parser: make sure to not fail synchronously 2014-05-12 13:04:52 +04:00
Fedor Indutny
dfdc69aa3a lib: remove heavy modules 2014-05-11 14:27:05 +04:00
Fedor Indutny
ee9037e19a lib: jshint 2014-05-10 22:43:15 +04:00
Fedor Indutny
2f2b6a9aa7 preload: fix indexes 2014-05-10 21:52:41 +04:00
Fedor Indutny
86088f8ae9 tx-pool: ignore invalid orphans 2014-05-10 11:41:27 +04:00
Fedor Indutny
f9dc43eba2 chain: improvements 2014-05-07 16:54:22 +04:00
Fedor Indutny
4a2c54827b chain: better preload generation algorithm 2014-05-07 04:13:30 +04:00
Fedor Indutny
f95e8313b3 chain: prefer to keep more than less 2014-05-07 01:10:50 +04:00
Fedor Indutny
2a4553f6c5 preload: script to update 2014-05-06 22:08:38 +04:00
Fedor Indutny
a6be7bf5f7 lib: JSON serialization for everyone 2014-05-06 21:33:05 +04:00
Fedor Indutny
cdd3dbefb1 lib: use TX instead of Tx everywhere 2014-05-06 15:02:09 +04:00
Fedor Indutny
fb651d703e wallet: use compressed public key 2014-05-05 17:39:22 +04:00
Fedor Indutny
62d9af1194 parser: parse reject 2014-05-05 16:52:17 +04:00
Fedor Indutny
113e7dcdc3 tx: fix verification 2014-05-05 04:30:39 +04:00
Fedor Indutny
458e606359 wip 2014-05-04 23:24:32 +04:00
Fedor Indutny
40ea4d1fb1 tx: parse 2014-05-03 17:46:15 +04:00
Fedor Indutny
1ac3208360 pool: refactor, make search work! 2014-05-03 16:11:06 +04:00
Fedor Indutny
c3239b7f36 chain: preload and get 2014-05-02 14:50:21 +04:00
Fedor Indutny
9e0808eb39 pool: wip 2014-05-02 13:40:59 +04:00
Fedor Indutny
1432608813 poll: wip 2014-05-01 22:43:38 +04:00
Fedor Indutny
6cb1594424 lib: save progress 2014-04-30 21:45:55 +04:00
Fedor Indutny
a20cb1688f wip 2014-04-30 12:44:59 +04:00
Fedor Indutny
106d243873 parser: fix slicing 2014-04-28 19:57:40 +04:00
Fedor Indutny
b6a572f0c0 lib: protocol initial 2014-04-28 17:43:13 +04:00
Fedor Indutny
8a3c9d2dcd initial 2014-04-28 17:12:26 +04:00