Commit Graph

79 Commits

Author SHA1 Message Date
6ce8d4746d
Upgrade package versions before release (#469) 2023-11-14 15:01:52 +05:30
7b5fbf3d13
Implement new graph-node host API for BigDecimal exponentiation (#467)
* Implement host API for BigDecimal pow

* Handle FEVM future block error in rpc-eth-client getFullBlocks

* Handle future block error in rpc-eth-client getBlockWithTransactions

* Upgrade package versions
2023-11-13 12:22:23 +05:30
66d613767e
Upgrade version to 0.2.69 (#466) 2023-11-10 19:36:21 +05:30
prathamesh0
be24166ea7
Update package versions (#463) 2023-11-10 14:48:35 +05:30
prathamesh0
a8e59eb6b9
Support filtering by topics when fetching logs in rpc-eth-client (#441)
* Support filtering by topics when fetching logs

* Include event signatures from all contracts in topics list

* Refactor common code

* Update package versions
2023-10-26 17:25:56 +05:30
prathamesh0
72ccaa0381
Upgrade nitro-node dependency (#430)
* Upgrade nitro-node to v0.1.15

* Upgrade packages version to v0.2.66

* Add default value for Nitro node store path

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-10-17 18:39:08 +05:30
prathamesh0
e6767c3aca
Pass vouchers for RPC requests in header (#429)
* Send voucher in request header instead of url params

* Handle review changes

* Update package versions

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
2023-10-12 17:42:19 +05:30
2b83f38ab6
Upgrade package version to 0.2.64 (#427)
* Upgrade package version to 0.2.64

* Comment CI workflow to publish docker image

* Update CI workflow names
2023-10-12 11:43:17 +05:30
prathamesh0
caa8da7090
Upgrade nitro-node and add Nitro config option for chain URL (#424)
* Upgrade @cerc-io/nitro-node dependency

* Add a separate config option for chain URL used by Nitro node

* Avoid adding ETH RPC method to request URL as no longer needed

* Update package versions
2023-10-05 11:28:13 +05:30
prathamesh0
ae60bbe1ce
Setup config for paid RPC methods and funding amounts with upstream ETH server (#423)
* Add config option for paid RPC methods

* Change rpcProviderNitroNode to nitro

* Add config option for funding amounts

* Handle review changes

* Refactor config and add a method to setup provider with payments

* Upgrade package versions

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
2023-10-04 16:10:54 +05:30
prathamesh0
e203154ac7
Support payments to upstream ETH server for RPC requests (#418)
* Add config option for upstream RPC mutation endpoint

* Use mutation endpoint as chain URL for Nitro node

* Add a method to setup an upstream payment channel

* Add a method to send payments to upstream Nitro node

* Upgrade package versions
2023-09-28 15:24:45 +05:30
prathamesh0
32c78a907c
Add a config option to set gossipub direct peers (#414)
* Add support for setting gossipsub direct peers

* Use string array for direct peers config

* Handle empty nitro and consensus config

* Increase consensus write retry attempts

* Rename config option for watcher party peers file

* Handle directPeers array being passed undefined

* Upgrade package versions

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
2023-09-22 13:46:20 +05:30
prathamesh0
48e7785367
Upgrade nitro-node package (#415)
* Upgrade nitro-node package

* Update package versions
2023-09-21 18:32:03 +05:30
77312a2f95
Add yamux stream multiplexer in peer package (#413)
* Add yamux muxer to peer

* Upgrade version to 0.2.58

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-09-15 12:19:51 +05:30
prathamesh0
bd73dae1b1
Implement consensus mechanism using mokka (#412)
* Add Consensus class with placeholders

* Implement Consensus constructor

* Move PubsubType to peer package

* Implement remaining methods in Consensus class

* Use existing consensus stream if it exists

* Setup send and receive pipes on consensus streams

* Refactor P2P and consensus setup in server command

* Add Nitro node initialization in server command

* Return objects from server initializations

* Use dynamic imports for ES modules in util package

* Fix util deps

* Change target to es6 to allow creating a Mokka instance

* Set moduleResolution to node16 in util for dynamic imports

* Upgrade @cerc-io/nitro-node package

* Implement retries while sending consensus messages

* Use bunyan for consensus logs and subscribe to state changes

* Use debug for logging state change events

* Handle empty watcher party file path

* Return object from initP2P

* Upgrade @cerc-io/nitro-node package

* Update package versions
2023-09-14 13:47:31 +05:30
prathamesh0
c80e4d0ab7
Add support for gossipsub (#410)
* Replace floodsub with gossipsub

* Add a pubsub flag to support both floodsub and gossipsub

* Fix deps

* Handle empty string values

* Upgrade @cerc-io/libp2p dependency

* Upgrade package versions
2023-09-05 17:54:52 +05:30
f89eea0d2f
Upgrade package versions (#407) 2023-08-30 15:55:35 +05:30
444901eb87
Upgrade package versions to 0.2.54 (#403)
Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-08-16 19:07:30 +05:30
f2bc054c19
Rename nitro-client to nitro-node (#402)
* Rename nitro-client to nitro-node

* Upgrade package versions to 0.2.53

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-08-16 17:57:15 +05:30
b600524c8c
Fix dependencies in cli and eth-client packages (#401)
* Fix dependencies in cli and eth-client packages

* Upgrade package versions
2023-08-10 09:58:50 +05:30
prathamesh0
3b090b3987
Handle null blocks in FEVM (#400)
* Avoid gasPrice while serializing tx in getRawTransaction

* Convert base fee to bigint when fetching block data

* Fix methods to get block data in rpc-eth-client

* Fix error checking in rpc-eth-client

* Continue processig after missing null block in FEVM

* Self review fix

* Upgrade package versions

---------

Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
2023-08-09 17:31:11 +05:30
prathamesh0
198d3e65db
Add payments config and charge according to configured rates (#395)
* Track amount paid on payment channels and charge as per query cost

* Add payments manager config

* Fix received payment checks

* Separate out payment not received and amount insufficient errors

* Serve a query for free if its rate is not configured

* Load open payment channels from the stored state

* Take list of free queries from config

* Take mutation rates from config

* Rename query rates config fields

* Take cache settings and request timeout from config

* Upgrade ts-nitro packages

* Upgrade package versions
2023-07-27 15:52:36 +05:30
prathamesh0
aa10a2dc05
Cleanup dead connections in peer heartbeat checker (#394)
* Cleanup dead connections in peer heartbeat checker

* Remove yamux muxer
2023-07-26 13:37:16 +05:30
prathamesh0
6731a640a2
Use a single payment header in payments plugin (#393)
* Add client address field to payments manager

* Use a single payment header in payments plugin

* Upgrade ts-nitro packages

* Rename method to authenticateVoucherForSender

* Upgrade package versions

---------

Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
2023-07-25 13:34:02 +05:30
10fa9d6b4b
Wait for receiving voucher on GQL query (#392)
* Wait for receiving voucher on GQL query

* Add timeout while authenticating voucher and remove listener channel

* Clear timeout after payment received

* Rename variable to paymentListener

* Upgrade package versions

* Add rpcSupportsBlockHashParam flag in config
2023-07-24 13:36:13 +05:30
prathamesh0
eec1965980
Add a payments plugin to GQL server (#391)
* Add a custom payments plugin in server process

* Fix voucher channel read in voucher subscription

* Use voucher hash and signature for payment authentication

* Use a LRU hash map for storing received vouchers

* Avoid hoisting level types to resolve build errors

* Upgrade ts-nitro packages

* Add payments related logs

* Upgrade package versions

* Always allow latestBlock query

* Upgrade ts-nitro packages
2023-07-20 17:22:48 +05:30
11930c0107
Expose peer instance in server CLI and add nitro config options (#390)
* Expose peer instance in server CLI and add nitro config options

* Update package versions

---------

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2023-07-13 15:30:31 +05:30
c6e685fc13
Use local lerna for publishing package in CI (#389)
* Use local lerna for publishing package in CI

* Upgrade package versions

* Add new line at EOF
2023-06-28 12:14:51 +05:30
b0780da52f
Upgrade package versions before publish (#388) 2023-06-28 11:38:07 +05:30
1b6c2a486a
Add peer config options for transports and peerDiscovery (#387)
* Add peer config options for transports and peerDiscovery

* Add yamux muxer to peer libp2p
2023-06-28 11:25:03 +05:30
dfd38d3329
Upgrade package versions (#384)
* Upgrade package versions

* Use node 18.x in github CI
2023-05-15 12:30:24 +05:30
prathamesh0
79898bc3df
Update package version (#383) 2023-05-12 15:11:33 +05:30
prathamesh0
2e1652d772
Block connections with blacklisted multiaddrs (#373)
* Block connections from blacklisted multiaddrs in relay node

* Block connections from blacklisted multiaddrs in peer nodes

* Block dials for blacklisted multiaddrs

* Update package version
2023-05-04 16:33:29 +05:30
ca844dbe47
Upgrade package version before release (#370) 2023-04-25 18:29:07 +05:30
aaa60430e4
Update readme content and package versions (#366)
* Upgrade package versions

* Update readme for watchers
2023-04-14 18:11:15 +05:30
7f91fa7ed8
Remove watchers after moving them out to their own repos (#365)
* Remove all watchers after moving them out

* Add missing dependencies
2023-04-14 17:22:44 +05:30
e841b6a7c3
Publish package for tracing-client (#364)
* Publish tracing-client package

* Upgrade package versions
2023-04-14 15:43:15 +05:30
3f2dc56261
Fix json-bigint package version in yarn.lock file (#361)
* Fix json-bigint package version in lock file

* Upgrade package versions
2023-04-13 17:38:50 +05:30
72ec6c8e5b
Upgrade package versions (#360)
* Set eslint max-warnings to 0 in codegen generated watcher

* Upgrade package versions
2023-04-13 17:07:09 +05:30
prathamesh0
91816db6f3
Upgrade js-libp2p (#346)
* Upgrade js-libp2p

* Upgrade package version
2023-03-29 09:37:06 +05:30
0c2e432c80
Upgrade all package versions (#345) 2023-03-28 13:43:15 +05:30
9e53b1a498
Upgrade dependency versions to remove vulnerabilities from dependabot (#343)
* Dependency patch updates

* Minor update @apollo/client 3.3.19 -> 3.7.10

* Minor update @nomiclabs/hardhat-ethers 2.0.2 -> 2.2.2

* Minor update @openzeppelin/contracts 4.3.2 -> 4.8.2

* Minor update @types/chai 4.2.19 -> 4.3.4

* Minor update decimal 10.3.1 -> 10.4.3

* Minor update @graphql-tools/utils 9.1.1 -> 9.2.1

* Minor update @graphql, graphql-ws, graphql-request

* Minor update yargs

* Minor update @types/node

* Minor update graph-ts

* Minor updates graphql-tools, multiaddr

* Update dependencies with minor updates

* Minor updates to eslint and related dependencies

* Update solidity compiler version for erc721-watcher

* Fix ESLint indent rule

---------

Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
2023-03-28 13:17:53 +05:30
ac5e030b13
Integrate peer in watcher server and send txs to L2 chain (#344)
* Integrate peer in watcher and send txs to L2

* Remove passing debug log in functions

* Remove unnecessary relay advertise config option

---------

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2023-03-24 16:49:16 +04:00
ee63e33cc5
Upgrade Typescript and ESLint (#337) (#342)
* Upgrade eslint and additional lint changes

* Upgrade typescript version to v5

---------

Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
2023-03-24 10:31:33 +04:00
prathamesh0
0f239c360e
Use websockets transport with WebRTC signalling (#341)
* Use websockets as the base transport

* Update yarn lock file

* Upgrade cerc-io/js-libp2p

* Update package version
2023-03-23 16:58:11 +05:30
prathamesh0
787991c432
Add a basic test to demonstrate a p2p connection (#336)
* Add a test to demonstrate a p2p connection

* Use debug for logs

* Perform peer intialization in a separate test
2023-03-09 17:36:27 +05:30
1ba731915d
Log pseudonyms with peer id (#334)
* Log pseudonyms with peer id

* Upgrade package version
2023-03-06 16:26:38 +05:30
prathamesh0
c46d5c3f33
Broadcast peer info over floodsub when requested (#332)
* Refactor discovery handler

* Broadcast peer info over floodsub on requests

* Broadcast peer info from relay nodes

* Make debug reponse handler optional

* Register debug info request handler on peer init

* Move debug info types to types dir

* Return method to unsubscribe from the debug topic

* Make debug info flag optional for relay nodes

* Restructure peer connection info data

* Refactor getting peer info to be used in react app

* Refactor duplicate code to utils

* Rename peer methods

---------

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2023-03-06 10:20:51 +05:30
90d60f54a6
Improve connection check with peers by retrying ping on failures (#330)
* Improve connection check with peers by retrying ping on failures

* Use DEFAULT_PING_INTERVAL in cli

* Log only error message

* Add config option to pass peer id file path

* Finish retrying pings before connection check interval duration

* Handle duplicate connections to relay nodes

* Increase default max dial retries from one relay to another

* Update connection manager config for relay nodes

* Use debug for logs in relay node

---------

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2023-02-27 12:47:49 +05:30
prathamesh0
888199b717
Upgrade package versions (#329) 2023-02-21 18:27:28 +05:30