* Use laconic ETH RPC endpoint for querying
* Run peer with message handler to send tx to laconic
* Handle revoke messages in mobymask p2p
* Set tx gasLimit explicitly for slow eth_estimateGas call
* Convert delegationHash to hex string before broadcasting json
* 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>
* 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>
* Pass initialization options when starting a peer
* Update config used for relay and peer nodes in watcher
* Rename types
* Refactor mobymask libp2p message parsing
* Enable laconic debug logs in server command
* Add an option to run relay node with watcher server
* Add a v2 mobymask-watcher
* Add an option to run peer node with watcher server
* Ignore ts error when importing types from peer package
* Rename mobymask v2 watcher
* Parse mobymask libp2p messages
* Refactor and add comments
* Add a note in peer package about nodejs exports
* Update copyright
* Use browser metrics package
* Get latency from heartbeat check
* Use metrics in nodejs CLI
* Avoid disconnect from primary relay on reaching limit
* Fix relay connections count
* Refactor protocol change handler
* Refactor protocol stream creation
* Refactor Peer constructor
* Refactor peer CLIs to a separate cli folder
* Move peer node setup to a separate file
* Add a getter method for primary relay node mutiaddr
* Close new relay peer connection if limit already reached
* Add an option to use a domain name for a announce address
* Update chat CLI readme
* Set port range for relay node
* Add descriptive comment
* Upgrade webrtc-direct version
* 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
* 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
* 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
* 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
* 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>
* Move graph-database from graph-node to util
* Refactor and remove graph-node dependency from cli package
* Modify dependencies using depcheck
* Implement CLI refactoring changes in other watchers
* Review changes to remove eden comment and fix local import in util
* Import GraphDatabase from util instead of graph-node
* Move graph-node non assemblyscript code to util package
* Implement CLI refactoring changes in codegen
* Fix graph-node tests after refactoring
* Move fromStateEntityValues to graph state utils
* Use watch-contract CLI from cli package in codegen
* Use reset CLIs from cli package in codegen
* Use create checkpoint CLI from cli package in codegen
* Use inspect-cid CLI from cli package in codegen
* Use import state CLI from cli package in codegen
* Use export-state and verify-checkpoint CLI from cli package in codegen
* Use server CLI from cli package in codegen
* Use job-runner CLI from cli package in codegen
* Use index-block CLI from cli package in codegen
* Use fill CLI from cli package in codegen
* Minor codegen fixes
* Update watcher instructions to run job-runner before server
* Refactor fill CLI to cli package
* Refactor method to fill-state to graph-node
* Refactor fill-state CLI to cli package
* Move subgraph state utils to a separate file
* Refactor subgraph state helper methods to graph-node
* Update mock indexer
* Move watcher job-runner to util
* Remove mock server and data from erc20-watcher
* Import watcher job-runner from util
* Refactor reset CLIs to cli package
* Use reset CLIs from cli package in watchers
* Fix method to canonicalize latest entities
* Use composition with common code for refactored CLIs
* Refactor watch-contract CLI to cli package
* Use watch-contract from cli in eden and erc721 watchers
* Use watch-contract from cli in all watchers
* Pass an object containing clients to refactored CLI
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
* Ignore watch contract jobs in event processing complete handler
* Update job-queue config and handle errors on job completion hook
* Update graph decimal implementation
* Return generic type from method to read watcher config
* Export fill prefetch batch size default value
* Upgrade apollo server to v3 in eden-watcher
* Upgrade apollo server to v3 in other watchers and codegen
* Refactor common server code to util
* Pass express application object in the method to create server
* Remove unnecessary import
* Add flag to load relations sequentially or concurrently
* Fix database init in graph-node test
* Fix graph-node watcher query method and add changes to codegen
* Reset watcher to previous indexed block before start
* Implement changes in other watchers
* Save successfully fetched blocks and events to prefetch cache
* Add unique query for transaction table
* Check db for blocks before fetching from eth-server
* Show all mismatches at a block
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
* Avoid refetching block while fetching events
* Prefetch a batch of blocks with events while indexing
* Update mock indexer used in graph-node testing
* Process available blocks while prefetching
* Refactor events fetching to a method in util
* Move method to get GQL event query result to util
* Remove support for pushing state to IPFS
* Move job handlers for state creation to util
* Rename state creation related methods and objects
* Update mock indexer used in graph-node testing
* Fetch and merge diffs in batches while creating a state checkpoint
* Fix timing logs while for state checkpoint creation
* Refactor method to get state query result to util
* Accept contracts for state verification in compare CLI config
* Make method to update state status map synchronous
* Clear cache of latest entities on event processing error
* Remove lighthouse-watcher and update ethersjs version
* Handle GraphDecimal type in state entity
* Add option for comparing all entities using paginate
* Clear pruned cached entities at intervals
* Move ipld-demo to graph-node package and remove reset-dbs script
* Implement changes in all watchers and codegen
* Prefetch blocks along with events in memory
* Fix prefetched block destructuring
* Wait while blocks are being prefetched
* Retry only if block not returned by upstream eth-server
* Log time taken to prefetch blocks
* Avoid creating a separate job for prefetching blocks
* Skip syncStatus check while fetching blocks
* Convert block number string to number for comparison
* Prefetch blocks in a batch only when required
* Keep existing pattern for watchers in this repo
* Fix logging while fetching a batch of blocks
* Changes to use util from uniswap-watcher
* Refactor ResultIPLDBlock to util
* Verify state in compare CLI for uniswap multiple queries
* Prepare watcher-ts for publishing packages
* Fix verify state in compare CLI for multiple entities query
* Fix codegen util imports
* Load relations according to GQL query
* Implement cache for latest entities to used in mapping code
* Add metrics for cache hit and fix caching pruned entities
* Changes in codegen and graph-test-watcher
* Remove entity load counter reset to zero
* Import entities from checkpoint
* Fix IPLD state when updating subgraph entity
* Changes in codegen and other watchers
* Update IPLD state with all Block entities
* Add verify and create sub commands to checkpoint
* Add option for specifying snapshot block in export state CLI
* Check endBlock greater than chainHeadBlock in fill blocks CLI
* Load relations for single entity with limit 100
* Use single tx query runner for entity GQL query
* Remove assert for CLI input checks
* Add a CLI to fill state for a given range
* Refactor code
* Add a CLI to reset IPLD state
* Replace ORDER BY clause in the query to get latest IPLD block
* Optimize delete query in CLI to reset IPLD state
* Add an option to decouple subgraph state creation from mapping code
* Use a raw SQL query to delete IPLD blocks in a block range
* Accomodate changes in codegen
* Prefetch block size from eth_blockByHash
* Fix updating of blockSizeMapLatestHeight
* Move block size caching to separate file
* Remove timer logs from graph-node store set and get
* Implement graceful shutdown in job-runner
* Improve reset CLI delete query
* Exit job-runner immediately in development
* Implement changes in other watchers
* Update fill prefetch CLI to accept env variables
* Clean up assets before building util package
* Accomodate change in other watchers and codegen
* Add logs for debugging failing test in CI
* Implement query for multiple entities in eden-watcher
* Implement nested relation queries
* Implement GQL query params first, skip, orderBy, orderDirection
* Add blockNumber index to subgraph entities
* Add logs for timing eth-calls and storage calls
* Add prometheus metrics to monitor GQL queries
* Fix default limit and order of 1-N related field in GQL entitiy query
* Add timer logs for block processing
* Run transpiled js in all watchers
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
* Compare IPLD state entity without derived fields
* Apply default limit to array relation fields in IPLD state entity
* Mark block as complete after processing of block handler
* Avoid re processing of block handler
* Use LIMIT 1 in the query to get latest IPLD block
* Replace eth_calls in eden-watcher with getStorageValue
* Add checkpoint verification to export state CLI
* Fix get diff blocks query when creating checkpoint
* Fix subgraph staker sort and remove entities sequentially in reset CLI
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
* Add test package
* Add a separate command to perform an eth-call
* Add snapshot test suite
* Add eth-calls for UniswapV2 Pair, USDC, Compound, Dai contracts
* Add args for Uniswap and USDC contracts
* Add args for Compound and Dai contracts
* Add getStorageAt calls to the test suite
* Refactor code and add documentation
* Loop over test slots for getStorageAt calls
* Add support for individual calls
* Use debug for logging
* Change compare CLI to verify only updated entities
* Implement IPLD state verification in compare CLI
* Changes to IPLD state to match with GQL result entity
* Implement storage call in subgraph mapping code
* Add test for mapping type variable storage call
* Use vulcanize graph-ts
* Revert to graph-ts version 0.22.1
* Make sumStaked variable local in eden network mapping
* Implement compare CLI to fetch and query by ids
* Set filterLogs to true for eden-watcher
* Use varchar for bigint array type in eden-watcher
* Store subgraph entities by id in IPLD state
* Store bigint vales as string in IPLD state
* Update eden watcher hook to store single Block entity in IPLD checkpoint
* Fix entity enum type property
* Fix parsing big numbers in event params
* Fix event bigint params parsing in all watchers
* Set default limit to query result and process block after events
* Add prometheus metrics endpoint in watcher
* Add event, sync status and DB size metrics
* Fix subgraph watchers DB entities directory path
* Make watcher metrics optional using config
* Update codegen with index-block CLI and remove graph-node
* Add filter logs by contract flag
* Skip generating GQL API for immutable variables
* Add config for maxEventsBlockRange
* Add new flags in existing watchers
* Remove using graph-node from mobymask-watcher
* Parse batched transactions for MobyMask events
* Update to use same ethers package version
* Add CLI for processing block out of order
* Fix job-runner for already processed blocks out of order
* Use stack-orchestrator for erc721-watcher demo
* Run all services in stack-orchestrator with auto mining of blocks
* Add step to check docker-compose version
* Update demo for IPLD blocks
* Add update for custom properties in state diff
* Implement custom update of transfer counter in state diff
* Comment code for updating custom state prop
* Separate markdown for erc721-watcher Demo
* Run workflow on main branch commit
* Implement data source templates
* Remove optional param from wasm instantiate
* Add all types for solidity to typescript mapping
* Set contract address in context for data source templates
* Implement block handlers for data source templates
* Implement ethereum ABI encode in subgraph
* Implement ethereum ABI decoding host API
* Implement ABI encode decode for array type
* Implement ABI encode decode for bytes type
* Parse events for multiple contracts in the generated code
* Use contract wise artifacts in the generated indexer methods
* Update codegen docs to use config file to generate a watcher
* Add watcher generation config to eden-watcher