Commit Graph

461 Commits

Author SHA1 Message Date
prathamesh0
b91f904f14
Add an option for host address when running relay node (#319)
* Add an option for host address when running relay node

* Set default host and port values in yargs
2023-02-14 14:02:45 +05:30
prathamesh0
0d22915d59
Add support to use stored peer id (#318)
* Add support to use stored peer id

* Upgrade package version

* Add a type for peer id object

* Use Buffer from buffer package for creating peer id
2023-02-14 11:27:36 +05:30
prathamesh0
197aec74aa
Restrict number of relay connections for a peer (#317)
* Restrict number of relay connections for a peer

* Add a log message when ignoring a relay node
2023-02-13 18:04:11 +05:30
prathamesh0
582a8e10e3
Pass node type in libp2p transport config (#316) 2023-02-09 19:53:49 +05:30
40fd5f8ab8
Add heartbeat checks in relay node to hangup disconnected peers (#314)
* Close connections from relay node to disconnected peers

* Review changes and update libp2p version

* Update package version
2023-02-07 20:04:41 +08:00
f5ff7cc96e Update package version to v0.2.26 2023-02-02 19:50:27 +05:30
prathamesh0
a1af962d99 Use webrtc-direct protocol with peer signalling integrated into relay node (#307)
* Use webrtc-direct transport with pubsub based discovery

* Use changes to integrate signalling using relay node

* Add an indicator for peer connection type (direct/relayed)

* Catch errors while creting a libp2p node

* Catch errors while dialling peers

* Catch errors when dialling from relay node

* Pass CLI arg for port to listen on for relay node

* Subscribe chat CLI to pubsub topic

* Update yarn lockfile

* Update webrtc-direct dependency in package json

* Update webrtc-direct version

* Update yarn lockfile
2023-02-02 19:50:27 +05:30
453ee6a473 Use scoped libp2p package after publishing to gitea (#309) 2023-02-02 19:50:27 +05:30
cc445d5caf Prioritize direct webrtc connection between peers (#306)
* Prioritize direct webrtc connection between peers

* Close event listener and add comment
2023-02-02 19:50:27 +05:30
a5658c6344 Fix for multiple connections between two peers (#305)
* Close existing connection

* Fix closing existing connections

* Close new connections from only peer

* Refresh in intervals to update UI stats
2023-02-02 19:50:27 +05:30
f619c71b42 Add connection check for all remote peers 2023-02-02 19:50:27 +05:30
69e9402dc1
Fix getting bytes value length from storage slot in solidity mapper (#313)
* Add failing test case for bytes with leading zeros

* Fix getting bytes value length from storage slot
2023-02-02 17:49:31 +05:30
28023d834a
Remove peer-test-app react app (#312) 2023-02-02 12:39:55 +05:30
abb47fc7cc
Upgrade version to 0.2.25 (#311) 2023-02-01 19:07:45 +05:30
30dd2521e3
Fix yarn lock file libp2p package (#310) 2023-02-01 16:16:40 +05:30
dfc3f5a63e
Move out react-peer package to its own repo (#308) 2023-02-01 09:54:52 +05:30
prathamesh0
ff64dcb43c
Upgrade js-libp2p and related dependencies (#298)
* Upgrade js-libp2p and related dependencies

* Dial all multiaddr of a discovered peer in parallel

* Dial using peer id instead of dialling individual multiaddr

* Log peer id on discovery
2023-01-20 10:34:55 +05:30
prathamesh0
7069a7f455
Upgrade version to 0.2.24 (#299) 2023-01-19 15:48:38 +05:30
b07e288756
Ensure connection with peers after going offline (#297)
* Redial relay node on failure and after going offline

* Redial only relay node if not connected

* Refactor and rename methods

* Only close existing connection to relay node

* Hearbeat check only for relay node

* Refactor startHeartbeatCheck method
2023-01-19 15:01:40 +05:30
prathamesh0
9d38306fe9
Federated relay nodes and limiting connections (#296)
* Pass relay node an optional list of relay peers to connect to

* Catch protocol selection failure on dialling to new relay nodes

* Restrict max number of connections for a peer

* Tag the relay node with a high value to avoid disconnects

* Use debug for connect/disconnect logs in relay nodes

* Ignore incomplete multiaddr on a peer discovery

* Increase max connections for a peer to 10

* Refactor and descriptive comments
2023-01-19 11:35:09 +05:30
prathamesh0
1e5485c6ef
Use StrictSign signature policy in pubsub (#295)
* Log number of connected peers on connect/disconnect

* Log generated peer id if file path not provided

* Use StrictSign signature policy in pubsub
2023-01-17 13:54:24 +05:30
Zach
64a30b7a4d
Merge pull request #288 from cerc-io/cleanup-readmes
Watcher docs updates
2023-01-16 10:44:19 -05:00
zramsay
6e11ded46c
nits 2023-01-16 07:45:39 -05:00
zramsay
69bd47dbea
move dev to CONTRIBUTING 2023-01-16 07:42:28 -05:00
zramsay
ae97b3fc65
fixup main README, link to an SO stack where applicable 2023-01-16 07:40:40 -05:00
zramsay
67dd22e761
deduplicate the Customize section 2023-01-16 07:40:40 -05:00
zramsay
dd9f85f268
moar cli & complete address-watcher README 2023-01-16 07:40:39 -05:00
zramsay
85452a870f
combine demo & readme, graph-test-watcher; start docs/cli 2023-01-16 07:40:39 -05:00
zramsay
4ee889eaa7
deduplicate into a docs/README 2023-01-16 07:40:39 -05:00
zramsay
4080e2ded7
combine demo & readme, mobymask-watcher 2023-01-16 07:40:39 -05:00
zramsay
d70b89d19a
placeholder for CLI commands 2023-01-16 07:40:38 -05:00
zramsay
c47a435588
combine demo & readme, erc721-watcher 2023-01-16 07:40:38 -05:00
zramsay
c03041f09d
combine demo & readme, erc20-watcher 2023-01-16 07:40:38 -05:00
zramsay
a1deb17e4b
update readmes 2023-01-16 07:40:23 -05:00
prathamesh0
38daa31029
Add a method to send messages on the network using pubsub (#293)
* Add a method to send messages using pubsub on a topic

* Update version to 0.2.22
2023-01-11 17:19:21 +05:30
55884a8ecd
Fix publish failing for react-peer package (#292)
* Remove empty repository from package.json

* Update version to 0.2.21
2023-01-10 22:11:40 +05:30
4f82dfbf74
Update version to 0.2.20 (#291) 2023-01-10 20:32:05 +05:30
cd29b47ecc
Implement peer package to send messages between peers (#279)
* Initial implementation of class and discoving other peers

* Implement peer connection and sending messages between peers

* Add react app and use peer package for broadcasting

* Maintain stream for each remote peer

* Refactor code in peer package

* Add serve package for react-app

* Add readme for running react app

* Add peer package readme

* Add logs for events with details

* Add a chat CLI using peer package (#280)

* Add a flag to instantiate Peer for nodejs

* Add a basic chat CLI using peer

* Add a signal server arg to chat CLI

* Add instructions for chat CLI

* Fix typescript and ESM issues after adding peer package (#282)

* Fix build issues in util package

* Update eslint TS plugins

* Scope react app package name

* Convert cli package back to CJS and dynamically import ESM

* Upgrade ts-node version

* Fix tests

* Setup a relay node and pubsub based discovery (#284)

* Add a script to setup a relay node

* Use pubsub based peer discovery

* Add peer multiaddr to connection log

* Catch relay node dial errors

* Increase discovery interval and dial all mutiaddr

* Add UI to display self peer ID and multiaddrs

* Add UI for displaying live remote connections

* Send js objects in peer broadcast messages

* Add react-peer package for using peer in react app

* Reduce disconnect frequency between peers (#287)

* Restrict number of max concurrent dials per peer

* Increase hop relay timeout to 1 day

* Self review changes

* Review changes

* Increase pubsub discovery interval and add steps to create a peer id  (#290)

* Increase pubsub discovery interval

* Disable autodial to avoid peer dials without protocol on a reconnect

* Add steps to create a peer id and use for relay node

* Add back dependency to run signalling server

* Avoid bootstrapping and dial to relay node directly

Co-authored-by: prathamesh0 <42446521+prathamesh0@users.noreply.github.com>
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2023-01-10 20:10:27 +05:30
aa4a954330
Use graph-ts and graph-cli packages from gitea (#283)
* Use published packages from gitea

* Remove token used for github packages
2022-12-29 16:59:42 +05:30
prathamesh0
a834250259
Update demo hardhat configs to use env variable for eth endpoint (#277)
* Use an env variable for eth RPC endpoint in hardhat config

* Add a task to get main account address in erc20 watcher
2022-12-21 17:59:31 +05:30
9566dff466
Fix job-runner to process missing parent block (#274)
* Fix job-runner to process missing parent block

* Upgrade package versions to 0.2.18
2022-12-13 11:59:55 +05:30
cc66f44bab
Use assemblyscript from gitea packages (#272)
* Use assemblyscript from gitea packages

* Add back github registry for vulcanize/graph-ts

* Use cerc-io scoped assemblyscript package
2022-12-07 15:13:41 +05:30
d0ac2aa895
Add script to set package versions in codegen (#270) 2022-11-29 14:52:39 +05:30
c5908c4c0e
Upgrade package versions to 0.2.17 (#269) 2022-11-28 19:10:36 +05:30
prathamesh0
847837c2fb
Add a demo for erc20-watcher (#268)
* Fix event subscription in erc20-watcher

* Add demo for erc20-watcher

* Update README
2022-11-28 18:54:09 +05:30
c299737aab
Add demo for graph-test-watcher (#267)
* Add demo for graph-test-watcher

* Remove stack-orchestrator from demos
2022-11-28 16:35:19 +05:30
05bfd57278
Add isPruned flag to erc721-watcher custom transferCount entity (#266)
* Remove block number param from job-queue reset CLI in readme

* Add isPruned flag to erc721-watcher custom transferCount entity
2022-11-28 14:14:02 +05:30
prathamesh0
bd8f003322
Gracefully shutdown server (#265)
* Gracefully shutdown server

* Forbid lint warnings

* Avoid setting subgraph path in template contex in codegen
2022-11-28 12:01:28 +05:30
prathamesh0
2417e3feb1
Fix linter warnings and dependencies (#264)
* Fix minor linting errors

* Fix CLI getters linting errors

* Fix resolvers template in codegen

* Fix dependencies
2022-11-25 20:03:58 +05:30
prathamesh0
94c8ed9575
Move event watcher to util (#262) 2022-11-25 17:19:37 +05:30