Finschia / finschia-sdk

A framework for building blockchains based Finschia Mainnet that is forked from cosmos-sdk
Apache License 2.0
61 stars 31 forks source link

refactor!: Remove grpc-web/rosetta and improve server performance #1418

Closed tkxkd0159 closed 5 months ago

tkxkd0159 commented 5 months ago

Description

closes: #1416

After update:

At this time, I also want to refactor our server code structure based on cosmos/cosmos-sdk#15041, cosmos/cosmos-sdk#16152.

Motivation and context

  1. We separate rosetta/grpc-web from main core to apply MSA. It will replace legacy code with latest one and improve the complication level of dependencies.
  2. To improve query performance, we modify grpc-gateway to be concurrent.

How has this been tested?

Screenshots (if appropriate):

Checklist:

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 69.35484% with 19 lines in your changes missing coverage. Please review.

Project coverage is 69.57%. Comparing base (6054848) to head (4d9cc76). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418/graphs/tree.svg?width=650&height=150&src=pr&token=m16qfzIPO7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) ```diff @@ Coverage Diff @@ ## main #1418 +/- ## ========================================== + Coverage 68.66% 69.57% +0.90% ========================================== Files 767 751 -16 Lines 63512 62259 -1253 ========================================== - Hits 43611 43316 -295 + Misses 17234 16308 -926 + Partials 2667 2635 -32 ``` | [Files](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) | Coverage Δ | | |---|---|---| | [server/config/config.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?src=pr&el=tree&filepath=server%2Fconfig%2Fconfig.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-c2VydmVyL2NvbmZpZy9jb25maWcuZ28=) | `45.94% <ø> (-0.38%)` | :arrow_down: | | [server/config/toml.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?src=pr&el=tree&filepath=server%2Fconfig%2Ftoml.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-c2VydmVyL2NvbmZpZy90b21sLmdv) | `15.78% <ø> (ø)` | | | [simapp/simd/cmd/root.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?src=pr&el=tree&filepath=simapp%2Fsimd%2Fcmd%2Froot.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-c2ltYXBwL3NpbWQvY21kL3Jvb3QuZ28=) | `87.58% <ø> (-0.09%)` | :arrow_down: | | [testutil/network/util.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?src=pr&el=tree&filepath=testutil%2Fnetwork%2Futil.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-dGVzdHV0aWwvbmV0d29yay91dGlsLmdv) | `76.36% <94.73%> (+3.39%)` | :arrow_up: | | [client/grpc\_query.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?src=pr&el=tree&filepath=client%2Fgrpc_query.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-Y2xpZW50L2dycGNfcXVlcnkuZ28=) | `26.86% <0.00%> (-0.83%)` | :arrow_down: | | [testutil/network/network.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?src=pr&el=tree&filepath=testutil%2Fnetwork%2Fnetwork.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-dGVzdHV0aWwvbmV0d29yay9uZXR3b3JrLmdv) | `84.38% <71.42%> (+1.79%)` | :arrow_up: | | [client/context.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?src=pr&el=tree&filepath=client%2Fcontext.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-Y2xpZW50L2NvbnRleHQuZ28=) | `59.23% <0.00%> (+0.79%)` | :arrow_up: | | [server/grpc/server.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?src=pr&el=tree&filepath=server%2Fgrpc%2Fserver.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-c2VydmVyL2dycGMvc2VydmVyLmdv) | `72.50% <71.42%> (+6.78%)` | :arrow_up: | | [server/api/server.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418?src=pr&el=tree&filepath=server%2Fapi%2Fserver.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-c2VydmVyL2FwaS9zZXJ2ZXIuZ28=) | `56.00% <58.82%> (-1.36%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1418/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)