GitBulletin

Repository: farcasterxyz/hub-monorepo

Tech Titans Tackle Bundle Bloat: Maximum Sizes Ensured!

2024-10-06 14:34:14 UTC

New safeguards implemented to enhance app performance by curbing endless message sizes, leading to a more efficient digital landscape.

Commit Details:

fix: Limit max bundle size (#2355) ## Why is this change needed? `submitBulkMessages` and `submitMessageBundle` were not validating size of the bundle and allowing unbounded input. ## 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) - [ ] 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 limiting the size of message bundles in the application to enhance performance and prevent overload. ### Detailed summary - Added a new export `MAX_BUNDLE_SIZE` in `apps/hubble/src/network/p2p/bundleCreator.ts`. - Implemented a check in `apps/hubble/src/hubble.ts` to reject message bundles exceeding `MAX_BUNDLE_SIZE`. - Added a similar check in `apps/hubble/src/rpc/server.ts` for gRPC message submissions. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->

Search Similar