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
* fix: prune limits on store subclasses
Overriding class fields in Javascript is tricky as they are not
available in the parent constructor.
Refactored into getters since these will be available.
* add changeset
* fix test
* 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