-
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
Return an unsigned tx in legacy GET /tx endpoint when signature conversion fails #7649
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7649 +/- ##
==========================================
- Coverage 54.14% 54.14% -0.01%
==========================================
Files 611 611
Lines 38556 38559 +3
==========================================
Hits 20877 20877
- Misses 15547 15550 +3
Partials 2132 2132 |
@@ -48,7 +49,11 @@ func CopyTx(tx signing.Tx, builder client.TxBuilder) error { | |||
|
|||
err = builder.SetSignatures(sigs...) | |||
if err != nil { | |||
return err | |||
if ignoreSignatureError { | |||
_ = builder.SetSignatures() |
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.
Why we are calling this second time?
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.
In case there is any side effect of the initial SetSignatures
. For instance maybe there were 2 signatures and 1 was successful but the other wasn't. This call clears all signatures.
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's already merged, but I still think we should add a comment.
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.
I did
I am trying to figure out what exactly would happen when That would trigger the deprecation error message? how does that bubble up. |
It would trigger an error in marshaling. That needs to be addressed, but IMHO separately (#7639) |
…to aaronc/7639-ignore-sig-error
…rsion fails (#7649) * Return an unsigned tx in legacy GET /tx endpoint when signature conversion fails * Add test * add comment * add comment * add comment
ref #7639
This will cause the legacy REST GET
/tx
endpoint to return an unsigned transaction when the sign mode cannot be represented in amino JSON so that this endpoint fails more gracefully.It WILL NOT fix all errors with the legacy GET
/tx
endpoint as some tx's (ex. IBC) CANNOT be represented in amino at all.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