-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Audit / Refactor proto packages layout #6905
Conversation
Some notes on the various messages that I'd still like to be pulled out of My initial thought was to pile everything inside packages within
|
Codecov Report
@@ Coverage Diff @@
## master #6905 +/- ##
==========================================
+ Coverage 61.86% 65.36% +3.49%
==========================================
Files 520 390 -130
Lines 32108 24271 -7837
==========================================
- Hits 19865 15864 -4001
+ Misses 10628 7165 -3463
+ Partials 1615 1242 -373 |
Please see updated description above, which gives an overview of the changes being made in this PR. The piece I'm least certain about is the Not sure if thats 100% the best way to structure stuff, but this is my attempt at it. Also- i'll be on vacation next week and am happy for anyone else to pick this up while i'm out and push it over the finish line. |
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 beta
and not the more standard v1beta
?
I think cosmos
and cosmos.tx
should both be beta as well, at least cosmos.tx
I've thought about this a bit more. My biggest hesitancy about putting everything into At the same time, I also feel that calling everything stable and fixed right away does tie our hands a bit and might be a bit rushed. We're doing the first SDK protobuf release ever and there are a lot of proto definitions. We might have gotten some major things wrong or just find out a radically better way to do certain things 1-2 months after the release. So maintaining the optionality of What if we:
This reduces the churn of marking and then unmarking everything as What do people think? |
So it seems like we agreed in the meeting today to move everything into This appears to be preferred over my proposal to just delay making stable packages actually "stable". |
…-sdk into proto-packages-audit
This PR is ready for another round of review. I has been updated to reflect last Friday's call decision, see also 1st comment for an overview of the folder arch. |
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.
@amaurymartiny Left a few comments, otherwise LGTM. I cannot approve / request changes, as i was the original author.
types/codec.go
Outdated
@@ -14,5 +14,5 @@ func RegisterCodec(cdc *codec.LegacyAmino) { | |||
|
|||
// Register the sdk message type | |||
func RegisterInterfaces(registry types.InterfaceRegistry) { | |||
registry.RegisterInterface("cosmos_sdk.v1.Msg", (*Msg)(nil)) | |||
registry.RegisterInterface("cosmos.Msg", (*Msg)(nil)) |
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.
We should probably still register this as a specific version (e.g. cosmos.v1beta1.Msg), right? Only thing is, since it's not actually tied to a specific protobuf definition, it's not super clear when we would update the version in the interface registry.
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 point, I changed to "cosmos.v1beta1.Msg"
for now, since everything is in beta. But yeah, I guess we should also define which interfaces are beta/stable, maybe add a line somewhere in #6954?
413d2c3
to
2a175d1
Compare
Description
New proposed layout:
v1beta1
, and every package has this versionHighlights of the main changes made:
cosmos/cosmos.proto
refactored tocosmos.base
a.
ValidatorAddresses
moved tocosmos.staking
b.
cosmos.base
left with 2 files:cosmos/base/abci.proto
, containing all proto definitions related to simulation / broadcast / responses from tendermint (e.g.Result
,GasInfo
,TxResponse
...)cosmos/base/coin.proto
, containing coin related proto definitionsc. all remaining non-module packages (
kv
,query
,tx
) moved undercosmos.base
tx.proto
file within each module package (as proposed by @amaurymartiny when commenting on Audit Protobuf package names & update RegisterInterface calls #6822)closes: #6822
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