Files
Aditi Srinivasan 9e0c932309 fix: fix sync id retrieval for sync health job (#2240)
## Why is this change needed?

The `getAllSyncIdsByPrefix` rpc returns a max of 1024 sync ids and we
weren't accounting for the fact that the list returned by the rpc might
be truncated. As a result, we weren't looking at all relevant sync ids
when trying to submit missing messages.

I lumped some cleanups/improvements to the sync health command in too
and an update to the vscode config for formatting rust code.

## Merge Checklist

_Choose all relevant options below by adding an `x` now or at any time
before submitting for review_

- [x] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [x] PR has a
[changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets)
- [x] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [x] PR includes
[documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs)
if necessary.

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing sync health tracking in the `hubble` app. 

### Detailed summary
- Added `MAX_VALUES_RETURNED_PER_SYNC_ID_REQUEST` constant
- Updated `trie_node.rs` and `server.ts` with new constant value
- Modified sync health computations and message stats
- Introduced `sync-health` source for data submission
- Improved peer selection logic for sync health
- Enhanced handling of sync IDs with a large number of entries

> The following files were skipped due to too many changes:
`apps/hubble/src/utils/syncHealth.ts`

>  Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
2024-08-07 15:49:06 -04:00
..