Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

chainHead: Produce method responses on chainHead_follow #14692

Merged
merged 19 commits into from
Aug 8, 2023

Conversation

lexnv
Copy link
Contributor

@lexnv lexnv commented Jul 31, 2023

This PR extends the chainHead_follow to produce the results of the other chainHead methods

  • chainHead_storage, chainHead_call, chainHead_body are now plain methods
  • mpsc::channel is added between the chainHead_follow and the rest of the methods
  • unique operation ID to identify the response in the chainHead_follow events is generated by the subscription management
  • BlockGuard struct is extended with the following fields:
    • the unique operation ID
    • the Sender part of the channel to communicate the response back to the chainHead_follow
  • chainHead_follow merges the Recv part of the channel to forward responses of methods back to the user
  • remove the events produced by the prior subscriptions that are now plain methods
  • testing is adjusted and added unique ID validation

Closes: #14638

// @paritytech/subxt-team

lexnv added 13 commits July 31, 2023 18:54
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv added A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit B1-note_worthy Changes should be noted in the release notes T2-API This PR/Issue is related to APIs. labels Jul 31, 2023
@lexnv lexnv self-assigned this Jul 31, 2023
@lexnv
Copy link
Contributor Author

lexnv commented Jul 31, 2023

bot rebase

@paritytech-processbot
Copy link

Rebased

@lexnv
Copy link
Contributor Author

lexnv commented Aug 1, 2023

bot rebase

@paritytech-processbot
Copy link

Rebased

@lexnv lexnv requested a review from skunert August 8, 2023 13:14
Copy link
Contributor

@jsdw jsdw left a comment

Choose a reason for hiding this comment

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

This looks great to me; good job!

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B1-note_worthy Changes should be noted in the release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit T2-API This PR/Issue is related to APIs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RPC-Spec-V2] Extend chainHead_follow with method responses
3 participants