Commit Graph

460 Commits

Author SHA1 Message Date
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
Shane da Silva
75ed86a30a chore: changeset version bumps (#676) @farcaster/hub-nodejs@0.4.1 @farcaster/utils@0.2.12 2023-03-18 13:13:38 -07:00
adityapk00
4e6b83e10c feat: Retry rocksDB lock during open (#666) 2023-03-18 12:58:22 -07:00
Anthony D'Addeo
86c00f5326 refactor: simplify Eip712Signer interface (#673)
* refactor: simplify Eip712Signer interface

* add changeset
2023-03-18 14:55:09 -05:00
Paul Fletcher-Hill
269337c7e6 improve engine error messages (#674) 2023-03-18 15:44:33 -04:00
adityapk00
8f2c6ef0e7 fix: Increase Q limits now that we have more memory. (#668)
* fix: Increase Q limits now that we have more memory.

* changeset
2023-03-17 14:28:40 -07:00
adityapk00
2bd81f6255 feat: Admin server on localhost only (#667) 2023-03-17 13:27:11 -07:00
Varun Srinivasan
046cb77681 docs(hub-nodejs): improve docs based on feedback (#664)
* fix: typo in VerificationAddEthAddress

* fix: address and hash types should be Uint8Array not string

* docs: SignerBody is now SignerAddBody or SignerRemoveBody

* docs: clarify MessageData structure

* docs: placeholders for utils

* docs: replace stub data with better defaults

* docs: making verification messages
2023-03-16 21:25:25 -07:00
Varun Srinivasan
42f9da1ea4 chore: add instructions and nudges to add changesets (#661) 2023-03-16 13:50:18 -07:00
Varun Srinivasan
73d11308fb chore: changeset version bumps (#660) @farcaster/utils@0.2.11 @farcaster/hub-nodejs@0.4.0 @farcaster/protobufs@0.1.8 2023-03-16 13:28:19 -07:00
Varun Srinivasan
2e0d95f33a chore: upgrade minor and patch versions of monorepo dependencies (#659) 2023-03-16 13:18:35 -07:00
Varun Srinivasan
a74ecb2097 refactor(farcaster/hub-nodejs): rename farcaster/js to farcaster/hub-nodejs (#658)
* refactor: rename farcaster/js to farcaster/hub-nodejs

* chore: add changeset
2023-03-16 13:08:05 -07:00
Varun Srinivasan
3a1ead3039 chore: upgrade typescript to v5 from v5beta (#656) 2023-03-16 10:48:06 -07:00
Paul Fletcher-Hill
9b4a7fea27 fix prune messages job (#655) 2023-03-16 13:00:45 -04:00
Varun Srinivasan
cfc47a97da docs(@farcaster/js): update documentation for client and builders to match refactor (#648) 2023-03-16 09:17:45 -07:00
Paul Fletcher-Hill
0a3b77c9e5 feat: make name and fromId optional (#652)
* make name and fromId optional

* add changeset
2023-03-15 23:47:01 -04:00
Paul Fletcher-Hill
68230b7f86 chore: move submitIdRegistryEvent and submitNameRegistryEvent to admin grpc service (#650)
* move submitIdRegistryEvent and submitNameRegistryEvent to admin grpc service

* add changeset

* fix imports
2023-03-15 13:31:36 -04:00
Anthony D'Addeo
e7602bdd31 feat: pagination for list queries and gRPC (#610)
* poc

* address pr feedback, add pagination to getAllSignerMessagesByFid

* fix types

* use bytes and uint32

* move makeEndPrefix into utils

* getSignersByFid

* fix: getCastsByFid should return items in reverse chronological order

* returns casts in chronological order

* fix: getCastsByFid should return casts in chronological order

In the RocksDB iterator we use to construct thashes for the messages query, select only the CastMessages which are CastAdds

* rename page options and move page iterator to message file

* intermediate commit

* fix tests

* use suffixes as tokens rather than full keys

* remove commented out code

* paginate getCastsByParent, getCastsByMention, getReactionsByCast

* add changeset and fix linting

* update multiPeerSyncEngine test

* add more tests

* fix import

---------

Co-authored-by: bstchow <36556453+bstchow@users.noreply.github.com>
Co-authored-by: Paul Fletcher-Hill <pfletcherhill@gmail.com>
2023-03-15 01:15:31 -04:00
adityapk00
d809846423 fix: Catch timeouts during shutdown (#643) 2023-03-13 09:33:26 -07:00
Varun Srinivasan
7588fffdd5 docs: remove typedoc and outdated docs (#639) 2023-03-13 05:19:11 -07:00
Shane da Silva
935b6ec6e8 chore: changeset version (#640) 2023-03-12 14:34:11 -07:00
Shane da Silva
2d90f5bf1c fix: Validate embed URLs using utf8 byte length (#638)
We want to ensure these URLs remain under 256 bytes when encoded as
utf8.
2023-03-12 13:46:33 -07:00
Paul Fletcher-Hill
f55fa8a219 feat: refactor @farcaster/js to only export from utils and protobufs (#636)
* remove js files and export from utils and protobufs

* remove hex methods and add changeset
2023-03-11 18:38:12 -05:00
Shane da Silva
fe503a29c8 chore: changeset version (#637) 2023-03-11 14:10:18 -08:00