Commit Graph

664 Commits

Author SHA1 Message Date
Shane da Silva
71eef0c559 Re-publish 1.2.3 as 1.2.4 (#969)
We made a mistake during the publishing process which resulted in
missing files. Re-publish with the proper build.
@farcaster/hub-nodejs@0.7.4 @farcaster/hub-web@0.3.4 @farcaster/hubble@1.2.4 @farcaster/core@0.8.1
2023-05-15 15:07:39 -07:00
Shane da Silva
a4cb2c4b75 chore: Release 1.2.3 (#968) @farcaster/hubble@1.2.3 @farcaster/hub-nodejs@0.7.3 @farcaster/core@0.8.0 @farcaster/hub-web@0.3.3 2023-05-15 15:01:33 -07:00
Shane da Silva
61e5122f7d Add peer ID for @sds (#967)
Been so busy running our own hubs I forgot to run a personal one.
2023-05-15 14:29:57 -07:00
Phil Cockfield
6d43cb8678 chore: add peerid for [fc.bus.events] (#948)
* chore: add peerid for [fc.bus.events]

Prep for mainnet.

As per instructions on:
https://github.com/philcockfield/hub-monorepo/tree/main/apps/hubble#4-switch-to-mainnet

* chore: add additional context (comment)
2023-05-15 14:13:18 -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
723ea9f58e Don't require Depot to build images for PRs from forks (#966)
GitHub's permission scheme doesn't share the secret with forks. Switch
to using a vanilla Docker build (it'll be fast enough anyway).
2023-05-12 18:03:56 -07:00
Shane da Silva
763b8dcbd1 fix: Add list of ports to expose (#965) 2023-05-12 18:00:19 -07:00
Shane da Silva
9497e1f78d Quickstart guide for running hubs with TLS (#963) 2023-05-12 17:43:57 -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
Phil Cockfield
a1fc17dab5 chore: add peerid for [fc.bus.events] (#948)
* chore: add peerid for [fc.bus.events]
2023-05-10 13:01:15 -07:00
Phil Cockfield
3e6382455a chore: add peerid for [fc.bus.events] (#948)
* chore: add peerid for [fc.bus.events]

Prep for mainnet.

As per instructions on:
https://github.com/philcockfield/hub-monorepo/tree/main/apps/hubble#4-switch-to-mainnet

* chore: add additional context (comment)
2023-05-10 13:00:51 -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
Varun Srinivasan
1e8a04210b docs(hub-nodejs): cleanup replicate example readme (#957) 2023-05-10 09:42:49 -07:00
Shane da Silva
532622aa2f fix: Correct time remaining estimate (#956)
We were not calculating this correctly.

While here, also fix the health check to not result in `FATAL` error
messages in the logs.
2023-05-09 22:47:02 -07:00
Shane da Silva
5fee6b4f25 chore: Optimize replication example (#955)
Fetch data in batches and execute jobs concurrently. This reduces the
time estimate from ~4 hours to under 1 hour on my machine.

We could probably make this even faster by implementing a
`getAllMessages` endpoint on the hubs.
2023-05-09 22:07:25 -07:00
Shane da Silva
08354f4f19 Fix typos (#953) 2023-05-09 20:39:08 -07:00
Shane da Silva
ed8bde6f82 Streamline replication example further (#952)
Instead of requiring the user to run `yarn install` followed by `yarn
start`, we simply have them run `docker compose up` to start both the
app and Postgres together. This is much easier and reduces the need for
them to install anything else besides Docker. It also makes cleaning up
the example easier.
2023-05-09 18:45:38 -07:00
Aidan Musnitzky
e891c69cdf Fix block number parsing in cli (#937) 2023-05-09 16:50:33 -07:00
Stephan Cilliers
21cb8dd703 fix: Remove stackblitz example (#930) 2023-05-09 12:48:06 -07:00
Colin Armstrong
85c4bdcf7d Add Colin / Paragraph to hub allowlist (#945) 2023-05-09 12:35:19 -07:00
Vincent Liao
77b5873b43 docs: update client to use waitForReady pattern (#922)
* docs: update client to use waitForReady pattern

* update: revert waitForReady for hub-web
2023-05-09 08:22:13 -05:00
Shane da Silva
d8054207b7 chore: Adding missing sections of replication README (#951)
These were missed in 7d98fdf8.
2023-05-08 21:03:53 -07:00
Shane da Silva
7d98fdf844 chore: Improve documentation for replication example (#950) 2023-05-08 20:32:27 -07:00
Sanjay
f7a62a52f1 chore: Release 1.2.2 (#949) @farcaster/hubble@1.2.2 @farcaster/hub-nodejs@0.7.2 @farcaster/core@0.7.2 @farcaster/hub-web@0.3.2 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
Stephan Cilliers
ceac2c1bea fix: Remove stackblitz example (#930) 2023-05-08 12:50:27 -07:00
Shane da Silva
32e660a181 fix: Reduce memory consumption of replication example (#943)
We had a report of one user on modern MacBook with 16GB of memory who
was running into heap allocation issues. This was likely due to the
excessive number of promises we were creating (as well as buffering all
data for each call).

Change the logic to fetch in batches of 1K records at most. This slows
down the initial sync but should reduce the likelihood that someone will
hit a memory limit.

We also specify a custom limit in the `yarn start` command so that when
we test locally we are using the same limit as everyone else.
2023-05-05 15:53:56 -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
Sanjay
f0e4df7d78 chore: ensure we clear the event handler cache in tests (#942) 2023-05-05 12:11:09 -07:00
Shane da Silva
987e1c460b chore: Remove some unused code from replication example (#941) 2023-05-05 11:14:34 -07:00
Shane da Silva
22f53d6c2b Fix handling of conflicts on UserData insertion (#940)
We were using hash as the conflict ID instead of FID + type. Fix this.
2023-05-05 10:26:48 -07:00
Shane da Silva
cc2f5a4fae Add syncing/replication example for Postgres (#938)
Provide a working end-to-end example of syncing data from hubs to a
Postgres database.

This should work with no additional dependencies besides what you
install with `yarn install` and Docker.
2023-05-05 09:56:48 -07:00
Sanjay
5d1fef9db7 fix: Only consider a peer bad if we failed to merge a large number of messages (#939) 2023-05-04 21:36:12 -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
Tiago Alves
d3f707be82 Minor fix on hubs interaction link (#931) 2023-05-02 09:31:54 -07:00
Tiago Alves
36fe1b7990 Add eventcaster hub to allowlist (#929) 2023-05-01 15:15:31 -07:00
Sanjay
6c8c05d957 fix: Fix inSync reporting true when peer is blocked from sync (#934) 2023-05-01 14:58:20 -07:00
Meyanis95
aa8f451861 Ask to run a mainnet Hub (#927) 2023-04-28 09:23:12 -04:00
Rohit Jha
806e5a1f31 chore: added jam.so peer id to mainnet allowed peers (#926) 2023-04-28 08:28:22 -04:00
Sanjay
52fc714970 chore: Release 1.2.1 (#925) @farcaster/hubble@1.2.1 @farcaster/hub-web@0.3.1 @farcaster/hub-nodejs@0.7.1 @farcaster/core@0.7.1 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
Vincent Liao
3af9f6e166 docs: fix 404 links in PR template (#923) 2023-04-27 08:00:52 -07: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
Varun Srinivasan
a57e335da6 chore(hub-nodejs): update write-cast example for v0.7 (#915) 2023-04-24 21:36:46 -07:00