From 6e1a2a7ee91f4b8a5c8de9e819981214f29f7a12 Mon Sep 17 00:00:00 2001 From: Nabarun Date: Sat, 8 Jun 2024 16:31:02 +0530 Subject: [PATCH 1/4] Upgrade watcher package versions to delay processing --- environments/local.toml | 2 +- package.json | 12 +++--- src/resolvers.ts | 2 + yarn.lock | 94 ++++++++++++++++++++--------------------- 4 files changed, 56 insertions(+), 54 deletions(-) diff --git a/environments/local.toml b/environments/local.toml index 1ba34d8..ee82b24 100644 --- a/environments/local.toml +++ b/environments/local.toml @@ -90,7 +90,7 @@ jobDelayInMilliSecs = 100 eventsInBatch = 50 subgraphEventsOrder = true - blockDelayInMilliSecs = 2000 + blockDelayInMilliSecs = 30000 # 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. diff --git a/package.json b/package.json index 15c2407..f7c4095 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/ajna-watcher-ts", - "version": "0.1.12", + "version": "0.1.13", "description": "ajna-watcher-ts", "private": true, "main": "dist/index.js", @@ -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.96", + "@cerc-io/ipld-eth-client": "^0.2.96", + "@cerc-io/solidity-mapper": "^0.2.96", + "@cerc-io/util": "^0.2.96", + "@cerc-io/graph-node": "^0.2.96", "@ethersproject/providers": "^5.4.4", "debug": "^4.3.1", "decimal.js": "^10.3.1", diff --git a/src/resolvers.ts b/src/resolvers.ts index 4a7e98f..3648f63 100644 --- a/src/resolvers.ts +++ b/src/resolvers.ts @@ -133,6 +133,8 @@ const executeAndRecordMetrics = async ( apiKey: expressContext.req.header('x-api-key'), origin: expressContext.req.headers.origin }); + + throw error; } finally { endTimer(); } diff --git a/yarn.lock b/yarn.lock index 81ef1f5..68dce23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -199,10 +199,10 @@ binaryen "101.0.0-nightly.20210723" long "^4.0.0" -"@cerc-io/cache@^0.2.94": - version "0.2.94" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcache/-/0.2.94/cache-0.2.94.tgz#e1557bfc3c85ebe3b83f24c79b55c7324797e7ed" - integrity sha512-9NBMd+19aBs3lgiie0X6TJizcn7yBCfEXXlbvMvac9SgYDPcloU+ghauQephAxayRjaWkrgjjfEWR/I0x6FwqA== +"@cerc-io/cache@^0.2.96": + version "0.2.96" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcache/-/0.2.96/cache-0.2.96.tgz#93bdef1d1bc87cf0c52979f8a9aec3065db5e1bc" + integrity sha512-Q+ESew2+qTxNrEcBnQiogCxI1UN6nDllAv8KFnxwD+C6oY/JjAMtDLbSHw+Er/OVwqhpMF0UUXzkIPI4qmGfDA== dependencies: canonical-json "^0.0.4" debug "^4.3.1" @@ -210,19 +210,19 @@ fs-extra "^10.0.0" level "^7.0.0" -"@cerc-io/cli@^0.2.94": - version "0.2.94" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcli/-/0.2.94/cli-0.2.94.tgz#f193165a4b85174c48150051ea4b0e3df57fdf9e" - integrity sha512-aJGzH630bhYca74efVEU37sCjxRLmERDObzNpKIjbmYjKPg6urMbYI8gs33R2HIS/FUOMS39F5B9NMwgCQd/Vw== +"@cerc-io/cli@^0.2.96": + version "0.2.96" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcli/-/0.2.96/cli-0.2.96.tgz#ffc44af774dfe7022f8d15e35dbc112c6e4a8b52" + integrity sha512-ps7bmGwRQscQ8ZT7noId+KQdZA4l0SCa7jAGx/EoGF+KNTMVy1YsPpUSuccqjFRp4BzWj2ZOnE4WMJycVXWVMQ== dependencies: "@apollo/client" "^3.7.1" - "@cerc-io/cache" "^0.2.94" - "@cerc-io/ipld-eth-client" "^0.2.94" + "@cerc-io/cache" "^0.2.96" + "@cerc-io/ipld-eth-client" "^0.2.96" "@cerc-io/libp2p" "^0.42.2-laconic-0.1.4" "@cerc-io/nitro-node" "^0.1.15" - "@cerc-io/peer" "^0.2.94" - "@cerc-io/rpc-eth-client" "^0.2.94" - "@cerc-io/util" "^0.2.94" + "@cerc-io/peer" "^0.2.96" + "@cerc-io/rpc-eth-client" "^0.2.96" + "@cerc-io/util" "^0.2.96" "@ethersproject/providers" "^5.4.4" "@graphql-tools/utils" "^9.1.1" "@ipld/dag-cbor" "^8.0.0" @@ -243,16 +243,16 @@ typeorm "0.2.37" yargs "^17.0.1" -"@cerc-io/graph-node@^0.2.94": - version "0.2.94" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fgraph-node/-/0.2.94/graph-node-0.2.94.tgz#e8d346daa9e7733098d039d27e7d575e0f978b20" - integrity sha512-bGqv/5dq2saBcekA/YqDcepvRaZVIMPXt/lDEcP+8lXmavImXO1sdnut7JyMDQCy3DNKXT6IGADPM/olUwnDPQ== +"@cerc-io/graph-node@^0.2.96": + version "0.2.96" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fgraph-node/-/0.2.96/graph-node-0.2.96.tgz#d7f372f8487c87527e14131fb1d71590054c3ef0" + integrity sha512-NOx+kKK+OKZjElYupRPBbyKNQ2l6avobXUDh6cZtYxPWTkpbFyDgyTi5N97OdCNqTY0x788MMxTA6VQBkhTViw== dependencies: "@apollo/client" "^3.3.19" "@cerc-io/assemblyscript" "0.19.10-watcher-ts-0.1.2" - "@cerc-io/cache" "^0.2.94" - "@cerc-io/ipld-eth-client" "^0.2.94" - "@cerc-io/util" "^0.2.94" + "@cerc-io/cache" "^0.2.96" + "@cerc-io/ipld-eth-client" "^0.2.96" + "@cerc-io/util" "^0.2.96" "@types/json-diff" "^0.5.2" "@types/yargs" "^17.0.0" bn.js "^4.11.9" @@ -269,14 +269,14 @@ typeorm-naming-strategies "^2.0.0" yargs "^17.0.1" -"@cerc-io/ipld-eth-client@^0.2.94": - version "0.2.94" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fipld-eth-client/-/0.2.94/ipld-eth-client-0.2.94.tgz#22f79eaf82da60a25d8f89f23cf45581c012d6ff" - integrity sha512-IOOZrryZ3M7ndhk8N9NeRaXvzC8eU2OS0z7fVL0xZ/h3Ei4D+dz8fVJbCvgGRB6mJadrMXYyhahOtEAJYxjNHg== +"@cerc-io/ipld-eth-client@^0.2.96": + version "0.2.96" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fipld-eth-client/-/0.2.96/ipld-eth-client-0.2.96.tgz#5baa23fdf24cd502a636ce794221070acf8a48a3" + integrity sha512-g8e1voATy4BsG0tJ65kv4+HwSBve3sNv0Qw9PlBFHp3bz4N8ra2fW55vH1cWd0aXxhH+L9FXYO/UGDnhzDLvGQ== dependencies: "@apollo/client" "^3.7.1" - "@cerc-io/cache" "^0.2.94" - "@cerc-io/util" "^0.2.94" + "@cerc-io/cache" "^0.2.96" + "@cerc-io/util" "^0.2.96" cross-fetch "^3.1.4" debug "^4.3.1" ethers "^5.4.4" @@ -429,10 +429,10 @@ unique-names-generator "^4.7.1" yargs "^17.0.1" -"@cerc-io/peer@^0.2.94": - version "0.2.94" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fpeer/-/0.2.94/peer-0.2.94.tgz#c8776a9968b32d96fb91ed2a2c6d4b62b365e4a0" - integrity sha512-QQANziPnT08guAD/Nwy/HoqgIIX+w1+GS2bOUE4hfS+LJmTiZ+Zquiqcj69qGQeMQxfiUHmsBPttioF+B9rp/A== +"@cerc-io/peer@^0.2.96": + version "0.2.96" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fpeer/-/0.2.96/peer-0.2.96.tgz#3de10d2f4792a358baa122a2acc6f6758595e087" + integrity sha512-OKoFhDmFVYWOCUHBBmNYVKdBHUEC15nnKPQQ/kG+LQbS/Dg1FYC0sO7GQWrHApa1B6yXS8RLwoGjaXuoJhpt+A== dependencies: "@cerc-io/libp2p" "^0.42.2-laconic-0.1.4" "@cerc-io/prometheus-metrics" "1.1.4" @@ -471,23 +471,23 @@ it-stream-types "^1.0.4" promjs "^0.4.2" -"@cerc-io/rpc-eth-client@^0.2.94": - version "0.2.94" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Frpc-eth-client/-/0.2.94/rpc-eth-client-0.2.94.tgz#0c4f679abacf0aed831cbd295d21780f2a3dd17a" - integrity sha512-S3UvHO7Qb4Z43+fArMbrs78CP8l81D5Ootd225MQ2//TGmu9QsIK9+oqdI1CIVAQCbxI7QAStzdz76Y0px2iFA== +"@cerc-io/rpc-eth-client@^0.2.96": + version "0.2.96" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Frpc-eth-client/-/0.2.96/rpc-eth-client-0.2.96.tgz#ec0fa853839c73df6d2959a2f84fb4bad181f5e0" + integrity sha512-ejDV/OlvYrhL98njSMVkyXHxYBMm5LOoMEeS1RiawR/yPYvVJgpaWdWnm607uPYQiqBxdYwq9PNZr49Lt4ZfhQ== dependencies: - "@cerc-io/cache" "^0.2.94" - "@cerc-io/ipld-eth-client" "^0.2.94" - "@cerc-io/util" "^0.2.94" + "@cerc-io/cache" "^0.2.96" + "@cerc-io/ipld-eth-client" "^0.2.96" + "@cerc-io/util" "^0.2.96" chai "^4.3.4" ethers "^5.4.4" left-pad "^1.3.0" mocha "^8.4.0" -"@cerc-io/solidity-mapper@^0.2.94": - version "0.2.94" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fsolidity-mapper/-/0.2.94/solidity-mapper-0.2.94.tgz#a414653bf20fcbedd91d4a544c6a019c8a02d958" - integrity sha512-kO2xqyAeq2+bbxBcItsT6i8qK1F0BhaYPzV1tTNXgGbkp3j1do86mc6IeTEeV6J/8e9EaeRBsOSQOdGOHUjcDA== +"@cerc-io/solidity-mapper@^0.2.96": + version "0.2.96" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fsolidity-mapper/-/0.2.96/solidity-mapper-0.2.96.tgz#d51ff5ee8922b5271038ac127186005845ea62f9" + integrity sha512-bISnByQJhlNQgP7KTDQAlWvyjBJlcNHSg2d3XuvZeloxoLjtmQXD2WgZhyeQ6iS2FVKAmeRJQKGdpQmxhNk4xA== dependencies: dotenv "^10.0.0" @@ -496,15 +496,15 @@ resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fts-channel/-/1.0.3-ts-nitro-0.1.1/ts-channel-1.0.3-ts-nitro-0.1.1.tgz#0768781313a167295c0bf21307f47e02dc17e936" integrity sha512-2jFICUSyffuZ+8+qRhXuLSJq4GJ6Y02wxiXoubH0Kzv2lIKkJtWICY1ZQQhtXAvP0ncAQB85WJHqtqwH8l7J3Q== -"@cerc-io/util@^0.2.94": - version "0.2.94" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Futil/-/0.2.94/util-0.2.94.tgz#5d4c8046cf44641eac39a6f6ee11f2eb8b298c1f" - integrity sha512-4B1RkUKZoRMVVxWK5u+5d3GEmn0IN1FoAbkfCsBXMTH+OGI+VVGg6bRozaluy7pegpwDh1KtiH0A7NFjUup4OQ== +"@cerc-io/util@^0.2.96": + version "0.2.96" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Futil/-/0.2.96/util-0.2.96.tgz#231f8a01cee04baf9e09e6233caca07ca6233dc6" + integrity sha512-sm5m6sn0/QsWpabShafx4SBZStcOpOXS+TaNZndiUELoyNinMM2ZfG8ABYAawySGOz4bwhBEoqBJ9cAxjmqW4w== dependencies: "@apollo/utils.keyvaluecache" "^1.0.1" "@cerc-io/nitro-node" "^0.1.15" - "@cerc-io/peer" "^0.2.94" - "@cerc-io/solidity-mapper" "^0.2.94" + "@cerc-io/peer" "^0.2.96" + "@cerc-io/solidity-mapper" "^0.2.96" "@cerc-io/ts-channel" "1.0.3-ts-nitro-0.1.1" "@ethersproject/properties" "^5.7.0" "@ethersproject/providers" "^5.4.4" -- 2.45.2 From 230edd61d5842413b95d4f09e47aa335d96e66df Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 10 Jun 2024 16:25:29 +0530 Subject: [PATCH 2/4] Upgrade dependencies for block processing offset option --- environments/local.toml | 3 ++ package.json | 10 ++--- yarn.lock | 94 ++++++++++++++++++++--------------------- 3 files changed, 55 insertions(+), 52 deletions(-) diff --git a/environments/local.toml b/environments/local.toml index ee82b24..7bc6160 100644 --- a/environments/local.toml +++ b/environments/local.toml @@ -92,6 +92,9 @@ subgraphEventsOrder = true blockDelayInMilliSecs = 30000 + # 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/package.json b/package.json index f7c4095..d9a0740 100644 --- a/package.json +++ b/package.json @@ -39,11 +39,11 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.3.19", - "@cerc-io/cli": "^0.2.96", - "@cerc-io/ipld-eth-client": "^0.2.96", - "@cerc-io/solidity-mapper": "^0.2.96", - "@cerc-io/util": "^0.2.96", - "@cerc-io/graph-node": "^0.2.96", + "@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", diff --git a/yarn.lock b/yarn.lock index 68dce23..7943928 100644 --- a/yarn.lock +++ b/yarn.lock @@ -199,10 +199,10 @@ binaryen "101.0.0-nightly.20210723" long "^4.0.0" -"@cerc-io/cache@^0.2.96": - version "0.2.96" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcache/-/0.2.96/cache-0.2.96.tgz#93bdef1d1bc87cf0c52979f8a9aec3065db5e1bc" - integrity sha512-Q+ESew2+qTxNrEcBnQiogCxI1UN6nDllAv8KFnxwD+C6oY/JjAMtDLbSHw+Er/OVwqhpMF0UUXzkIPI4qmGfDA== +"@cerc-io/cache@^0.2.97": + version "0.2.97" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcache/-/0.2.97/cache-0.2.97.tgz#996380c8cf842efd84ca1763720b4a4c97f2dd9f" + integrity sha512-O7qcuNt1+5ufRGFBeuWVALjFpu4oMn5OEqnhTqCLQuJ6FaosFArH7PFAYSyZfjYmE4UQRpAbzfpRj1EdhzU7Pg== dependencies: canonical-json "^0.0.4" debug "^4.3.1" @@ -210,19 +210,19 @@ fs-extra "^10.0.0" level "^7.0.0" -"@cerc-io/cli@^0.2.96": - version "0.2.96" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcli/-/0.2.96/cli-0.2.96.tgz#ffc44af774dfe7022f8d15e35dbc112c6e4a8b52" - integrity sha512-ps7bmGwRQscQ8ZT7noId+KQdZA4l0SCa7jAGx/EoGF+KNTMVy1YsPpUSuccqjFRp4BzWj2ZOnE4WMJycVXWVMQ== +"@cerc-io/cli@^0.2.97": + version "0.2.97" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcli/-/0.2.97/cli-0.2.97.tgz#6aab38e5db520ea2f600fb6cd9f64566e80d3e81" + integrity sha512-F9o1LTQx5fEHMLL4HShhplHtDGZ565+71NBwiIV1dnfqz8HOxXIRDffGRHKl56EBWWkdxNis2vMIcLz98r9RfA== dependencies: "@apollo/client" "^3.7.1" - "@cerc-io/cache" "^0.2.96" - "@cerc-io/ipld-eth-client" "^0.2.96" + "@cerc-io/cache" "^0.2.97" + "@cerc-io/ipld-eth-client" "^0.2.97" "@cerc-io/libp2p" "^0.42.2-laconic-0.1.4" "@cerc-io/nitro-node" "^0.1.15" - "@cerc-io/peer" "^0.2.96" - "@cerc-io/rpc-eth-client" "^0.2.96" - "@cerc-io/util" "^0.2.96" + "@cerc-io/peer" "^0.2.97" + "@cerc-io/rpc-eth-client" "^0.2.97" + "@cerc-io/util" "^0.2.97" "@ethersproject/providers" "^5.4.4" "@graphql-tools/utils" "^9.1.1" "@ipld/dag-cbor" "^8.0.0" @@ -243,16 +243,16 @@ typeorm "0.2.37" yargs "^17.0.1" -"@cerc-io/graph-node@^0.2.96": - version "0.2.96" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fgraph-node/-/0.2.96/graph-node-0.2.96.tgz#d7f372f8487c87527e14131fb1d71590054c3ef0" - integrity sha512-NOx+kKK+OKZjElYupRPBbyKNQ2l6avobXUDh6cZtYxPWTkpbFyDgyTi5N97OdCNqTY0x788MMxTA6VQBkhTViw== +"@cerc-io/graph-node@^0.2.97": + version "0.2.97" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fgraph-node/-/0.2.97/graph-node-0.2.97.tgz#31b49709123a513dbb043cbb05d60958973a72c0" + integrity sha512-v7PK2M4f41Z8ESm0QNaP3arGZdpMGO+Z4z3jp3+vISlzPkDdiY/Vmjzv8Sl5kI0LBm3ifziCRPxnBYJeLMj6GA== dependencies: "@apollo/client" "^3.3.19" "@cerc-io/assemblyscript" "0.19.10-watcher-ts-0.1.2" - "@cerc-io/cache" "^0.2.96" - "@cerc-io/ipld-eth-client" "^0.2.96" - "@cerc-io/util" "^0.2.96" + "@cerc-io/cache" "^0.2.97" + "@cerc-io/ipld-eth-client" "^0.2.97" + "@cerc-io/util" "^0.2.97" "@types/json-diff" "^0.5.2" "@types/yargs" "^17.0.0" bn.js "^4.11.9" @@ -269,14 +269,14 @@ typeorm-naming-strategies "^2.0.0" yargs "^17.0.1" -"@cerc-io/ipld-eth-client@^0.2.96": - version "0.2.96" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fipld-eth-client/-/0.2.96/ipld-eth-client-0.2.96.tgz#5baa23fdf24cd502a636ce794221070acf8a48a3" - integrity sha512-g8e1voATy4BsG0tJ65kv4+HwSBve3sNv0Qw9PlBFHp3bz4N8ra2fW55vH1cWd0aXxhH+L9FXYO/UGDnhzDLvGQ== +"@cerc-io/ipld-eth-client@^0.2.97": + version "0.2.97" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fipld-eth-client/-/0.2.97/ipld-eth-client-0.2.97.tgz#1ba6a774b6ee944bb6dea9977ad11b35e17a1a3e" + integrity sha512-AuH//S/IPJ1NQ2zfizBLLDHv6HEbpSliTkR+SgexzECtAZwRmbmZ9x+4fdN5EnRMS1W7LJ1FmcyXjarRBCBAiA== dependencies: "@apollo/client" "^3.7.1" - "@cerc-io/cache" "^0.2.96" - "@cerc-io/util" "^0.2.96" + "@cerc-io/cache" "^0.2.97" + "@cerc-io/util" "^0.2.97" cross-fetch "^3.1.4" debug "^4.3.1" ethers "^5.4.4" @@ -429,10 +429,10 @@ unique-names-generator "^4.7.1" yargs "^17.0.1" -"@cerc-io/peer@^0.2.96": - version "0.2.96" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fpeer/-/0.2.96/peer-0.2.96.tgz#3de10d2f4792a358baa122a2acc6f6758595e087" - integrity sha512-OKoFhDmFVYWOCUHBBmNYVKdBHUEC15nnKPQQ/kG+LQbS/Dg1FYC0sO7GQWrHApa1B6yXS8RLwoGjaXuoJhpt+A== +"@cerc-io/peer@^0.2.97": + version "0.2.97" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fpeer/-/0.2.97/peer-0.2.97.tgz#6b386a53220bb4b026337eb2ef4246b3eeb947f9" + integrity sha512-ylJslts/q6uGVlHS27GiHKYVpTTTv/4vryexxqDPA45YJRk0vCleqRDPehRQr40kCgBQjG9W92Uwcwr7HcSQxQ== dependencies: "@cerc-io/libp2p" "^0.42.2-laconic-0.1.4" "@cerc-io/prometheus-metrics" "1.1.4" @@ -471,23 +471,23 @@ it-stream-types "^1.0.4" promjs "^0.4.2" -"@cerc-io/rpc-eth-client@^0.2.96": - version "0.2.96" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Frpc-eth-client/-/0.2.96/rpc-eth-client-0.2.96.tgz#ec0fa853839c73df6d2959a2f84fb4bad181f5e0" - integrity sha512-ejDV/OlvYrhL98njSMVkyXHxYBMm5LOoMEeS1RiawR/yPYvVJgpaWdWnm607uPYQiqBxdYwq9PNZr49Lt4ZfhQ== +"@cerc-io/rpc-eth-client@^0.2.97": + version "0.2.97" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Frpc-eth-client/-/0.2.97/rpc-eth-client-0.2.97.tgz#b854a4ac3eaeeb8b67cb79963b32230c1a3f56db" + integrity sha512-b9FbiuKKYWYaDDwfABiqItazNqkXi7YdWFmJ2mLTPGfnUT7OVKFji8LcWAsmubjTQb1mVhyHPz1y+bqAvhyxHA== dependencies: - "@cerc-io/cache" "^0.2.96" - "@cerc-io/ipld-eth-client" "^0.2.96" - "@cerc-io/util" "^0.2.96" + "@cerc-io/cache" "^0.2.97" + "@cerc-io/ipld-eth-client" "^0.2.97" + "@cerc-io/util" "^0.2.97" chai "^4.3.4" ethers "^5.4.4" left-pad "^1.3.0" mocha "^8.4.0" -"@cerc-io/solidity-mapper@^0.2.96": - version "0.2.96" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fsolidity-mapper/-/0.2.96/solidity-mapper-0.2.96.tgz#d51ff5ee8922b5271038ac127186005845ea62f9" - integrity sha512-bISnByQJhlNQgP7KTDQAlWvyjBJlcNHSg2d3XuvZeloxoLjtmQXD2WgZhyeQ6iS2FVKAmeRJQKGdpQmxhNk4xA== +"@cerc-io/solidity-mapper@^0.2.97": + version "0.2.97" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fsolidity-mapper/-/0.2.97/solidity-mapper-0.2.97.tgz#a7f666b00ce7a8867746a855d92575b09f1ca5eb" + integrity sha512-hUdqZ20NYa1NpbFs7z2AiInVGxjtAznE31uydRg1A20EN9csKUJ8+FP2C7ilFnB/UdB1qFVecB3QSw9Zc7TlUg== dependencies: dotenv "^10.0.0" @@ -496,15 +496,15 @@ resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fts-channel/-/1.0.3-ts-nitro-0.1.1/ts-channel-1.0.3-ts-nitro-0.1.1.tgz#0768781313a167295c0bf21307f47e02dc17e936" integrity sha512-2jFICUSyffuZ+8+qRhXuLSJq4GJ6Y02wxiXoubH0Kzv2lIKkJtWICY1ZQQhtXAvP0ncAQB85WJHqtqwH8l7J3Q== -"@cerc-io/util@^0.2.96": - version "0.2.96" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Futil/-/0.2.96/util-0.2.96.tgz#231f8a01cee04baf9e09e6233caca07ca6233dc6" - integrity sha512-sm5m6sn0/QsWpabShafx4SBZStcOpOXS+TaNZndiUELoyNinMM2ZfG8ABYAawySGOz4bwhBEoqBJ9cAxjmqW4w== +"@cerc-io/util@^0.2.97": + version "0.2.97" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Futil/-/0.2.97/util-0.2.97.tgz#5bc0865cfda68660215d59604cf42fb6c5b74352" + integrity sha512-wtpffWlXyc3+iEgX6bSD4+fWDTVqu9ryiD8mYtb+eTcK7/gA+VsGqzeDBD7tvEa6+cLpW6PqIc8ZpsMS62dASQ== dependencies: "@apollo/utils.keyvaluecache" "^1.0.1" "@cerc-io/nitro-node" "^0.1.15" - "@cerc-io/peer" "^0.2.96" - "@cerc-io/solidity-mapper" "^0.2.96" + "@cerc-io/peer" "^0.2.97" + "@cerc-io/solidity-mapper" "^0.2.97" "@cerc-io/ts-channel" "1.0.3-ts-nitro-0.1.1" "@ethersproject/properties" "^5.7.0" "@ethersproject/providers" "^5.4.4" -- 2.45.2 From 3e1fa15ddab6c90804b081571f808ee51c2bf1ae Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Tue, 11 Jun 2024 18:53:42 +0530 Subject: [PATCH 3/4] Upgrade dependencies --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d9a0740..2adeaf7 100644 --- a/package.json +++ b/package.json @@ -39,11 +39,11 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.3.19", - "@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", + "@cerc-io/cli": "^0.2.98", + "@cerc-io/ipld-eth-client": "^0.2.98", + "@cerc-io/solidity-mapper": "^0.2.98", + "@cerc-io/util": "^0.2.98", + "@cerc-io/graph-node": "^0.2.98", "@ethersproject/providers": "^5.4.4", "debug": "^4.3.1", "decimal.js": "^10.3.1", -- 2.45.2 From f34309110de08113d37c127c91cf45fbcf06e903 Mon Sep 17 00:00:00 2001 From: Nabarun Date: Tue, 11 Jun 2024 19:13:49 +0530 Subject: [PATCH 4/4] Update yarn lock and blockProcessingOffset to 0 after eth_getLogs blockHash filter change --- environments/local.toml | 2 +- yarn.lock | 94 ++++++++++++++++++++--------------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/environments/local.toml b/environments/local.toml index 7bc6160..a3ec98d 100644 --- a/environments/local.toml +++ b/environments/local.toml @@ -93,7 +93,7 @@ blockDelayInMilliSecs = 30000 # Number of blocks by which block processing lags behind head - blockProcessingOffset = 16 + blockProcessingOffset = 0 # 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. diff --git a/yarn.lock b/yarn.lock index 7943928..08d24e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -199,10 +199,10 @@ binaryen "101.0.0-nightly.20210723" long "^4.0.0" -"@cerc-io/cache@^0.2.97": - version "0.2.97" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcache/-/0.2.97/cache-0.2.97.tgz#996380c8cf842efd84ca1763720b4a4c97f2dd9f" - integrity sha512-O7qcuNt1+5ufRGFBeuWVALjFpu4oMn5OEqnhTqCLQuJ6FaosFArH7PFAYSyZfjYmE4UQRpAbzfpRj1EdhzU7Pg== +"@cerc-io/cache@^0.2.98": + version "0.2.98" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcache/-/0.2.98/cache-0.2.98.tgz#acbd54b0e3b0379652020f3dac832ed04cf392dc" + integrity sha512-scrDlufZIs0DDehEUL+eaab4Rz2r4G2fgvy2USeY3AnItreXMgUwTUAR7pXqh3FOCuj9crNfysH09Et+49/F/w== dependencies: canonical-json "^0.0.4" debug "^4.3.1" @@ -210,19 +210,19 @@ fs-extra "^10.0.0" level "^7.0.0" -"@cerc-io/cli@^0.2.97": - version "0.2.97" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcli/-/0.2.97/cli-0.2.97.tgz#6aab38e5db520ea2f600fb6cd9f64566e80d3e81" - integrity sha512-F9o1LTQx5fEHMLL4HShhplHtDGZ565+71NBwiIV1dnfqz8HOxXIRDffGRHKl56EBWWkdxNis2vMIcLz98r9RfA== +"@cerc-io/cli@^0.2.98": + version "0.2.98" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcli/-/0.2.98/cli-0.2.98.tgz#b29046fe48260e3e465c240d0aa64da84ad2338d" + integrity sha512-d79Gm3YOLn+CEidPBHaQhm1zu873O75LnFyH7fbIOubC4cBDWQk+RdH5U+8jU4b54EPZeVRotSoo7rQ5V8HsDg== dependencies: "@apollo/client" "^3.7.1" - "@cerc-io/cache" "^0.2.97" - "@cerc-io/ipld-eth-client" "^0.2.97" + "@cerc-io/cache" "^0.2.98" + "@cerc-io/ipld-eth-client" "^0.2.98" "@cerc-io/libp2p" "^0.42.2-laconic-0.1.4" "@cerc-io/nitro-node" "^0.1.15" - "@cerc-io/peer" "^0.2.97" - "@cerc-io/rpc-eth-client" "^0.2.97" - "@cerc-io/util" "^0.2.97" + "@cerc-io/peer" "^0.2.98" + "@cerc-io/rpc-eth-client" "^0.2.98" + "@cerc-io/util" "^0.2.98" "@ethersproject/providers" "^5.4.4" "@graphql-tools/utils" "^9.1.1" "@ipld/dag-cbor" "^8.0.0" @@ -243,16 +243,16 @@ typeorm "0.2.37" yargs "^17.0.1" -"@cerc-io/graph-node@^0.2.97": - version "0.2.97" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fgraph-node/-/0.2.97/graph-node-0.2.97.tgz#31b49709123a513dbb043cbb05d60958973a72c0" - integrity sha512-v7PK2M4f41Z8ESm0QNaP3arGZdpMGO+Z4z3jp3+vISlzPkDdiY/Vmjzv8Sl5kI0LBm3ifziCRPxnBYJeLMj6GA== +"@cerc-io/graph-node@^0.2.98": + version "0.2.98" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fgraph-node/-/0.2.98/graph-node-0.2.98.tgz#06b7eb0feb1e1c4ae4e203b6007b8f0c0ac3c218" + integrity sha512-6PGVnPyRihW1f+yyU2TL61ALnsVN1f5MffmHxiJ+Co02F5t/RP7sfYjJPdT63S+W6mlwpnnmGyX0LuklOXpezQ== dependencies: "@apollo/client" "^3.3.19" "@cerc-io/assemblyscript" "0.19.10-watcher-ts-0.1.2" - "@cerc-io/cache" "^0.2.97" - "@cerc-io/ipld-eth-client" "^0.2.97" - "@cerc-io/util" "^0.2.97" + "@cerc-io/cache" "^0.2.98" + "@cerc-io/ipld-eth-client" "^0.2.98" + "@cerc-io/util" "^0.2.98" "@types/json-diff" "^0.5.2" "@types/yargs" "^17.0.0" bn.js "^4.11.9" @@ -269,14 +269,14 @@ typeorm-naming-strategies "^2.0.0" yargs "^17.0.1" -"@cerc-io/ipld-eth-client@^0.2.97": - version "0.2.97" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fipld-eth-client/-/0.2.97/ipld-eth-client-0.2.97.tgz#1ba6a774b6ee944bb6dea9977ad11b35e17a1a3e" - integrity sha512-AuH//S/IPJ1NQ2zfizBLLDHv6HEbpSliTkR+SgexzECtAZwRmbmZ9x+4fdN5EnRMS1W7LJ1FmcyXjarRBCBAiA== +"@cerc-io/ipld-eth-client@^0.2.98": + version "0.2.98" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fipld-eth-client/-/0.2.98/ipld-eth-client-0.2.98.tgz#c1a7128be1e81fb4d1ec9a9888b7e5e94ae710ac" + integrity sha512-qCnz7foqf+9+X/zEGAu5HGXlvzNwahcsKu6Rtreh8bxhR5VTuuF3KrEeFcQeL1Bhv5+w7KXs5I+ivEgo4ZvHSA== dependencies: "@apollo/client" "^3.7.1" - "@cerc-io/cache" "^0.2.97" - "@cerc-io/util" "^0.2.97" + "@cerc-io/cache" "^0.2.98" + "@cerc-io/util" "^0.2.98" cross-fetch "^3.1.4" debug "^4.3.1" ethers "^5.4.4" @@ -429,10 +429,10 @@ unique-names-generator "^4.7.1" yargs "^17.0.1" -"@cerc-io/peer@^0.2.97": - version "0.2.97" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fpeer/-/0.2.97/peer-0.2.97.tgz#6b386a53220bb4b026337eb2ef4246b3eeb947f9" - integrity sha512-ylJslts/q6uGVlHS27GiHKYVpTTTv/4vryexxqDPA45YJRk0vCleqRDPehRQr40kCgBQjG9W92Uwcwr7HcSQxQ== +"@cerc-io/peer@^0.2.98": + version "0.2.98" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fpeer/-/0.2.98/peer-0.2.98.tgz#650c771be2a3767456f38c93cb86e6667f2867ec" + integrity sha512-b8sCTzFxfTgrlscNutBzML0y4rzkZvzjCpHDEp3P4fMRHIK9SM5o8yYaPS9g1NwoedjbLKCnCDrmaIGpLEbmqA== dependencies: "@cerc-io/libp2p" "^0.42.2-laconic-0.1.4" "@cerc-io/prometheus-metrics" "1.1.4" @@ -471,23 +471,23 @@ it-stream-types "^1.0.4" promjs "^0.4.2" -"@cerc-io/rpc-eth-client@^0.2.97": - version "0.2.97" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Frpc-eth-client/-/0.2.97/rpc-eth-client-0.2.97.tgz#b854a4ac3eaeeb8b67cb79963b32230c1a3f56db" - integrity sha512-b9FbiuKKYWYaDDwfABiqItazNqkXi7YdWFmJ2mLTPGfnUT7OVKFji8LcWAsmubjTQb1mVhyHPz1y+bqAvhyxHA== +"@cerc-io/rpc-eth-client@^0.2.98": + version "0.2.98" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Frpc-eth-client/-/0.2.98/rpc-eth-client-0.2.98.tgz#005546cf25a245e60fa00b0c972239748ac1c29e" + integrity sha512-SjR621w5WxrhLsXyy17mTXo1UwvcPz9QPL4/mwQcwsvzDXoFff1bgxR7UGKInQG5QzGgwTJjAaozVqxQA1X3+g== dependencies: - "@cerc-io/cache" "^0.2.97" - "@cerc-io/ipld-eth-client" "^0.2.97" - "@cerc-io/util" "^0.2.97" + "@cerc-io/cache" "^0.2.98" + "@cerc-io/ipld-eth-client" "^0.2.98" + "@cerc-io/util" "^0.2.98" chai "^4.3.4" ethers "^5.4.4" left-pad "^1.3.0" mocha "^8.4.0" -"@cerc-io/solidity-mapper@^0.2.97": - version "0.2.97" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fsolidity-mapper/-/0.2.97/solidity-mapper-0.2.97.tgz#a7f666b00ce7a8867746a855d92575b09f1ca5eb" - integrity sha512-hUdqZ20NYa1NpbFs7z2AiInVGxjtAznE31uydRg1A20EN9csKUJ8+FP2C7ilFnB/UdB1qFVecB3QSw9Zc7TlUg== +"@cerc-io/solidity-mapper@^0.2.98": + version "0.2.98" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fsolidity-mapper/-/0.2.98/solidity-mapper-0.2.98.tgz#6fc8dfcaf872e31964a6cca1ea9fbd7900119f8a" + integrity sha512-RmGmcgN0fZEZU0r4q14qPm2hVHUK/OQVPIEgyLEbcStHXupYLaTn79li1WpURI7yeVuJ7mFVaauviWA2DeG7dw== dependencies: dotenv "^10.0.0" @@ -496,15 +496,15 @@ resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fts-channel/-/1.0.3-ts-nitro-0.1.1/ts-channel-1.0.3-ts-nitro-0.1.1.tgz#0768781313a167295c0bf21307f47e02dc17e936" integrity sha512-2jFICUSyffuZ+8+qRhXuLSJq4GJ6Y02wxiXoubH0Kzv2lIKkJtWICY1ZQQhtXAvP0ncAQB85WJHqtqwH8l7J3Q== -"@cerc-io/util@^0.2.97": - version "0.2.97" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Futil/-/0.2.97/util-0.2.97.tgz#5bc0865cfda68660215d59604cf42fb6c5b74352" - integrity sha512-wtpffWlXyc3+iEgX6bSD4+fWDTVqu9ryiD8mYtb+eTcK7/gA+VsGqzeDBD7tvEa6+cLpW6PqIc8ZpsMS62dASQ== +"@cerc-io/util@^0.2.98": + version "0.2.98" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Futil/-/0.2.98/util-0.2.98.tgz#0bed961a20d43c8973d5b86b400086caa76d2d0a" + integrity sha512-s1St/bD9OjD3NIfx3gj1tDELgpiyxGl6le3mCs77jHM4KbEHW7pFjhe/5YsLXRvc5cIHwNsrCdOuSAIyVUtC2Q== dependencies: "@apollo/utils.keyvaluecache" "^1.0.1" "@cerc-io/nitro-node" "^0.1.15" - "@cerc-io/peer" "^0.2.97" - "@cerc-io/solidity-mapper" "^0.2.97" + "@cerc-io/peer" "^0.2.98" + "@cerc-io/solidity-mapper" "^0.2.98" "@cerc-io/ts-channel" "1.0.3-ts-nitro-0.1.1" "@ethersproject/properties" "^5.7.0" "@ethersproject/providers" "^5.4.4" -- 2.45.2