From 4055f7001e4c0b1579ba9a6d806e02ba626dee99 Mon Sep 17 00:00:00 2001 From: Wasif Iqbal Date: Fri, 5 Jul 2024 15:26:05 -0500 Subject: [PATCH] chore: update cleanup interval for active peers (#2123) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Motivation Describe why this issue should be fixed and link to any relevant design docs, issues or other relevant items. ## Change Summary Describe the changes being made in 1-2 concise sentences. ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [ ] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [ ] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [ ] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. - [ ] All [commits have been signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits) ## Additional Context If this is a relatively large or complex change, provide more details here that will help reviewers --- ## PR-Codex overview This PR adjusts the cleanup interval for the Peer TTLMap in the sync engine from 36 hours to 25 hours. ### Detailed summary - Adjusted the cleanup interval for the Peer TTLMap from 36 hours to 25 hours > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- apps/hubble/src/network/sync/syncEngine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/hubble/src/network/sync/syncEngine.ts b/apps/hubble/src/network/sync/syncEngine.ts index 2da9f68f8b..4fd3110a5a 100644 --- a/apps/hubble/src/network/sync/syncEngine.ts +++ b/apps/hubble/src/network/sync/syncEngine.ts @@ -59,7 +59,7 @@ import { peerIdFromString } from "@libp2p/peer-id"; // Time to live for peer contact info in the Peer TTLMap const PEER_TTL_MAP_EXPIRATION_TIME_MILLISECONDS = 1000 * 60 * 60 * 24; // 24 hours // Time interval to run cleanup on the Peer TTLMap -const PEER_TTL_MAP_CLEANUP_INTERVAL_MILLISECONDS = 1000 * 60 * 60 * 36; // 36 hours +const PEER_TTL_MAP_CLEANUP_INTERVAL_MILLISECONDS = 1000 * 60 * 60 * 25; // 25 hours // Number of seconds to wait for the network to "settle" before syncing. We will only // attempt to sync messages that are older than this time.