Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

imp(rpc,server): concurrent gRPC queries #1352

Merged
merged 9 commits into from
Sep 20, 2022
Merged

imp(rpc,server): concurrent gRPC queries #1352

merged 9 commits into from
Sep 20, 2022

Conversation

yihuang
Copy link
Contributor

@yihuang yihuang commented Sep 20, 2022

Closes: #1007

Description

  • Initiate the GRPCClient introduced in sdk 0.46.

Verified manually that it indeed worked (by adding a long sleep in one of the grpc query handlers).


For contributor use:

  • 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

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

Solution:
- Initiate the GRPCClient introduced in [sdk 0.46](cosmos/cosmos-sdk#11234).
@yihuang yihuang requested a review from a team as a code owner September 20, 2022 07:02
@yihuang yihuang requested review from ramacarlucho and adisaran64 and removed request for a team September 20, 2022 07:02
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
server/start.go Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
server/start.go Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
yihuang and others added 4 commits September 20, 2022 16:32
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

ACK.

Verified manually that it indeed worked (by adding a long sleep in one of the grpc query handlers).

Does this need any additional documentation? Would be nice to add some concurrent query test cases in the JSON-RPC

@yihuang
Copy link
Contributor Author

yihuang commented Sep 20, 2022

ACK.

Verified manually that it indeed worked (by adding a long sleep in one of the grpc query handlers).

Does this need any additional documentation? Would be nice to add some concurrent query test cases in the JSON-RPC

may need a very slow debug_traceTransaction call, slow enough to slow down block production, to notice the effect though. most queries run pretty fast even if sequentially.

@fedekunze fedekunze changed the title Problem: grpc query is not run concurrently imp(rpc,server): concurrent gRPC queries Sep 20, 2022
@fedekunze
Copy link
Contributor

@yihuang can you look into the failing integration tests?

@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #1352 (9487a0d) into main (34226aa) will not change coverage.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1352   +/-   ##
=======================================
  Coverage   54.77%   54.77%           
=======================================
  Files         107      107           
  Lines        9994     9994           
=======================================
  Hits         5474     5474           
  Misses       4249     4249           
  Partials      271      271           
Impacted Files Coverage Δ
x/evm/keeper/grpc_query.go 69.06% <0.00%> (ø)

@yihuang
Copy link
Contributor Author

yihuang commented Sep 20, 2022

@yihuang can you look into the failing integration tests?

Integration test fixed, but the panic causing node to crash need further investigation, probably at sdk level

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem: slow queries can slow down consensus state machine
2 participants