Skip to content

Commit

Permalink
Increase delay between pinging bootnodes (#4490)
Browse files Browse the repository at this point in the history
Ensures that the delay between pings is longer than the session timeout from discovery so previously failed ping attempts are forgotten and we retry from a clean slate. This is a quick fix, ultimately the session management in discovery needs to be adjusted to drop sessions that are non-responsive faster when they are in the initial handshake phase.
  • Loading branch information
ajsutton authored Oct 16, 2021
1 parent e4531a8 commit 6f46877
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ For information on changes in released versions of Teku, see the [releases page]
- Set an idle timeout for metrics connections, to clean up ports when no longer used.
- Fixed error when building from a source download rather than a git checkout.
Now logs a warning when building without git information to warn users that version information will not be available.
- Fixed an issue where discovery did not recover if it was initially started while the bootnodes were unavailable.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
public class DiscV5Service extends Service implements DiscoveryService {
private static final Logger LOG = LogManager.getLogger();
private static final String SEQ_NO_STORE_KEY = "local-enr-seqno";
private static final Duration BOOTNODE_REFRESH_DELAY = Duration.ofMinutes(2);
// Currently must be longer than the 3 minute NodeSession timeout in discovery
// See https://github.com/ConsenSys/teku/pull/4490
private static final Duration BOOTNODE_REFRESH_DELAY = Duration.ofMinutes(4);
private final AsyncRunner asyncRunner;
private final Bytes localNodePrivateKey;
private final SchemaDefinitionsSupplier currentSchemaDefinitionsSupplier;
Expand Down

0 comments on commit 6f46877

Please sign in to comment.