From 826c8ecb2612b46724328e706ff14363629a9b15 Mon Sep 17 00:00:00 2001 From: abitmore Date: Tue, 24 Mar 2020 15:51:15 -0400 Subject: [PATCH 1/4] Remove trailing whitespaces --- libraries/net/node.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index 06aebf6fbd..b22b880413 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -854,14 +854,14 @@ namespace graphene { namespace net { namespace detail { // timeout for any active peers is two block intervals uint32_t active_disconnect_timeout = 10 * _recent_block_interval_in_seconds; uint32_t active_send_keepalive_timeout = active_disconnect_timeout / 2; - + // set the ignored request time out to 1 second. When we request a block // or transaction from a peer, this timeout determines how long we wait for them // to reply before we give up and ask another peer for the item. // Ideally this should be significantly shorter than the block interval, because - // we'd like to realize the block isn't coming and fetch it from a different + // we'd like to realize the block isn't coming and fetch it from a different // peer before the next block comes in. At the current target of 3 second blocks, - // 1 second seems reasonable. When we get closer to our eventual target of 1 second + // 1 second seems reasonable. When we get closer to our eventual target of 1 second // blocks, this will need to be re-evaluated (i.e., can we set the timeout to 500ms // and still handle normal network & processing delays without excessive disconnects) fc::microseconds active_ignored_request_timeout = fc::seconds(1); From 133a6726e7d149e809899f649bb0e500899319ea Mon Sep 17 00:00:00 2001 From: Michael Vandeberg Date: Mon, 16 Oct 2017 16:11:20 -0700 Subject: [PATCH 2/4] Increase the active ignored request timeout to 6 seconds Cherry-picked from https://github.com/steemit/steem/pull/1663 --- libraries/net/node.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index b22b880413..ca8eed3d54 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -864,7 +864,9 @@ namespace graphene { namespace net { namespace detail { // 1 second seems reasonable. When we get closer to our eventual target of 1 second // blocks, this will need to be re-evaluated (i.e., can we set the timeout to 500ms // and still handle normal network & processing delays without excessive disconnects) - fc::microseconds active_ignored_request_timeout = fc::seconds(1); + + // Increased to 6 in #1660 due to heavy load. May need to adjust further + fc::microseconds active_ignored_request_timeout = fc::seconds(6); fc::time_point active_disconnect_threshold = fc::time_point::now() - fc::seconds(active_disconnect_timeout); fc::time_point active_send_keepalive_threshold = fc::time_point::now() - fc::seconds(active_send_keepalive_timeout); From 819a1c14b7dae33f2b96444c18981ceb8e0714f2 Mon Sep 17 00:00:00 2001 From: Michael Vandeberg Date: Mon, 16 Oct 2017 17:12:02 -0700 Subject: [PATCH 3/4] Update comment for active ignored request timeout Cherry-picked from https://github.com/steemit/steem/pull/1663 --- libraries/net/node.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index ca8eed3d54..0622e56535 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -855,17 +855,13 @@ namespace graphene { namespace net { namespace detail { uint32_t active_disconnect_timeout = 10 * _recent_block_interval_in_seconds; uint32_t active_send_keepalive_timeout = active_disconnect_timeout / 2; - // set the ignored request time out to 1 second. When we request a block + // set the ignored request time out to 6 second. When we request a block // or transaction from a peer, this timeout determines how long we wait for them // to reply before we give up and ask another peer for the item. // Ideally this should be significantly shorter than the block interval, because // we'd like to realize the block isn't coming and fetch it from a different - // peer before the next block comes in. At the current target of 3 second blocks, - // 1 second seems reasonable. When we get closer to our eventual target of 1 second - // blocks, this will need to be re-evaluated (i.e., can we set the timeout to 500ms - // and still handle normal network & processing delays without excessive disconnects) - - // Increased to 6 in #1660 due to heavy load. May need to adjust further + // peer before the next block comes in. + // Increased to 6 from 1 in #1660 due to heavy load. May need to adjust further fc::microseconds active_ignored_request_timeout = fc::seconds(6); fc::time_point active_disconnect_threshold = fc::time_point::now() - fc::seconds(active_disconnect_timeout); From f70dbdb5a4c9fb98aadbccb09d0c51f51c4b7a66 Mon Sep 17 00:00:00 2001 From: abitmore Date: Tue, 24 Mar 2020 15:57:39 -0400 Subject: [PATCH 4/4] Add comment about linked issue, remove whitespaces --- libraries/net/node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index 0622e56535..96e94a4643 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -860,8 +860,9 @@ namespace graphene { namespace net { namespace detail { // to reply before we give up and ask another peer for the item. // Ideally this should be significantly shorter than the block interval, because // we'd like to realize the block isn't coming and fetch it from a different - // peer before the next block comes in. + // peer before the next block comes in. // Increased to 6 from 1 in #1660 due to heavy load. May need to adjust further + // Note: #1160 is https://github.com/steemit/steem/issues/1660 fc::microseconds active_ignored_request_timeout = fc::seconds(6); fc::time_point active_disconnect_threshold = fc::time_point::now() - fc::seconds(active_disconnect_timeout);