-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Prefer sending tx_bytes to Simulate gRPC endpoint #8926
Conversation
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=a716ec678810892f266ddf4b813597e54552f409 |
Benchmark finished. See the result: https://github.orijtech.com/benchmark/result?id=c3d1f8488c564a40998331a59298d240 |
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=8ee3a37892a78a17b43a285f89da219541f60bd4 |
Benchmark finished. See the result: https://github.orijtech.com/benchmark/result?id=9d7dac8f4cd94ad0bbb81315316fa4c8 |
// | ||
// TODO:/XXX: Using a package-level global isn't ideal and we should consider | ||
// refactoring the module manager to allow passing in the correct module codec. | ||
var Codec codec.Marshaler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead code
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=76d16d4b0bc296871e09132da0ee377ae25352a9 |
Benchmark finished. See the result: https://github.orijtech.com/benchmark/result?id=43e834b9481b47598a9891d7edd70832 |
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=806c3b5f77b8a05026428d15d990cf789654153c |
Codecov Report
@@ Coverage Diff @@
## master #8926 +/- ##
=======================================
Coverage 58.88% 58.88%
=======================================
Files 571 571
Lines 32120 32111 -9
=======================================
- Hits 18914 18910 -4
+ Misses 10984 10981 -3
+ Partials 2222 2220 -2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like a test is failing (related to sig verification, in the test that still uses Tx
).
Should this also close #7726?
…425-fix-simulation
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
…os-sdk into am/8425-fix-simulation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just one snippet to remove from a merge conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one. ACK from me.
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=519f6431cda33e56a216d890cc017f4d5a338123 |
Benchmark finished. See the result: https://github.orijtech.com/benchmark/result?id=21239dafa30240f09a8b4cc751e6eeee |
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=40cebc3bfbbcfcbabd886e8bc7e3755827a4a4c4 |
Benchmark finished. See the result: https://github.orijtech.com/benchmark/result?id=e812b923cb3146cf92d803380ed82b6d |
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=5c2e4a46b7254e0b32807e44458aae4e6992b9d7 |
Benchmark finished. See the result: https://github.orijtech.com/benchmark/result?id=7a9f196407fb4eeea888ae2c3493fb12 |
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=1fa2c22d8a1cfb63d0d0e49074a7720d1a81e660 |
"errors" | ||
"fmt" | ||
"net/http" | ||
"os" | ||
|
||
gogogrpc "github.com/gogo/protobuf/grpc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typealias is not needed.
func WriteGeneratedTxResponse( | ||
ctx client.Context, w http.ResponseWriter, br rest.BaseReq, msgs ...sdk.Msg, | ||
clientCtx client.Context, w http.ResponseWriter, br rest.BaseReq, msgs ...sdk.Msg, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually we don't need to repeat a typename in the variable name.
* First run * Remove dead code * Make test pass * Proto gen * Fix lint * Add changelog * Fix tests * Fix test * Update x/auth/tx/service.go Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com> * Remove protoTxProvider * Add grpc-gateway test * Add comment * move to api breaking * lesser diff * remove conflict * empty commit to rerun CI * empty commit to rerun CI Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com> Co-authored-by: Alessio Treglia <alessio@tendermint.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Description
closes: #8425
closes: #7726
This PR does 2 things, both around tx simulation:
tx
field on SimulateRequest, prefertx_bytes
.tx_bytes
tx
field has not been removed, as to not introduce any proto-breaking changetx
field is used, then there might be sig verification errors, as described in adr-020CalculateGas
to use the tx service gRPC query client (instead of hardcoding the path)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.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes