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 converting dict block to eth block, add tests #265

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

stwiname
Copy link

No description provided.

Copy link

github-actions bot commented Mar 21, 2024

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🔴 Statements 49.52% 3301/6666
🟡 Branches 67.44% 350/519
🔴 Functions 47.04% 119/253
🔴 Lines 49.52% 3301/6666

Test suite run failed

Failed tests: 3/73. Failed suites: 4/14.
  ● Eth Dictionary V1 › Can resovle chain aliases

    ApolloError: Only absolute URLs are supported

      at new ApolloError (node_modules/@subql/node-core/node_modules/@apollo/client/errors/index.js:39:28)
      at node_modules/@subql/node-core/node_modules/@apollo/client/core/QueryManager.js:777:71
      at both (node_modules/@subql/node-core/node_modules/@apollo/client/utilities/observables/asyncMap.js:22:31)
      at node_modules/@subql/node-core/node_modules/@apollo/client/utilities/observables/asyncMap.js:11:72
      at Object.then (node_modules/@subql/node-core/node_modules/@apollo/client/utilities/observables/asyncMap.js:11:24)
      at Object.error (node_modules/@subql/node-core/node_modules/@apollo/client/utilities/observables/asyncMap.js:24:49)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at node_modules/@subql/node-core/node_modules/@apollo/client/utilities/observables/iteration.js:7:68
          at Array.forEach (<anonymous>)
      at iterateObserversSafely (node_modules/@subql/node-core/node_modules/@apollo/client/utilities/observables/iteration.js:7:25)
      at Object.error (node_modules/@subql/node-core/node_modules/@apollo/client/utilities/observables/Concast.js:76:21)
      at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
      at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
      at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
      at handleError (node_modules/@subql/node-core/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:167:14)
      at node_modules/@subql/node-core/node_modules/@apollo/client/link/http/createHttpLink.js:145:17


  ● rawBlockToEthBlock › successfully convers a block

    FetchError: request to http://localhost:3000/rpc/eth-mainnet failed, reason: connect ECONNREFUSED ::1:3000

      at ClientRequest.<anonymous> (node_modules/node-fetch/lib/index.js:1491:11)


  ● Dictionary utils › can filter eth ds with multiple dynamic ds/templates

    expect(received).toBe(expected) // Object.is equality

    Expected: 3
    Received: 4

      83 |     const filteredDs = ethFilterDs(dataSources);
      84 |     // Runtime + ERC721 (groupedOptions) + ERC1155
    > 85 |     expect(filteredDs.length).toBe(3);
         |                               ^
      86 |     expect((filteredDs[1] as any).groupedOptions).toBe([
      87 |       'address1',
      88 |       'address2',

      at Object.<anonymous> (packages/node/src/indexer/dictionary/utils.spec.ts:85:31)


  ● Test suite failed to run

    Jest worker encountered 4 child process exceptions, exceeding retry limit

      at ChildProcessWorker.initialize (node_modules/jest-worker/build/workers/ChildProcessWorker.js:181:21)

Report generated by 🧪jest coverage report action from 17a88fa

@jiqiang90 jiqiang90 merged commit 09973bd into dictionary-v2-poc-generalization Mar 21, 2024
1 of 2 checks passed
stwiname added a commit that referenced this pull request Mar 21, 2024
* move node-core

* working but need tidy up

poc with indexing

tidy up

* use EnqueueBlock

* draft

* Update packages/node-core/src/indexer/blockDispatcher/block-dispatcher.ts

Co-authored-by: Scott Twiname <[email protected]>

* draft

* generalization draft

* tidy up

* Fix runtime issue

* working

* rename

update

before fix types

fix types

tidy up

* update interface

* fix v1 tests

* update tests

* update interface and tests

* fix test and change enqueue type

* fix modulo and bypass blocks

* tidy up

* tidy up and more fixes

* Update packages/node-core/src/indexer/blockDispatcher/worker-block-dispatcher.ts

Co-authored-by: Scott Twiname <[email protected]>

* Update packages/node-core/src/indexer/blockDispatcher/worker-block-dispatcher.ts

Co-authored-by: Scott Twiname <[email protected]>

* Fix part 1

* Fix part 2

* Update packages/node/src/indexer/dictionary/v2/ethDictionaryV2.ts

Co-authored-by: Scott Twiname <[email protected]>

* Update packages/node/src/indexer/dictionary/v2/types.ts

Co-authored-by: Scott Twiname <[email protected]>

* Update packages/node/src/indexer/dictionary/v2/ethDictionaryV2.ts

Co-authored-by: Scott Twiname <[email protected]>

* Fix part 3

* Fix part 4

* Fix part 5

* Fix worker fetching

* Add feature disable dictionary, timeout inspection query

* private getDictionary

* Fix part 6

* Fix update v2 metadata when getData

* other fixes

* other fixes

* remove node-core, update dependencies

* update

* remove FAT

* fix formatter

* Update packages/node/src/ethereum/utils.ethereum.ts

Co-authored-by: Scott Twiname <[email protected]>

* tidy up

* fix isFullBlock

* fix node-core version

* Update packages/node/src/indexer/dictionary/v2/ethDictionaryV2.ts

Co-authored-by: Scott Twiname <[email protected]>

* Update packages/node/src/indexer/dictionary/v1/ethDictionaryV1.ts

Co-authored-by: Scott Twiname <[email protected]>

* Fix1

* tests

* Fix2

* tidy up

* fix dependencies

* fix dependencies

* fix tests

* Fix converting dict block to eth block, add tests (#265)

* Fix converting dict block to eth block, add tests

* Fix tx being empty

---------

Co-authored-by: Scott Twiname <[email protected]>
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