Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix data sources not loading #314

Merged
merged 2 commits into from
Jun 13, 2024
Merged

Fix data sources not loading #314

merged 2 commits into from
Jun 13, 2024

Conversation

stwiname
Copy link

@stwiname stwiname commented Jun 13, 2024

Description

Fixes an issue caused from removing Flare alias which could result in either a Cannot find module or Failed to load datasource asset error.

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have tested locally
  • I have performed a self review of my changes
  • Updated any relevant documentation
  • Linked to any relevant issues
  • I have added tests relevant to my changes
  • Any dependent changes have been merged and published in downstream modules
  • My code is up to date with the base branch
  • I have updated relevant changelogs. We suggest using chan

Copy link

github-actions bot commented Jun 13, 2024

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🔴 Statements 50.38% 3246/6443
🟡 Branches 69.96% 368/526
🔴 Functions 51.94% 134/258
🔴 Lines 50.38% 3246/6443

Test suite run failed

Failed tests: 23/90. Failed suites: 3/14.
  ● rawBlockToEthBlock › successfully converts a block

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:12:09 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"109","x-kong-proxy-latency":"1","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x3e579e\",true],\"id\":42,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● rawBlockToEthBlock › can fetch receipts

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:12:09 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"109","x-kong-proxy-latency":"1","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x3e579e\",true],\"id\":42,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16


  ● ApiService › can instantiate api

    All endpoints failed to initialize. Please add healthier endpoints

      69 |     }
      70 |
    > 71 |     await this.createConnections(network, (endpoint) =>
         |     ^
      72 |       EthereumApiConnection.create(
      73 |         endpoint,
      74 |         this.nodeConfig.blockConfirmations,

      at EthereumApiService.createConnections (node_modules/@subql/node-core/src/api.service.ts:116:13)
      at EthereumApiService.init (packages/node/src/ethereum/api.service.ethereum.ts:71:5)
      at prepareApiService (packages/node/src/ethereum/api.service.ethereum.test.ts:58:3)
      at Object.<anonymous> (packages/node/src/ethereum/api.service.ethereum.test.ts:68:25)

  ● ApiService › can fetch blocks

    expect(received).resolves.toHaveLength()

    Received promise rejected instead of resolved
    Rejected to value: [Error: bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:12:15 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"120","x-kong-proxy-latency":"0","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0xbcbed7\",true],\"id\":52,\"jsonrpc\":\"2.0\"},{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0xbcbed8\",true],\"id\":53,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)]

      78 |
      79 |   it('can fetch blocks', async () => {
    > 80 |     await expect(
         |           ^
      81 |       apiService.api.fetchBlocks(range(12369621, 12369625)),
      82 |     ).resolves.toHaveLength(4);
      83 |   });

      at expect (node_modules/expect/build/index.js:105:15)
      at Object.<anonymous> (packages/node/src/ethereum/api.service.ethereum.test.ts:80:11)

  ● ApiService › can get the finalized height

    All endpoints failed to initialize. Please add healthier endpoints

      69 |     }
      70 |
    > 71 |     await this.createConnections(network, (endpoint) =>
         |     ^
      72 |       EthereumApiConnection.create(
      73 |         endpoint,
      74 |         this.nodeConfig.blockConfirmations,

      at EthereumApiService.createConnections (node_modules/@subql/node-core/src/api.service.ts:116:13)
      at EthereumApiService.init (packages/node/src/ethereum/api.service.ethereum.ts:71:5)
      at prepareApiService (packages/node/src/ethereum/api.service.ethereum.test.ts:58:3)
      at Object.<anonymous> (packages/node/src/ethereum/api.service.ethereum.test.ts:68:25)

  ● ApiService › ensure api errorCode is exposed when throwing

    All endpoints failed to initialize. Please add healthier endpoints

      69 |     }
      70 |
    > 71 |     await this.createConnections(network, (endpoint) =>
         |     ^
      72 |       EthereumApiConnection.create(
      73 |         endpoint,
      74 |         this.nodeConfig.blockConfirmations,

      at EthereumApiService.createConnections (node_modules/@subql/node-core/src/api.service.ts:116:13)
      at EthereumApiService.init (packages/node/src/ethereum/api.service.ethereum.ts:71:5)
      at prepareApiService (packages/node/src/ethereum/api.service.ethereum.test.ts:58:3)
      at Object.<anonymous> (packages/node/src/ethereum/api.service.ethereum.test.ts:68:25)

  ● ApiService › should not retry on any errors not in the retry list

    All endpoints failed to initialize. Please add healthier endpoints

      69 |     }
      70 |
    > 71 |     await this.createConnections(network, (endpoint) =>
         |     ^
      72 |       EthereumApiConnection.create(
      73 |         endpoint,
      74 |         this.nodeConfig.blockConfirmations,

      at EthereumApiService.createConnections (node_modules/@subql/node-core/src/api.service.ts:116:13)
      at EthereumApiService.init (packages/node/src/ethereum/api.service.ethereum.ts:71:5)
      at prepareApiService (packages/node/src/ethereum/api.service.ethereum.test.ts:58:3)
      at Object.<anonymous> (packages/node/src/ethereum/api.service.ethereum.test.ts:68:25)


  ● Api.ethereum › Should format transaction in logs, and the transaction gas should be bigInt type

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:12:17 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"106","x-kong-proxy-latency":"0","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",false],\"id\":45,\"jsonrpc\":\"2.0\"},{\"method\":\"eth_getBlockByNumber\",\"params\":[\"finalized\",false],\"id\":46,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › should have the ability to get receipts via transactions from all types

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:12:19 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"104","x-kong-proxy-latency":"1","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0xf81649\",true],\"id\":48,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › Decode nested logs in transactions

    could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at OPProvider.<anonymous> (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:483:23)
      at step (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
      at Object.throw (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
      at rejected (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)

  ● Api.ethereum › Should decode transaction data and not clone object

    could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at OPProvider.<anonymous> (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:483:23)
      at step (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
      at Object.throw (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
      at rejected (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)

  ● Api.ethereum › Should return raw logs, if decode fails

    could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at OPProvider.<anonymous> (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:483:23)
      at step (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
      at Object.throw (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
      at rejected (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)

  ● Api.ethereum › Should not clone logs when parsing args

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:14:35 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"107","x-kong-proxy-latency":"1","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0xf81649\",true],\"id\":48,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › Null filter support

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:14:57 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"103","x-kong-proxy-latency":"0","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",false],\"id\":45,\"jsonrpc\":\"2.0\"},{\"method\":\"eth_getBlockByNumber\",\"params\":[\"finalized\",false],\"id\":46,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › !null filter support for logs, expect to filter out

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:15:34 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"104","x-kong-proxy-latency":"0","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0xf81649\",true],\"id\":48,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › Null and 0x (empty) filter support for transaction data

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"74","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:15:55 GMT","etag":"W/\"4a-lv3ZtrIumz1KYPbbDtiIO50+pUg\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"20016","x-kong-proxy-latency":"1","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: Error: The user aborted a request.\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",false],\"id\":45,\"jsonrpc\":\"2.0\"},{\"method\":\"eth_getBlockByNumber\",\"params\":[\"finalized\",false],\"id\":46,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › Null filter support, for undefined transaction.to

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:15:56 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"102","x-kong-proxy-latency":"1","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",false],\"id\":43,\"jsonrpc\":\"2.0\"},{\"method\":\"eth_getBlockByNumber\",\"params\":[\"finalized\",false],\"id\":44,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › Should return all tx if filter.to is not defined

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:15:59 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"108","x-kong-proxy-latency":"0","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getLogs\",\"params\":[{\"blockHash\":\"0x65bcd860a13664944fcc5fb1bf564a67021076c4470f2bc570a07a60add2c8d6\"}],\"id\":47,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › filter.to Should support only null not undefined

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:15:59 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"112","x-kong-proxy-latency":"0","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",false],\"id\":43,\"jsonrpc\":\"2.0\"},{\"method\":\"eth_getBlockByNumber\",\"params\":[\"finalized\",false],\"id\":44,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › If transaction is undefined, with null filter, should be supported

    could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at OPProvider.<anonymous> (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:483:23)
      at step (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
      at Object.throw (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
      at rejected (node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)

  ● Api.ethereum › Resolves the correct tags for finalization

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:16:38 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"109","x-kong-proxy-latency":"1","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0xf81649\",true],\"id\":50,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › Assert blockHash on logs and block

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"99","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:17:50 GMT","etag":"W/\"63-cqOMRZysIoGNCGyA82lA45y2qJo\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"101","x-kong-proxy-latency":"1","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: FetchError: {\\\"code\\\":1141,\\\"error\\\":\\\"Invalid serialize\\\"}\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",false],\"id\":47,\"jsonrpc\":\"2.0\"},{\"method\":\"eth_getBlockByNumber\",\"params\":[\"finalized\",false],\"id\":48,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

  ● Api.ethereum › Should able to check is fullBlock

    bad response (status=500, headers={"content-type":"application/json; charset=utf-8","content-length":"54","connection":"keep-alive","access-control-allow-origin":"*","date":"Thu, 13 Jun 2024 03:18:28 GMT","etag":"W/\"36-HF2Dkev/2xMYsVB/GGdirTPXQr4\"","x-powered-by":"Express","x-continent":"NA","x-cluster":"dc","x-kong-upstream-latency":"35004","x-kong-proxy-latency":"0","via":"kong/2.5.2"}, body="{\"code\":2000,\"error\":\"Request failed: Error: Timeout\"}", requestBody="[{\"method\":\"eth_getBlockByNumber\",\"params\":[\"0xf81649\",false],\"id\":48,\"jsonrpc\":\"2.0\"}]", requestMethod="POST", url="https://ethereum.rpc.subquery.network/public", code=SERVER_ERROR, version=web/5.7.1)

      388 |       ) {
      389 |         runningTimeout.cancel();
    > 390 |         logger.throwError('bad response', Logger.errors.SERVER_ERROR, {
          |                ^
      391 |           status: response.statusCode,
      392 |           headers: response.headers,
      393 |           body: bodyify(

      at Logger.Object.<anonymous>.Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.Object.<anonymous>.Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at packages/node/src/ethereum/ethers/web/index.ts:390:16

Report generated by 🧪jest coverage report action from 66d77e8

@stwiname stwiname merged commit 5f4ab27 into main Jun 13, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants