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

portalnet/overlay: FindContent query doesn't check for the content in database before making network requests #1329

Open
ogenev opened this issue Jun 26, 2024 · 0 comments

Comments

@ogenev
Copy link
Member

ogenev commented Jun 26, 2024

The core FindContent query in OvelrayService does not check local database for the content before making network requests.

This cause an issue when we send commands to the OverlayService from external services.

For example, when we request a content in the light-client module, the OverlayService ignores all content in the database and relies solely on network requests.

On the other side, when we do a RecursiveFindContent JSON-RPC call, we check for the content in the database but this is implemented only on the JSON-RPC level.

To allow external modules to communicate with OverlayService in a way to get the available content via either database or network request, it seems that we have two options:

Option 1: Check for content availability in database before sending network request on OverlayService level and remove the locality check from the JSON-RPC module.

Option 2: Implement a new OverlayService command that will explicitly check only for content availability in the database. External services then will have to send two commands to OverlayService - one to check for the content in the database and one to get the content from the network.

@ogenev ogenev changed the title portalnet/overlay: FIndContent query doesn't check for the content in database before making network requests portalnet/overlay: FindContent query doesn't check for the content in database before making network requests Jun 27, 2024
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

No branches or pull requests

1 participant