-
Notifications
You must be signed in to change notification settings - Fork 72
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
feat!: drop legacy storage #1117
Conversation
36b281d
to
e339f76
Compare
I recognize that the legacy indexing mechanism doesn't work on many chains, is difficult to maintain, and that no one wants to spend the time to fix it. For those reasons, I agree that removing it now is the right move. Nonetheless, would it be possible to leave injection points such that someone could plug in their own custom indexer into the protocol? |
Yes @MantisClone; that would be best indeed! These injection points are still available, but not as the Node level (same as today). I've introduced a new layer called "indexer" that represents better the way things are (it would actually be possible to keep the old code with this indexer layer, but it's not efficient so better remove it). This PR is still draft because I'm trying to reduce the surface of TheGraph in the code; it should be down to only the Subgraph Client, graphql queries and types. The rest could be generalised to work with any type of indexer. |
d34fb57
to
185f6b2
Compare
185f6b2
to
ca607ae
Compare
f449cb1
to
70119e9
Compare
@@ -1,42 +1,29 @@ | |||
#!/usr/bin/env node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file now only creates the server object, but doesn't start it. startNode is called from bin.ts
@@ -1,36 +1,182 @@ | |||
import { DataAccess, TransactionIndex } from '@requestnetwork/data-access'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requestNodeBase.ts moved to requestNode.ts
@@ -0,0 +1,194 @@ | |||
import { DataAccessTypes, StorageTypes } from '@requestnetwork/types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved from packages/thegraph-data-access/src/data-access.ts
@@ -0,0 +1,32 @@ | |||
import { DataAccessTypes } from '@requestnetwork/types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved from packages/thegraph-data-access/src/data-access.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Massive!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm about 1/4th of the way through the review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impressive refactor! Only a few minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
NB: from now on, the |
BREAKING CHANGE: Dropping legacy indexing mechanism.
Changes: