Commit Graph

12026 Commits

Author SHA1 Message Date
Jude Nelson
a2828287c8 Merge branch 'fix/poll-too-many-peers-crash' into feature/net-p2p-pingback 2020-05-17 18:49:58 -04:00
Jude Nelson
f0c70eac96 when polling, running out of event sockets shouldn't result in an error -- it should just close the newly-accepted socket and carry on (if we didn't do this, then we would accidentally starve the p2p code since it would never get Ok(NetworkPollState)) 2020-05-17 18:47:34 -04:00
Jude Nelson
62f5a6ebb9 make max client sockets configurable (default 800) 2020-05-17 18:46:59 -04:00
Jude Nelson
ecf89cc6f4 remove infinite loop condition from poller when we run out of event ID capacity 2020-05-17 16:00:49 -04:00
Jude Nelson
a138a1bf3f remove infinite loop condition from poller when we run out of event ID capacity 2020-05-17 15:57:52 -04:00
Jude Nelson
9aaa4d07a5 fix failing test 2020-05-17 01:26:49 -04:00
Jude Nelson
3051682561 Merge branch 'master' into feature/net-p2p-pingback 2020-05-17 01:03:11 -04:00
Jude Nelson
6d9fd825be fix timeout checks 2020-05-17 01:02:31 -04:00
Jude Nelson
9487011cce two major improvements to neighbor walking: pingbacks, and inbound neighbor walks. Pingbacks are when an inbound neighbor handshakes with us, and we remember to later try to handshake with them (and if we succeed, we add them to our frontier table). Inbound neighbor walks are when we start a neighbor walk using an inbound neighbor (instead of the usual outbound neighbor), in order to learn about other outbound neighbors from its neighbors. Only outbound neighbors will be added to the frontier table, though. 2020-05-17 01:01:06 -04:00
Jude Nelson
501a25fe03 document last_contact_time for Neighbor; add empty() constructor 2020-05-17 01:00:43 -04:00
Jude Nelson
1b2b89f87c add walk_inbound_ratio connection option -- the number of times we do an inbound neighbor walk to 1 outbound neighbor walk 2020-05-17 01:00:19 -04:00
Jude Nelson
a4f6bae801 update stats on both ends of a handshake, and if we're the one giving the handshake, expect the peer to ping us in at most $OUR_HEARTBEAT seconds 2020-05-17 00:59:36 -04:00
Jude Nelson
978f31272d Merge pull request #1590 from friedger/patch-6
[docs] as-max-length? use uint, not int
clarity-sdk-v0.1.0
2020-05-15 22:50:40 +00:00
Aaron Blankstein
bc6a6d19b7 Merge pull request #1588 from blockstack/fix/change-dust
Fix: check change output for dust clearance
2020-05-15 16:40:09 -05:00
Friedger Müffke
469ad27b71 fix as-max-length? docs 2020-05-15 23:02:37 +02:00
Aaron Blankstein
c28e1f3984 fix: check change output for dust clearance 2020-05-15 15:05:15 -05:00
Aaron Blankstein
edb9c6c83a Merge pull request #1587 from blockstack/fix/check-sendrawtx
Fix: Check Send Raw TX Error status
2020-05-15 12:50:06 -05:00
Aaron Blankstein
e664f0a541 remove some commit cruft 2020-05-15 12:35:41 -05:00
Aaron Blankstein
7febd01e09 test for presence of non-null error field instead. bitcoin rpc is weird 2020-05-15 12:33:55 -05:00
Aaron Blankstein
6100d18c63 type errors 2020-05-15 12:10:11 -05:00
Aaron Blankstein
34fd203511 fix: check sendrawtx response status 2020-05-15 12:06:04 -05:00
Aaron Blankstein
3aa7f79253 Merge pull request #1584 from blockstack/fix/clarity-cli-execute
fix: use eval rather than parse for execute cli arguments
2020-05-15 10:22:00 -05:00
Aaron Blankstein
a38a83fe7d fix: use eval rather than parse for execute cli arguments 2020-05-15 09:34:17 -05:00
Jude Nelson
ae9ed9af18 Merge pull request #1575 from blockstack/fix/net-event-id-tocttou
Fix/net event id tocttou
clarity-sdk-v0.0.9
2020-05-13 15:02:32 +00:00
Ludo Galabru
45ee6f1f39 Merge pull request #1546 from blockstack/feature/whitelist-configurable
BTC Faucet support
2020-05-13 09:15:28 -04:00
Jude Nelson
3caab44e96 Merge branch 'fix/net-event-id-tocttou' into feature/net-p2p-pingback 2020-05-12 21:29:54 -04:00
Jude Nelson
986e2100cf panic if we try to register with a non-server; deregister sockets if it turns out we already have conversation state for them 2020-05-12 17:41:09 -04:00
Jude Nelson
c490d823a6 Merge branch 'fix/net-event-id-tocttou' into feature/net-p2p-pingback 2020-05-12 17:10:19 -04:00
Jude Nelson
1534f12264 use the event_id generated by NetworkState::register(), instead of the hinted one given by the newly-accepted socket map. 2020-05-12 17:03:35 -04:00
Jude Nelson
a07e9b4bb8 fix a TOCTTOU bug in the event ID allocation logic. All event IDs will now be allocated on NetworkState::register(), and any event ID given to this method will be taken as a hint 2020-05-12 17:02:15 -04:00
Jude Nelson
b418a0a2c8 Merge pull request #1574 from blockstack/fix/dont-panic-on-extra-events
don't panic on extra readiness events
2020-05-12 18:08:42 +00:00
Jude Nelson
7df49f1ce9 don't panic on extra readiness events 2020-05-12 14:04:17 -04:00
Jude Nelson
0ec1bbb521 Merge branch 'master' into feature/net-p2p-pingback 2020-05-12 12:44:14 -04:00
Jude Nelson
99fef94fbb use connection timeout 2020-05-12 12:42:01 -04:00
Jude Nelson
f3e9fb5fe6 have the p2p network state track inbound connections that successfully authenticate to us, so the neighbor walk can ping them back. Also, implement connection timeouts 2020-05-12 12:41:28 -04:00
Jude Nelson
4ace615068 better debug messages 2020-05-12 12:40:26 -04:00
Jude Nelson
2c9f5017af connection options for pingbacks 2020-05-12 12:40:17 -04:00
Jude Nelson
39e2615c4e implement pingback steps in the neighbor walk state machine -- have the neighbor walk attempt to handshake with any newly-discovered inbound peers using their peer neighbor address. Also, alternate between fetching a neighbor list from inbound and outbound peers, so a publicly-routable peer can discover other publicly-routable peers through NAT'ed peers 2020-05-12 12:38:43 -04:00
Jude Nelson
2739aad80e track both local and peer neighbor addresses 2020-05-12 12:38:23 -04:00
Jude Nelson
8bce1e5d2c Merge pull request #1563 from blockstack/fix/neon-fixes-20200507-net-marf
Fix/neon fixes 20200507 net marf
2020-05-12 16:16:39 +00:00
Jude Nelson
9b2d940535 revert logging to INFO by default 2020-05-12 12:09:24 -04:00
Jude Nelson
2633934165 Merge branch 'master' into fix/neon-fixes-20200507-net-marf 2020-05-12 12:03:45 -04:00
Aaron Blankstein
0c32abe253 Merge pull request #1559 from blockstack/feat/helpful-tools
Add some helpful debug tools
2020-05-12 10:36:24 -05:00
Jude Nelson
5e939c831f LOG_DEBUG by default for now 2020-05-12 11:09:25 -04:00
Jude Nelson
09cafc4881 fix test DB name 2020-05-11 23:37:33 -04:00
Jude Nelson
e8b4a83318 revert 2020-05-11 22:43:20 -04:00
Jude Nelson
7fd3c9d890 disable tls in reqwest feature flags 2020-05-11 22:37:42 -04:00
Jude Nelson
69c7ea1df7 repair tests to reflect the removal of the 1-indexing of the headers DB 2020-05-11 22:08:56 -04:00
Jude Nelson
1f2a69b4de fix build errors 2020-05-11 20:46:14 -04:00
Jude Nelson
4ce80787d4 if we're gonna break consensus, might as well do it all at once. Address #1565: use a reward window of 16 blocks 2020-05-11 19:21:50 -04:00