Giveth / giveth-bridge

Giveth bridge
GNU General Public License v3.0
12 stars 6 forks source link

Foreign node request timeout makes bridge not work after #23

Open aminlatifi opened 3 years ago

aminlatifi commented 3 years ago

Request to xdai node timed out and after that bridge didn't make any tx Bridge logs

2021-07-13 08:30: debug: ForeignBridge tx error -> message=Returned error: Timeout, stack=Error: Returned error: Timeout
    at Object.ErrorResponse (/home/deploy/giveth-bridge-cstoken/node_modules/web3-core-helpers/lib/errors.js:28:19)
    at /home/deploy/giveth-bridge-cstoken/node_modules/web3-core-requestmanager/lib/index.js:303:36
    at XMLHttpRequest.request.onreadystatechange (/home/deploy/giveth-bridge-cstoken/node_modules/web3-providers-http/lib/index.js:98:13)
    at XMLHttpRequestEventTarget.dispatchEvent (/home/deploy/giveth-bridge-cstoken/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (/home/deploy/giveth-bridge-cstoken/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpResponseEnd (/home/deploy/giveth-bridge-cstoken/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
    at IncomingMessage.<anonymous> (/home/deploy/giveth-bridge-cstoken/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
    at IncomingMessage.emit (events.js:203:15)
    at IncomingMessage.EventEmitter.emit (domain.js:448:20)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19), data=Nethermind.JsonRpc.Modules.ModuleRentalTimeoutException: Unable to rent an instance of IEthRpcModule. Too many concurrent requests.
   at Nethermind.JsonRpc.Modules.BoundedModulePool`1.SlowPath() in /src/Nethermind/Nethermind.JsonRpc/Modules/BoundedModulePool.cs:line 58
   at Nethermind.JsonRpc.Modules.RpcModuleProvider.<>c__DisplayClass15_0`1.<<Register>b__0>d.MoveNext() in /src/Nethermind/Nethermind.JsonRpc/Modules/RpcModuleProvider.cs:line 74
--- End of stack trace from previous location ---
   at Nethermind.JsonRpc.JsonRpcService.ExecuteAsync(JsonRpcRequest request, String methodName, ValueTuple`2 method, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 162
   at Nethermind.JsonRpc.JsonRpcService.ExecuteRequestAsync(JsonRpcRequest rpcRequest, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 115
   at Nethermind.JsonRpc.JsonRpcService.SendRequestAsync(JsonRpcRequest rpcRequest, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 105
2021-07-13 08:30: debug: Releasing nonce: -1 isHomeTx: false broadcasted: false
2021-07-13 08:30: You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
Error: attempting to release nonce, but the provided nonce should not have a lock
    at _default.releaseNonce (/home/deploy/giveth-bridge-cstoken/lib/NonceTracker.js:61:15)
    at Relayer._callee$ (/home/deploy/giveth-bridge-cstoken/lib/Relayer.js:196:37)
    at tryCatch (/home/deploy/giveth-bridge-cstoken/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/deploy/giveth-bridge-cstoken/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.throw (/home/deploy/giveth-bridge-cstoken/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/home/deploy/giveth-bridge-cstoken/lib/Relayer.js:48:103)
    at _throw (/home/deploy/giveth-bridge-cstoken/lib/Relayer.js:50:291)
.
.
.
.

2021-07-13 08:36: debug: ForeignBridge tx error -> message=Returned error: Timeout, stack=Error: Returned error: Timeout
    at Object.ErrorResponse (/home/deploy/giveth-bridge-cstoken/node_modules/web3-core-helpers/lib/errors.js:28:19)
    at /home/deploy/giveth-bridge-cstoken/node_modules/web3-core-requestmanager/lib/index.js:303:36
    at XMLHttpRequest.request.onreadystatechange (/home/deploy/giveth-bridge-cstoken/node_modules/web3-providers-http/lib/index.js:98:13)
    at XMLHttpRequestEventTarget.dispatchEvent (/home/deploy/giveth-bridge-cstoken/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (/home/deploy/giveth-bridge-cstoken/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpResponseEnd (/home/deploy/giveth-bridge-cstoken/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
    at IncomingMessage.<anonymous> (/home/deploy/giveth-bridge-cstoken/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
    at IncomingMessage.emit (events.js:203:15)
    at IncomingMessage.EventEmitter.emit (domain.js:448:20)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19), data=Nethermind.JsonRpc.Modules.ModuleRentalTimeoutException: Unable to rent an instance of IEthRpcModule. Too many concurrent requests.
   at Nethermind.JsonRpc.Modules.BoundedModulePool`1.SlowPath() in /src/Nethermind/Nethermind.JsonRpc/Modules/BoundedModulePool.cs:line 58
   at Nethermind.JsonRpc.Modules.RpcModuleProvider.<>c__DisplayClass15_0`1.<<Register>b__0>d.MoveNext() in /src/Nethermind/Nethermind.JsonRpc/Modules/RpcModuleProvider.cs:line 74
--- End of stack trace from previous location ---
   at Nethermind.JsonRpc.JsonRpcService.ExecuteAsync(JsonRpcRequest request, String methodName, ValueTuple`2 method, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 162
   at Nethermind.JsonRpc.JsonRpcService.ExecuteRequestAsync(JsonRpcRequest rpcRequest, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 115
   at Nethermind.JsonRpc.JsonRpcService.SendRequestAsync(JsonRpcRequest rpcRequest, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 105
2021-07-13 08:36: debug: Releasing nonce: -1 isHomeTx: false broadcasted: false
2021-07-13 08:36: (node:13513) UnhandledPromiseRejectionWarning: Error: attempting to release nonce, but the provided nonce should not have a lock
    at _default.releaseNonce (/home/deploy/giveth-bridge-cstoken/lib/NonceTracker.js:61:15)
    at Relayer._callee$ (/home/deploy/giveth-bridge-cstoken/lib/Relayer.js:196:37)
    at tryCatch (/home/deploy/giveth-bridge-cstoken/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/deploy/giveth-bridge-cstoken/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.throw (/home/deploy/giveth-bridge-cstoken/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/home/deploy/giveth-bridge-cstoken/lib/Relayer.js:48:103)
    at _throw (/home/deploy/giveth-bridge-cstoken/lib/Relayer.js:50:291)
2021-07-13 08:36: (node:13513) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 612)
2021-07-13 08:36: (node:13513) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
aminlatifi commented 3 years ago

It has happened today for cslove bridge (mainnet -> rinkeby) too!

2021-07-13 08:30: debug: ForeignBridge tx error -> message=Returned error: Timeout, stack=Error: Returned error: Timeout
    at Object.ErrorResponse (/home/deploy/giveth-bridge-cslove/node_modules/web3-core-helpers/lib/errors.js:28:19)
    at /home/deploy/giveth-bridge-cslove/node_modules/web3-core-requestmanager/lib/index.js:303:36
    at XMLHttpRequest.request.onreadystatechange (/home/deploy/giveth-bridge-cslove/node_modules/web3-providers-http/lib/index.js:98:13)
    at XMLHttpRequestEventTarget.dispatchEvent (/home/deploy/giveth-bridge-cslove/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (/home/deploy/giveth-bridge-cslove/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpResponseEnd (/home/deploy/giveth-bridge-cslove/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
    at IncomingMessage.<anonymous> (/home/deploy/giveth-bridge-cslove/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
    at IncomingMessage.emit (events.js:203:15)
    at IncomingMessage.EventEmitter.emit (domain.js:448:20)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19), data=Nethermind.JsonRpc.Modules.ModuleRentalTimeoutException: Unable to rent an instance of IEthRpcModule. Too many concurrent requests.
   at Nethermind.JsonRpc.Modules.BoundedModulePool`1.SlowPath() in /src/Nethermind/Nethermind.JsonRpc/Modules/BoundedModulePool.cs:line 58
   at Nethermind.JsonRpc.Modules.RpcModuleProvider.<>c__DisplayClass15_0`1.<<Register>b__0>d.MoveNext() in /src/Nethermind/Nethermind.JsonRpc/Modules/RpcModuleProvider.cs:line 74
--- End of stack trace from previous location ---
   at Nethermind.JsonRpc.JsonRpcService.ExecuteAsync(JsonRpcRequest request, String methodName, ValueTuple`2 method, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 162
   at Nethermind.JsonRpc.JsonRpcService.ExecuteRequestAsync(JsonRpcRequest rpcRequest, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 115
   at Nethermind.JsonRpc.JsonRpcService.SendRequestAsync(JsonRpcRequest rpcRequest, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 105
2021-07-13 08:30: debug: Releasing nonce: -1 isHomeTx: false broadcasted: false
2021-07-13 08:30: You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
Error: attempting to release nonce, but the provided nonce should not have a lock
    at _default.releaseNonce (/home/deploy/giveth-bridge-cslove/lib/NonceTracker.js:61:15)
    at Relayer._callee$ (/home/deploy/giveth-bridge-cslove/lib/Relayer.js:270:37)
    at tryCatch (/home/deploy/giveth-bridge-cslove/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/deploy/giveth-bridge-cslove/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.throw (/home/deploy/giveth-bridge-cslove/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/home/deploy/giveth-bridge-cslove/lib/Relayer.js:50:103)
    at _throw (/home/deploy/giveth-bridge-cslove/lib/Relayer.js:52:291)
2021-07-13 08:30: debug: ForeignBridge tx error -> message=Returned error: Timeout, stack=Error: Returned error: Timeout
    at Object.ErrorResponse (/home/deploy/giveth-bridge-cslove/node_modules/web3-core-helpers/lib/errors.js:28:19)
    at /home/deploy/giveth-bridge-cslove/node_modules/web3-core-requestmanager/lib/index.js:303:36
    at XMLHttpRequest.request.onreadystatechange (/home/deploy/giveth-bridge-cslove/node_modules/web3-providers-http/lib/index.js:98:13)
    at XMLHttpRequestEventTarget.dispatchEvent (/home/deploy/giveth-bridge-cslove/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (/home/deploy/giveth-bridge-cslove/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpResponseEnd (/home/deploy/giveth-bridge-cslove/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
    at IncomingMessage.<anonymous> (/home/deploy/giveth-bridge-cslove/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
    at IncomingMessage.emit (events.js:203:15)
    at IncomingMessage.EventEmitter.emit (domain.js:448:20)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19), data=Nethermind.JsonRpc.Modules.ModuleRentalTimeoutException: Unable to rent an instance of IEthRpcModule. Too many concurrent requests.
   at Nethermind.JsonRpc.Modules.BoundedModulePool`1.SlowPath() in /src/Nethermind/Nethermind.JsonRpc/Modules/BoundedModulePool.cs:line 58
   at Nethermind.JsonRpc.Modules.RpcModuleProvider.<>c__DisplayClass15_0`1.<<Register>b__0>d.MoveNext() in /src/Nethermind/Nethermind.JsonRpc/Modules/RpcModuleProvider.cs:line 74
--- End of stack trace from previous location ---
   at Nethermind.JsonRpc.JsonRpcService.ExecuteAsync(JsonRpcRequest request, String methodName, ValueTuple`2 method, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 162
   at Nethermind.JsonRpc.JsonRpcService.ExecuteRequestAsync(JsonRpcRequest rpcRequest, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 115
   at Nethermind.JsonRpc.JsonRpcService.SendRequestAsync(JsonRpcRequest rpcRequest, JsonRpcContext context) in /src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 105
2021-07-13 08:30: debug: Releasing nonce: -1 isHomeTx: false broadcasted: false
2021-07-13 08:30: (node:29360) UnhandledPromiseRejectionWarning: Error: attempting to release nonce, but the provided nonce should not have a lock
    at _default.releaseNonce (/home/deploy/giveth-bridge-cslove/lib/NonceTracker.js:61:15)
    at Relayer._callee$ (/home/deploy/giveth-bridge-cslove/lib/Relayer.js:270:37)
    at tryCatch (/home/deploy/giveth-bridge-cslove/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/deploy/giveth-bridge-cslove/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.throw (/home/deploy/giveth-bridge-cslove/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/home/deploy/giveth-bridge-cslove/lib/Relayer.js:50:103)
    at _throw (/home/deploy/giveth-bridge-cslove/lib/Relayer.js:52:291)
2021-07-13 08:30: (node:29360) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 259)