* feat: limit logs to 7gb when run with docker compose
* feat(hubble): reduce log files to 2x1GB in docker compose
---------
Co-authored-by: Varun Srinivasan <varunsrin@gmail.com>
Set up automation so that when we push the `@farcaster/hubble@X.Y.Z` tag
we will automatically kick off a Docker build and push the resulting
image layers + tag to Docker Hub.
CLI now supports comma separated RPC URLs to fall back on (--eth-rpc-url, --eth-mainnet-rpc-url, --l2-rpc-url)
Added --rank-rpcs CLI option which will rank provided RPC URLs by stability and latency if there are multiple
For now, since we're on testnet we want to ensure user registrations are
recognized relatively quickly so that onboarding doesn't take too long.
Reduce the number of confirmations.
Once we move to user registration happening on an L2, this will be less
of a concern.
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
Currently, if you call `getInfo` the version falls back to `1.0.0`,
which is confusing since users want to know which version of the hub
they are communicating with.
The reason this happens is because the `npm_package_version` environment
variable trick only works if you run via `npm`/`yarn`. Since we don't
want those as PID 1 (it interferes with signal processing) we build and
run directly with the `node` executable.
To get this to work, we create a symlink to `package.json` in the `src`
directory so that we can still reference the version specified in that
file.
This required some adjustments to have TypeScript not error (including
upgrading Jest), but should now work.
Due to a bug in the sync logic in older versions, these hubs can spam
messages that are pruned, which consumes bandwidth and results in the
`submitMessage` API call taking longer than it should.
For now, remove these peers. They can add themselves back once they have
upgraded.
* 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