Skip to content

Commit c4b8a15

Browse files
committed
build(agd): run make proto-gen
1 parent 4f0f55d commit c4b8a15

25 files changed

+376
-362
lines changed

golang/cosmos/.clang-format

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
Language: Proto
3+
BasedOnStyle: Google
4+
AccessModifierOffset: -2
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: true
7+
AlignConsecutiveDeclarations: true
8+
AlignEscapedNewlines: Right
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: true
12+
AllowShortBlocksOnASingleLine: true
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: Empty
15+
AllowShortIfStatementsOnASingleLine: false
16+
AllowShortLoopsOnASingleLine: false
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: false
20+
AlwaysBreakTemplateDeclarations: false
21+
BinPackArguments: true
22+
BinPackParameters: true
23+
BraceWrapping:
24+
AfterClass: false
25+
AfterControlStatement: false
26+
AfterEnum: false
27+
AfterFunction: false
28+
AfterNamespace: false
29+
AfterObjCDeclaration: false
30+
AfterStruct: false
31+
AfterUnion: false
32+
AfterExternBlock: false
33+
BeforeCatch: false
34+
BeforeElse: false
35+
IndentBraces: false
36+
SplitEmptyFunction: true
37+
SplitEmptyRecord: true
38+
SplitEmptyNamespace: true
39+
BreakBeforeBinaryOperators: None
40+
BreakBeforeBraces: Attach
41+
BreakBeforeInheritanceComma: false
42+
BreakBeforeTernaryOperators: true
43+
BreakConstructorInitializersBeforeComma: false
44+
BreakConstructorInitializers: BeforeColon
45+
BreakAfterJavaFieldAnnotations: false
46+
BreakStringLiterals: true
47+
ColumnLimit: 120
48+
CommentPragmas: '^ IWYU pragma:'
49+
CompactNamespaces: false
50+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
51+
ConstructorInitializerIndentWidth: 4
52+
ContinuationIndentWidth: 4
53+
Cpp11BracedListStyle: true
54+
DerivePointerAlignment: false
55+
DisableFormat: false
56+
ExperimentalAutoDetectBinPacking: false
57+
FixNamespaceComments: true
58+
ForEachMacros:
59+
- foreach
60+
- Q_FOREACH
61+
- BOOST_FOREACH
62+
IncludeBlocks: Preserve
63+
IncludeCategories:
64+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
65+
Priority: 2
66+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
67+
Priority: 3
68+
- Regex: '.*'
69+
Priority: 1
70+
IncludeIsMainRegex: '(Test)?$'
71+
IndentCaseLabels: false
72+
IndentPPDirectives: None
73+
IndentWidth: 2
74+
IndentWrappedFunctionNames: false
75+
JavaScriptQuotes: Leave
76+
JavaScriptWrapImports: true
77+
KeepEmptyLinesAtTheStartOfBlocks: true
78+
MacroBlockBegin: ''
79+
MacroBlockEnd: ''
80+
MaxEmptyLinesToKeep: 1
81+
NamespaceIndentation: None
82+
ObjCBlockIndentWidth: 2
83+
ObjCSpaceAfterProperty: false
84+
ObjCSpaceBeforeProtocolList: true
85+
PenaltyBreakAssignment: 2
86+
PenaltyBreakBeforeFirstCallParameter: 19
87+
PenaltyBreakComment: 300
88+
PenaltyBreakFirstLessLess: 120
89+
PenaltyBreakString: 1000
90+
PenaltyExcessCharacter: 1000000
91+
PenaltyReturnTypeOnItsOwnLine: 60
92+
PointerAlignment: Right
93+
RawStringFormats:
94+
- Delimiters:
95+
- pb
96+
Language: TextProto
97+
BasedOnStyle: Google
98+
ReflowComments: true
99+
SortIncludes: true
100+
SortUsingDeclarations: true
101+
SpaceAfterCStyleCast: false
102+
SpaceAfterTemplateKeyword: true
103+
SpaceBeforeAssignmentOperators: true
104+
SpaceBeforeParens: ControlStatements
105+
SpaceInEmptyParentheses: false
106+
SpacesBeforeTrailingComments: 1
107+
SpacesInAngles: false
108+
SpacesInContainerLiterals: false
109+
SpacesInCStyleCastParentheses: false
110+
SpacesInParentheses: false
111+
SpacesInSquareBrackets: false
112+
Standard: Cpp11
113+
TabWidth: 8
114+
UseTab: Never
115+
---
116+

