Skip to content

grpc: BlockService backport to v0.37.x-experimental#1441

Closed
cason wants to merge 3 commits intocason/backport-pr818-v0.37from
cason/backport-pr1142-v0.37
Closed

grpc: BlockService backport to v0.37.x-experimental#1441
cason wants to merge 3 commits intocason/backport-pr818-v0.37from
cason/backport-pr1142-v0.37

Conversation

@cason
Copy link

@cason cason commented Oct 6, 2023

Addresses part of the tasks in #1420:

Depends on #1438 .

Once it #1438 merged, the destination branch should be updated to v0.37.x-experimental.


PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments

andynog and others added 2 commits October 6, 2023 11:45
* initial logic for the gRPC block service (#1094)

* initial logic for gRPC block client and test (#1094)

* block response and request (#1094)

* add configuration for block service (#1094)

* use pointer for request parameter (#1094)

* change block service GetBlock response (#1094)

* return block information (#1094)

* convert core type to proto type (#1094)

* hookup server (#1094)

* hooking directly to the BlockStore instead of Environment (#1094)

* changing client return type, use core type (#1094)

* convert from proto to core type (#1094)

* implemented proper logic to test block service (#1094)

* return the latest height if height is 0 (#1094)

* adding proper grpc error handling and return (#1094)

* rename rpc and message in proto to match ADR-101 spec (#1094)

* renaming service and client methods structs to match ADR (#1094)

* additional error handling (#1094)

* rename get block request and response (#1094)

* update method name in the client (#1094)

* proto entries for GetLatestHeight logic (#1094)

* added logic for streaming new blocks as part of GetLatestHeight (#1094)

* ensure subcribers have their own unique id (#1094)

* client logic to use a channel parameter (#1094)

* added test for GetLatestHeight (#1094)

* better streaming test to prevent error (#1094)

* remove empty line

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* removing UNARY_RPC to prevent lint on server streaming (#1094)

* remove server reflection, doesn't work well with gogoproto (#1094)

* handle negative height parameter (#1094)

* remove `Block` from `GetBlockLatestHeight`

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* changed method name and fixes to test (#1094)

* fixes from PR feedback (#1094)

* remove vars

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* fix declaration

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* simplify error return

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* simplest error return

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* remove line

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* remove var declaration, not needed

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* use simplest error return

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* simplest error return

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* simplest error return

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* simplify error handling

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* simplified the logic for subscriber id (#1094)

* more fixs based on PR feedback (#1094)

* generated new protos (#1094)

* remove else logic to allow compilation (#1094)

* added logging capabilities to the block service and added log messages (#1094)

* ensure node is a valid testing node (#1094)

* added more conditions to handle subscription cancel (#1094)

* use break in the for loop (#1094)

* renamed ResultBlock to Block (#1094)

* refactored the client logic use a channel for errors (#1094)

* simplify subscriber name

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* adding error to log

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* update logging

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* Simplified and improved logging (#1094)

* added logic to drop the height publish if channel full (#194)

* improved test to ensure is not light or seed node (#1094)

* refactored block service to use one channel with result type (#1094)

* blockservice: Apply service name to all logs

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* blockservice: Capitalize start of all log messages

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* blockservice: Remove unnecessary logs

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* blockservice: Add trivial RPC error response tracing mechanism for easier debugging

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* blockservice: Simplify constructor

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* blockservice: Extract type assertion

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add changelog entries

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* docs: Update configuration-related content

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* grpc/client: Format

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* grpc: Extract function to validate or update block height from request

Signed-off-by: Thane Thomson <connect@thanethomson.com>

---------

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
@cason cason force-pushed the cason/backport-pr1142-v0.37 branch from 94477e6 to 759afd0 Compare October 6, 2023 10:08
@cason cason changed the title grpc: BlockService and BlockResultsService backport to v0.37.x-experimental grpc: BlockService backport to v0.37.x-experimental Oct 6, 2023
@cason cason mentioned this pull request Oct 6, 2023
18 tasks
@cason cason marked this pull request as ready for review October 6, 2023 10:37
@cason cason requested a review from a team as a code owner October 6, 2023 10:37
@cason cason requested review from hvanz and jmalicevic October 6, 2023 10:38
@cason cason added the grpc Anything relating to the gRPC API label Oct 6, 2023
@cason cason added this to the 2023-Q4 milestone Oct 6, 2023
@cason cason self-assigned this Oct 6, 2023
Copy link
Collaborator

@jmalicevic jmalicevic left a comment

Choose a reason for hiding this comment

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

LGTM

@cason cason removed this from the 2023-Q4 milestone Oct 10, 2023
@cason cason marked this pull request as draft October 10, 2023 08:50
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale For use by stalebot label Oct 21, 2023
@github-actions github-actions bot closed this Oct 25, 2023
@zrbecker zrbecker deleted the cason/backport-pr1142-v0.37 branch February 7, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

grpc Anything relating to the gRPC API stale For use by stalebot

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants