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

Responder sends no blocks, just metadata #372

Open
Tracked by #371 ...
hannahhoward opened this issue Mar 29, 2022 · 0 comments
Open
Tracked by #371 ...

Responder sends no blocks, just metadata #372

hannahhoward opened this issue Mar 29, 2022 · 0 comments

Comments

@hannahhoward
Copy link
Collaborator

hannahhoward commented Mar 29, 2022

What

We introduce a new RequestType - Metadata - as follows:

type GraphSyncRequestType enum {
   # New means a new request
   | New     ("n")
   # Cancel means cancel the request referenced by request ID
   | Cancel  ("c")
   # Update means the extensions contain an update about this request
   | Update  ("u")
   # Restart means restart this request from the begging, respecting the any
   # DoNotSendCids/DoNotSendBlocks contained in the extensions--essentially a
   # cancel followed by a new
   # TODO: | Restart ("r")
   | Metadata ("m")
} representation string

For a metadata request, a responder responds as would normally, but simply never sends blocks for this request. This means they respond only with metadata.

Suggested implementation:

  • Add a call to the ResponseStream to disable block sending entirely, similar to the SkipFirstBlocks / IgnoreBlocks that when called, always does not send a block in future calls to Transaction
  • Modify the query preparer as needed
  • Handle the request type in the ResponseManager otherwise just like a new request for first implementation.
@hannahhoward hannahhoward changed the title For this request type, the responder sends no blocks, just metadata. Responder sends no blocks, just metadata. Mar 29, 2022
@hannahhoward hannahhoward changed the title Responder sends no blocks, just metadata. Responder sends no blocks, just metadata Mar 29, 2022
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