## Why is this change needed?
Release client and shuttle some snapchain bug fixes
## 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 updating the versions of various packages and fixing
issues related to event timestamp calculations and type guards in the
`@farcaster/core` and `@farcaster/hub-nodejs` packages.
### Detailed summary
- Updated `@farcaster/core` version from `0.17.0` to `0.17.1`.
- Updated `@farcaster/hub-nodejs` version from `0.14.0` to `0.14.1`.
- Updated `@farcaster/shuttle` version from `0.6.16` to `0.6.17`.
- Fixed event timestamp calculation for snapchain.
- Added type guards for `TierPurchase` on-chain event.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
The typeguard for the new tier purchase event is required for processing
these events cleanly out of the event stream.
## 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 type safety by adding type guards for the
`TierPurchaseOnChainEvent`, ensuring that the event structure is
validated correctly.
### Detailed summary
- Updated `TierPurchaseOnChainEvent` type in
`packages/core/src/protobufs/types.ts` to include specific properties.
- Introduced `isTierPurchaseOnChainEvent` type guard in
`packages/core/src/protobufs/typeguards.ts` to validate `OnChainEvent`
instances.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Deprecate existing event timestamp functions that rely on event id, and
add a new one that fetch it from the itself itself.
## 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 updating the event timestamp handling in the
`shuttle` and `core` packages. It replaces the deprecated
`extractEventTimestamp` function with `extractTimestampFromEvent`, which
aligns with the new event structure using timestamps instead of event
IDs.
### Detailed summary
- Changed function name from `extractEventTimestamp` to
`extractTimestampFromEvent` in `hubSubscriber.ts` and `eventStream.ts`.
- Updated calls to `extractEventTimestamp` to use
`extractTimestampFromEvent`.
- Marked `extractEventTimestamp` as deprecated in `time.ts` with a note
on using event timestamps.
- Added a new implementation for `extractTimestampFromEvent` in
`time.ts`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release client library for snapchain 0.3
## 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 updating the versions of various `@farcaster`
packages, enhancing features related to the snapchain 0.3 protocol, and
adjusting dependencies.
### Detailed summary
- Deleted `.changeset/thick-radios-end.md`
- Updated `@farcaster/hub-nodejs` to version `0.14.0`
- Updated `@farcaster/core` to version `0.17.0`
- Updated `@farcaster/hub-web` to version `0.10.0`
- Updated version numbers in `package.json` files for `@farcaster/core`,
`@farcaster/hub-web`, `@farcaster/shuttle`, and `@farcaster/hub-nodejs`
- Added support for snapchain 0.3 protocol features in `CHANGELOG.md`
files
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Fixes the previous release.
## 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
- [ ] 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 introduces new user data types, expands username validation, and
adds tier-related functionalities across multiple files. It enhances the
handling of usernames, addresses, and event types while improving
validations and error handling.
### Detailed summary
- Added `USERNAME_TYPE_BASENAME` to `UserNameType` enums.
- Introduced `BANNER`, `USER_DATA_PRIMARY_ADDRESS_ETHEREUM`, and
`USER_DATA_PRIMARY_ADDRESS_SOLANA` to `UserDataType` enums.
- Updated `CastType` enum to include `TEN_K_CAST`.
- Modified username validation to support `USERNAME_TYPE_BASENAME`.
- Enhanced user data validation for Ethereum and Solana addresses.
- Updated maximum username length from 20 to 25 characters.
- Changed embed limit from 2 to 4 in validations.
- Added `TierType` enum with `None` and `Pro` values.
- Introduced `TierPurchaseBody` interface for tier purchases.
- Added handling for `EVENT_TYPE_TIER_PURCHASE` in `OnChainEventType`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
---------
Co-authored-by: Sanjay Raveendran <sanjayprabhu@gmail.com>
## Why is this change needed?
Release hub-nodejs and core
## 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.
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on updating the version of the `@farcaster/core` and
`@farcaster/hub-nodejs` packages, along with their changelogs and
dependencies.
### Detailed summary
- Deleted `CHANGELOG.md` for `afraid-impalas-kiss`.
- Added version `0.13.6` for `@farcaster/hub-nodejs` with updated
dependencies.
- Added version `0.16.5` for `@farcaster/core` with a change to bring
protos to parity with Snapchain.
- Updated `version` in `package.json` for both packages.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
The new proto definitions need to be exposed via the client library to
build on new features.
## 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 updating the protocol buffers in the client library
to align with the Snapchain implementation. It introduces new message
types, enums, and fields to enhance functionality, particularly around
tier management and user data handling.
### Detailed summary
- Added `USERNAME_TYPE_BASENAME` to `username_proof.proto`.
- Introduced `TierDetails` message and `tier_subscriptions` field in
`StorageLimitsResponse`.
- Updated error message date in `time.test.ts` to 01/01/2021.
- Added new user data types: `USER_DATA_TYPE_BANNER`,
`USER_DATA_PRIMARY_ADDRESS_ETHEREUM`, and
`USER_DATA_PRIMARY_ADDRESS_SOLANA`.
- Introduced `TEN_K_CAST` enum in `message.proto`.
- Added `EVENT_TYPE_TIER_PURCHASE` in `onchain_event.proto`.
- Created `TierPurchaseBody` message with relevant fields.
- Updated `OnChainEvent` to include `tierPurchaseEventBody`.
- Added methods for handling `TierType` in JSON conversions.
- Enhanced `StorageLimitsResponse` to include `tierSubscriptions`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
The typeguard was incorrect.
## Merge Checklist
- [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 fixing the type guard `isMergeFailureHubEvent` to
correctly identify `MergeFailureHubEvent` instances in the codebase.
### Detailed summary
- Updated the return type of `isMergeFailureHubEvent` to correctly
reflect `types.MergeFailureHubEvent`.
- Introduced the `MergeFailureHubEvent` type in `types.ts`, which
includes the `mergeFailure` property.
- Ensured the type guard checks for the `MERGE_FAILURE` event type.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release hub-nodejs version
## 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 updating version numbers and dependencies across
several packages in the `@farcaster` ecosystem, specifically enhancing
compatibility and adding features related to snapchain fields.
### Detailed summary
- Updated `@farcaster/core` version from `0.16.2` to `0.16.3`.
- Updated `@farcaster/hub-web` version from `0.9.6` to `0.9.7`.
- Updated `@farcaster/shuttle` version from `0.6.14` to `0.6.15`.
- Updated `@farcaster/hub-nodejs` version from `0.13.3` to `0.13.4`.
- Added snapchain fields to hub event and improved data compatibility in
changelogs for multiple packages.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
- Add new fields from snapchain to hubble protos and libraries so
shuttle can access them
- Update shuttle to use getInfo for max fid
- Populate data and databytes for convenience (snapchain updated to
prioritize dataBytes https://github.com/farcasterxyz/snapchain/pull/454)
## 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 introduces new fields related to `snapchain` events, enhances
compatibility by populating additional data, and modifies existing event
structures to include `block_number`, `shard_index`, and `timestamp`. It
also updates documentation for clarity.
### Detailed summary
- Added `block_number`, `shard_index`, and `timestamp` fields to various
stores and event structures.
- Introduced `MergeFailureBody` to handle merge failures with `message`,
`code`, and `reason`.
- Updated comments and documentation to reflect changes in event types.
- Enhanced `HubEventArgs` to omit additional fields for better
compatibility.
- Modified `makeMessageWithSignature` to use `dataBytes` for
serialization differences.
- Updated event type handling in generated files to include
`MERGE_FAILURE`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release 0.19.3
## 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 updating the versions of various packages within the
Farcaster project, specifically enhancing dependencies and making minor
version increments to ensure compatibility and improvements.
### Detailed summary
- Updated `@farcaster/core` from `0.16.1` to `0.16.2`.
- Updated `@farcaster/hub-nodejs` from `0.13.2` to `0.13.3`.
- Updated `@farcaster/hubble` from `1.19.2` to `1.19.3`.
- Added changelog entries for versions `0.16.2`, `0.13.3`, and `1.19.3`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Extend expiry by a few weeks for those who need more time to migrate to
snapchain
## 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 updating the expiry dates of certain versions in the
`hubble` application to extend their validity.
### Detailed summary
- Updated expiry date for version `2025.2.19` from `4/30/25` to
`5/16/25` in `apps/hubble/src/hubble.ts`.
- Added a patch entry for `@farcaster/hubble` in the changeset.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Social usernames (twitter, github) have support for removals by setting
the value to empty string. The validator in core erroneously marks this
as an invalid message.
## 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 enhancing username validation for social media
platforms by allowing users to remove their usernames. It also updates
tests related to version expiry.
### Detailed summary
- Added support for removing social usernames in `validations.ts` for
`TWITTER` and `GITHUB`.
- Updated validation logic to check if the username value is not an
empty string before validation.
- Removed a test block in `versions.test.ts` related to version expiry
checks.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release hub-nodejs 0.13.1
## 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 updating the version of the `@farcaster/hub-nodejs`
package from `0.13.0` to `0.13.1` and includes a changelog entry for the
patch changes made.
### Detailed summary
- Deleted the file `.changeset/nasty-eagles-grin.md`.
- Updated `CHANGELOG.md` to include version `0.13.1` with a patch change
for snapchain error codes.
- Updated `packages/hub-nodejs/package.json` version from `0.13.0` to
`0.13.1`.
- Updated `apps/hubble/package.json` to reflect the new version
`^0.13.1` for `@farcaster/hub-nodejs`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Snapchain sends the error codes back using a different header name. Read
that as well.
## 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 improving error handling in the `hub-nodejs` package
by ensuring that error codes from the snapchain are correctly passed
through to the `HubError`.
### Detailed summary
- Updated error handling in `packages/hub-nodejs/src/client.ts`.
- Modified the way `HubError` is instantiated to use `hubErrorCode`,
which retrieves error codes from both `err.metadata.get("errCode")` and
`err.metadata.get("x-err-code")`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release snapchain updates
## 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 updating package versions and changelogs across
multiple modules in the `@farcaster` ecosystem, including new features
and dependency updates.
### Detailed summary
- Updated `@farcaster/core` version from `0.15.6` to `0.16.0`.
- Updated `@farcaster/hub-nodejs` version from `0.10.x` to `0.13.0`.
- Updated `@farcaster/hub-web` version from `0.9.5` to `0.9.6`.
- Updated `@farcaster/shuttle` version from `0.6.13` to `0.6.14`.
- Updated `@farcaster/hubble` version from `1.19.1` to `1.19.2`.
- Added changelog entries for each module reflecting the updates.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Defer version expiry to April 30 to provide time to migrate to snapchain
## 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)
- [ ] 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 updating the version expiry date for a specific
version in the `hubble.ts` file and includes a patch for the
`@farcaster/hubble` package.
### Detailed summary
- Updated the expiry date for version `2025.2.19` from `4/16/25` to
`4/30/25` in `hubble.ts`.
- Added a patch entry for `@farcaster/hubble` in the changeset file.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Update builders to use dataBytes so messages work with snapchain
## 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 updating the package versions and modifying various
`HUB_URL` configurations to support the `snapchain` functionality,
alongside some validation and message handling improvements.
### Detailed summary
- Updated package versions for `@farcaster/hub-nodejs` and
`@farcaster/core` to minor.
- Changed `HUB_URL` in multiple examples to point to
`juno.farcaster.xyz:3383`.
- Enhanced validation by checking both `message.data` and
`message.dataBytes`.
- Updated message creation to use `dataBytes` for `snapchain`
compatibility.
- Adjusted signature handling to use `_unsafeUnwrap()`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
Release hubble 1.19.1
## 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 updating the version of the `@farcaster/hubble`
package from `1.19.0` to `1.19.1`, along with a corresponding change in
the `CHANGELOG.md` to document a bug fix.
### Detailed summary
- Updated `version` in `apps/hubble/package.json` from `1.19.0` to
`1.19.1`.
- Added entry in `CHANGELOG.md` for version `1.19.1` noting a fix for
negative storage usage.
- Deleted `.changeset/empty-queens-bathe.md`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
Addresses the issue reported here:
https://github.com/farcasterxyz/hub-monorepo/issues/2547
## 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 fixing the storage usage calculations in the `hubble`
application to prevent negative values, enhancing cache management, and
adding tests to ensure accurate usage reporting.
### Detailed summary
- Added `clearCaches` method to `eventHandler` and `storageCache`.
- Updated logic in `StorageCache` to prevent negative counts.
- Introduced a test for accurate storage usage when a username proof is
revoked.
- Enhanced test coverage for storage usage scenarios.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
Release shuttle v0.6.13
## 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 updates the version of the `@farcaster/shuttle` package from
`0.6.12` to `0.6.13`, adds a new feature related to environment
variables for `shuttle`, and removes an outdated changelog file.
### Detailed summary
- Updated `@farcaster/shuttle` version from `0.6.12` to `0.6.13` in
`package.json`.
- Added a new feature: environment variables for consuming from
`snapchain` in the changelog.
- Deleted the `.changeset/wild-rabbits-tap.md` file.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
For subscribing to the snapchain cluster, it's useful to have a longer
subscribe rpc timeout given there isn't consistent activity on the
cluster and it's required to use the standard (non-streaming) bulk rpcs.
This feature adds config via envvars for these parameters.
## 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 adding environment variables to the `shuttle`
application for configuration, particularly for streaming RPCs and
timeout settings.
### Detailed summary
- Introduced `USE_STREAMING_RPCS_FOR_BACKFILL` and
`SUBSCRIBE_RPC_TIMEOUT` environment variables in `env.ts`.
- Modified the `constructor` in `MessageReconciliation` to accept a new
parameter `useStreamingRpcs`.
- Updated `establishStream` method call to conditionally execute based
on `useStreamingRpcs`.
- Adjusted the instantiation of `MessageReconciliation` in
`reconcileFids` to include `USE_STREAMING_RPCS_FOR_BACKFILL`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release 1.18
## 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 updating the version of the `@farcaster/hubble`
package and making minor adjustments to the `FARCASTER_VERSION` and its
schedule. It includes a changelog entry for the release.
### Detailed summary
- Updated `version` in `apps/hubble/package.json` from `1.17.0` to
`1.18.0`.
- Added changelog entry for version `1.18.0` in
`apps/hubble/CHANGELOG.md`.
- Updated `FARCASTER_VERSION` in `apps/hubble/src/hubble.ts` from
`2024.11.27` to `2025.1.8`.
- Added new version `2025.1.8` to `FARCASTER_VERSIONS_SCHEDULE`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
In case the db didn't already have sufficient peers we wouldn't connect
to enough peers because the autodial was disabled.
## 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 enhancing the peer-to-peer connection management in
the `hubble` application by ensuring a minimum number of connected peers
and adding functionality to manage denied peers.
### Detailed summary
- Updated `minConnections` from `0` to `7` in `connectionManager` for
better connection stability.
- Introduced `addDeniedPeer(peerId: string)` method in
`connectionFilter.ts` to manage denied peers.
- Added logic to prevent autodial reconnections for denied peers in
`removePeerFromAddressBook`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release shuttle with revert for reconciliation issue.
## 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 updating the version of the `@farcaster/shuttle`
package from `0.6.11` to `0.6.12`, along with a changelog entry that
documents a specific feature revert.
### Detailed summary
- Updated `version` of `@farcaster/shuttle` from `0.6.11` to `0.6.12`.
- Added changelog entry for version `0.6.12` noting the revert of the
feature "Support deleting messages on DB that are missing on hub"
(#2341).
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
Reverts farcasterxyz/hub-monorepo#2341
We found this to be a fundamentally flawed action to take on messages
missing in the hub. Reverting the change to not mislead other Shuttle
users.
Why is this unsafe? Imagine a simple Shuttle-powered app with a `links`
table written to and deleted from by its `handleMessageMerge` method.
Then imagine this series of Farcaster messages submitted to the network:
1. LINK_ADD: FID 123 follows FID 234
2. LINK_REMOVE: FID 123 unfollows FID 234
3. LINK_ADD: FID 123 refollows FID 234
Obviously the correct final `links` table state should be FID 123
following FID 234. But with my changes that I'm reverting here, this
won't be the case. The hubs will eventually delete message 1, meaning
Shuttle's reverse reconciliation would ultimately run
`handleMessageMerge()` with a `state` arg of `"deleted"` on message 1.
This means the `links` table would have its row deleted that signifies
FID 123 following FID 234, regardless of message 3.
I think it might be safe in general to have this `onDbMessage()`
callback do something like hard delete missing-in-hub messages from the
`messages` table to keep its disk usage in check, but calling into the
app to have it perform all downstream deletion processing of the message
like this isn't safe.
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on reverting a previous change that allowed for the
deletion of messages from the database if they were missing on the hub.
It simplifies the `handleMissingMessage` method by removing the
conditional check for `missingInHub`.
### Detailed summary
- Reverted feature: "Support deleting messages on DB that are missing on
hub".
- Modified `handleMissingMessage` method in `hubEventProcessor.ts` to
remove the `missingInHub` parameter.
- Updated calls to `handleMissingMessage` in `app.ts` to reflect the
removal of the `missingInHub` argument.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release shuttle
## 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 updating the version of the `@farcaster/shuttle`
package from `0.6.10` to `0.6.11`, along with a corresponding entry in
the `CHANGELOG.md` to document a bug fix related to using the `statsd`
host from the environment.
### Detailed summary
- Updated version of `@farcaster/shuttle` from `0.6.10` to `0.6.11` in
`packages/shuttle/package.json`.
- Added changelog entry for version `0.6.11` documenting a fix for using
`statsd` host from the environment.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Use statsd host from env for shuttle
## 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 updating the `statsd` configuration in the `shuttle`
package to use the `STATSD_HOST` environment variable for the host
address, enhancing flexibility and avoiding hardcoded values.
### Detailed summary
- Updated `host` in `statsd` configuration from a hardcoded IP
(`"127.0.0.1"`) to use `process.env["STATSD_HOST"]` with a fallback to
`"127.0.0.1"`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
Release hubble v1.16.3 and shuttle v0.6.10.
## 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 primarily focuses on updating version numbers and changelogs for
the `@farcaster/hubble` and `@farcaster/shuttle` packages, along with
some minor code adjustments.
### Detailed summary
- Updated `@farcaster/hubble` version from `1.16.2` to `1.16.3`.
- Added changelog entry for `1.16.3` with a log tag standardization
change.
- Updated `@farcaster/shuttle` version from `0.6.9` to `0.6.10`.
- Added changelog entry for `0.6.10` regarding RPC fallback
improvements.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
In cases like this, we're not falling back to the RPC
```
{"jobName":"reconcile","jobId":"9273216","reason":"Unable to get all casts for FID 652934: server timeout","errorName":"Error","errorMessage":"Unable to get all casts for FID 652934: server timeout","errorStack":"Error: Unable to get all casts for FID 652934: server timeout\n at
MessageReconciliation.getAllCastMessagesByFidInBatchesOf (file:///app/node_modules/@farcaster/shuttle/dist/index.mjs:1060:15)\n at runNextTicks (node:internal/process/task_queues:60:5)\n at process.processTimers (node:internal/timers:511:9)\n at async MessageReconciliation.allHubMessagesOfTypeForFid (file:///app/node_modules/@farcaster/shuttle/dist/index.mjs:980:22)\n at async MessageReconciliation.reconcileMessagesOfTypeForFid (file:///app/node_modules/@farcaster/shuttle/dist/index.mjs:918:22)\n at async MessageReconciliation.reconcileMessagesForFid (file:///app/node_modules/@farcaster/shuttle/dist/index.mjs:913:7)\n at App.reconcileFids (/app/src/shuttle.ts:132:13)\n at Worker.Worker.autorun (/app/src/worker.ts:21:9)\n at Worker.processJob (/app/node_modules/bullmq/src/classes/worker.ts:776:22)\n at Worker.retryIfFailed (/app/node_modules/bullmq/src/classes/worker.ts:982:16)"}
```
## 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 improving error handling in the `reconcile` process
by enhancing the fallback mechanism to RPC in more scenarios when stream
errors occur, and temporarily skipping a test for unresponsive server
requests.
### Detailed summary
- Updated the `shuttle.integration.test.ts` file to skip the test for
unresponsive server requests.
- Enhanced the `messageReconciliation.ts` file to log a warning when a
stream fetch times out and fall back to RPC.
- Added a cancellation mechanism to prevent hanging connections.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release shuttle 0.6.9
## 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 updates the version of the `@farcaster/shuttle` package from
`0.6.8` to `0.6.9` and includes notable changes in the changelog.
### Detailed summary
- Updated `version` in `packages/shuttle/package.json` from `0.6.8` to
`0.6.9`.
- Added a new section for `0.6.9` in `packages/shuttle/CHANGELOG.md`:
- `feat(shuttle)`: Pipe `connectionTimeout` argument through
`EventStreamHubSubscriber`.
- `chore`: Add event timestamp metric for event subscription monitoring.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
This will help us understand if hub are sending events from far back in
time.
## 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 introduces an event timestamp metric for monitoring event
subscriptions in the `EventStreamHubSubscriber` class. It enhances the
telemetry by adding the earliest event timestamp and associates the
metrics with the `hub` property.
### Detailed summary
- Added a new private property `hub` to store the hub client host.
- Extracted the earliest event timestamp using `extractEventTimestamp`
and recorded it with `statsd.gauge`.
- Updated existing metrics to include the `hub` property for better
context in monitoring.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Follow-up to https://github.com/farcasterxyz/hub-monorepo/pull/2367. I
missed piping through BaseHubSubscriber's new `connectionTimeout` param
through to EventStreamHubSubscriber, which means `connectionTimeout`
isn't really configurable for streaming right now like it should be.
## 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)
- [ ] 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 adding a new optional parameter, `connectionTimeout`,
to the `EventStreamHubSubscriber` class, allowing for better control
over connection timeouts.
### Detailed summary
- Added `connectionTimeout?: number` as an optional parameter in the
constructor of `EventStreamHubSubscriber`.
- Updated the call to `super` in the constructor to include the new
`connectionTimeout` argument.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
It's hard to filter logs by tag if we name the same tag different things
in different places. Introduce a pattern for constructing logs that
pushes us toward standardizing log tag names.
## 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 standardizing log tag names by introducing a `Tags`
class, which is used throughout the codebase to create consistent log
entries.
### Detailed summary
- Introduced `Tags` class in `apps/hubble/src/utils/logger.ts` for
standardized log tags.
- Updated logging in `apps/hubble/src/hubble.ts`,
`apps/hubble/src/network/p2p/gossipNode.ts`, and
`apps/hubble/src/network/sync/syncHealthJob.ts` to use `Tags`.
- Added `TagFields` type definition for better structure of log fields.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Bumping version to release social verifications
## 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 updating the versioning of several packages,
enhancing support for Twitter and GitHub usernames, and making various
dependency updates across the `@farcaster` ecosystem.
### Detailed summary
- Updated `@farcaster/core` version from `0.15.5` to `0.15.6`.
- Added support for Twitter and GitHub usernames in `@farcaster/core`.
- Updated `@farcaster/hub-nodejs` version from `0.12.6` to `0.12.7`.
- Updated `@farcaster/hub-web` version from `0.9.4` to `0.9.5`.
- Updated `@farcaster/hubble` version from `1.16.1` to `1.16.2`.
- Placed backups in a dedicated directory in `@farcaster/hub`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
This allows the backups directory to be mounted on a separate volume so
that it doesn't take away from the main storage volume.
## Merge Checklist
- [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 improving the backup functionality in the `RocksDB`
implementation by changing the backup directory structure and enhancing
logging.
### Detailed summary
- Updated the log message format for creating a snapshot.
- Changed the `main_backup_path` construction to place backups in a
dedicated `backup` directory, which is a sibling of the `main_db_path`.
- Adjusted the backup file naming format to include a timestamp.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Describe why this issue should be fixed and link to any relevant design
docs, issues or other relevant items.
## 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 introduces support for validating `twitter` and `github`
usernames in the system. It adds new constants, validation functions,
and test cases to ensure username formats comply with specified rules.
### Detailed summary
- Added constants `USER_DATA_TYPE_TWITTER` and `USER_DATA_TYPE_GITHUB`
in `message.proto`.
- Implemented validation functions `validateTwitterUsername` and
`validateGithubUsername` in `validations.ts`.
- Added regex patterns for Twitter and GitHub usernames.
- Created test cases for Twitter username validation in
`validations.test.ts`.
- Updated functions to handle new user data types in
`userDataTypeFromJSON` and `userDataTypeToJSON` across several files.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
Releasing hubble v1.16.1.
## 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 updating the version of the `@farcaster/hubble`
package from `1.16.0` to `1.16.1` and documenting the changes in the
`CHANGELOG.md`.
### Detailed summary
- Updated version in `apps/hubble/package.json` from `1.16.0` to
`1.16.1`.
- Added a new entry in `CHANGELOG.md` for version `1.16.1`:
- Patch change: Fixed validation for `fid` on username add message to
match `fid` on ENS proof.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
This fixes a bug which allows an users to assume an arbitrary user's ens
name as their own.
## 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 enhancing the validation of `fid` in user data
messages to ensure that it matches the `fid` associated with the
username proof, specifically for `fname` and `ENS` types.
### Detailed summary
- Updated validation logic in `index.ts` to check if `fid` matches for
`fname` and `ENS` username types.
- Added error handling for invalid username types.
- Introduced a new test case in `index.test.ts` to verify failure when
`fid` on message does not match `fid` on ENS name proof.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release 1.16
## 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 updating version numbers and changelogs for the
`@farcaster/hub-nodejs` and `@farcaster/shuttle` packages, along with
modifications to the `FARCASTER_VERSION` in the `hubble.ts` file.
### Detailed summary
- Updated `@farcaster/hub-nodejs` version from `0.12.5` to `0.12.6`.
- Added `createDefaultMetadataKeyInterceptor` in `CHANGELOG.md`.
- Updated `@farcaster/shuttle` version from `0.6.7` to `0.6.8`.
- Parametrized hub connection timeouts for `HubSubscriber` and
`MessageReconciliation`.
- Updated `@farcaster/hubble` version from `1.15.7` to `1.16.0`.
- Changed `FARCASTER_VERSION` from `2024.9.4` to `2024.10.16`.
- Added new version `2024.10.16` to `FARCASTER_VERSIONS_SCHEDULE`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Running the latest version of Shuttle with its fixed 5000ms hub
connection timeout for reconciliation has resulted in a lot of timeout
failures even against a seemingly healthy hub. I've increased the
default connection timeout of MessageReconciliation from 5000ms to
30000ms to match HubSubscriber's and parameterized both.
## 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)
- [ ] 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 introduces parameterized connection timeouts for the
`HubSubscriber` and `MessageReconciliation` classes, allowing for more
flexible timeout settings in handling unresponsive connections.
### Detailed summary
- Added `connectionTimeout` parameter to the constructors of
`MessageReconciliation` and `BaseHubSubscriber`, defaulting to 30000
milliseconds.
- Updated timeout handling in `MessageReconciliation` to use
`connectionTimeout`.
- Adjusted timeout in tests to account for new configurable timeout
settings.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Neynar requires x-api-key to access its hubs. This change makes it easy
to include that (or any other) header.
I tried to follow the docs to create a changes, but got an error. Am I
running it from the wrong directory maybe?
```
% yarn changeset
yarn run v1.22.22
error Command "changeset" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
bryan@Bryan-Neynar hub-monorepo % yarn run changeset
yarn run v1.22.22
error Command "changeset" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
## 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)
- [ ] 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 introduces a new function to create a metadata key interceptor
for gRPC calls in the `hub-nodejs` package.
### Detailed summary
- Added the `createDefaultMetadataKeyInterceptor` function in
`packages/hub-nodejs/src/client.ts`.
- The function takes a `key` and `value`, returning an interceptor that
sets the specified metadata key with the given value if it is not
already present.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
Releasing hubble v1.15.7.
## 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)
- [ ] 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 updating the version of `@farcaster/core`,
`@farcaster/hub-web`, and `@farcaster/hub-nodejs` packages to `0.15.5`,
`0.9.4`, and `0.12.5` respectively, while also adding a feature for user
location to the protocol and updating dependencies across various
packages.
### Detailed summary
- Updated `@farcaster/core` version to `0.15.5`.
- Updated `@farcaster/hub-web` version to `0.9.4`.
- Updated `@farcaster/hub-nodejs` version to `0.12.5`.
- Added user location feature to the protocol.
- Updated dependencies in `@farcaster/hub-web` and
`@farcaster/hub-nodejs`.
- Updated changelogs for multiple packages.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
This is required to decentralize user location.
## 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 introduces a new feature to add user location data to the
protocol, including validation for latitude and longitude, and updates
across several files to support this functionality.
### Detailed summary
- Added `USER_DATA_TYPE_LOCATION` to `protobufs/schemas/message.proto`.
- Updated `userDataTypeFromJSON` and `userDataTypeToJSON` functions to
handle location type.
- Implemented location handling in `packages/hub-web`,
`packages/hub-nodejs`, and `packages/core`.
- Created validation functions for latitude and longitude.
- Added tests for user location data handling in
`apps/hubble/src/rpc/test/userDataService.test.ts` and
`packages/core/src/validations.test.ts`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Releases shuttle v0.6.7
## 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 updating the version of the `@farcaster/shuttle`
package from `0.6.6` to `0.6.7` and includes a new changelog entry for
the patch that addresses a specific issue with timed out connections.
### Detailed summary
- Updated version of `@farcaster/shuttle` in `package.json` from `0.6.6`
to `0.6.7`.
- Added changelog entry for version `0.6.7`:
- Fixed handling of timed out connections from hub event subscriber.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Similar to #2358, this resolves unexpected hanging gRPC connections by
timing them out at the call level. While gRPC configurations exist to
perform keepalives and theoretically would be preferable, some
deployment environments cannot alter them, and some consumers aren't
always able to be aligned with the stream source.
## 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 improving the handling of timed-out connections in
the `BaseHubSubscriber` class within the `hubSubscriber.ts` file. It
implements a mechanism to ensure that unresponsive connections are
properly terminated after a specified timeout.
### Detailed summary
- Added a timeout mechanism to prevent unresponsive connections from
lingering.
- Introduced a `setTimeout` to call `this.destroy()` after 30 seconds of
inactivity.
- Cleared the timeout after processing each `HubEvent` to reset the
timer.
- Ensured proper error handling by emitting an error event if an
exception occurs.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
The metrics collected for statsd were not integrated into grafana, and
needed a few extra details for advanced configurations. This adds a new
metric for streaming, more tags on all three (http/rpc/streaming), and
incorporates them into grafana.
## 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 enhancing metrics tracking for HTTP and RPC requests
in the `hubble` application, particularly for Grafana monitoring, by
adding new metrics and adjusting existing ones.
### Detailed summary
- Updated the method for decrementing `rpc.open_request_count` to use
`getOnChainSigner`.
- Introduced new metrics for `rpc.open_stream_count` in `subscribe`,
`streamSync`, `streamFetch`.
- Added new Grafana dashboard panels for tracking HTTP and RPC requests.
- Configured `Graphite` as the data source for the new metrics in
Grafana.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Releases v0.6.6 of shuttle
## 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 updates the version of the `@farcaster/shuttle` package from
`0.6.5` to `0.6.6`, adds a new entry to the `CHANGELOG.md` for patch
changes, and includes a fix for handling streaming hangups when the
server unexpectedly dies.
### Detailed summary
- Updated `version` in `packages/shuttle/package.json` from `0.6.5` to
`0.6.6`.
- Added a new section in `CHANGELOG.md` for version `0.6.6`.
- Documented a fix for gracefully handling streaming hangups when the
server dies unexpectedly.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Fixes#2346. Under certain conditions, like a hub failure or odd
connectivity quirks, the fetch can hang indefinitely, leading to a need
for consumers to restart if they aren't timeout driven. This avoids the
issue by setting a sensible timeout and returning failure in the event
it can't complete the request.
## 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 improving the handling of server streaming timeouts
and errors in the `shuttle` package, ensuring graceful termination of
unresponsive connections and adding corresponding tests.
### Detailed summary
- Added timeout handling to prevent hanging connections in
`packages/shuttle/src/shuttle/messageReconciliation.ts`.
- Updated promise resolution logic to handle server timeout errors.
- Implemented a test case in
`packages/shuttle/src/shuttle.integration.test.ts` for unresponsive
server requests.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->