Commit Graph

16 Commits

Author SHA1 Message Date
Cassandra Heart
61959467c5 chore: upgrade libp2p all the way (#2224)
## Why is this change needed?

Upgrades libp2p all the way to the latest version ([Release
Notes](https://github.com/libp2p/js-libp2p/releases/tag/libp2p-v1.8.2) |
[Migration
Guide](https://github.com/libp2p/js-libp2p/blob/main/doc/migrations/v0.46-v1.0.0.md))

Upgrades GossipSub along with it.

No major interface changes were required here, just different dependency
references as the libp2p project moved some things around.

## 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)
- [ ] PR includes
[documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs)
if necessary.

<!-- start pr-codex -->

---

## PR-Codex overview
This PR upgrades `libp2p/gossipsub` and dependencies, aligns imports
with `@libp2p/interface`, and adjusts types in various files.

### Detailed summary
- Upgraded `libp2p/gossipsub` and dependencies
- Aligned imports with `@libp2p/interface`
- Adjusted types in multiple files for compatibility

> The following files were skipped due to too many changes:
`apps/hubble/src/hubble.ts`,
`apps/hubble/src/network/p2p/gossipNodeWorker.ts`, `yarn.lock`

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

<!-- end pr-codex -->
2024-07-30 18:04:48 -05:00
Varun Srinivasan
4c38067c15 chore: switch from eslint/prettier to rome (#1074)
* chore: add rome config files

* chore: add rome into configs and ci

* chore: remove eslint annotations

* chore: update annotations for rome ignores

* chore: remove prettier
2023-07-04 19:09:15 -07:00
Varun Srinivasan
a198dda18e refactor: monorepo (#340)
* feat: configure turborepo to run tasks

* refactor: set up app/ workspace

* fix: move tsconfig up and inherit

* fix: update turborepo

* refactor: extract flatbuffers to package

* fix: ci by using symlink instead of yalc

* refactor: extract eslint config

* ci: add manypkg to catch package issues

* security: remove manypkg due to yarn audit fail

* fix: misc changes

* refactor: move config into hub

* fix: export as module

* remove: manypkg postinstall
2022-12-31 17:12:50 -08:00
Anthony D'Addeo
5d99da1dc4 perf: use swc to transform TS in jest (#330)
Speed up est execution
2022-12-27 14:47:21 -08:00
Anthony D'Addeo
ec10fc6b7f chore: enable noUncheckedIndexedAccess (#261) 2022-12-08 16:03:09 -08:00
Anthony D'Addeo
f18298dbc0 chore: enable noPropertyAccessFromIndexSignature (#260) 2022-12-05 12:41:56 -08:00
Paul Fletcher-Hill
dac98117ca feat: flatbuffers engine (#209)
* feat: initial flatbuffers engine commit

* add initial tests for flatbuffers engine

* add tests

* feat: add farcaster time utils

* use farcaster time util in validation

* intermediate validation test commit

* add verification validation tests

* add signer and follow validation tests

* add UserDataAdd validation

* Add user data body validation
2022-11-03 13:45:11 -04:00
Varun Srinivasan
932bd11d4e chore: disable noUnusedLocals in tsconfig (#194) 2022-11-01 11:20:44 -07:00
Paul Fletcher-Hill
8ed0c32f5f feat: flatbuffers verification set (#188)
* feat: add verification util for signing and verifying typed data

* feat: flatbuffer verification set

* fix verification util test

* format generated message.ts

* upgrade to new faker version
2022-10-30 10:32:05 -04: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
Sagar
b445407e0b feat: Script to benchmark a network of Hubs (#146)
* feat: Script to benchmark a network of Hubs

* fix: use the package version for the bench script

* fix: add a brief doc at the top of the file

* chore: clean up some unnecessary console.logs

* fix: Increase timeout for test teardown
2022-10-08 12:40:40 -07:00
Paul Fletcher-Hill
4e879ff84f feat: rocksdb persistence and make CastSet a LWW CRDT (#107)
* chore: clean up jest

* feat: initial leveldb commit

* feat: refactor signer set to use db

* refactor: fix mock test

* feat: start adding rocksdb wrapper

* intermediate commit

* feat: integrate all sets with db

* feat: update rocksdb wrapper to create directory if missing

* chore: extend test timeout for rpcSync and engine mock

* chore: improve db/cast.test

* chore: add documentation to db/ files

* chore: update set comments
2022-09-27 09:40:09 -07:00
Sagar
1167fa6a2e feat: add libp2p and initial support for sync (#95)
* feat:Add libp2p and initial support for networking and messaging

* Add IDRegistryContent message types to the Network Protocol

* Add a test for the Node class

* Fix CI errors

* Disable coverage for Network tests

* Remove hack to split tests

* Remove unused jest config file

* Finally fix jest config

* Added a negative test case and some typeguards for protocol messages
2022-09-20 11:28:35 -04:00
Varun Srinivasan
43ed53355e refactor: use esm instead of cjs (#97)
* chore: update config to change from cjs to esm modules

* fix: import linter configs as cjs files
2022-09-08 10:39:59 -07:00
Varun Srinivasan
cd56faabf8 feat: ping-pong nodes (#2)
* fix: tsc should build with correct paths

* create simple farcaster nodes that ping-pong each other
2022-03-17 14:59:49 -07:00
Varun Srinivasan
01897f840a scaffold node application 2022-03-16 17:46:07 -07:00