## Why is this change needed?
Add support for backfilling lend storage messages from snapchain to
clients.
## 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 `@farcaster/shuttle` package to version
`0.9.5`, adding support for backfilling lend storage messages, and
introducing new methods related to lend storage message retrieval.
### Detailed summary
- Updated version in `package.json` files to `0.9.5`.
- Added support for backfilling lend storage messages in `CHANGELOG.md`.
- Introduced `getAllLendStorageMessagesByFid` method in
`shuttle.integration.test.ts`.
- Included `LEND_STORAGE` message type in message reconciliation logic
in `messageReconciliation.ts`.
- Created `getAllLendStorageMessagesByFidInBatchesOf` for batch
processing of lend storage messages.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Pull in latest snapchain protos for storage lending backfill.
## 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 updates the versioning of several packages, introduces
a new request interface for on-chain events migration, and enhances the
`ShardInfo` structure by adding a `numOnchainEvents` field. It also
updates dependencies across various packages.
### Detailed summary
- Updated `@farcaster/core` version to `0.18.9` and other package
versions accordingly.
- Added `numOnchainEvents` field to `ShardInfo` in multiple generated
files.
- Introduced `RunOnchainEventsMigrationRequest` interface in
`admin_rpc.ts`.
- Added RPC methods for `getAllLendStorageMessagesByFid` and
`runOnchainEventsMigration`.
- Updated changelogs for `core`, `hub-web`, `hub-nodejs`, and `shuttle`
packages.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
The example app was fixed at an old version of shuttle that was missing
more recent updates including storage lending.
## 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 upgrading the `@farcaster/shuttle` dependency in the
example app and making related adjustments in the codebase, including
changes to request handling and variable names.
### Detailed summary
- Updated `@farcaster/shuttle` dependency from `^0.5.0` to `^0.9.3`.
- Replaced `HubInfoRequest` with `GetInfoRequest` in the `App` class.
- Changed handling of `undefined` instead of `null` for the
`hubSubscriber` initialization.
- Modified the retrieval of `maxFid` to use `numFidRegistrations`
instead of `numFidEvents`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release packages for storage lending.
## 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 several packages in the
`farcaster` ecosystem to `0.18.8` for `@farcaster/core`, `0.15.8` for
`@farcaster/hub-nodejs`, and `0.11.6` for `@farcaster/hub-web`. It also
introduces a new feature related to storage lending.
### Detailed summary
- Updated `@farcaster/core` version from `0.18.7` to `0.18.8`.
- Updated `@farcaster/hub-nodejs` version from `0.15.7` to `0.15.8`.
- Updated `@farcaster/hub-web` version from `0.11.5` to `0.11.6`.
- Updated `@farcaster/shuttle` version from `0.9.2` to `0.9.3`.
- Added feature: support for storage lending (commit `206eb72f`).
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
All the changes required to submit storage lending messages to the
protocol.
## 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 storage lending in the system, including
new message types and validation for lending operations.
### Detailed summary
- Added support for `LendStorage` message type in
`packages/shuttle/src/utils.ts`.
- Introduced `LendStorageData` and `LendStorageMessage` types in
`packages/core/src/protobufs/types.ts`.
- Updated `StoreType` to include `STORAGE_LENDS`.
- Implemented validation for lending storage in
`packages/core/src/validations.ts`.
- Enhanced `ContactInfoBody` to include `announceRpcAddress` in multiple
files.
- Updated related protobufs and message handling for `MergeMessage`
events.
> The following files were skipped due to too many changes:
`packages/core/src/protobufs/generated/request_response.ts`,
`packages/hub-web/src/generated/message.ts`,
`packages/hub-nodejs/src/generated/message.ts`,
`packages/core/src/protobufs/generated/message.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release client versions for
https://github.com/farcasterxyz/hub-monorepo/pull/2648
## 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/core` package
and its dependencies, along with corresponding changelog updates to
reflect these changes.
### Detailed summary
- Updated `@farcaster/core` version from `0.18.6` to `0.18.7`.
- Added changelog entries for versions `0.18.7`, `0.11.5`, and `0.15.7`
with details on protobuf updates.
- Updated `@farcaster/core` dependency version in `packages/hub-web` and
`packages/hub-nodejs` from `0.18.6` to `0.18.7`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Update client libs to support profile tokens
## 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 protobuf definitions to support new types,
specifically adding profile tokens and enhancing event handling in the
system.
### Detailed summary
- Removed `job` exports from `packages/core/src/protobufs/index.ts`.
- Added `PROFILE_TOKEN` to `UserDataType` in multiple files.
- Introduced `validateProfileToken` function in
`packages/core/src/validations.ts`.
- Added `maxBlockEventSeqnum` to various event-related interfaces.
- Implemented `SubmitBulkMessages` RPC methods in
`packages/hub-nodejs/src/generated/rpc.ts`.
- Enhanced `Block` and `BlockEvent` structures to include transactions
and events.
- Added tests for profile token validation in
`packages/core/src/validations.test.ts`.
> The following files were skipped due to too many changes:
`packages/core/src/protobufs/generated/blocks.ts`,
`packages/core/src/protobufs/generated/replication.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Expose a function that calculates the expiry timestamp from just the
block timestamp.
## 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 `@farcaster/core` and
`@farcaster/hub-nodejs` packages to version `0.18.6` and `0.15.6`
respectively, along with introducing a new function for calculating
storage unit expiry timestamps.
### Detailed summary
- Updated `@farcaster/core` to version `0.18.6`.
- Updated `@farcaster/hub-nodejs` to version `0.15.6`.
- Added `getStorageExpiryTimestampFromBlockTimestamp` function in
`limits.ts`.
- Modified `getStorageUnitExpiry` to use the new expiry function.
- Added tests for `getStorageExpiryTimestampFromBlockTimestamp` in
`limits.test.ts`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new packages.
## 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)
- [ ] 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` package
and making corresponding updates in the `@farcaster/hub-web` and
`@farcaster/hub-nodejs` packages. It also includes changelog entries for
the new versions.
### Detailed summary
- Updated `@farcaster/core` version from `0.18.4` to `0.18.5`.
- Updated `@farcaster/hub-web` version from `0.11.3` to `0.11.4`.
- Updated `@farcaster/hub-nodejs` version from `0.15.4` to `0.15.5`.
- Added changelog entries for versions `0.18.5`, `0.11.4`, and `0.15.5`.
- Notable fixes and updates related to Snapchain protos and dataBytes
length check.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Pull in the `GetConnectedPeers` endpoint so we can use it in the
console.
## 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 `GetConnectedPeers` functionality in the
`HubService` by introducing new request and response types, along with
modifications to the serialization and deserialization processes. It
also updates dependencies and related proto files.
### Detailed summary
- Added `GetConnectedPeersRequest` and `GetConnectedPeersResponse`
interfaces.
- Implemented `getConnectedPeers` method in `HubServiceService`.
- Updated `HubServiceServer` and `HubServiceClient` interfaces to
include `getConnectedPeers`.
- Modified `generate-protos.sh` to use a new proto revision.
- Updated `ContactInfoBody` structure in `gossip.ts` to include new
fields.
- Refactored `GossipMessage` to accommodate new message types.
- Updated dependencies in `.changeset/tender-melons-fail.md`.
> The following files were skipped due to too many changes:
`packages/hub-nodejs/src/generated/gossip.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
The current check only allows `dataBytes` to be max 2048 bytes.
## 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 validation logic for `dataBytes` in
messages to accommodate larger sizes, specifically for 10k casts. It
also includes a new test case to ensure that messages with a length of
10,000 characters are validated correctly.
### Detailed summary
- Updated the length check for `dataBytes` from 2048 to 65,536 bytes in
`packages/core/src/validations.ts`.
- Added a new test case in `packages/core/src/validations.test.ts` to
validate messages with 10,000 characters using `makeCastAdd`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new core and hub-nodejs packages.
## 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)
- [ ] 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 the `@farcaster/core` and
`@farcaster/hub-nodejs` packages, along with their changelogs, to
reflect recent changes and dependency updates.
### Detailed summary
- Deleted the changelog file: `.changeset/calm-drinks-ring.md`
- Updated `CHANGELOG.md` for `packages/core` to version `0.18.4`, noting
a fix for determining storage unit type.
- Updated `CHANGELOG.md` for `packages/hub-nodejs` to version `0.15.4`,
indicating updated dependencies.
- Updated `package.json` for `packages/core` to version `0.18.4`.
- Updated `package.json` for `packages/hub-nodejs` to version `0.15.4`.
- Updated dependency version for `@farcaster/core` in
`packages/hub-nodejs/package.json` to `0.18.4`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
We're incorrectly determining that newly created storage units are 2025
storage units not 2024 storage units.
## 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 correcting the determination of storage unit types
and updating related constants to reflect the correct cutoff timestamps
for storage units.
### Detailed summary
- Updated `UNIT_TYPE_2025__CUTOFF_TIMESTAMP` to
`UNIT_TYPE_2024__CUTOFF_TIMESTAMP` in `limits.ts`.
- Modified the logic in `getStorageUnitType` to return
`StorageUnitType.UNIT_TYPE_2024` instead of
`StorageUnitType.UNIT_TYPE_2025` for the 2024 cutoff.
- Adjusted the expiry logic in `getStorageUnitExpiry` to match the
updated cutoff for 2024 storage units.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release shuttle 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
- [ ] 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.9.1` to `0.9.2`, adds a new entry in the `CHANGELOG.md` for version
`0.9.2`, and includes a fix related to error emission on hub subscriber
disconnects.
### Detailed summary
- Updated `version` in `packages/shuttle/package.json` from `0.9.1` to
`0.9.2`.
- Added `CHANGELOG.md` entry for version `0.9.2`:
- Fix: updated error emission on hub subscriber disconnects.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Emitting here ensures that the `stopped` state properly reflects whether
a retry will happen.
## 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 `hubSubscriber` by
adjusting when errors are emitted during subscriber disconnects. It
ensures that the `stopped` state accurately reflects whether a retry
will occur after a delay.
### Detailed summary
- Modified the error emission logic to occur after a sleep period.
- Added a comment explaining the rationale for checking the `stopped`
state post-sleep.
- Ensured that if the subscription is stopped, it logs an abort message
instead of retrying.
> ✨ 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
- [ ] 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.9.0` to `0.9.1`, along with a changelog entry detailing
a bug fix related to server-side termination handling in
`HubSubscriber`.
### Detailed summary
- Updated `version` in `packages/shuttle/package.json` from `0.9.0` to
`0.9.1`.
- Added changelog entry in `packages/shuttle/CHANGELOG.md` for version
`0.9.1`:
- Fix: handle retries on server-side termination properly in
`HubSubscriber`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Previously the `HubSubscriber` would raise if the stream was closed in
between when there was an error on one rpc and when the retry happened.
## 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 `HubSubscriber` class
by properly managing retries during server-side terminations.
### Detailed summary
- Added a log message indicating an unexpected halt in the hub event
stream processing.
- Changed the log message for when the subscription is stopped to
specify aborting the retry.
- Ensured the retry logic only proceeds if the subscription is not
stopped after a sleep period.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Update protos to support new storage unit type in snapchain v0.4.0
## 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 various packages,
enhancing the `StorageUnitType` enumeration with a new type, and
updating dependencies across the project. It also includes changes to
configuration files for better package management.
### Detailed summary
- Updated `@farcaster/core` version to `0.18.3`.
- Updated `@farcaster/hub-nodejs` version to `0.15.3`.
- Updated `@farcaster/hub-web` version to `0.11.3`.
- Added `UNIT_TYPE_2025` to `StorageUnitType` in multiple files.
- Updated changelogs for `core`, `hub-web`, and `hub-nodejs`.
- Updated `PROTO_REV` in `generate-protos.sh`.
- Added `overrides` in `pnpm-workspace.yaml` and `pnpm-lock.yaml`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new packages
## 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,
particularly `@farcaster/core`, `@farcaster/hub-nodejs`, and
`@farcaster/hub-web`, along with adding a console example and making
adjustments to dependencies and changelogs.
### Detailed summary
- Updated `@farcaster/core` version to `0.18.2` from `0.18.1`.
- Updated `@farcaster/hub-web` version to `0.11.2` from `0.11.1`.
- Updated `@farcaster/hub-nodejs` version to `0.15.2` from `0.15.1`.
- Updated `@farcaster/shuttle` version to `0.9.0` from `0.8.2`.
- Added a console example and bumped protos in changelogs.
- Noted dependency updates for `@farcaster/hub-nodejs` and
`@farcaster/core` in respective changelogs.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
It's hard for the client to determine where to resume from if they're
subscribed to multiple shards.
## 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 making the `shardIndex` parameter required for the
`hubSubscriber` and removing the optional `totalShards` parameter. It
ensures that the `shardIndex` is always provided when creating instances
of `BaseHubSubscriber` and `EventStreamHubSubscriber`.
### Detailed summary
- Made `shardIndex` a required parameter in the constructors of
`BaseHubSubscriber` and `EventStreamHubSubscriber`.
- Removed the optional `totalShards` parameter from both constructors.
- Updated the constructor calls to reflect the removal of `totalShards`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Port the yarn console from hubble as an example app
## 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 console commands for the
`@farcaster/hub-nodejs` package by adding new functionalities and
updating existing ones. It also updates the protobuf definitions and
dependencies.
### Detailed summary
- Added `console-example` in
`packages/hub-nodejs/examples/console/package.json`.
- Introduced new commands: `RpcClientCommand`, `AdminCommand`,
`ProtobufCommand`, `FactoriesCommand`, and `TrackHubDelayCommand`.
- Updated `generate-protos.sh` with a new `PROTO_REV`.
- Enhanced `RetryFnameRequest` and added related methods in protobuf
files.
- Improved console utility functions and command help descriptions.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new shuttle 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
- [ ] 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.8.1` to `0.8.2`, including a new logging feature for the
event stream monitor.
### Detailed summary
- Deleted the `.changeset/calm-hornets-confess.md` file.
- Updated `CHANGELOG.md` to include version `0.8.2` with a new logging
feature.
- Changed the `version` in `package.json` from `0.8.1` to `0.8.2`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Add logging required to debug missed blocks
## 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 logging in the `EventStreamMonitor` class
to include additional context about events being processed, specifically
the `eventShardId` and `currentBlockNumber`.
### Detailed summary
- Added `eventShardId` to the error logging in `this.log.error`.
- Included `eventShardId` and `currentBlockNumber` in the event object
being logged.
- Updated logging for unexpected events to include `eventShardId`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new shuttle version with the revert for the previous change.
## 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)
- [ ] 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.8.0` to `0.8.1`, along with a changelog entry that
documents a fix related to event stream processing.
### Detailed summary
- Updated `version` in `packages/shuttle/package.json` from `0.8.0` to
`0.8.1`.
- Added changelog entry for version `0.8.1` in
`packages/shuttle/CHANGELOG.md`:
- Reverted changes to the event stream to ensure events are processed in
order.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
This change causes the event stream to halt unexpectedly.
## 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 focuses on reverting changes to the event stream processing,
ensuring events are handled in order, and introducing the ability to
claim and process stale events.
### Detailed summary
- Reverted event stream processing changes for order.
- Added `claimStale` method to retrieve pending events.
- Introduced `eventProcessingTimeout` property in
`HubEventStreamConsumer`.
- Implemented `processStale` method for processing stale events.
- Enhanced error handling and monitoring for event processing.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new shuttle 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
- [ ] 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 `@farcaster/shuttle` package to version `0.8.0`,
introduces a new feature for processing events from a stream in order,
and removes the `.changeset/polite-eyes-protect.md` file.
### Detailed summary
- Updated `version` in `packages/shuttle/package.json` from `0.7.4` to
`0.8.0`.
- Added a new entry in `CHANGELOG.md` for version `0.8.0` detailing the
feature: process events from stream in order.
- Deleted the `.changeset/polite-eyes-protect.md` file.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
With the new blockchain model for Snapchain, we want to deliver messages
to clients in order.
Previously, we always prioritized new events even if there were old
events backed up. If there are backed up events, we want to process
those before moving onto new events.
This feature also changes the guarantees around error handling by the
stream. Events won't be presented to the client again if the client
returns an error when processing the event. It's the clients
responsibility to retry event processing on errors if they want to.
## 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 `EventStreamConnection` and
`HubEventStreamConsumer` classes by improving event processing, removing
the `claimStale` method, and adjusting event handling logic for better
performance and clarity.
### Detailed summary
- Updated event processing to ensure events are processed in order.
- Removed the `claimStale` method from `HubEventStreamConsumer`.
- Eliminated `eventProcessingTimeout` property from
`HubEventStreamConsumer`.
- Refactored logic for handling skipped events and timing metrics.
- Improved error handling and event acknowledgment processes.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new shuttle 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
- [ ] 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.7.3` to `0.7.4`, including a fix related to stream
monitoring.
### Detailed summary
- Updated version in `packages/shuttle/package.json` from `0.7.3` to
`0.7.4`.
- Added a new entry in `CHANGELOG.md` for version `0.7.4`:
- Fix: use shard id from event in stream monitoring.
- Deleted the `.changeset/giant-masks-deny.md` file.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
If we subscribe to all shards in a single event stream, using a shard
index that's provided by the user at initialization doesn't work.
## 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 `EventStreamMonitor` class by
incorporating `shardId` into various methods to improve event streaming
and monitoring capabilities.
### Detailed summary
- Updated `streamKey` to include `shardId`.
- Modified `blockCountsKey`, `currentBlockNumberKey`, and
`currentBlockTimestampKey` to accept `shardId`.
- Adjusted `setBlockCounts`, `blockCompleted`, and `onEventProcessed`
methods to use `shardId`.
- Changed Redis key retrievals to utilize `shardId`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new shuttle version to fix event stream monitoring
## 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)
- [ ] 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.7.2` to `0.7.3` and includes a changelog entry for the
new patch version that addresses a specific fix in event stream
monitoring.
### Detailed summary
- Updated `version` of `@farcaster/shuttle` from `0.7.2` to `0.7.3` in
`packages/shuttle/package.json`.
- Added changelog entry for version `0.7.3`:
- Fixed issue to maintain counts only for expected events in event
stream monitoring.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
We're producing a lot of errors with 0 missing events due to this bug.
## 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 event stream monitoring by ensuring that
only counts for expected events are maintained, thereby optimizing the
handling of event data.
### Detailed summary
- Modified the `setBlockCounts` method in the `eventStream.ts` file.
- Changed the way event counts are retrieved: now checks if the count is
`undefined` before setting it in Redis.
- Removed the default count of `0`, ensuring only relevant counts are
stored.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new version 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
- [ ] 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.7.1` to `0.7.2`, including a new patch change that adds
a custom Redis key prefix for monitoring.
### Detailed summary
- Updated `version` in `packages/shuttle/package.json` from `0.7.1` to
`0.7.2`
- Added a new entry in `CHANGELOG.md` for version `0.7.2`:
- Patch Change: `3cd6a779`: fix: add custom redis key prefix for
monitoring
- Removed the `.changeset/spicy-chairs-judge.md` file.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
If clients split up streams beyond host/shard, the keys in redis need a
special prefix to remain unique per 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)
- [ ] 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 custom Redis key prefix for monitoring in the
`EventStreamMonitor` class, enhancing key management for event streams.
### Detailed summary
- Added a new property `redisPrefix: string;` in the
`EventStreamMonitor` class.
- Updated the constructor to accept `redisPrefix: string`.
- Modified the `streamKey` method to use the new `redisPrefix` for
generating keys.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new packages to pick up event stream observability 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
- [ ] 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 versions and changelogs for several packages
within the `farcaster` project, along with adding new features and fixes
related to event stream monitoring.
### Detailed summary
- Updated `@farcaster/core` version from `0.18.0` to `0.18.1`.
- Added monitoring for event stream based on snapchain block numbers.
- Updated `@farcaster/hub-web` version from `0.11.0` to `0.11.1`.
- Updated `@farcaster/hub-nodejs` version from `0.15.0` to `0.15.1`.
- Updated `@farcaster/shuttle` version from `0.7.0` to `0.7.1`.
- Updated dependencies across multiple packages to reflect new versions.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Track event stream stats by both shard and host since streams are per
host.
## 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 enhances the `EventStreamMonitor` and `HubEventStreamConsumer`
classes to track event stream statistics by `host`, improving monitoring
capabilities for events processed in a distributed environment.
### Detailed summary
- Added a new `host` property to `EventStreamMonitor`.
- Updated the constructor of `EventStreamMonitor` to accept `host` as a
parameter.
- Modified methods to use `streamKey()` for generating keys.
- Enhanced statistics tracking by including `host` in metrics.
- Adjusted `HubEventStreamConsumer` to call `onEventProcessed` with
`hubEvt`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Detect when there are missed events using the `BlockConfirmed` event.
## 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 event stream monitoring capabilities by
introducing new types and methods to track block events, including event
counts by type, and updating the related structures across multiple
packages.
### Detailed summary
- Introduced `eventCountsByType` in `BlockConfirmedBody`.
- Added `BlockConfirmedBody_EventCountsByTypeEntry` interface.
- Modified `createBaseBlockConfirmedBody` to initialize
`eventCountsByType`.
- Updated serialization and deserialization logic for
`BlockConfirmedBody` to handle `eventCountsByType`.
- Created `EventStreamMonitor` class to manage event counts and monitor
block events.
- Integrated `EventStreamMonitor` into `HubEventStreamConsumer`.
- Enhanced error handling and logging for missed events and old events
in the event stream.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Release new versions of all packages.
## 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 in the
`@farcaster` ecosystem, along with minor changes and enhancements
related to client library generation and type guards.
### Detailed summary
- Updated `@farcaster/core` version from `0.17.1` to `0.18.0`.
- Updated `@farcaster/hub-web` version from `0.10.0` to `0.11.0`.
- Updated `@farcaster/shuttle` version from `0.6.18` to `0.7.0`.
- Updated `@farcaster/hub-nodejs` version from `0.14.1` to `0.15.0`.
- Added changelog entries for versions `0.18.0`, `0.11.0`, `0.15.0`, and
`0.7.0`.
- Included minor changes for client library generation and type guards
for `BlockConfirmed` event.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
This eliminates the need to keep 2 sets of protos in sync with one
another. Generated files should be backwards compatible because we've
kept the protos in sync so far.
Some material updates
- Snapchain doesn't have the bulk streaming rpcs we used for
reconciliation in hubs. Deleted all the shuttle code that depends on
these rpcs
- In the Snapchain protos, admin rpcs are specified in a different
proto. This caused some small amount of churn.
- The admin rpcs in snapchain do not mirror the admin rpcs on hubs.
## 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 removing outdated `.proto` files and updating the
generation of client libraries from new `snapchain` protobufs. It also
introduces type guards for the `BlockConfirmed` event and modifies
various message structures in the codebase.
### Detailed summary
- Deleted outdated `.proto` files in `protobufs/schemas`.
- Updated `package.json` scripts to generate clients from `snapchain`
instead of local schemas.
- Added type guards for `BlockConfirmed` events in `typeguards.ts`.
- Modified message structures to include `BlockConfirmedBody`.
- Updated comments for clarity in `message.ts`.
- Refactored `MessageReconciliation` class to remove streaming logic.
- Introduced new methods for handling on-chain events in `admin_rpc.ts`.
> The following files were skipped due to too many changes:
`packages/hub-web/src/generated/hub_event.ts`,
`packages/hub-nodejs/src/generated/hub_event.ts`,
`packages/core/src/protobufs/generated/hub_event.ts`,
`packages/hub-web/src/generated/rpc.ts`,
`packages/core/src/protobufs/generated/gossip.ts`,
`packages/hub-nodejs/src/generated/rpc.ts`,
`packages/hub-web/src/generated/blocks.ts`,
`packages/hub-nodejs/src/generated/blocks.ts`,
`packages/core/src/protobufs/generated/blocks.ts`,
`packages/hub-web/src/generated/request_response.ts`,
`packages/hub-nodejs/src/generated/request_response.ts`,
`packages/core/src/protobufs/generated/request_response.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Why is this change needed?
Shuttle was ignoring the should validate flag when reconciling link
compact state messages
## 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 and making a modification in the `hubEventProcessor.ts` file to
include a new parameter in a function call, enhancing the validation of
messages.
### Detailed summary
- Updated `version` in `package.json` from `0.6.17` to `0.6.18`.
- Added a new entry in `CHANGELOG.md` for version `0.6.18`, noting a fix
for respecting validate messages flag.
- Modified the function call in `hubEventProcessor.ts` to include
`shouldValidate` as an additional argument in
`MessageProcessor.deleteDifferenceMessages`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## 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 -->
from beginning - from the beginning
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on improving the logging message in the
`hubSubscriber.ts` file for clarity.
### Detailed summary
- Updated the warning log message from `"No last hub event ID found,
starting from beginning"` to `"No last hub event ID found, starting from
the beginning"` for better readability.
> ✨ 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_
- [ ] 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 adds a new section to the `packages/core/README.md` file to
introduce the `@farcaster/core` package, which includes shared
hub-related methods and classes.
### Detailed summary
- Added a new header `# @farcaster/core` to the
`packages/core/README.md`.
- Included a description stating that the package contains shared
hub-related methods and classes.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
In the code, the epoch is set to January 1, 2021, but there's a typo in
the error message referencing “01/01/2022” instead of “01/01/2021”.
<!-- start pr-codex -->
---
## PR-Codex overview
This PR updates the error message in the `toFarcasterTime` function to
reflect a change in the acceptable time range, adjusting the Farcaster
epoch date from "01/01/2022" to "01/01/2021".
### Detailed summary
- Updated the error message in the `toFarcasterTime` function.
- Changed the date in the message from "01/01/2022" to "01/01/2021" to
specify the new Farcaster epoch threshold.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
Co-authored-by: comfsrt <155266597+comfsrt@users.noreply.github.com>