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

[Access] Implement gRPC streaming endpoint SubscribeBlocks #5307

Merged

Conversation

UlyanaAndrukhiv
Copy link
Contributor

@UlyanaAndrukhiv UlyanaAndrukhiv commented Jan 26, 2024

FLIP: onflow/flips#229

Context

This PR implements

  • SubscribeBlocks
  • SubscribeBlockHeaders
  • SubscribeBlockDigests

endpoints within the Access Node API to facilitate the streaming of blocks at the gRPC level.

This new endpoints have similar functionality of receiving new blocks/headers as SubscribeEvents. Additionally, subscribers can define the block status (BlockStatusSealed or BlockStatusFinalized) through an argument, receiving only blocks with the specified statuses.

As part of this PR:

access/api.go Outdated Show resolved Hide resolved
Copy link
Contributor

@peterargue peterargue left a comment

Choose a reason for hiding this comment

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

mostly small comments. I think this is pretty much ready to go.

Have you tried this out on localnet?

access/handler.go Outdated Show resolved Hide resolved
engine/access/state_stream/backend/engine.go Outdated Show resolved Hide resolved
engine/access/subscription/block_tracker.go Outdated Show resolved Hide resolved
engine/access/subscription/execution_data_tracker.go Outdated Show resolved Hide resolved
engine/access/subscription/execution_data_tracker.go Outdated Show resolved Hide resolved
engine/access/rpc/backend/backend_stream_blocks_test.go Outdated Show resolved Hide resolved
engine/access/rpc/backend/backend_stream_blocks_test.go Outdated Show resolved Hide resolved
engine/access/subscription/base_tracker.go Outdated Show resolved Hide resolved
engine/access/subscription/block_tracker.go Outdated Show resolved Hide resolved
engine/access/subscription/execution_data_tracker.go Outdated Show resolved Hide resolved
@peterargue peterargue requested a review from durkmurder March 12, 2024 22:17
Copy link
Member

@durkmurder durkmurder left a comment

Choose a reason for hiding this comment

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

Left a few comments regarding documentation. I am sure open comment will be addressed so I am approving. Great job, very solid lift.

Copy link
Contributor

@peterargue peterargue left a comment

Choose a reason for hiding this comment

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

looks good. Great work!

@peterargue peterargue enabled auto-merge March 13, 2024 17:54
@peterargue peterargue added this pull request to the merge queue Mar 13, 2024
Merged via the queue into onflow:master with commit 0bb7997 Mar 13, 2024
55 checks passed
@franklywatson
Copy link
Contributor

Tagging onflow/developer-grants#242 for Milestone 1 item 9 completion

peterargue added a commit that referenced this pull request Mar 25, 2024
…be-blocks

[Access] Implement gRPC streaming endpoint SubscribeBlocks
peterargue added a commit that referenced this pull request Apr 4, 2024
…be-blocks

[Access] Implement gRPC streaming endpoint SubscribeBlocks
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.

6 participants