Commit Graph

34 Commits

Author SHA1 Message Date
Varun Srinivasan
5e458b10ac chore: fix issues with repository setup (#2153)
## Why is this change needed?

Following the instructions to setup a repository resulted in errors.
This change:

- Adds CMake to setup instructions
- Requires Rust 1.77.0 locally since 1.78.0+ cause build errors
- Requires Rust 1.77.0 in CI for parity
- Requires Node 20+ locally for parity with CI
- Updates some README text for clarity

## Merge Checklist

_Choose all relevant options below by adding an `x` now or at any time
before submitting for review_

- [x] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [ ] PR has a
[changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets)
- [x] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [ ] PR includes
[documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs)
if necessary.

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update Node.js, Rust toolchains, and CI
configurations, ensuring consistency across environments. Additionally,
it enhances documentation clarity and fixes environment issues.

### Detailed summary
- Updated Node.js to version 20.11
- Updated Rust toolchain to version 1.77.0 for consistency
- Aligned CI configurations with local and Docker image setups
- Improved README.md for better understanding
- Fixed environment issue with running `yarn test` in shuttle

>  Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
2024-07-11 16:42:06 -07:00
iwantanode
b27aa83f2e Docs improvements (#2046)
Hello
I fixed some typos in the code, code comments and docs,
Hope it helps.
Br,
Tudor


farcaster ACC: @tudor 

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving code consistency by fixing typos and
grammatical errors across various files in the project.

### Detailed summary
- Fixed typos in function names and comments for better code readability
- Corrected grammatical errors in error messages and documentation for
clarity and consistency
- Updated wording for better understanding and adherence to project
standards

> The following files were skipped due to too many changes:
`apps/hubble/www/README.md`,
`apps/hubble/www/docs/docs/httpapi/httpapi.md`,
`apps/hubble/www/docs/docs/api.md`

>  Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
2024-06-13 11:35:28 -07:00
Brendan Kirby
fc0f683e99 fix: fixes typos in readme (#1916)
## Motivation

Fix typos in readme file 

## Change Summary

"used a replacement" -> "used **as a** replacement"
"the generates files" -> "the **generated** files"
"used throught the project" -> "used **throughout** the project"

## Merge Checklist

_Choose all relevant options below by adding an `x` now or at any time
before submitting for review_

- [x] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [ ] PR has a
[changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets)
- [ ] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [x] PR includes
[documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs)
if necessary.
- [x] All [commits have been
signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits)

## Additional Context



<!-- start pr-codex -->

---

## PR-Codex overview


### Detailed summary

<!-- end pr-codex -->
2024-04-18 14:17:00 +00:00
adityapk00
d2b2f726d3 chore: Add rustfmt check for rust files before git commit (#1831)
## Motivation

Ensure consistent formatting of rust files. 

## Change Summary

Run `yarn lint:rust` to format all the rust files

## Merge Checklist

_Choose all relevant options below by adding an `x` now or at any time
before submitting for review_

- [X] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [X] PR has a
[changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets)
- [X] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [X] PR includes
[documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs)
if necessary.
- [X] All [commits have been
signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a Rust code formatter check before Git commit, updates
linting scripts, and refactors code in the `LinkStore` module.

### Detailed summary
- Added Rustfmt check before Git commit
- Updated linting scripts in `package.json`
- Refactored code in the `LinkStore` module

> The following files were skipped due to too many changes:
`apps/hubble/src/addon/src/store/link_store.rs`

>  Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
2024-03-20 10:21:48 -05:00
adityapk00
5a1764d81c Move Reactions Store and RocksDB to rust (#1748)
## Motivation

Merging messages into the CRDT stores is slow, and to speed it up, we'll
move the stores and the DB itself into rust.

## Change Summary

- Move DB into Rust (instead of abstract-leveldown)
- Move the reactions store into Rust
- RocksDB is upgraded from 6.17 to 8.10
- Add statsd metrics to track merge latencies specific to rust vs nodejs

## Merge Checklist

_Choose all relevant options below by adding an `x` now or at any time
before submitting for review_

- [X] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [X] PR has a
[changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets)
- [X] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [X] PR includes
[documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs)
if necessary.
- [X] All [commits have been
signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits)

## Additional Context
There's a README in `src/addon/` that describes the rust objects used

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on moving the DB and Reactions store to Rust for
performance improvement.

### Detailed summary
- Added Rust modules for DB operations
- Updated storage configurations
- Improved logging functionality
- Implemented Rust functions for hashing
- Refactored DB iterators
- Added Rust client for statsd
- Updated Cargo.toml dependencies and build.rs
- Reorganized store modules

> The following files were skipped due to too many changes:
`apps/hubble/package.json`, `apps/hubble/src/network/sync/trieNode.ts`,
`apps/hubble/src/storage/jobs/revokeMessagesBySignerJob.ts`,
`apps/hubble/src/storage/stores/castStore.test.ts`, `Dockerfile.hubble`,
`apps/hubble/src/storage/db/hubState.ts`,
`apps/hubble/src/storage/db/migrations/2.fnameproof.ts`,
`apps/hubble/src/storage/stores/usernameProofStore.ts`,
`apps/hubble/src/storage/stores/store.test.ts`,
`apps/hubble/src/storage/stores/castStore.ts`,
`apps/hubble/src/storage/db/nameRegistryEvent.ts`,
`apps/hubble/src/storage/db/migrations/1.usernameproof.ts`,
`apps/hubble/src/storage/jobs/pruneMessagesJob.ts`,
`apps/hubble/src/storage/db/migrations/5.fnameSyncIds.ts`,
`.github/workflows/ci.yml`,
`apps/hubble/src/network/sync/syncEngine.ts`,
`apps/hubble/src/addon/src/statsd.rs`,
`apps/hubble/src/storage/stores/storageCache.ts`,
`apps/hubble/src/storage/stores/linkStore.ts`,
`apps/hubble/src/storage/stores/onChainEventStore.ts`,
`apps/hubble/src/storage/db/onChainEvent.ts`,
`apps/hubble/src/storage/stores/reactionStore.test.ts`,
`apps/hubble/src/storage/engine/index.ts`,
`apps/hubble/src/network/sync/merkleTrie.ts`,
`apps/hubble/src/profile/profile.ts`, `apps/hubble/src/rpc/server.ts`,
`apps/hubble/src/rustfunctions.test.ts`,
`apps/hubble/src/addon/README.md`, `apps/hubble/src/addon/src/lib.rs`,
`apps/hubble/src/addon/src/store/store_event_handler.rs`,
`apps/hubble/src/storage/jobs/validateOrRevokeMessagesJob.ts`,
`apps/hubble/src/storage/stores/storeEventHandler.test.ts`,
`apps/hubble/src/addon/src/logger.rs`, `apps/hubble/src/hubble.ts`,
`yarn.lock`, `apps/hubble/src/storage/db/message.ts`,
`apps/hubble/src/storage/stores/verificationStore.ts`,
`apps/hubble/src/addon/src/store/utils.rs`,
`apps/hubble/src/storage/stores/storeEventHandler.ts`,
`apps/hubble/src/storage/stores/store.ts`,
`apps/hubble/src/addon/src/store/message.rs`,
`apps/hubble/src/rustfunctions.ts`,
`apps/hubble/src/storage/db/rocksdb.ts`,
`apps/hubble/src/addon/src/store/reaction_store.rs`,
`apps/hubble/src/storage/stores/reactionStore.ts`,
`apps/hubble/src/addon/src/db/rocksdb.rs`,
`apps/hubble/src/storage/db/rocksdb.test.ts`,
`apps/hubble/src/addon/src/store/store.rs`,
`apps/hubble/src/addon/Cargo.lock`,
`apps/hubble/src/addon/src/proto/protobufs.rs`

>  Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->

---------

Co-authored-by: Wasif Iqbal <Wazzymandias@users.noreply.github.com>
2024-03-04 12:20:40 -06:00
Varun Srinivasan
f026ad1ef4 docs: update release steps (#1583) 2023-11-15 08:30:21 -08:00
adityapk00
8df8be3745 chore: Add docker to release instructions (#1378) 2023-09-11 11:49:26 -05:00
adityapk00
b0d4d6e455 chore: Slightly update release instructions (#1262) 2023-08-14 16:06:13 -05:00
adityapk00
1ca39ab6a3 chore: Add documentation about how to do migrations (#1255) 2023-08-11 14:52:42 -05:00
Shane da Silva
4c81d05ac3 chore: Update release instructions (#1229) 2023-08-07 16:36:30 -07:00
Shane da Silva
505790be6c chore: Cut Hubble version 1.4.4 and other package upgrades (#1228) 2023-08-07 16:10:29 -07:00
adityapk00
ec7734cf77 feat: Move blake3 into rust (#1194) 2023-07-28 12:07:13 -07:00
adityapk00
15fad46703 feat: Add Rust toolchain to Hubble and move ed25519 to rust (#1191)
* feat: Add Rust toolchain to hubble and move ed25519 to rust

* changeset

* cleanup

* Add rust-toolchain

* Add Rust installation to docs

* Update docs

* tests for invalid data

* fix: Fix TestData generator for testnet (#1193)

* fix: Fix TestData generator for testnet

* changeset

* update docs
2023-07-28 09:32:03 -07:00
Varun Srinivasan
4d28208563 docs: add documentation requirement and instructions to pr template (#1150) 2023-07-15 22:44:48 -07:00
Tony D'Addeo
159c62df7a chore(hubble): use viem to interact with ethereum (#997)
* chore: use viem to interact with ethereum

* add ViemLocalEip712Signer to exports

* add codecov exceptions

* upgrade viem

* add log for historically synced blocks

* fix test

* poll every 4 seconds

* clean up pre-viem 1.0 code

* update viem

* update comments
2023-06-22 14:50:18 -05:00
omahs
0a7e040f41 chore: fix typos in documentation (#1016) 2023-06-14 07:41:04 +01: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
Varun Srinivasan
f2f7297a13 docs(hubble): add instructions for connecting to mainnet (#903)
* chore(hubble): remove all references to flatbuffers

* docs(hubble): update getting started with mainnet instructions
2023-04-21 11:02:49 -07:00
PangZhi
7750ded8ac chore: fix typo in contributing.md (#766) 2023-03-27 12:39:08 -07:00
Varun Srinivasan
5f20d30c99 docs: release instructions (#762) 2023-03-26 19:38:04 -07:00
Varun Srinivasan
42f9da1ea4 chore: add instructions and nudges to add changesets (#661) 2023-03-16 13:50:18 -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
Vincent Liao
7af59f9fd4 docs: @farcaster/js (#590)
* fix: relative path on hubble docs not resolving to contributing.md

* add: initial table structure of the docs

* remove: link on first column

* add: docs/Ed25519Signer.md

* fix: wrong links in Ed25519Signer.md

* fix: wrong link again

* add: constructor to ed25519signer.md

* add docs/Eip712Signer.md

* update: replace ambiguous description with TODO

* update: code example on readme

* add: a comment about neverthrow

* add: js docs to interact with hub

* update: wrong import on docs

* remove: make Data and Amp functions

* update: clarify the eddsa private key part

* update: move signer docs to readme

* update: readme table

* fix: wrong path

* add: docs for eip signer but in js

* remove: ambiguous descriptions

* add: doc generation with TypeDoc

* add: docs for ed25519 signer

* update: build first before running docs

* update: only use packages/js for typedoc entrypoint

* remove: function name in tsdoc comments

* update: move examples up for clarity

* add: typedoc.json

* add: description for properties of signers

* update: link to classes in readme

* update: move make message explanation above

* remove: ambiguous description in readme

* add: a line in contributing.md about generating docs for packages/*

* remove: old docs

* update: recompiled docs and add plugin on typedoc.json

* add: description to sign verification

Co-authored-by: Anthony D'Addeo <tony@tavour.com>

* update: use yarn instead of npm

Co-authored-by: Anthony D'Addeo <tony@tavour.com>

* update: disable typedoc source

* update: contributing.md packages/* to packages/js

* update: TODO to TODO DOCS

* fix: eip712 signer not rendering properly

* add: docs to message builders

* add: docs to client

---------

Co-authored-by: Anthony D'Addeo <tony@tavour.com>
2023-02-23 21:15:07 -08:00
Varun Srinivasan
ad4dfcfa1d docs: update READMEs to match latest behavior (#601) 2023-02-22 20:36:52 -08:00
Peter Rood
f8e86d7dea update documentation to match code (#446) 2023-01-30 10:14:22 -08:00
Varun Srinivasan
e7b09965c1 docs: update READMEs (#343) 2022-12-31 18:03:26 -08:00
adityapk00
4fef556861 fix: flatc generation (#333) 2022-12-28 10:11:13 -08:00
adityapk00
5e072a55e1 Add flatc generation (#267)
- Add `yarn flatc` to regenereate all flatbuffers
- Update instructions in Contributing.md
2022-12-06 15:06:30 -05:00
Varun Srinivasan
86dbc7141b feat(HubError): allow construction with ErrorCode and Error (#229)
* feat(HubError): allow construction with ErrorCode and Error

* docs: update CONTRIBUTING.md
2022-11-11 11:30:01 -08:00
Varun Srinivasan
f98b8c4e6b refactor(p2p): network/p2p uses HubResults and HubErrors (#227)
* refactor: p2p/protocol returns HubResults

* refactor: return HubError from SyncId constructor

* wip: refactor sync

* refactor: utils/p2p returns HubResults

* fix: connectionFilter.shouldDeny does not need to be async or accept null

* refactor: network/p2p/node returns HubResults

* refactor: address issues identified in pr review

* refactor: network/sync/syncEngine to use HubResults

* docs: error handling
2022-11-10 18:44:48 -08:00
Varun Srinivasan
ab015b48e6 refactor(flatbuffers): rename hash to tsHash, targetTsHash for clarity (#200)
* refactor(flatbuffers): rename hash to tsHash, targetTsHash for clarity

* docs: flatbuffer instructions
2022-11-01 20:58:50 -07:00
Varun Srinivasan
bdd742e51f refactor: code organization (#149)
* docs: update README to reflect new design

* refactor: rename MerkleSync to SyncEngine

* refactor: move db, engine, sets, providers into storage

* refactor: move factories, bench, client into test/

* refactor: combine typeguards

* refactor: move utils into folder

* refactor: cleanup docs in hub.ts

* refactor: package.json scripts

* refactor: rename server to cli

* chore: add stricter type checks, disable currently violated rules

* chore: type check for unreachable code

* chore: require explicit overrides when type checking

* chore: do not allow unused params while typechecking

* chore: enforce no unused locals when typechecking, remove unused code

* chore: enforce typechecking of exactOptionalPropertyTypes

* docs: add comments to commented out checks in tsconfig

* refactor(network): reorganize network folder

* docs: update README.md

* docs: update CONTRIBUTING.md

* chore: update comments to blocks

* chore: address PR comments
2022-10-10 12:06:53 -07:00
Varun Srinivasan
3c789b4157 docs: add signing instructions to CONTRIBUTING (#68) 2022-08-15 10:43:43 -07:00
Varun Srinivasan
d943876e8e chore: add issue templates, pr templates and contributing guide (#57)
* chore: add pr template

* chore: add CONTRIBUTING.md

* chore: add issue templates
2022-08-14 20:50:32 -07:00