## Motivation
Allow sharding the event stream by fid
## Change Summary
Describe the changes being made in 1-2 concise sentences.
## 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.
- [x] All [commits have been
signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits)
## Additional Context
If this is a relatively large or complex change, provide more details
here that will help reviewers
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces sharding of event streams by `fid`, adds
`total_shards` and `shard_index` fields, and updates event handling
logic.
### Detailed summary
- Introduces sharding event stream by `fid`
- Adds `total_shards` and `shard_index` fields for event stream sharding
- Updates event handling logic based on sharding parameters
> The following files were skipped due to too many changes:
`apps/hubble/src/rpc/test/eventService.test.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Motivation
Gossip MessageBundles instead of individual messages
## Change Summary
- The feature is in, but it is not turned on yet. It can be % rolled out
via network config
## 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.
- [X] All [commits have been
signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits)
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces gossip MessageBundles, adds `mergeMany` method,
refactors message handling, and updates network configuration handling.
### Detailed summary
- Added gossip `MessageBundle` in `gossip.proto`
- Implemented `mergeMany` method in Rust functions
- Refactored message handling in various files
- Updated network configuration handling
> The following files were skipped due to too many changes:
`apps/hubble/src/network/p2p/bundleCreator.ts`,
`apps/hubble/src/storage/stores/rustStoreBase.ts`,
`apps/hubble/src/addon/src/store/store.rs`,
`apps/hubble/src/network/p2p/gossipNode.ts`,
`apps/hubble/src/storage/stores/castStore.test.ts`,
`apps/hubble/src/storage/engine/index.test.ts`,
`apps/hubble/src/test/e2e/hubbleNetwork.test.ts`,
`apps/hubble/src/network/p2p/bundleCreator.test.ts`,
`packages/hub-web/src/generated/gossip.ts`,
`packages/hub-nodejs/src/generated/gossip.ts`,
`packages/core/src/protobufs/generated/gossip.ts`,
`apps/hubble/src/storage/stores/castStoreBundle.test.ts`,
`apps/hubble/src/test/e2e/gossipNetworkBundle.test.ts`,
`apps/hubble/src/storage/engine/index.ts`,
`apps/hubble/src/network/p2p/gossipNodeWorker.ts`,
`apps/hubble/src/network/utils/networkConfig.test.ts`,
`apps/hubble/src/hubble.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Motivation
It's useful for frames to know:
1) the current connected address, to generate transaction calldata
2) the actual address that executed a tx, in the post transaction
callback
We should pass this as part of the frame message.
## Change Summary
- Add `address` field to `FrameActionBody`
- Limit length to 64 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.
- [x] All [commits have been
signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits)
<!-- start pr-codex -->
---
## PR-Codex overview
This PR updates message schemas and validations to include a
chain-specific address for transaction actions.
### Detailed summary
- Added `address` field to message schemas
- Updated validations to check address length
- Updated message serialization and deserialization functions to handle
the `address` field
> The following files were skipped due to too many changes:
`packages/hub-web/src/generated/rpc.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
## Motivation
This endpoint was added to get an approximate list of all peers on the
network
## Change Summary
- Added new Proto definitions for endpoint
- New accessor method for current peers
- New RPC endpoint for current peers `/v1/peerList`
## 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.
- [x] All [commits have been
signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits)
## Additional Context
Response looks like the following:
```
{
"contacts": [
{
"gossipAddress": {
"address": "84.247.175.196",
"family": 4,
"port": 2282,
"dnsName": ""
},
"rpcAddress": {
"address": "84.247.175.196",
"family": 4,
"port": 2283,
"dnsName": ""
},
"excludedHashes": [],
"count": 10694067,
"hubVersion": "2023.12.27",
"network": "FARCASTER_NETWORK_MAINNET",
"appVersion": "1.9.2",
"timestamp": 1705796040744
},
...
```
<!-- start pr-codex -->
---
## PR-Codex overview
This PR adds a new `currentPeers` API endpoint and related changes to
support fetching current peer contacts in the Hub network.
### Detailed summary
- Added `currentPeers` RPC endpoint
- Implemented API endpoint for getting a list of current sync peers
- Updated documentation for the new API endpoint
- Added protobuf message for `ContactInfoResponse`
- Updated HTTP server to handle `currentPeers` API call
- Updated TypeScript files to include `ContactInfoResponse` and related
functions
> The following files were skipped due to too many changes:
`packages/core/src/protobufs/generated/request_response.ts`,
`packages/hub-nodejs/src/generated/rpc.ts`,
`packages/hub-web/src/generated/rpc.ts`,
`packages/hub-web/src/generated/gossip.ts`,
`packages/hub-nodejs/src/generated/gossip.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->
* feat: rename verification message to support additional protocols in the future
* chore: add changeset
* refactor: change signature for verification message
* remove solana related changes
* refactor: update ethereum verification tests to support new protocol field on message
* feat: add initial logic for parsing solana vs ethereum message
* Add protocol to verifications, update tests
* Add sol factories
* Add some verification tests
* Update claim factory for solana
* Fix tests for sol
* Update comment
* Verify signature for solana
* Replace tweetnacl due to dynamic import issue
* Got signature verification working for Solana ed25519
* Add changeset
* minor cleanup
* update solana verification to use full message adhering to off-chain message specification
* Use a simpler claim message format
* feature flag solana verifications
* cleanup
---------
Co-authored-by: Wasif Iqbal <Wazzymandias@users.noreply.github.com>
* feat: rename verification message to support additional protocols in the future
* chore: add changeset
* refactor: change signature for verification message
* first pass, working native signing + tests
* WAR-1064 – add configuration support and validation of contact info signing
* remove signing info from message signature validation
* add changeset
* misref
* pr feedback
* Support clean restarts on specific changes to network config
* don't terminate gossip node unless we are following default termination
* delay invocation if gossip node worker isn't started
* reduce delay to 1s, shouldn't need to exceed
* feat: Handle onchain event ordering edge cases
* changeset
* validate scheme for signer
* Sort events by blocknumber and logindex to reflect actual order of onchain operations
* revert enum ordering changes
* feat: onchain signers
* Refactor l2 provider to accept more contracts and events easily
* flesh out support for storing onchain events
* Switch source of truth on migration
* Emit events and fix active signer
This PR adds support for storage events and includes the following changes:
Adds support for storage events in the protobufs
Updates the server to handle rent registry events
Updates the logger to include rent registry and storage admin registry events
Adds CLI option for L2 RPC URL
Adds methods to submit rent registry and storage admin registry events in the mock hub
Updates the sync engine to use L2 events provider
* Add new proto definitions
* Add ping and ack functions
* Add gossip event handler
* Add cli argument for network latency mode
* Add ping message scheduler
* Fix imports
* Add tests for message handler
* Add metrics store
* Fix cli arg name
* Add multinode setup and fix metric logging
* Add docker-compose file for multinode test setup
* Drop hard coded id paths
* preserve backward compatibility of process file path
* Enable gossip network diagnostics
* Add tests 1
* Clean up gossipNode tests
* Fix lint
* Lower frequency for latency pings
* Add tests for metrics
* Improve coverage computation algo
* Clean up
* Fixes from PR feedback
* Fixes from PR feedback
* Fixes from PR feedback
* Rename field for consistency
* Add jitter to ping cron
Add jitter to ping cron
* Log legible peerIds
* Fix import paths
* Update log field name
* Consolidate metrics recorder and ping job
* Fix docker compose
* Add time-to-merge metric
* Confine metrics logic to single class
* Clean up
* Fix div by zero
* Use peerId string as metrics key
* Drop unused getter
* Refactor metrics to be keyed by peerId
* Fix tests
* Clean up and fix tests
* Store metrics in DB
* Replace interfaces with types
* Fix testS
* WIP: Adding metrics serde
* Replace map with object to allow for metrics serde
* Add test for serde
* Fix security warnings
* Fix coverage logging
* Add test
* Move message handling to hub
* Fix timestamp overflow
* Lower ping freq and fix coverage logging
* Add peer network to logs
* Fix merge time metric
* Revert "Fix merge time metric"
This reverts commit 76beb5f11a.
* Expire metrics after logging
* Rename command line arguments
* Fixes + test updateS
* Fixes + test updateS
* Add test for expiry
* Add test for ping function
* Drop unused function
* Record merge times for all merges
* Don't accumulate message count metrics
* Add check for successful message merge
* Re-add generated code
* Fix types
* Re-add generated code
* Fix imports
* fix imports
* Initial commit of L2 provider/storage contract integration
* l2 storage admin
* storage store
* update mockhub
* viem
* adjust import
* adjust import
* weave in config
* flesh out l2 test
* storage registry test
* strawman the storage tests
* null check
* switch type
* further updates, updated abi
* temporarily disabling test until anvil issue is sorted out
* more tests
* weird slowdown in node18 test on ci
* ok
* confirm iterator ordering
* rework timestamp into event message
* more coverage
* feat: Initial fname registry provider class
* flesh out fname registry provider functionality
* Update to match fip
* Use new query params and gradefully handle errors
* feat: add support for verifying username proofs
* Validate server signatures before submitting username proofs
* Add changeset and default fname server url
* rolling up changes for links FIP
* typeToSetPostfix
* pr feedback
* consistency to avoid js quirks
* add versioning logic and update tests
* include version check in mergeMessages
* update protobuf comment to reflect nit
* added changeset
* code coverage