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

Add gRPC server & reflection #6463

Merged
merged 48 commits into from
Jul 27, 2020
Merged

Add gRPC server & reflection #6463

merged 48 commits into from
Jul 27, 2020

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Jun 17, 2020

ref: #5921


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

@codecov
Copy link

codecov bot commented Jun 17, 2020

Codecov Report

Merging #6463 into master will decrease coverage by 0.06%.
The diff coverage is 45.16%.

@@            Coverage Diff             @@
##           master    #6463      +/-   ##
==========================================
- Coverage   61.54%   61.48%   -0.07%     
==========================================
  Files         508      510       +2     
  Lines       31523    31597      +74     
==========================================
+ Hits        19402    19428      +26     
- Misses      10611    10656      +45     
- Partials     1510     1513       +3     

@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2020

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 label Jul 4, 2020
@alexanderbez alexanderbez added pinned and removed stale labels Jul 4, 2020
@aaronc aaronc mentioned this pull request Jul 14, 2020
4 tasks
@aaronc aaronc mentioned this pull request Jul 15, 2020
43 tasks
baseapp/baseapp.go Outdated Show resolved Hide resolved
@amaury1093 amaury1093 marked this pull request as draft July 27, 2020 08:06
@amaury1093 amaury1093 marked this pull request as ready for review July 27, 2020 10:11
baseapp/grpcserver.go Outdated Show resolved Hide resolved
baseapp/grpcserver.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

Looks great!

@alexanderbez alexanderbez added A:automerge Automatically merge PR once all prerequisites pass. C: gRPC Issues and PRs related to the gRPC service and HTTP gateway. labels Jul 27, 2020
Copy link
Member Author

@aaronc aaronc left a comment

Choose a reason for hiding this comment

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

Left some comments on the headers. I don't think we should pretend to support proofs now. Otherwise LGTM!

server/grpc/server.go Outdated Show resolved Hide resolved
server/grpc/server.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@anilcse anilcse left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -186,8 +186,8 @@ func (app *BaseApp) MountKVStores(keys map[string]*sdk.KVStoreKey) {
}
}

// MountStores mounts all IAVL or DB stores to the provided keys in the BaseApp
// multistore.
// MountTransientStores mounts all IAVL or DB stores to the provided keys in
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// MountTransientStores mounts all IAVL or DB stores to the provided keys in
// MountTransientStores mounts all the transient stores from the MultiStore.

}

// Create the sdk.Context. Passing false as 2nd arg, as we can't
// actually support proofs with gRPC right now.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Something for TODO?

@mergify mergify bot merged commit e9534b0 into master Jul 27, 2020
@mergify mergify bot deleted the aaronc/5921-grpc-proxy branch July 27, 2020 17:57
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* Add gRPC proxy

* Make GRPC disabled by default

* WIP on integration tests

* WIP on integration tests

* Start setting up in process tests

* Start setting up in process tests

* Make it compile

* Add start server to network util

* Add Println

* Use go routine

* Fix scopelint

* Move to proxy_test

* Add response type cache

* Remove proxy

* Tweaks

* Use channel to handle error

* Use error chan

* Update server/start.go

Co-authored-by: Federico Kunze <[email protected]>

* Use %w

* Add sdk.Context

* Add comments

* Fix lint

* Add header and tests

* Address comments

* Factorize some code

* Fix lint

* Add height and prove in req metadata

* Add reflection test

* Fix lint

* Put grpc test in server/grpc

* Update baseapp/grpcserver.go

* Update baseapp/grpcserver.go

* Remove proof header

Co-authored-by: Amaury Martiny <[email protected]>
Co-authored-by: Federico Kunze <[email protected]>
Co-authored-by: Alexander Bezobchuk <[email protected]>
Co-authored-by: SaReN <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C: gRPC Issues and PRs related to the gRPC service and HTTP gateway.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants