* 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
* Fix import mapping to work with built JS files
This allows us to ship a Docker image that runs using `node` directly,
rather than via `tsx`.
* Remove use of top-level `await` expressions
These were only used in tests and weren't critical. Switch away so we
have the optional to convert to CommonJS if we need.
* Switch all imports to use relative paths instead of ~ shortcut
The ~ shortcut doesn't work in some contexts, which makes our lives more
difficult when trying to output ESM.
Since we were already using relative paths in some part of the codebase
and not others, just switch to using relative paths everywhere for
simplicity.
* Switch imports to append .js extension
And update Jest configuration to work with this extension.
* Build single image instead of two separate ones
We originally created the other image so that we could build an image
using only packages published to NPM, but this proved problematic when
wanting to test those changes without publishing.
Since there are more situations where we'd want to ship an image using
unpublished packages (i.e. for testing) remove the "public" image and
update our "testing" image to also be used as the public image. However,
a key difference is that the testing image will now run compiled JS
instead of using a TypeScript interpreter.