Commit Graph

189 Commits

Author SHA1 Message Date
Sanjay
f49df2d87b chore: release 1.4.3 (#1173) 2023-07-20 15:26:56 -07:00
adityapk00
376ae0f48b feat: Use a web based allowlist (#1171)
* feat: Use a web-based network config for hubble

* changeset

* tests

* add test

* noop test
2023-07-20 13:46:21 -05:00
adityapk00
c1bb21c9d9 fix: Use a queue when retrying messages (#1168)
* fix: Add a retry Q for failed signer messages

* changeset
2023-07-20 09:19:10 -05:00
Christian Mladenov
e36fcae936 Fix proof message timestamp validation & add builders for UsernameProofData and UsernameProofMessage (#1164) 2023-07-19 11:43:10 -07:00
adityapk00
998979d5ce feat: Warn if there are no incoming connections to the hub. (#1163)
* feat: Log warnings when no incoming connections

* changeset

* cleanup
2023-07-19 09:09:32 -05:00
adityapk00
115f1b5932 feat: validateOrRevoke fid-by-fid (#1159)
* feat: validateOrRevoke fid-by-fid

Fixes #1158

* changeset

* cleanup

* cleanup
2023-07-18 08:53:51 -05:00
Sanjay
88f31f27dc fix: Fix typing for merge username proof events (#1161) 2023-07-17 20:10:58 -07:00
adityapk00
f00d7d2a00 fix: Move validateOrRevokeMessages and storageCache iterators to be managed (#1156)
* fix: Move more iterators to managed

* changeset

* fixes

* return values

* logs
2023-07-17 13:54:12 -05:00
Varun Srinivasan
9668d34e40 chore: release hubble v1.4.1 and new package versions (#1143) 2023-07-14 22:30:56 -07:00
Cassandra Heart
8d0d87dcc1 feat: support direct peering (#1133)
* Support direct peering

* Add changeset
2023-07-14 18:22:10 -05:00
Stephan Cilliers
15d43931f4 feat: support fallback RPC providers (#1128)
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
2023-07-14 15:07:51 -05:00
Shane da Silva
71558f8700 chore: Decrease block confirmations from 6 to 3 for L1 ETH events (#1135)
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.
2023-07-14 15:17:57 -04:00
adityapk00
f179dd6a2e fix: Add managed Iterators (#1134)
* fix: Add managed iterator

* changeset

* timeout
2023-07-14 13:37:24 -05:00
Christian Mladenov
57235761a8 chore: remove obsolete ethers dependency from hub-nodejs (#1105) 2023-07-14 11:24:03 -07:00
Cassandra Heart
728a557a8d fix: Adjust chunk size to 1000 (#1123)
* Adjust chunk size to 1000

* add changeset
2023-07-14 12:59:04 -05:00
Sanjay
6042e957fe fix: Only revoke the username if the name proof matches (#1132) 2023-07-13 20:48:54 -07:00
Sanjay
3dfc29de3d fix: Throw error if unable to fetch fname server signature (#1120) 2023-07-13 17:39:08 -07:00
adityapk00
a0dbfbd8cd perf: Get exact diff nodes during incremental sync (#1125)
* fix: Find divergence quickly

* logging

* changeset

* test
2023-07-13 11:19:36 -05:00
Cassandra Heart
2391c3a5e3 feat: storage registry support (#1052)
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
2023-07-12 18:43:41 -05:00
Sanjay
f4587bbba9 chore: release 1.4 (#1117) 2023-07-12 15:34:13 -07:00
Sanjay
a38720b9d1 chore: hard fail on missing rpc urls (#1116)
* chore: hard fail on missing rpc urls and create new release

* Fix build
2023-07-12 15:27:31 -07:00
adityapk00
2817141fa1 perf: Tune sync params (#1114)
* perf: Tune sync params

* changeset
2023-07-12 09:30:47 -05:00
adityapk00
b5becd9088 fix: Improve open iterator logging (#1107)
* fix: Improve open iterator logging

* changeset

* cleanup
2023-07-12 08:58:53 -05:00
Sanjay
e072a0e535 chore: Release 1.3.4 (#1109) 2023-07-11 17:34:17 -07:00
Sanjay
4fa7a56153 Rename UserDataType.FNAME to USERNAME (#1108) 2023-07-11 17:16:53 -07:00
adityapk00
e513a3f326 [WIP] perf: Prevent un-necessary network calls when syncing (#1096)
* fix: Strip out any syncIDs we already have

* changeset

* optimization

* test
2023-07-11 12:23:08 -05:00
adityapk00
6e7ce940ab perf: Don't await leaf nodes during sync (#1097)
* perf: Fetch upto 4 leaf nodes at a time

* changeset
2023-07-11 10:16:50 -05:00
adityapk00
850f82f278 perf: Add a Sync Profiler (#1098)
* feat: Add Sync profiler

* changeset

* bugfix

* pretty print

* cleanup
2023-07-11 10:16:35 -05:00
Sanjay
cd0ddd6d24 feat: Support ENS names in the hub (#1101)
* feat: Add ENS username proof support

* Add UserNameProof store

* ENS name ownership validations

* Add remaining ens validations

* Generate events correctly

* Allow setting ens names on UserData and handle revoking it

* Add changeset and cli flag
2023-07-10 23:40:50 -07:00
Shane da Silva
d5d65bdc62 Prevent connecting to peers not in allowed peer list (#1102)
We needed to add some additional logic to ensure we didn't connect to
peers not in the allowlist.
2023-07-10 22:13:37 -07:00
Shane da Silva
1d07446152 fix: Display correct app version when run in Docker container (#1047)
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.
2023-07-10 16:47:06 -07:00
Shane da Silva
dbe6074812 feat: Allow log level to be configured via environment variable (#1089)
This is useful in allowing operators to quiet logs if they so choose.
2023-07-07 20:00:50 +03:00
Shane da Silva
f9c978a289 Include bad_request.prunable in list of INVALID_ARGUMENT errors (#1088) 2023-07-07 19:56:52 +03:00
Tony D'Addeo
f54185f30a chore: hard fail if cannot connect to eth RPC provider (#1086)
* chore: hard fail if cannot connect to eth RPC provider

* add changeset
2023-07-06 17:24:52 -05:00
adityapk00
229b806dd3 Add rocksDB storage profiling (#1085)
* feat: Profile rocksDB storage

* changeset

* fix

* fix index calculation

* cleanup
2023-07-06 13:42:56 -05:00
adityapk00
a08bff38ac fix: Better error if hub config is misspecified (#1067)
* fix: Better error if hub config is misspecified

* changeset
2023-07-03 11:13:48 -07:00
Sanjay
abb7df9cdd chore: Release 1.3.3 (#1065) 2023-07-02 21:52:27 -07:00
Tony D'Addeo
abca3ed362 fix: prune limits on store subclasses (#1064)
* 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
2023-07-02 15:38:25 -05:00
Sanjay
5a1baaedbb feat: Switch from name events to username proofs (#1049)
* feat: switch to username proofs

* Add rpc endpoint

* Add changeset
2023-06-28 17:36:11 -07:00
Tony D'Addeo
9e03df8579 chore: publish package version (#1048) 2023-06-28 15:42:59 -05:00
Tony D'Addeo
d8729a7734 chore(hub-web): remove @improbable-eng/grpc-node-http-transport (#1043) 2023-06-26 12:50:51 -05:00
Tony D'Addeo
bfdbfea6b0 chore: use viem in @farcaster/core (#1037)
* chore: use viem instead of ethers

* add changeset

* remove more ethers usages

* move ethers to dev dependecy

* add signUserNameProof to Eip712Signer

* expand test coverage

* update changeset

* add makeUserNameProofClaim

* prefer @noble/hashes/utils in examples
2023-06-26 11:27:13 -05:00
Tony D'Addeo
27fd99ff16 chore: update changesets (#1033) 2023-06-22 14:56:18 -05:00
Tony D'Addeo
159c62df7a chore(hubble): use viem to interact with ethereum (#997)
* chore: use viem to interact with ethereum

* add ViemLocalEip712Signer to exports

* add codecov exceptions

* upgrade viem

* add log for historically synced blocks

* fix test

* poll every 4 seconds

* clean up pre-viem 1.0 code

* update viem

* update comments
2023-06-22 14:50:18 -05:00
Sanjay
f1c15510d1 chore: release 1.3.1 (#1031) 2023-06-21 19:47:51 -07:00
Sanjay
f1c6b25c23 feat: Support fname registry server and store user name proofs (#1014)
* 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
2023-06-21 19:33:01 -07:00
Cassandra Heart
7dabc0b006 chore(hubble): General Store (#1001)
* initial draft of general store

* pr feedback, mass simplification, next up, the swap-out

* incorporate txn to SIdxs

* cast store converted

* convert links store

* convert reaction to general store

* convert all stores, resolve warnings around null checks with appropriate action per situation

* add changeset
2023-06-13 16:01:00 -05:00
Sanjay
6667748a67 fix: Handle peers with zero messages when printing status (#1008)
* fix: Handle peers with zero messages when printing status

* Add changeset
2023-06-05 15:10:17 -07:00
Sanjay
c6fc422193 fix: server no longer hangs due to slow subscribers (#1004)
* fix: server no longer hangs due to slow subscribers

* Preserve ordering and allow more grace period for slower clients to catch up
2023-06-01 17:37:48 -07:00
Sanjay
9654197697 chore: Release 1.3 (#1000)
* chore: Release 1.3

* bump version
2023-05-31 10:02:16 -07:00