golang/cosmos/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ proto-gen:
101101
@echo "Generating Protobuf files"
102102
@$(protoImage) sh ./scripts/protocgen.sh
103103

104+
proto-format:
105+
@$(protoImage) find ./proto -name "*.proto" -exec clang-format -i {} \;
106+
104107
proto-lint:
105108
@$(protoImage) buf lint --error-format=json ./proto
106109

@@ -174,7 +177,7 @@ proto-update-deps:
174177
mkdir -p $(COSMOS_SDK_AMINO_TYPES) && \
175178
curl -sSL $$url/amino.proto > $(COSMOS_SDK_AMINO_TYPES)/amino.proto
176179

177-
.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps
180+
.PHONY: proto-all proto-format proto-lint proto-gen proto-check-breaking proto-update-deps
178181

179182
lint:
180183
golangci-lint run

golang/cosmos/proto/agoric/swingset/genesis.proto

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,19 @@ option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types
88

99
// The initial or exported state.
1010
message GenesisState {
11-
option (gogoproto.equal) = false;
11+
option (gogoproto.equal) = false;
1212

13-
Params params = 2 [(gogoproto.nullable) = false];
13+
Params params = 2 [(gogoproto.nullable) = false];
1414

15-
State state = 3 [(gogoproto.nullable) = false];
15+
State state = 3 [(gogoproto.nullable) = false];
1616

17-
repeated SwingStoreExportDataEntry swing_store_export_data = 4 [
18-
(gogoproto.jsontag) = "swingStoreExportData"
19-
];
17+
repeated SwingStoreExportDataEntry swing_store_export_data = 4 [(gogoproto.jsontag) = "swingStoreExportData"];
2018

21-
string swing_store_export_data_hash = 5 [
22-
(gogoproto.jsontag) = "swingStoreExportDataHash"
23-
];
19+
string swing_store_export_data_hash = 5 [(gogoproto.jsontag) = "swingStoreExportDataHash"];
2420
}
2521

2622
// A SwingStore "export data" entry.
2723
message SwingStoreExportDataEntry {
28-
string key = 1;
29-
string value = 2;
24+
string key = 1;
25+
string value = 2;
3026
}

golang/cosmos/proto/agoric/swingset/msgs.proto

