Commit Graph

483 Commits

Author SHA1 Message Date
adityapk00
d5e6395dfd chore: Improve sync logging (#729) 2023-03-22 18:57:57 -07:00
Paul Fletcher-Hill
13c316b9bb chore: improve logging for pruning errors (#728)
* changeset version

* fix pruning error logging

* Revert "changeset version"

This reverts commit 144fa7071a.
2023-03-22 21:48:07 -04:00
adityapk00
0f6737bfc6 feat: IP based rate limiting for submitMessage RPC (#722) 2023-03-22 14:53:39 -07:00
adityapk00
3d45ccba81 chore: Change port numbers (#726) 2023-03-22 14:44:49 -07:00
adityapk00
7a2beb5f12 fix: Remove peerIDs checked into config file (#723)
* fix: Remove peerIDs checked into config file

* Change dockerfile
2023-03-22 14:30:43 -07:00
Paul Fletcher-Hill
72ca1416d6 move signer pruning before other sets (#725) 2023-03-22 17:30:22 -04:00
Anthony D'Addeo
dc69b6686b chore: add changeset for ethers v5 (#724) 2023-03-22 16:23:12 -05:00
Anthony D'Addeo
91b788d78f feat: add EthersV5Eip712Signer (#720) 2023-03-22 16:17:24 -05:00
Paul Fletcher-Hill
9710f4af40 chore: minor pruning refactor (#721)
* minor pruning refactor

* fix imports

* prune batches of fids in parallel
2023-03-22 17:13:37 -04:00
adityapk00
c26fafa255 feat: Add test data into test hubs (#719)
* feat: Add test data into test hubs

* changeset
2023-03-22 11:57:31 -07:00
Paul Fletcher-Hill
3e45dbe24c use warn rather than error for submitMessage (#718) 2023-03-22 00:58:18 -04:00
Paul Fletcher-Hill
b47a170f0a feat: add storage cache to speed up pruning (#717)
* add storage cache

* use event emitter to call revokeMessagesBySigner in engine

* test engine listeners

* log engine start and stop

* fix prune messages cron

* add more processEvent tests

* ensure event listeners are removed on engine stop

* move validation worker back into constructor

* fix imports

* more logging in engine and storage cache
2023-03-22 00:45:19 -04:00
Anthony D'Addeo
12c9c40081 chore: use subset of ethers Signer class (#716)
* chore: use subset of ethers Signer class

* use changeset
2023-03-21 17:03:10 -05:00
adityapk00
a89a5b9520 feat: Reset DB if DB_RESET_TOKEN is set (#713)
* feat: Reset DB if DB_RESET_TOKEN is set

* changeset
2023-03-21 10:24:31 -07:00
Varun Srinivasan
9138b5226a docs(hub-nodejs): add docs for reverse param (#711)
* docs(hub-nodejs): fix chron-feed example to return in reverse chron

* docs(hub-nodejs): add docs for reverse param
2023-03-21 09:18:43 -07:00
adityapk00
b4105c94b1 fix: Handle ethersv6 contract listener change (#712)
* fix: Handle ethersv6 contract listener change

* forgot test file
2023-03-21 08:27:24 -07:00
Varun Srinivasan
4d15c45695 docs(hub-nodejs): example that demonstrates writing messages to hubs (#710)
* docs(hub-nodejs): example that demonstrates writing messages to hubs

* docs: renaming things for clarity
2023-03-21 07:35:48 -07:00
Paul Fletcher-Hill
e090a3d6f5 feat: revoke messages immediately (#705)
* revoke messages immediately

* ensure db calls are wrapped in fromPromise
2023-03-21 00:42:32 -04:00
Varun Srinivasan
9a0f18c55c docs(hub-nodejs): add chronological feed example (#704) 2023-03-20 21:03:26 -07:00
Varun Srinivasan
5dfbd1c572 docs: configuration for use with ethersv5 (#709) 2023-03-20 20:57:47 -07:00
adityapk00
e29958ea04 fix: Terminate webworker at end of tests (#708)
* fix: Terminate webworker at end of tests

* changeset
2023-03-20 19:20:09 -07:00
Anthony D'Addeo
245096f1ca docs: minor adjustments to signer related docs (#702)
* docs: minor adjustments to signer related docs

* fix typo

* fix: use bytes
2023-03-20 18:25:59 -05:00
Varun Srinivasan
b8eaa9a857 docs(hub-nodejs): update invocations to match 0.5.0 release, fix minor typos (#701)
* docs: fix all instances of types imports

* docs: fix issues with EthersEip712Signers

* docs: fix issues with NobleEd25519Signer

* docs: fix issues with Builders and Utils

* docs: cleanup primary README example
2023-03-20 15:34:27 -07:00
Varun Srinivasan
d139dae5d4 chore: bump versions (#700) @farcaster/utils@0.3.0 @farcaster/hub-nodejs@0.5.0 @farcaster/protobufs@0.1.9 2023-03-20 14:16:44 -07:00
Paul Fletcher-Hill
403c3ccfb8 feat: sort casts and reactions indices by timestamp (#699)
* sort casts and reactions indices by timestamp

* add more getReactionsByTargetCast tests
2023-03-20 17:06:15 -04:00
adityapk00
1b0e3a7efc feat: Allow setting rpcAuth via env variables (#698)
* feat: Allow setting rpcAuth via env variables

* changeset
2023-03-20 13:49:48 -07:00
adityapk00
f059e4c7f1 fix: Add a simple cache to the sync trie (#697)
* fix: Add a simple cache to the sync trie

This reduces the amount of disk writes the sync trie does.

* flaky tests
2023-03-20 13:09:51 -07:00
David Furlong
c459855337 docs: fix broken signer doc links in builders (#694)
* Update Builders.md

* add changeset and links to Eip712Signer as well

---------

Co-authored-by: Tony D'Addeo <tony@merklemanufactory.com>
2023-03-20 14:14:15 -05:00
Anthony D'Addeo
8de734cb5b chore: bump signers change from batch to minor (#681) 2023-03-20 10:45:11 -07:00
adityapk00
69ff0efada fix: Fix issue with ethers v6 (#696)
* fix: Fix issue with ethers v6

* add warning
2023-03-20 10:26:05 -07:00
Paul Fletcher-Hill
469825e7e1 feat: add reverse rpc pageOption (#695)
* add reverse rpc pageOption

* implement reverse for cast and reaction indices

* add changeset
2023-03-20 13:18:14 -04:00
Paul Fletcher-Hill
60ed81e8c6 feat: prune events after 3 days (#690)
* prune events after 3 days

* use fromId option

* schedule prune events job

* update default cron schedule and log any prune events errors

* update default prune events time limit to use ms
2023-03-20 12:15:59 -04:00
adityapk00
9235f68394 feat: Do validations in webworkers (#671)
* feat: Do validations in webworkers

* address code review comments

* don't encode/decode
2023-03-20 07:05:00 -07:00
Shane da Silva
a91afdb634 Allow specifying hub name via environment variable (#692)
This makes it easier to set the name when deploying multiple hubs.
2023-03-19 18:14:49 -07:00
adityapk00
bbae5da485 fix: Correctly get SSL / Insecure client (#691) 2023-03-19 17:40:36 -07:00
Varun Srinivasan
c503d19eb2 docs: add documentation for userdata, verifications and streaming services (#687)
* docs: add getUserData usage

* docs: add docs for verifications

* docs: add docs for streaming
2023-03-19 16:53:40 -07:00
Shane da Silva
d63e05f0f9 Switch to time-based check for process shutdown file (#688)
Using `fs.watch` uses `inotify`, which doesn't work with network file
systems like EFS where other kernels could be responsible for changes to
the file system.

Instead, check every 10 seconds to see if there is a change.

Ran this locally and it seemed to work fine.
2023-03-19 14:54:45 -07:00
adityapk00
0a0fec3bd5 fix: Fix accidentally removed sleep from prev commit (#686) 2023-03-19 13:46:15 -07:00
adityapk00
be864e31c0 Pidfix (#685)
* fix: Use a random number instead of PID

* maxsafeint
2023-03-19 13:36:08 -07:00
adityapk00
b596ec9189 feat: Exit if superseeded by a newer hub (#684)
* feat: Exit if superseeded by a newer hub

* changeset
2023-03-19 13:17:12 -07:00
Vincent Liao
f875c1ed65 chore: turn prettier into its own package (#653)
* chore: separate out prettier from eslint into its own package

* fix: duplicate package name in package.json
2023-03-19 12:47:15 -07:00
Vincent Liao
fde61010b8 fix: contributing.md 404 (#663) 2023-03-19 12:46:28 -07:00
Paul Fletcher-Hill
e0ca40de25 feat: refactor events to create and broadcast in order (#675)
* refactor events

* update tests and remove unused eventhandler methods
2023-03-19 15:26:59 -04:00
adityapk00
8815067813 fix: Fix memory leak in prune messages job (#679)
* fix: Fix memory leak in prune messages job

* Add end() to nameRegistryTest iterator

* refactor rocksdb iterator to use promises

* simplify next API

* clear iterator when paginating

* change prune messages cron back to every hour

* clear iterators from pagination methods

* fix build

---------

Co-authored-by: Paul Fletcher-Hill <pfletcherhill@gmail.com>
2023-03-19 15:17:14 -04:00
adityapk00
6ff9f4e18d fix: Add a grace period before forcing exit after signals (#682) 2023-03-19 11:59:09 -07:00
Anthony D'Addeo
99518efe30 refactor: introduce generic and dependency specific signers (#677)
* refactor: update ethers to v6.1 from v5.7

* refactor: generic signer classes

* remove neverthrow from crypto and signers

* update docs

* rm signer util fns

* add comment to getSignerKey

* rm not present methods from signers

* fix doc

* fix docs

* simplify Eip712Factory

* add changeset

---------

Co-authored-by: Varun Srinivasan <varunsrin@gmail.com>
2023-03-19 12:44:32 -05:00
Varun Srinivasan
1f202ed555 docs(hub-nodejs): add documentation for pagination, responses (#680)
* docs: fix makeVerificationRemove and dataOptions in builders

* docs: simplify main example, fix typo

* docs: add pagination documentation
2023-03-19 10:05:12 -07:00
Anthony D'Addeo
614720c246 docs: minor doc fixes (#662) 2023-03-18 21:27:15 -07:00
Varun Srinivasan
59920f9716 refactor: update ethers to v6.1 from v5.7 (#670) 2023-03-18 17:38:17 -07:00
Varun Srinivasan
1e4482e6ba chore: upgrade minor and patch versions of packages (#678)
* chore: update all devDependencies to the latest versions

* chore: update @noble/hashes to 1.3.0

* chore: update @swc/core to 1.3.41

* chore: update @noble/ed25519 by a patch version

* chore: update ts-proto and eslint/parser dev deps

* chore: upgrade pino minor version

* chore: upgrade tsx minor version

* chore: add changeset
2023-03-18 17:26:45 -07:00