Commit Graph

134 Commits

Author SHA1 Message Date
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
PangZhi
7194054d24 chore: export getAuthMetadata & getHubRpcClient (#822)
* export getAuthMetadata

* add changeset

* expose getHubRpcClient

* update error logging and readme

* update changeset

* fix errorcode

* fix typo
2023-04-05 13:38:13 -07:00
PangZhi
9f0dc6a0bb chore: enable getSSLHubRpcClient (#821)
* enable getSSLHubRpcClient

* add changeset
2023-04-05 08:08:00 -07:00
Paul Fletcher-Hill
64418e9495 changeset version (#820) 2023-04-04 23:28:23 -04:00
Paul Fletcher-Hill
1e4e5ba522 chore: update tsup configs (#819)
* update tsup configs

* add more browser options

* add changeset

* update browser versions
2023-04-04 23:21:01 -04:00
PangZhi
c4529a7ef2 feat: merge protobufs and utils into core package (#818)
* remove protobufs as a package, merge into utils

* update yarn.lock

* rename utils package to core

* update docker

* add changeset

* tsup config

* change schema path in workflow file

* update protobufs readme link
2023-04-04 19:21:30 -07:00
Paul Fletcher-Hill
58af42fdda chore: run changeset version (#816)
* update hub-web changeset from major to minor

* run changeset version
2023-04-04 18:52:33 -04:00
PangZhi
ce7929e2aa feat: wrap hub-web client to provide consistent APIs with hub-nodejs (#811)
* wrap client for hub-web so that the APIs are consistent with hub-nodejs

* update readme for new APIs

* fix type export

* add changeset

* rename client to be consistent with hub-nodejs

* update README

* remove envoy folder from root
2023-04-04 15:28:42 -07:00
Sanjay
759e1cfbc0 feat: ignore hubs below minimum version for sync (#808)
* feat: ignore hubs below minimum version for sync

* fix tests and add changeset
2023-04-04 13:09:31 -07:00
adityapk00
8e46cac194 fix: Start the rpc Server before the ethEventsProvider for smoke test (#812)
* fix: Start the rpc Server before the ethEventsProvider for smoke test

* changeset
2023-04-04 12:19:03 -07:00
adityapk00
13415ead71 fix: Prevent slow subscribers from crashing the hub (#799)
* fix: Prevent slow subscribers from crashing the hub

* changeset

* Add bufferedStreamWriter

* register listeners first

* Check if iterator has ended before ending it

* fix compile
2023-04-04 11:52:50 -07:00
PangZhi
1f47906693 feat: refactor protobufs and utils to remove grpc-js dependency (#798)
* remove grpc-js dependency from protobufs, refactor hubble to use hub-nodejs

* hub-web to use @farcaster/protobufs and utils

* add yarn.lock

* refactor hubble app to only use hub-nodejs

* update readme

* update export order

* update export order

* fix protobufs namespace build issue

* update codecov

* fix protobufCommand naming

---------

Co-authored-by: Paul Fletcher-Hill <pfletcherhill@gmail.com>
2023-04-04 09:27:53 -07:00