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

Make built-in indexer work for retrieval client #110

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

wmb-software-consulting
Copy link
Contributor

@wmb-software-consulting wmb-software-consulting commented Dec 6, 2023

Why are these changes needed?

Context issue:

  • Users previously only required a retrieval client with a built-in indexer.
  • Current changes necessitate the addition of a graph node, adding complexity for users.

Solution in this PR:

  • Prioritize making the built-in indexer effective instead of relying on the graph node.

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

Copy link
Contributor

@jianoaix jianoaix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you summarize the issues that this is fixing?

if err != nil {
return nil, err
}
err = indexedState.Start(context.Background())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to Start the indexedState from the retrieval client? Currently, it's left as the responsibility of caller to provide an indexedState that's actively indexing.

Even if we do, I don't think this should be called at initialization. If we need to explicitly start a goroutine, it should be separated out as an explicit method

disperser/cmd/batcher/main.go Outdated Show resolved Hide resolved
disperser/cmd/batcher/main.go Outdated Show resolved Hide resolved
"github.com/ethereum/go-ethereum/common"
)

func SetupNewIndexer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it setup or actually CreateNewIndexer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but this function is call that indexer.New(), so this will be better named as CreateNewIndexer.

Copy link
Contributor

@jianoaix jianoaix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

"github.com/ethereum/go-ethereum/common"
)

func SetupNewIndexer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but this function is call that indexer.New(), so this will be better named as CreateNewIndexer.

@jianoaix jianoaix merged commit 03cd96a into Layr-Labs:master Dec 12, 2023
4 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.

3 participants