Commit Graph

687 Commits

Author SHA1 Message Date
Sanjay
9654197697 chore: Release 1.3 (#1000)
* chore: Release 1.3

* bump version
@farcaster/hubble@1.3.0 @farcaster/hub-web@0.3.5 @farcaster/hub-nodejs@0.8.0 @farcaster/core@0.9.0
2023-05-31 10:02:16 -07:00
Sanjay
63927edd0d fix: Fix working directory so db directory will be under hubble app (#999)
* fix: Fix working directory so db directory will be under hubble app

* Fix build_image action
2023-05-26 19:32:47 -07:00
Tony D'Addeo
27181c6ced feat: add fallback to dbreset (#996) 2023-05-26 15:12:52 -05:00
Sanjay
70a855e765 fix: Fix yarn commands (#995) 2023-05-26 12:02:22 -07:00
98967eth
05618d1f8f add my own peer id (#991)
Co-authored-by: Shane da Silva <shane@dasilva.io>
2023-05-25 10:49:41 -07:00
Alex1237
8e84db4398 content: add allowlist (#989) 2023-05-25 10:49:11 -07:00
Shane da Silva
23d7a66675 chore: Support pure ESM output (#994)
* Fix import mapping to work with built JS files

This allows us to ship a Docker image that runs using `node` directly,
rather than via `tsx`.

* Remove use of top-level `await` expressions

These were only used in tests and weren't critical. Switch away so we
have the optional to convert to CommonJS if we need.

* Switch all imports to use relative paths instead of ~ shortcut

The ~ shortcut doesn't work in some contexts, which makes our lives more
difficult when trying to output ESM.

Since we were already using relative paths in some part of the codebase
and not others, just switch to using relative paths everywhere for
simplicity.

* Switch imports to append .js extension

And update Jest configuration to work with this extension.

* Build single image instead of two separate ones

We originally created the other image so that we could build an image
using only packages published to NPM, but this proved problematic when
wanting to test those changes without publishing.

Since there are more situations where we'd want to ship an image using
unpublished packages (i.e. for testing) remove the "public" image and
update our "testing" image to also be used as the public image. However,
a key difference is that the testing image will now run compiled JS
instead of using a TypeScript interpreter.
2023-05-24 20:02:38 -07: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
Parth Kohli
6638458448 content: add allowlist (#993) 2023-05-24 14:31:22 -07:00
Meyanis95
181e676a3e Update Messages.md (#992)
Fixed a typo.
2023-05-24 14:25:11 -07: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
mikey
08aabeace9 chore: add peer id for pfista (#985) 2023-05-23 13:36:19 -07:00
Rohit Jha
17bda10a2d feat: added jam hub key in allowed peers (#988)
* feat: added jam hub key in allowed peers

* feat: added ids of hub 2 and 3
2023-05-22 08:29:59 -07:00
Christian Mladenov
85750c3465 Add example for replying to a URL (FIP-2) (#986)
Also, improve the comments and add the code to use if the Hub uses authentication
2023-05-19 14:00:16 -07:00
Akshaan Kakar
7b4557128f chore: Add docker compose file for multi-node test setup (#984)
* Add docker-compose file for multinode test setup

* Drop hard coded id paths

* preserve backward compatibility of process file path
2023-05-19 13:24:48 -04: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
Blanker
30da04d06d chore: Fix readme and update peerId for blanker (#980)
* chore: fix typo when deploying on mainnet

`FC_NETOWKR_ID` on the mainnet should be 1 rather than 2.

* chore: update peer id because of lose identity file
2023-05-18 17:11:54 -07:00
Blanker
99d13c1bbf Add peerid @blanker (#979) 2023-05-18 10:52:34 -07:00
Shane da Silva
72ced0ee39 Run tests on larger VM instances (#976)
We're starting to see occasional OOM errors. Allocate more memory (and
vCPU so tests run faster as well).
2023-05-18 10:35:36 -07:00
Shane da Silva
31a78965f1 chore: Fix typos in hub README updates (#975) 2023-05-16 19:47:24 -07:00
Shane da Silva
f2611fee28 chore: Update README with Docker-based steps for running hubs (#974)
This should be easier/quicker than having users set up a
fully-functioning Node.js environment.
2023-05-16 19:35:20 -07:00
Shane da Silva
967fb3922c Build and test on Node.js 20 (#972)
This version includes updates to the V8 runtime and performance
improvements.

While here, update our test suite to test on both Node 18 and 20.
2023-05-16 14:30:52 -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
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