* 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
* 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
* 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>
* 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
* 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
* 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>
* Implement rpc-eth-client with getStorageAt method
* Add test for comparing RPC and GQL eth-client getStorageAt method
* Add getBlockWithTransactions and getBlocks method
* Implement getFullBlocks with RLP encoded data
* Implement getFullTransaction method with raw tx
* Implement getBlockByHash and getLogs methods
* Add flag and interface to switch between RPC and GQL eth clients
* Fix getBlocks to return empty array when block not present
* Return empty array in getBlocks for missing block and use blockNumber in getLogs
* Fix getRawTransaction method for zero signature.v value
* Remove duplicate util from rpc-eth-client
* 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
* 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>
* 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
* 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
* Add util method for preparing state from GQL response entity
* Refactor method to create or update state data
* Fix typeorm bigint transformer and convert to checksum contract address
* Skip resetting to previous block in job-runner if isComplete set to true
* Fix creating subgraph event with struct params
* Use quotes for table names in custom queries
* Fix indexer prepareStateEntry method
* Fix toEthereumValue method when used with ethereum.decode
* Add CLI for creating snapshot checkpoint state from GQL endpoint
* Skip import-state if block is already indexed
* Review changes
* Block connections from blacklisted multiaddrs in relay node
* Block connections from blacklisted multiaddrs in peer nodes
* Block dials for blacklisted multiaddrs
* Update package version
* Generate indexer and entities with DB caching for multiple return types
* Generate database file code for multiple return types
* Remove returnType from client codegen as not required
* Changes for fixing lint warnings
* Handle mapping type values in storage mode
* Generate entities for array return type queries
* Refactor visitor for DB caching of array return types
* Fix saving bigint array type in DB
* Fix ValueTransformers to check for undefined value
* Create Result types if needed
* Update codegen to include array return type queries in schema
* Update codegen to include array return type queries in resolvers
* Update codegen to include array return type queries in indexers
* Codegen skip db caching methods for queries returning unhandled types
* Codegen handle bigint array in indexer
* Update codegen to handle basic array types
* Remove redundant code and refactor
* Codegen map Solidity types directly to GraphQL types
* Codegen get TS from GQL types
* Codegen handle ethers BigNumber array in indexer template
* Fix GQL type returned in client queries
* Codegen unused method isElementaryType should not be exported
* Codegen update README with solc version in config
* Codegen update README with continue-on-error flag
* Codegen add continue-on-error flag for storage mode
* Codegen generate gitignore and license for watchers
* Codegen refactor gitignore and license generation utils
---------
Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
* Add --continue-on-error flag to codegen for skipping unhandled data types
* Use solc version defined in config
* Fix codegen log for unhandled array types
* Log solc compilation errors
---------
Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>