Commit Graph

525 Commits

Author SHA1 Message Date
Christopher Jeffrey
9388256e48
hostlist: fix flushing. 2017-03-16 00:39:30 -07:00
Christopher Jeffrey
7d6ebd0201
node: make hostlist persistence optional. 2017-03-14 06:10:37 -07:00
Christopher Jeffrey
a266391f1b
logger: truncate log files. 2017-03-14 06:10:36 -07:00
Christopher Jeffrey
eb601eece6
node: start using logger contexts. 2017-03-14 06:10:35 -07:00
Christopher Jeffrey
1401860fd4
pool: less error emission. 2017-03-14 06:10:35 -07:00
Christopher Jeffrey
1a8a9afade
config/wallet: refactor config handling. add wallet server. 2017-03-14 06:10:35 -07:00
Christopher Jeffrey
5cbbdbfb2f
refactor: config, plugins, and walletdb. 2017-03-14 06:10:34 -07:00
Christopher Jeffrey
a81733a720
node/config: refactor config and options. 2017-03-14 06:09:29 -07:00
Christopher Jeffrey
604362effd
pool: increase blocktxn limit. 2017-03-07 22:43:46 -08:00
Christopher Jeffrey
75f4e9616f
pool: fix discoverSeeds. 2017-03-07 22:41:13 -08:00
Christopher Jeffrey
19525826e3
pool: better stalling for compact blocks. 2017-03-07 20:54:44 -08:00
Christopher Jeffrey
4aecaf9158
pool/peer: do not allow duplicate txs in merkle blocks. 2017-03-07 20:13:32 -08:00
Christopher Jeffrey
bfca120f4f
pool: lint. minor. 2017-03-07 20:04:26 -08:00
Christopher Jeffrey
871225bbe4
pool/peer: split request map into two maps. 2017-03-07 19:49:50 -08:00
Christopher Jeffrey
2bbeb40ac5
net: resend sync on peer disconnection. 2017-03-07 18:59:46 -08:00
Christopher Jeffrey
11a2bc1356
net: less banning for bip152. 2017-03-07 18:01:05 -08:00
Christopher Jeffrey
cdbad54a8c
net: improvements. see comments.
- Improved local address handling.
- Enabled upnp discovery.
- Added retry for dns seeds.
- Improved hostlist in general.
2017-03-07 17:10:47 -08:00
Christopher Jeffrey
614a952015
net: hardcoded seeds (primarily for browser). 2017-03-07 13:57:09 -08:00
Christopher Jeffrey
c38a4fc031
net: listen after connecting to outbound. 2017-03-05 15:40:09 -08:00
Christopher Jeffrey
a96868ff8e
pool: track peer heights. 2017-03-04 15:40:59 -08:00
Christopher Jeffrey
beefcfba67
chain: return null on orphan blocks. 2017-03-04 15:37:27 -08:00
Christopher Jeffrey
694bab4ad0
net: less strict bip152 behavior. 2017-03-02 18:17:26 -08:00
Christopher Jeffrey
7b516ddd1e
net: more stall behavior. 2017-03-02 17:47:02 -08:00
Christopher Jeffrey
75877d2f22
upnp: rename resolve to discover. 2017-03-02 15:54:06 -08:00
Christopher Jeffrey
04735a1a37
upnp/ip: move some upnp functions to ip. 2017-03-02 15:50:25 -08:00
Christopher Jeffrey
beaf9ee37e
upnp: minor. 2017-03-02 12:20:55 -08:00
Christopher Jeffrey
d09ed2442c
upnp: lint. 2017-03-02 12:18:25 -08:00
Christopher Jeffrey
c0a6952bb2
upnp: minor. 2017-03-02 12:14:04 -08:00
Christopher Jeffrey
36377d5a7f
upnp: better params for addPortMapping. 2017-03-02 12:04:09 -08:00
Christopher Jeffrey
0791bad973
upnp: do not throw when getting network interfaces. 2017-03-02 11:58:26 -08:00
Christopher Jeffrey
525e6f21b7
upnp: better timeouts. 2017-03-02 11:54:04 -08:00
Christopher Jeffrey
da5851ed51
net: add upnp support for port mappings and external ip. 2017-03-02 11:40:30 -08:00
Christopher Jeffrey
53f607e19f
hostlist: minor. 2017-03-01 11:39:14 -08:00
Christopher Jeffrey
da69c5d888
hostlist: persist to file. 2017-03-01 11:29:11 -08:00
Christopher Jeffrey
161fe6e2a1
net: increase timeout for getdata. see #144. 2017-03-01 09:25:26 -08:00
Christopher Jeffrey
89ff0796c7
refactor: do not require json files. 2017-03-01 08:48:53 -08:00
Christopher Jeffrey
a4201e6bd5
peer: better stall detection. 2017-02-28 10:08:17 -08:00
Christopher Jeffrey
56ccfaa980
merkleblock/minerblock: fix hasTX calls. 2017-02-28 09:32:17 -08:00
Christopher Jeffrey
7688d80e74
block/chain: refactor block verification and caching. 2017-02-28 09:20:22 -08:00
Christopher Jeffrey
2a69b7ab7a
pool: account for header download time before invoking stall behavior. 2017-02-28 09:13:03 -08:00
Christopher Jeffrey
4c4cf9e6a4
peer: timeout inv spamming. 2017-02-24 16:25:29 -08:00
Christopher Jeffrey
fb997d43bb
pool: increase max header chain failures. 2017-02-23 20:56:21 -08:00
Christopher Jeffrey
e8b0a9ef83
pool: fix uncatchable error. 2017-02-08 15:57:13 -08:00
Christopher Jeffrey
c12a0630aa
pool: do not request duplicate txs. 2017-02-08 14:40:55 -08:00
Christopher Jeffrey
d3f94dbc6a
mempool: force broadcasting on addTX fail. 2017-02-07 13:56:30 -08:00
Christopher Jeffrey
ef95b69e5e
minor: refactor. move asyncobject. 2017-02-04 14:52:13 -08:00
Christopher Jeffrey
4e7df6ef87
docs: get jsdoc compiling again. 2017-02-03 22:47:26 -08:00
Christopher Jeffrey
b4a21cad2d
proxysocket: do not stop reads. 2017-02-03 10:25:04 -08:00
Christopher Jeffrey
91f36b3d1c
net: expose more of the tcp interface. 2017-02-03 09:59:02 -08:00
Christopher Jeffrey
f20aae676a
pool: do not reset chain when checkpoints=false. 2017-02-02 17:55:38 -08:00
Christopher Jeffrey
65f7b94c07
hostlist: lint. 2017-01-31 16:28:26 -08:00
Christopher Jeffrey
95fab44015
hostlist: allow multiple refs even if full. 2017-01-30 15:47:55 -08:00
Christopher Jeffrey
9cd70fb589
hostlist: improve hash perf. 2017-01-30 15:44:29 -08:00
Christopher Jeffrey
3d0254054c
peer: remove useless call. 2017-01-29 16:49:09 -08:00
Christopher Jeffrey
cc6ccfe9d9
peer: only request cmpctblock if we received sendcmpct. 2017-01-29 16:26:36 -08:00
Christopher Jeffrey
fae56d1387
pool: less log spam. 2017-01-29 16:08:59 -08:00
Christopher Jeffrey
4085321145
net: better compact block debug logs. 2017-01-29 13:19:30 -08:00
Christopher Jeffrey
695509b1b3
peer: fix potential memory leak. 2017-01-27 18:10:51 -08:00
Christopher Jeffrey
394df48408
pool: some cleanup. 2017-01-27 00:11:34 -08:00
Mokhtar Naamani
e651338ff3 pool: graceful disconnect - minor fix 2017-01-27 10:01:35 +02:00
Mokhtar Naamani
06d25a9007 pool: graceful disconnect - simpler approach 2017-01-27 09:56:58 +02:00
Mokhtar Naamani
de36d64d4a pool: graceful disconnect 2017-01-26 18:21:13 +02:00
Christopher Jeffrey
bae2aa33dd
parser: minor. 2017-01-26 03:00:14 -08:00
Christopher Jeffrey
f576ab6e6c
pool: always relay onion addresses. 2017-01-26 03:00:13 -08:00
Christopher Jeffrey
e05fb77d33
socks: more checks for tor resolve. 2017-01-26 03:00:13 -08:00
Christopher Jeffrey (JJ)
2552b3fca3 Merge pull request #123 from mnaamani/fix-pool-broadcast-item
pool: fix BroadcastItem multiple reject methods
2017-01-25 13:35:31 -08:00
Mokhtar Naamani
e1147cdf3d pool: fix BroadcastItem multiple reject methods 2017-01-25 21:20:16 +02:00
Christopher Jeffrey
64114460ad
socks: refactor addr parsing. 2017-01-25 02:31:40 -08:00
Christopher Jeffrey
00dccf0d5d
socks: minor. 2017-01-25 02:01:45 -08:00
Christopher Jeffrey
c6aad6448c
socks: error handling. 2017-01-25 01:20:58 -08:00
Christopher Jeffrey
b8cd9893fb
net: fix socket and dns callbacks. 2017-01-24 18:34:01 -08:00
Christopher Jeffrey
32fd1d6dba
dns: fix tor resolution. 2017-01-24 18:30:47 -08:00
Christopher Jeffrey
5073c1508f
net: tor support for outgoing conns. 2017-01-24 18:25:44 -08:00
Christopher Jeffrey
5288e8a619
socks: refactor errors. 2017-01-24 18:21:41 -08:00
Christopher Jeffrey
3a0b7d07d3
socks: fix no auth and proxying. 2017-01-24 06:03:27 -08:00
Christopher Jeffrey
a87484f2e8
socks: misc fixes. 2017-01-24 05:17:52 -08:00
Christopher Jeffrey
0de1302ca9
socks: fix state handling. 2017-01-24 03:58:18 -08:00
Christopher Jeffrey
6c9dd723cd
net: add socks proxy. 2017-01-24 03:52:08 -08:00
Christopher Jeffrey
b8324e0b09
ip: rename some functions. 2017-01-23 23:08:21 -08:00
Christopher Jeffrey
07c3177227
ip: better tor support. 2017-01-23 22:44:17 -08:00
Christopher Jeffrey
2c0f8ce226
peer: block type fix for compact blocks. 2017-01-23 21:23:01 -08:00
Christopher Jeffrey
caf8043dcb
peer: fix handleDrain. 2017-01-23 21:21:05 -08:00
Christopher Jeffrey
592191c44c
peer: less aggresive stall behavior. 2017-01-23 20:43:17 -08:00
Christopher Jeffrey
cfeafb6273
net: wait for peer drain on block serving. 2017-01-23 20:30:02 -08:00
Christopher Jeffrey
e6dd78abe1
minor: lint. 2017-01-23 19:43:19 -08:00
Christopher Jeffrey
016d0da096
ip/netaddress: better ip parsing. 2017-01-23 19:36:19 -08:00
Christopher Jeffrey
2a6ee729a0
pool: disable bip37 by default. 2017-01-23 15:06:20 -08:00
Christopher Jeffrey
c6b439f21c
chain/pool: remove witness option. 2017-01-23 14:51:40 -08:00
Christopher Jeffrey
c44fc3bcef
pool: disable checkpoints properly. rename prop for consistency. 2017-01-23 13:40:29 -08:00
Christopher Jeffrey
e7413aabb7
chain/pool: disable checkpoints on checkpoint failure. see #121. 2017-01-23 13:25:01 -08:00
Christopher Jeffrey
30ab5c2a88
http/pool: more options fixes. 2017-01-23 03:58:47 -08:00
Christopher Jeffrey
dc9f31f36f
pool: fix port for options. 2017-01-23 03:50:54 -08:00
Christopher Jeffrey
cbb45db801
config: rename useCheckpoints. allow implicit noAuth on localhost. 2017-01-23 03:19:19 -08:00
Christopher Jeffrey
2fdbdfc087
network: remove witness field. 2017-01-23 03:03:38 -08:00
Christopher Jeffrey
e32f521a43
packets: limit chain locators. 2017-01-22 20:05:07 -08:00
Christopher Jeffrey
00f24dc11e
peer: minor. change log level. 2017-01-22 19:57:37 -08:00
Christopher Jeffrey
25899827fd
net: remove noDiscovery. exempt bip150 packets from lock. 2017-01-22 14:48:03 -08:00
Christopher Jeffrey
6cca0aac1c
pool: minor fixes. 2017-01-21 17:27:15 -08:00
Christopher Jeffrey
d516035473
pool: minor. 2017-01-21 17:06:10 -08:00
Christopher Jeffrey
6e13fe57c0
pool: refactor header sync. 2017-01-21 16:59:20 -08:00
Christopher Jeffrey
219671c620
pool: do not emit tx if we have a mempool. 2017-01-21 15:38:39 -08:00
Christopher Jeffrey
51a25bf15f
net/nodeclient: always resend bloom filter. see #119. 2017-01-21 15:20:03 -08:00
Christopher Jeffrey
f3f585defc
pool: cleanup. 2017-01-21 13:59:13 -08:00
Christopher Jeffrey
b212eed282
net: handle public ip and port better. 2017-01-21 13:56:41 -08:00
Christopher Jeffrey
dc839062bf
pool: minor. 2017-01-21 13:20:44 -08:00
Christopher Jeffrey
545c0004e9
pool: minor. 2017-01-21 13:07:49 -08:00
Christopher Jeffrey
be4145e163
pool/peer: fixes. cleanup. 2017-01-21 13:03:53 -08:00
Christopher Jeffrey
58f8035add
pool: noncelist. 2017-01-21 12:57:01 -08:00
Christopher Jeffrey
f67eeee936
pool: minor. 2017-01-21 05:22:46 -08:00
Christopher Jeffrey
518a113e97
pool: fix error. 2017-01-21 05:19:53 -08:00
Christopher Jeffrey
44201193e8
pool: noncelist. 2017-01-21 05:18:18 -08:00
Christopher Jeffrey
3abfdb3770
pool: cleanup. 2017-01-21 04:15:16 -08:00
Christopher Jeffrey
59e73b24ca
parser: minor. 2017-01-21 03:56:30 -08:00
Christopher Jeffrey
4008caff51
peer: minor. 2017-01-21 03:49:44 -08:00
Christopher Jeffrey
4692849593
peer: abstract all deps. 2017-01-21 03:43:26 -08:00
Christopher Jeffrey
6016d96202
pool: move sync method out of peer. 2017-01-20 22:24:45 -08:00
Christopher Jeffrey
b60e0e20a4
pool: stricter standards for requests. 2017-01-20 20:51:36 -08:00
Christopher Jeffrey
7a5f4a1928
pool: fix spv. 2017-01-20 19:20:42 -08:00
Christopher Jeffrey
08b41a2dc4
peer: throw on destroyed write. 2017-01-20 17:40:06 -08:00
Christopher Jeffrey
f0f9f798c5
pool: fix inv. do not hold lock for bip151 msgs. 2017-01-20 17:23:14 -08:00
Christopher Jeffrey
cdcdb7bd52
pool: add forceInv for getdata. 2017-01-20 17:09:00 -08:00
Christopher Jeffrey
d035eb10eb
pool: getblocks fix again. 2017-01-20 17:01:51 -08:00
Christopher Jeffrey
4a45290f36
pool: fix getblocks. 2017-01-20 16:58:14 -08:00
Christopher Jeffrey
0c055ba236
pool: minor. 2017-01-20 16:49:55 -08:00
Christopher Jeffrey
3fb2150dc4
pool: allow use of headersFirst without checkpoints. 2017-01-20 15:04:13 -08:00
Christopher Jeffrey
fe52210c5e
pool: fix block logs. 2017-01-20 13:44:20 -08:00
Christopher Jeffrey
18c4a83ed3
pool: refactor and add compact block mode 1 support. 2017-01-20 09:39:58 -08:00
Christopher Jeffrey
7543049180
pool: refactor packet handling. 2017-01-19 17:31:38 -08:00
Christopher Jeffrey
2d952306e6
net: refactor packet handling. 2017-01-19 15:32:18 -08:00
Christopher Jeffrey
8cd951c994
pool: fix verify error handling. 2017-01-19 06:29:45 -08:00
Christopher Jeffrey
0a756aba34
pool: refactor logging. 2017-01-19 05:05:56 -08:00
Christopher Jeffrey
72e4ddc2b0
net: cleanup after removal. 2017-01-19 04:45:17 -08:00
Christopher Jeffrey
b6593adf75
net: remove alert system. 2017-01-19 04:41:58 -08:00
Christopher Jeffrey
e407c08668
net: drop getutxos impl. 2017-01-19 04:39:25 -08:00
Christopher Jeffrey
66ec0ae36e
net: better headers first. 2017-01-19 04:35:12 -08:00
Christopher Jeffrey
9c352c5d2b
net: better locks. 2017-01-19 01:18:57 -08:00
Christopher Jeffrey
05353e0e1a
peer: do not flush merkle blocks early. 2017-01-18 21:59:46 -08:00
Christopher Jeffrey
2ee6cea969
net: better dos protection for merkleblocks. 2017-01-18 21:54:35 -08:00
Christopher Jeffrey
4cba97a0a8
wallet/net: ensure low FPR of bloom filters. see #118. 2017-01-18 20:53:01 -08:00
Christopher Jeffrey
cdad00944c
pool: minor. 2017-01-17 08:15:41 -08:00
Christopher Jeffrey
1e3cc80e2d
networks: update testnet slowHeight. 2017-01-16 19:31:59 -08:00
Christopher Jeffrey
e15ee2308d
bip152: fix size calculation. 2017-01-16 14:09:46 -08:00
Christopher Jeffrey
d840144f3e
hostlist/authdb: dns resolution refactor. 2017-01-16 12:44:02 -08:00
Christopher Jeffrey
120ceef984
peer: timeout bip150 and bip151 properly. 2017-01-16 11:43:45 -08:00
Christopher Jeffrey
f2d092f23c
net: add priority nodes. 2017-01-16 04:30:10 -08:00
Christopher Jeffrey
db49f44c8a
peer: refactor version packet handling. 2017-01-16 03:33:54 -08:00
Christopher Jeffrey
212a69697e
tcp: make server promise based. 2017-01-16 01:55:10 -08:00
Christopher Jeffrey
63b39cec56
pool: dns resolution for authdb. 2017-01-16 01:31:14 -08:00
Christopher Jeffrey
ded8097a03
dns: add lookup function. 2017-01-16 01:29:38 -08:00
Christopher Jeffrey
491462f551
bip150: add dns resolution. comments. 2017-01-15 23:46:19 -08:00
Christopher Jeffrey
1e9b7363c2
bip151: cleanup handshake properly. 2017-01-15 23:43:19 -08:00
Christopher Jeffrey
9affb11b22
bip152: comments. 2017-01-15 23:42:39 -08:00
Christopher Jeffrey
afb15787ad
peer: better error messages. 2017-01-15 18:03:31 -08:00
Christopher Jeffrey
fe0ea9ac76
pool: minor. 2017-01-15 17:57:17 -08:00
Christopher Jeffrey
6d1c918793
hostlist: refactor seed handling. 2017-01-15 13:03:57 -08:00
Christopher Jeffrey
fcae101c0f
bip151: extra assertions. refactor. 2017-01-14 23:19:46 -08:00
Christopher Jeffrey
c0031e062a
peer: minor. 2017-01-14 19:46:18 -08:00
Christopher Jeffrey
199699d73a
node: better option handling. 2017-01-14 19:35:59 -08:00
Christopher Jeffrey
a486bd3a18
refactor: options. 2017-01-14 17:59:54 -08:00
Christopher Jeffrey
9dbfaf3127
pool: rename ignoreDiscovery. 2017-01-14 09:11:07 -08:00
Christopher Jeffrey
f0e7aa9d82
net: handle server differently. 2017-01-14 07:54:07 -08:00
Christopher Jeffrey
e8cc724488
node/net: refactor node bootstrapping. 2017-01-14 07:21:16 -08:00
Christopher Jeffrey
80d01b52c3
net: avoid 0-len getdatas for blocks. 2017-01-14 06:53:51 -08:00
Christopher Jeffrey
fd2f158169
net: avoid requesting duplicate blocks. avoid reconnecting to banned peers. 2017-01-14 06:43:49 -08:00
Christopher Jeffrey
699e71d84a
net: send peer addr in version msg. 2017-01-13 16:45:05 -08:00
Christopher Jeffrey
b77b814be4
bip152: fix empty block filling. 2017-01-13 15:27:13 -08:00
Christopher Jeffrey
166fe0ad6e
chain: remove bestHeight tracking. 2017-01-13 12:50:50 -08:00
Christopher Jeffrey
7c021cf842
utils: rename locker to lock for consistency. 2017-01-11 21:20:26 -08:00
Christopher Jeffrey
65ab296d2e
bloom: cleanup instantiation. 2017-01-11 12:10:04 -08:00
Christopher Jeffrey
dbaae30700
net: only add timeouts for outbound peers. 2017-01-10 18:03:19 -08:00
Christopher Jeffrey
eabbfbf98b
net: fix getdata bug. 2017-01-10 16:12:42 -08:00
Christopher Jeffrey
c605638daf
pool: some request refactoring. 2017-01-10 16:10:55 -08:00
Christopher Jeffrey
d338f62078
protocol: constants changes. 2017-01-10 04:57:41 -08:00
Christopher Jeffrey
4c557744a2
refactor: address, amount, uri, errors. 2017-01-09 23:07:02 -08:00
Christopher Jeffrey
84fce9aad4
minor: some comments. 2017-01-09 15:20:56 -08:00
Christopher Jeffrey
cd4a0cc964
network: remove segnet3 support. 2017-01-08 22:38:41 -08:00
Christopher Jeffrey
c7ce8c778b
peer: some comments. do not kill on late pong. 2017-01-08 22:29:57 -08:00
Christopher Jeffrey
fb0b2b53d7
net: use Map object for requested items. 2017-01-07 00:19:40 -08:00
Christopher Jeffrey
d396cdd0fd
constants: minor. 2017-01-06 21:14:11 -08:00
Christopher Jeffrey
5caf6210b9
refactor: move constants around. 2017-01-06 09:57:55 -08:00
Christopher Jeffrey
d1a4e53896
bloom/net: move bloom constants. net services, move inv types. 2017-01-06 01:57:49 -08:00
Christopher Jeffrey
3da4542ecb
pool: remove failsafe. 2017-01-05 19:25:34 -08:00
Christopher Jeffrey
b3ccd8a105
pool: fix handle headers. 2017-01-05 14:37:37 -08:00
Christopher Jeffrey
8ca683f4f3
peer: add inv queue. 2017-01-05 14:35:29 -08:00
Christopher Jeffrey
5fb64e7bac
pool: refactor reject handling. 2017-01-05 14:35:29 -08:00
Christopher Jeffrey
94d4e80373
co: stop using co.wrap. 2017-01-05 14:35:29 -08:00
Christopher Jeffrey
cca763ca95
peer: avoid compactblock dos. 2017-01-05 14:35:28 -08:00
Christopher Jeffrey
cd8e464079
net: redesign stall behavior and block management. 2017-01-05 14:35:28 -08:00
Christopher Jeffrey
eb12b0e608
net: misc. 2017-01-05 14:35:28 -08:00
Christopher Jeffrey
f8fa536129
pool: fix startSync. 2016-12-31 03:21:36 -08:00
Christopher Jeffrey
da7640cd27
peer: minor. 2016-12-29 15:35:03 -08:00
Christopher Jeffrey
943c5d2d12
net: treat services as a u32. 2016-12-27 15:28:19 -08:00
Christopher Jeffrey
dd6bd8db4a
net: move hostlist. 2016-12-27 14:38:32 -08:00
Christopher Jeffrey
74dbff2377
net: add addrman serialization. 2016-12-27 14:29:46 -08:00
Christopher Jeffrey
3ada25564e
chain: refactor orphan list. 2016-12-24 22:32:45 -08:00
Christopher Jeffrey
f3bd64689d
peer: minor. 2016-12-24 13:10:14 -08:00
Christopher Jeffrey
6ea846ee9a
pool: minor. 2016-12-22 22:27:09 -08:00
Christopher Jeffrey
5a0632f449
pool: schedule txs like blocks. 2016-12-22 13:26:04 -08:00
Christopher Jeffrey
8b8a65868b
peer: fix getutxos handler. 2016-12-22 05:16:04 -08:00
Christopher Jeffrey
4f8e401dbc
peer: cleanup events after connect timeout. 2016-12-22 04:01:49 -08:00