diff --git a/packages/blocks-watcher/.gitignore b/packages/blocks-watcher/.gitignore index 1c88d0a..549d70b 100644 --- a/packages/blocks-watcher/.gitignore +++ b/packages/blocks-watcher/.gitignore @@ -1,7 +1,8 @@ node_modules/ dist/ out/ -gql-logs/ .vscode .idea + +gql-logs/ diff --git a/packages/blocks-watcher/.husky/pre-commit b/packages/blocks-watcher/.husky/pre-commit old mode 100644 new mode 100755 diff --git a/packages/blocks-watcher/environments/local.toml b/packages/blocks-watcher/environments/local.toml index 2f2b3c2..1a21317 100644 --- a/packages/blocks-watcher/environments/local.toml +++ b/packages/blocks-watcher/environments/local.toml @@ -93,6 +93,9 @@ subgraphEventsOrder = true blockDelayInMilliSecs = 2000 + # Number of blocks by which block processing lags behind head + blockProcessingOffset = 16 + # Boolean to switch between modes of processing events when starting the server. # Setting to true will fetch filtered events and required blocks in a range of blocks and then process them. # Setting to false will fetch blocks consecutively with its events and then process them (Behaviour is followed in realtime processing near head). diff --git a/packages/blocks-watcher/package.json b/packages/blocks-watcher/package.json index a4d23e3..677d6e0 100644 --- a/packages/blocks-watcher/package.json +++ b/packages/blocks-watcher/package.json @@ -29,7 +29,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cerc-io/watcher-ts.git" + "url": "https://github.com/cerc-io/watcher-ts.git" }, "author": "", "license": "AGPL-3.0", @@ -39,11 +39,11 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.3.19", - "@cerc-io/cli": "^0.2.94", - "@cerc-io/ipld-eth-client": "^0.2.94", - "@cerc-io/solidity-mapper": "^0.2.94", - "@cerc-io/util": "^0.2.94", - "@cerc-io/graph-node": "^0.2.94", + "@cerc-io/cli": "^0.2.97", + "@cerc-io/ipld-eth-client": "^0.2.97", + "@cerc-io/solidity-mapper": "^0.2.97", + "@cerc-io/util": "^0.2.97", + "@cerc-io/graph-node": "^0.2.97", "@ethersproject/providers": "^5.4.4", "debug": "^4.3.1", "decimal.js": "^10.3.1", @@ -71,6 +71,7 @@ "eslint-plugin-standard": "^5.0.0", "husky": "^7.0.2", "ts-node": "^10.2.1", - "typescript": "^5.0.2" + "typescript": "^5.0.2", + "winston": "^3.13.0" } } diff --git a/packages/blocks-watcher/src/resolvers.ts b/packages/blocks-watcher/src/resolvers.ts index e209f6f..c611715 100644 --- a/packages/blocks-watcher/src/resolvers.ts +++ b/packages/blocks-watcher/src/resolvers.ts @@ -67,6 +67,8 @@ const executeAndRecordMetrics = async ( apiKey: expressContext.req.header('x-api-key'), origin: expressContext.req.headers.origin }); + + throw error; } finally { endTimer(); }