-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
refactor auths broadcast cmd in alignment with #6216 #6713
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6713 +/- ##
==========================================
- Coverage 59.87% 59.83% -0.04%
==========================================
Files 513 513
Lines 31470 31483 +13
==========================================
- Hits 18842 18838 -4
- Misses 11192 11209 +17
Partials 1436 1436 |
…act-broadcast-cmd
I think i've covered all the components I need to pull out from #6216, but some integration tests are still failing and i'm not exactly sure why. Getting a |
I'm maybe missing some context here. iiuc @clevinson you're tackling the "migrate x/auth commands to use TxGenerator and SignatureV2 -> edit: indeed the other commands still need to be converted, but |
@amaurymartiny yes indeed there was some work on actually migrating the After switching that over, there were a number of minor changes to properly handle the proto
|
I fixed the integration tests by updating An alternative that I was less sure about could have involved calling Also, just flagging that i'm not sure what breakout issue from this epic will take care of adding the |
Is the |
message TxResponse { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
int64 height = 1; | ||
string txhash = 2 [(gogoproto.customname) = "TxHash"]; | ||
string codespace = 3; | ||
uint32 code = 4; | ||
string data = 5; | ||
string raw_log = 6; | ||
repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false]; | ||
string info = 8; | ||
int64 gas_wanted = 9; | ||
int64 gas_used = 10; | ||
google.protobuf.Any tx = 11; | ||
string timestamp = 12; | ||
} |
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 do want to note that I do think this stuff should live in the root cosmos
proto package. I'm not sure where it should go but I don't feel comfortable with it here. Any thoughts?
I'd also like to take out the other Result
, SimulationResponse
, etc. stuff and leave just Coin
, DecCoin
& Int/DecProto
preferably before 0.40 is done.
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.
This makes sense. I can tackle this as another PR.
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.
Great 👍
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. Would be nice to clean up cosmos.proto, but maybe as a separate PR.
Nope, not necessary for this PR, just flagging that I want to make sure it is covered somewhere to be tackled in the #6213 bullet list if we want to include it in 0.40 |
func NewABCIMessageLog(i uint16, log string, events Events) ABCIMessageLog { | ||
return ABCIMessageLog{ | ||
MsgIndex: i, | ||
MsgIndex: uint32(i), |
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.
There shouldn't be a need to cast here, rather the function should just accept a uint32.
// in the case of a packing failure, keeps the cached value. This should only | ||
// be used in situations where compatibility is needed with amino. Amino-only | ||
// values can safely be packed using this method when they will only be | ||
// marshaled with amino and not protobuf |
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.
Missing puncuation.
* refactor auths broadcast cmd in alignment with cosmos#6216 * add TxResponse proto definition, and related refactoring * re-run make proto-gen, updating staking.pb.go * cleanup TxResponse tests to handle nil return values * properly handle nil Tx value in TxResponse's implementation of UnpackInterfaces Co-authored-by: Federico Kunze <[email protected]>
Description
Ref #6213
Changes:
TxResponse
andABCIMessageLog
, for use in x/auth's broadcast commandsTxResponse
by reference instead of by valueUnpackInterfaces
implementation ofTxResponse
to not unpackTx
fields when nilBefore 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