Snapchain Soars: New Era for Client Libraries with Protobuf Revolution
Outdated Protocols Obliterated as Codebase Streamlines, Paving the Way for Seamless Integration and Enhanced Functionality!
Commit Details:
chore: switch to generating client libraries off snapchain protos (#2603) ## 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 -->