Commit Graph

145 Commits

Author SHA1 Message Date
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
Tony D'Addeo
27181c6ced feat: add fallback to dbreset (#996) 2023-05-26 15:12:52 -05:00
Cassandra Heart
2bc598abcc feat: Links (#973)
* 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
2023-05-24 19:42:26 -05:00
Sanjay
37f515f049 feat: Add app version to contact info and log it when syncing (#990)
* feat: Add app version to contact info and log it when syncing

* Add changeset
2023-05-23 17:32:47 -07:00
Sanjay
16ea9b4a2b fix: validate the network in ethEventsProvider (#982)
* fix: validate the network in ethEventsProvider

* changeset
2023-05-18 17:58:58 -07:00
Shane da Silva
7f050d23fe fix: Correctly error when sequence ID exceeds max allowed value (#971)
We had this implemented incorrectly. We need to error once it meets or
exceeds the limit, since you can only store (2^N - 1) for a binary value
with N bits.
2023-05-16 13:10:06 -07:00
Shane da Silva
a4cb2c4b75 chore: Release 1.2.3 (#968) 2023-05-15 15:01:33 -07:00
Cassandra Heart
434444718c fix(eth): add stronger retry logic to eth events provider (#959)
* fix(eth): add stronger retry logic to eth events provider

* test has sporadic failure on CI, appears to be due to unresolved promise, perhaps this will fix

* alter retry provider to throw on retry limit

* more slight adjustments, makes concurrent tests stop freaking out

* add http status code to enforce retry

* slight changes to increase code coverage

* avoid clobbering globals

* await on emit

* finally hunted down RC, it's a timer, deep in subscriber

* ignoring mock utils

* exponential backoff + faster tests
2023-05-15 14:12:16 -07:00
Shane da Silva
ea55abcb83 Add separate Dockerfile for dedicated public image (#962)
We want to make it easier for developers to get started with hubs.

Add a separate optimized Docker image which we'll distribute for both
AMD and ARM architectures.

For now the publishing process is manual, but once hubs are fully open
(no peering allowlists) we'll be able to auto-publish with each hubble
release on NPM.
2023-05-11 20:31:45 -07:00
Shane da Silva
651df4120f Remove unnecessary @faker-js/faker dependency from core (#961)
This dependency is only required for dev, not production. It's used by
Hubble when generating fake data, however, so move it to a production
dependency for Hubble.
2023-05-11 15:52:05 -07:00
Shane da Silva
fe755fbdb3 Switch to rocksdb fork with precompiled Linux ARM build (#960)
With more Macs running ARM via Apple Silicon, the significantly slow
package installation was problematic. Fix by using our fork which
includes the prebuilt binary to reduce install time.
2023-05-11 10:04:49 -07:00
Anthony D'Addeo
2ca66b179c chore: upgrade to @noble/curves (#947)
* chore: update @farcaster/core to use @noble/curves

* chore: update hubble to use @noble/curves

* add changeset

	new file:   .changeset/eleven-lies-wait.md

* preserve async interface

* update changeset
2023-05-10 12:26:07 -05:00
Sanjay
c489175437 feat: Sync status improvements (#954)
* feat: improve status reporting

* Add changeset

* Fix test
2023-05-10 10:02:26 -07:00
Sanjay
f7a62a52f1 chore: Release 1.2.2 (#949) 2023-05-08 17:28:13 -07:00
Sanjay
1236b4e956 feat: Add a status hubble command for friendly reporting of current hub status (#944)
* feat: Suport sync status rpc call

* Add sync status hubble command

* Fix generated file

* Changeset

* Fix isSyncing check

* Rename to status and report db stats as well

* Fix error
2023-05-08 14:48:24 -07:00
Sagar Dhawan
530878831d fix: improve handling of duplicate messages on gossip (#919)
* fix: improve handling of duplicate messages on gossip

* fix tests

* fix changeset

* make gossip backwards compatible

* fix tests
2023-05-05 13:02:52 -07:00
Paul Fletcher-Hill
2e633db09b feat: reject prunable messages on merge (#928)
* feat: don't merge messages that would immediately be pruned

* Fix tests and minor cleanup/review comments

* Support all other stores

* Add changeset

* use prune iterator with keys available and expand cast store tests

* re-add prune iterator args

* Additional tests

* Add tests for other stores

---------

Co-authored-by: Sanjay Raveendran <sanjayprabhu@gmail.com>
2023-05-04 10:35:32 -07:00
Paul Fletcher-Hill
d2cb5e4e30 fix: validate parentUrl and targetUrl comprehensively (#935) 2023-05-03 21:04:05 -04:00
Sanjay
52fc714970 chore: Release 1.2.1 (#925) 2023-04-27 14:36:13 -07:00
Michael Huang
6a8486017e feat: implement ViemLocalEip712Signer (#787)
* Implement viemEip712Signer

* Add tests

* clean

* Stubs

* Deps

* Fixes

* Clean

* Fix bugs

* Rename

* Add changeset

* rename

* clean up

* rename

* update import

* Upgrade

* Update test

* ViemEip712Signer -> ViemLocalEip712Signer

* clean up

* Convert hash bytes to hex string before signing

* use random wallet

* Add test for mnemonic account

* Simplify

* Use random mnemonic phrase

* More clean up

* Add comment

* refactor EIP-712 signer tests into util

* update changeset to patch core

---------

Co-authored-by: Tony D'Addeo <tony@merklemanufactory.com>
Co-authored-by: Paul Fletcher-Hill <pfletcherhill@gmail.com>
2023-04-27 12:40:35 -04:00
Sanjay
427ced4f1b feat: Remember bad peers during sync and ignore them for a while. (#920)
This helps reduce excessive sync attempts (attempting to sync
with a peer that's catching up for the first time, sync divergence
prefix bugs, etc)
2023-04-26 20:40:04 -07:00
Sanjay
421c385453 feat: Add sync stats to getInfo call (#916)
* refactor: Rename sync events flag for clarity

* feat: Add sync statuts to HubInfo RPC call

* feat: Add sync stats to getInfo rpc call

* re-patch hub-web to use default export as before

* changeset
2023-04-25 10:40:59 -07:00
Sanjay
4fc319812e fix: Dedup eth events retries by block number to save api calls (#917) 2023-04-25 10:40:42 -07:00
Sanjay
5cee2c5526 fix: Fix off by one error when retrying id registry event on sync (#899)
* fix: Fix off by one error when retrying id registry event on sync

* feat: Add a command line flag to resync eth events from the beginning

* Add changeset
2023-04-20 18:18:49 -07:00
Paul Fletcher-Hill
c5a6aac6e4 changeset version (#889) 2023-04-19 00:43:57 -04:00
Paul Fletcher-Hill
87b2789124 feat: support arbitrary target types (#847)
* support CastId embeds, url parents and reaction targets

* docs(changeset): support CastId embeds, cast parent URLs, and reaction target URLs

* fix validations test

* add version and embeds deprecated validation

* docs(changeset): upgrade to protocol version 2023.4.19

* update protobuf generated code

* add reaction service tests

* add more examples to builder tests

* add more cast and reaction tests
2023-04-18 23:10:13 -04:00
Sanjay
a027a3ed63 fix: compact the db occasionally when syncing to avoid db bloat (#884)
* fix: compact the db occasionally when syncing to avoid db bloat

* Additional tests and logging

* add changeset
2023-04-18 15:25:47 -07:00
Paul Fletcher-Hill
0cb0a522b2 chore: re-organize sync engine to use submitMessage rather than mergeMessage (#878)
* upgrade hub-web in examples and move gossip to hubble

* use submitMessage for sync

* simplify logging in sync engine

* remove sync related methods from storage engine

* cleanup imports and remove test methods

* add changeset
2023-04-18 00:49:57 -04:00
github-actions[bot]
3be3a3842e version packages (#875)
Co-authored-by: Paul Fletcher-Hill <pfletcherhill@gmail.com>
2023-04-14 11:58:16 -04:00
Paul Fletcher-Hill
ee953ec4ad fix: examples and patch hub-web to use grpc-web default export (#867)
* fix chron-feed example

* update chron-feed example

* intermediate commit

* add chron-feed hub-web example

* add changeset

* remove commented out imports from example
2023-04-14 11:16:21 -04:00
Paul Fletcher-Hill
8a7e781fae changeset version hubble v1.1.0 (#869) 2023-04-12 21:31:11 -04:00
Sanjay
34fe54f3cc feat: Include network id in gossip topics to keep networks isolated (#861)
* chore: cleaner logging when ignoring peers

* feat: Include network id in gossip topics to keep peers homogeneous

* Add changeset
2023-04-12 16:27:14 -07:00
Sanjay
8758ef2e1a chore: log sync status for better visibility (#865)
* fix: log sync status for better visibility

* Add peer version and network to sync status logs
2023-04-12 14:05:15 -07:00
Paul Fletcher-Hill
d25b7038b6 changeset version @farcaster/hub-web (#859) 2023-04-11 17:58:18 -04:00
Paul Fletcher-Hill
6e5449acb2 fix: do not change observable stream in grpc-web client (#856)
* do not change observable stream in grpc-web client

* add changeset
2023-04-11 13:31:18 -04:00
Sanjay
31d8917f66 feat: make commit lock queue size and timeout configurable (#830)
* feat: make commit lock queue size and timeout configurable

* Add changeset

* make StorageCache a child of StoreEventHandler

---------

Co-authored-by: Paul Fletcher-Hill <pfletcherhill@gmail.com>
2023-04-10 15:17:22 -04:00
adityapk00
a3b0d098ec chore: Check in mainnet allowed peers (#844)
* chore: Check in mainnet allowed peers

* changeset
2023-04-07 12:42:42 -07:00
adityapk00
25c768d943 fix: Hangup on peers when removing from address book (#841)
* fix: Hangup on peers while removing from address book.

* changeset

* test disconnect both ways

* sleep
2023-04-07 10:38:21 -07:00
adityapk00
0fbbbccf24 fix: Make dbreset its own command (#838) 2023-04-07 07:59:01 -07:00
Varun Srinivasan
038a647bd7 chore: release new versions (#839) 2023-04-06 17:47:33 -07:00
Sanjay
edea195dba feat: ensure hub networks match when syncing with peers (#837)
* feat: ensure hub networks match when syncing with peers

* send the network when gossiping
2023-04-06 17:29:20 -07:00
Paul Fletcher-Hill
833c4cc0b4 fix: map grpc error codes to hub error codes (#832)
* map grpc codes to hub error codes

* add changeset
2023-04-06 13:42:35 -04:00
Paul Fletcher-Hill
52035aa031 run changeset version (#826) 2023-04-05 20:22:47 -04:00
PangZhi
74ec2526e5 fix: add grpc error code as fallback (#828)
* add grpc error code as fallback

* add changeset
2023-04-05 17:12:59 -07:00
PangZhi
7d58347545 fiix error code for no connection (#827) 2023-04-05 16:49:49 -07:00