Lines changed: 56 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,16 @@ service Msg {
2121

2222
// MsgDeliverInbound defines an SDK message for delivering an eventual send
2323
message MsgDeliverInbound {
24-
option (gogoproto.equal) = false;
25-
26-
repeated string messages = 1 [
27-
(gogoproto.jsontag) = "messages",
28-
(gogoproto.moretags) = "yaml:\"messages\""
29-
];
30-
repeated uint64 nums = 2 [
31-
(gogoproto.jsontag) = "nums",
32-
(gogoproto.moretags) = "yaml:\"nums\""
33-
];
34-
uint64 ack = 3 [
35-
(gogoproto.jsontag) = "ack",
36-
(gogoproto.moretags) = "yaml:\"ack\""
37-
];
38-
bytes submitter = 4 [
39-
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
40-
(gogoproto.jsontag) = "submitter",
41-
(gogoproto.moretags) = "yaml:\"submitter\""
42-
];
24+
option (gogoproto.equal) = false;
25+
26+
repeated string messages = 1 [(gogoproto.jsontag) = "messages", (gogoproto.moretags) = "yaml:\"messages\""];
27+
repeated uint64 nums = 2 [(gogoproto.jsontag) = "nums", (gogoproto.moretags) = "yaml:\"nums\""];
28+
uint64 ack = 3 [(gogoproto.jsontag) = "ack", (gogoproto.moretags) = "yaml:\"ack\""];
29+
bytes submitter = 4 [
30+
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
31+
(gogoproto.jsontag) = "submitter",
32+
(gogoproto.moretags) = "yaml:\"submitter\""
33+
];
4334
}
4435

4536
// MsgDeliverInboundResponse is an empty reply.
@@ -49,16 +40,16 @@ message MsgDeliverInboundResponse {}
4940
// action that *does not* spend any assets (other than gas fees/stamps). This
5041
// message type is typically protected by feegrant budgets.
5142
message MsgWalletAction {
52-
option (gogoproto.equal) = false;
43+
option (gogoproto.equal) = false;
5344

54-
bytes owner = 1 [
55-
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
56-
(gogoproto.jsontag) = "owner",
57-
(gogoproto.moretags) = "yaml:\"owner\""
58-
];
45+
bytes owner = 1 [
46+
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
47+
(gogoproto.jsontag) = "owner",
48+
(gogoproto.moretags) = "yaml:\"owner\""
49+
];
5950

60-
// The action to perform, as JSON-stringified marshalled data.
61-
string action = 2;
51+
// The action to perform, as JSON-stringified marshalled data.
52+
string action = 2;
6253
}
6354

6455
// MsgWalletActionResponse is an empty reply.
@@ -68,70 +59,60 @@ message MsgWalletActionResponse {}
6859
// perform an action that *does spend the owner's assets.* This message type is
6960
// typically protected by explicit confirmation by the user.
7061
message MsgWalletSpendAction {
71-
option (gogoproto.equal) = false;
62+
option (gogoproto.equal) = false;
7263

73-
bytes owner = 1 [
74-
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
75-
(gogoproto.jsontag) = "owner",
76-
(gogoproto.moretags) = "yaml:\"owner\""
77-
];
64+
bytes owner = 1 [
65+
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
66+
(gogoproto.jsontag) = "owner",
67+
(gogoproto.moretags) = "yaml:\"owner\""
68+
];
7869

79-
// The action to perform, as JSON-stringified marshalled data.
80-
string spend_action = 2;
70+
// The action to perform, as JSON-stringified marshalled data.
71+
string spend_action = 2;
8172
}
8273

8374
// MsgWalletSpendActionResponse is an empty reply.
8475
message MsgWalletSpendActionResponse {}
8576

8677
// MsgProvision defines an SDK message for provisioning a client to the chain
8778
message MsgProvision {
88-
option (gogoproto.equal) = false;
89-
90-
string nickname = 1 [
91-
(gogoproto.jsontag) = "nickname",
92-
(gogoproto.moretags) = "yaml:\"nickname\""
93-
];
94-
bytes address = 2 [
95-
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
96-
(gogoproto.jsontag) = "address",
97-
(gogoproto.moretags) = "yaml:\"address\""
98-
];
99-
repeated string power_flags = 3 [
100-
(gogoproto.customname) = "PowerFlags",
101-
(gogoproto.jsontag) = "powerFlags",
102-
(gogoproto.moretags) = "yaml:\"powerFlags\""
103-
];
104-
bytes submitter = 4 [
105-
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
106-
(gogoproto.jsontag) = "submitter",
107-
(gogoproto.moretags) = "yaml:\"submitter\""
108-
];
79+
option (gogoproto.equal) = false;
80+
81+
string nickname = 1 [(gogoproto.jsontag) = "nickname", (gogoproto.moretags) = "yaml:\"nickname\""];
82+
bytes address = 2 [
83+
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
84+
(gogoproto.jsontag) = "address",
85+
(gogoproto.moretags) = "yaml:\"address\""
86+
];
87+
repeated string power_flags = 3 [
88+
(gogoproto.customname) = "PowerFlags",
89+
(gogoproto.jsontag) = "powerFlags",
90+
(gogoproto.moretags) = "yaml:\"powerFlags\""
91+
];
92+
bytes submitter = 4 [
93+
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
94+
(gogoproto.jsontag) = "submitter",
95+
(gogoproto.moretags) = "yaml:\"submitter\""
96+
];
10997
}
11098

11199
// MsgProvisionResponse is an empty reply.
112100
message MsgProvisionResponse {}
113101

114102
// MsgInstallBundle carries a signed bundle to SwingSet.
115103
message MsgInstallBundle {
116-
string bundle = 1 [
117-
(gogoproto.jsontag) = "bundle",
118-
(gogoproto.moretags) = "yaml:\"bundle\""
119-
];
120-
bytes submitter = 2 [
121-
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
122-
(gogoproto.jsontag) = "submitter",
123-
(gogoproto.moretags) = "yaml:\"submitter\""
124-
];
125-
// Either bundle or compressed_bundle will be set.
126-
// Default compression algorithm is gzip.
127-
bytes compressed_bundle = 3 [
128-
(gogoproto.jsontag) = "compressedBundle",
129-
(gogoproto.moretags) = "yaml:\"compressedBundle\""
130-
];
131-
// Size in bytes of uncompression of compressed_bundle.
132-
int64 uncompressed_size = 4 [
133-
(gogoproto.jsontag) = "uncompressedSize"
134-
];
104+
string bundle = 1 [(gogoproto.jsontag) = "bundle", (gogoproto.moretags) = "yaml:\"bundle\""];
105+
bytes submitter = 2 [
106+
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
107+
(gogoproto.jsontag) = "submitter",
108+
(gogoproto.moretags) = "yaml:\"submitter\""
109+
];
110+
// Either bundle or compressed_bundle will be set.
111+
// Default compression algorithm is gzip.
112+
bytes compressed_bundle = 3
113+
[(gogoproto.jsontag) = "compressedBundle", (gogoproto.moretags) = "yaml:\"compressedBundle\""];
114+
// Size in bytes of uncompression of compressed_bundle.
115+
int64 uncompressed_size = 4 [(gogoproto.jsontag) = "uncompressedSize"];
135116
}
136117

137118
// MsgInstallBundleResponse is an empty acknowledgement that an install bundle

golang/cosmos/proto/agoric/swingset/query.proto

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ message QueryParamsResponse {
3737
// QueryEgressRequest is the request type for the Query/Egress RPC method
3838
message QueryEgressRequest {
3939
bytes peer = 1 [
40-
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
41-
(gogoproto.jsontag) = "peer",
42-
(gogoproto.moretags) = "yaml:\"peer\""
40+
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
41+
(gogoproto.jsontag) = "peer",
42+
(gogoproto.moretags) = "yaml:\"peer\""
4343
];
4444
}
4545

@@ -51,16 +51,13 @@ message QueryEgressResponse {
5151
// QueryMailboxRequest is the mailbox query.
5252
message QueryMailboxRequest {
5353
bytes peer = 1 [
54-
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
55-
(gogoproto.jsontag) = "peer",
56-
(gogoproto.moretags) = "yaml:\"peer\""
54+
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
55+
(gogoproto.jsontag) = "peer",
56+
(gogoproto.moretags) = "yaml:\"peer\""
5757
];
5858
}
5959

6060
// QueryMailboxResponse is the mailbox response.
6161
message QueryMailboxResponse {
62-
string value = 1 [
63-
(gogoproto.jsontag) = "value",
64-
(gogoproto.moretags) = "yaml:\"value\""
65-
];
62+
string value = 1 [(gogoproto.jsontag) = "value", (gogoproto.moretags) = "yaml:\"value\""];
6663
}

0 commit comments

Comments
 (0)