@agoric/cosmos 0.35.0-u20.0 → 0.35.0-u21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/.clang-format +116 -0
  2. package/CHANGELOG.md +14 -2
  3. package/Makefile +38 -67
  4. package/ante/ante.go +2 -2
  5. package/ante/inbound_test.go +1 -1
  6. package/app/app.go +173 -142
  7. package/app/export.go +6 -6
  8. package/app/genesis.go +4 -0
  9. package/app/sim_test.go +299 -50
  10. package/app/upgrade.go +125 -24
  11. package/app/upgrade_test.go +1 -1
  12. package/cmd/agd/agvm.go +1 -1
  13. package/cmd/agd/main.go +1 -1
  14. package/cmd/libdaemon/main.go +34 -1
  15. package/daemon/cmd/root.go +26 -35
  16. package/daemon/cmd/root_test.go +5 -4
  17. package/daemon/cmd/testnet.go +221 -95
  18. package/daemon/main.go +1 -0
  19. package/git-revision.txt +1 -1
  20. package/go.mod +93 -58
  21. package/go.sum +148 -95
  22. package/package.json +6 -3
  23. package/proto/agoric/swingset/genesis.proto +7 -11
  24. package/proto/agoric/swingset/msgs.proto +56 -75
  25. package/proto/agoric/swingset/query.proto +7 -10
  26. package/proto/agoric/swingset/swingset.proto +79 -108
  27. package/proto/agoric/vbank/genesis.proto +5 -5
  28. package/proto/agoric/vbank/msgs.proto +1 -2
  29. package/proto/agoric/vbank/vbank.proto +42 -52
  30. package/proto/agoric/vibc/msgs.proto +8 -11
  31. package/proto/agoric/vstorage/genesis.proto +6 -9
  32. package/proto/agoric/vstorage/query.proto +19 -48
  33. package/proto/agoric/vstorage/vstorage.proto +4 -10
  34. package/proto/agoric/vtransfer/genesis.proto +7 -7
  35. package/proto/buf.gen.gogo.yaml +8 -0
  36. package/proto/buf.gen.pulsar.yaml +17 -0
  37. package/proto/buf.gen.swagger.yaml +5 -0
  38. package/proto/buf.yaml +10 -0
  39. package/scripts/protocgen.sh +14 -21
  40. package/third_party/proto/amino/amino.proto +79 -0
  41. package/third_party/proto/cosmos/base/v1beta1/coin.proto +7 -2
  42. package/third_party/proto/cosmos/ics23/v1/proofs.proto +243 -0
  43. package/third_party/proto/cosmos/msg/v1/msg.proto +30 -0
  44. package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +17 -5
  45. package/third_party/proto/cosmos_proto/cosmos.proto +16 -1
  46. package/third_party/proto/gogoproto/gogo.proto +2 -2
  47. package/third_party/proto/google/protobuf/any.proto +6 -3
  48. package/third_party/proto/ibc/core/channel/v1/channel.proto +1 -1
  49. package/third_party/proto/ibc/core/client/v1/client.proto +4 -2
  50. package/types/address_hooks.go +2 -2
  51. package/types/address_hooks_test.go +3 -3
  52. package/types/ibc_packet.go +3 -3
  53. package/types/ibc_packet_test.go +3 -3
  54. package/vm/client.go +32 -7
  55. package/vm/proto_json.go +2 -2
  56. package/x/swingset/abci.go +1 -1
  57. package/x/swingset/alias.go +0 -1
  58. package/x/swingset/config.go +1 -1
  59. package/x/swingset/keeper/extension_snapshotter.go +1 -1
  60. package/x/swingset/keeper/extension_snapshotter_test.go +1 -1
  61. package/x/swingset/keeper/keeper.go +1 -1
  62. package/x/swingset/keeper/keeper_test.go +1 -1
  63. package/x/swingset/keeper/querier.go +1 -30
  64. package/x/swingset/keeper/swing_store_exports_handler.go +1 -1
  65. package/x/swingset/keeper/swing_store_exports_handler_test.go +1 -1
  66. package/x/swingset/module.go +1 -14
  67. package/x/swingset/types/default-params.go +24 -16
  68. package/x/swingset/types/genesis.pb.go +2 -2
  69. package/x/swingset/types/msgs.pb.go +4 -3
  70. package/x/swingset/types/msgs_test.go +1 -1
  71. package/x/swingset/types/query.pb.go +4 -3
  72. package/x/swingset/types/swingset.pb.go +2 -2
  73. package/x/vbank/genesis.go +1 -1
  74. package/x/vbank/keeper/querier.go +1 -21
  75. package/x/vbank/module.go +1 -16
  76. package/x/vbank/types/genesis.pb.go +2 -2
  77. package/x/vbank/types/msgs.pb.go +3 -2
  78. package/x/vbank/types/query.pb.go +4 -3
  79. package/x/vbank/types/vbank.pb.go +2 -2
  80. package/x/vbank/vbank_test.go +95 -16
  81. package/x/vibc/keeper/keeper.go +8 -5
  82. package/x/vibc/keeper/migrations.go +36 -0
  83. package/x/vibc/keeper/triggers.go +1 -1
  84. package/x/vibc/module.go +9 -17
  85. package/x/vibc/types/expected_keepers.go +5 -10
  86. package/x/vibc/types/ibc_module.go +4 -4
  87. package/x/vibc/types/msgs.go +1 -1
  88. package/x/vibc/types/msgs.pb.go +5 -4
  89. package/x/vibc/types/receiver.go +2 -2
  90. package/x/vlocalchain/keeper/keeper.go +3 -3
  91. package/x/vlocalchain/types/vlocalchain.pb.go +1 -1
  92. package/x/vlocalchain/vlocalchain_test.go +6 -6
  93. package/x/vstorage/alias.go +0 -1
  94. package/x/vstorage/client/cli/query.go +1 -1
  95. package/x/vstorage/genesis.go +1 -1
  96. package/x/vstorage/keeper/keeper.go +6 -5
  97. package/x/vstorage/keeper/keeper_test.go +24 -24
  98. package/x/vstorage/keeper/querier.go +1 -32
  99. package/x/vstorage/keeper/querier_test.go +41 -6
  100. package/x/vstorage/module.go +1 -14
  101. package/x/vstorage/types/genesis.pb.go +2 -2
  102. package/x/vstorage/types/query.pb.go +8 -5
  103. package/x/vstorage/types/vstorage.pb.go +2 -2
  104. package/x/vstorage/vstorage_test.go +3 -3
  105. package/x/vtransfer/genesis.go +1 -1
  106. package/x/vtransfer/ibc_middleware.go +4 -4
  107. package/x/vtransfer/ibc_middleware_test.go +10 -11
  108. package/x/vtransfer/keeper/keeper.go +5 -5
  109. package/x/vtransfer/module.go +1 -14
  110. package/x/vtransfer/types/expected_keepers.go +2 -18
  111. package/x/vtransfer/types/genesis.pb.go +2 -2
  112. package/x/vtransfer/utils_test.go +15 -15
  113. package/daemon/cmd/genaccounts.go +0 -195
package/.clang-format ADDED
@@ -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
+
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [0.35.0-u20.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.34.1...@agoric/cosmos@0.35.0-u20.0) (2025-04-16)
6
+ ## [0.35.0-u21.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.34.1...@agoric/cosmos@0.35.0-u21.0) (2025-06-19)
7
7
 
8
8
 
9
9
  ### ⚠ BREAKING CHANGES
@@ -38,6 +38,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
38
38
  * **cosmos:** Add a vstorage package for decoding CapData ([8bdd7cb](https://github.com/Agoric/agoric-sdk/commit/8bdd7cb915f8e8d4103dc4d21b212aae67644b56))
39
39
  * **cosmos:** add hooking kv reader ([496a430](https://github.com/Agoric/agoric-sdk/commit/496a430c772a1f996e515ef9622e7668e00ea843))
40
40
  * **cosmos:** add required export-dir export cmd option ([3be2986](https://github.com/Agoric/agoric-sdk/commit/3be2986059c9f007d34518deef68e31956e9b45e))
41
+ * **cosmos:** add Reserve withdrawal upgrade ([9e97cbd](https://github.com/Agoric/agoric-sdk/commit/9e97cbd7438e3df5aec96091d18ecdcde720978b))
41
42
  * **cosmos:** Always include alleged name and slot id in vstorage CapData remotable representations ([e2cbffa](https://github.com/Agoric/agoric-sdk/commit/e2cbffaccbd1da7f38c2358fd4d1fbbc2e1abd9c))
42
43
  * **cosmos:** clean up `OnStartHook` and `OnExitHook` signatures ([158d831](https://github.com/Agoric/agoric-sdk/commit/158d83156cf404d789882bb8bf34fe723d9704ec))
43
44
  * **cosmos:** encapsulate comms to agvm RPC ([e9a5c94](https://github.com/Agoric/agoric-sdk/commit/e9a5c943d2518c432329f9c1fe96e5a3f47608b4))
@@ -49,7 +50,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
49
50
  * **cosmos:** KVEntry implements json Marshaler and Unmarshaller ([1bba859](https://github.com/Agoric/agoric-sdk/commit/1bba8592eee0e24e480c407095f0f63ccca4a242))
50
51
  * **cosmos:** make vm comms use `context.Context` ([fa1754c](https://github.com/Agoric/agoric-sdk/commit/fa1754c791ba6c848e6b94f3a75051c6b4cc69f6))
51
52
  * **cosmos:** new `IBCPacket` helpers to tame JSON ([f5a10b6](https://github.com/Agoric/agoric-sdk/commit/f5a10b6457501c9be9ae396bd1c7a8d43ea42dd6))
52
- * **cosmos:** Next upgrade is agoric-upgrade-20 ([2631f84](https://github.com/Agoric/agoric-sdk/commit/2631f847b827a284c4ad11632c7f0ee914f78950))
53
+ * **cosmos:** Next upgrade is agoric-upgrade-21 ([39b5190](https://github.com/Agoric/agoric-sdk/commit/39b5190966dca03d8022ebd191c786647c8a3c3f))
53
54
  * **cosmos:** prevent VM port handlers from panicking ([afd6017](https://github.com/Agoric/agoric-sdk/commit/afd60170d453865cfa871a01e8d8a74ffef9221a))
54
55
  * **cosmos:** propagate and handle shutdown message ([ac12e6d](https://github.com/Agoric/agoric-sdk/commit/ac12e6d57b3a50e079744f7a6faced7f4bebb957))
55
56
  * **cosmos:** separate swing-store export data from genesis file ([f476bd5](https://github.com/Agoric/agoric-sdk/commit/f476bd50fb3ca5df0c4f43b20e059e05a2659b4c))
@@ -125,18 +126,24 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
125
126
  * **builders:** use proper `oracleBrand` subkey case ([52f02b7](https://github.com/Agoric/agoric-sdk/commit/52f02b75b6706ee455a32ff83617dd5afb7342a7))
126
127
  * **cosmic-swingset:** add missing bits for maxVatsOnline ([8c0c177](https://github.com/Agoric/agoric-sdk/commit/8c0c17752f7439db6f7aee9f88be1dedce2a1bf1))
127
128
  * **cosmic-swingset:** plumbing for maxVatsOnline ([45a759a](https://github.com/Agoric/agoric-sdk/commit/45a759a71c8abc724618a12dfd8ae72552b9783e))
129
+ * **cosmos-vm:** allow interleaved client requests ([a2a1cec](https://github.com/Agoric/agoric-sdk/commit/a2a1cec831c4556add77e099621253526596a0f6))
128
130
  * **cosmos-vstorage:** split 'size_delta' counter into 'size_increase' and 'size_decrease' ([#11063](https://github.com/Agoric/agoric-sdk/issues/11063)) ([3825031](https://github.com/Agoric/agoric-sdk/commit/38250315cedf68dc801b75bee867818a3846fae7)), closes [#11062](https://github.com/Agoric/agoric-sdk/issues/11062) [#10938](https://github.com/Agoric/agoric-sdk/issues/10938) [/github.com/Agoric/agoric-sdk/pull/10997#discussion_r1956583919](https://github.com/Agoric//github.com/Agoric/agoric-sdk/pull/10997/issues/discussion_r1956583919)
129
131
  * **cosmos:** add action context to core evals ([7cfae88](https://github.com/Agoric/agoric-sdk/commit/7cfae88a1d2c31d91030a8742972d9f03d331059))
132
+ * **cosmos:** add some missing pieces ([5cf1f52](https://github.com/Agoric/agoric-sdk/commit/5cf1f522d319434ec30cfb7961e2f3e607326b5f))
130
133
  * **cosmos:** Add support for iavl options ([c6770ec](https://github.com/Agoric/agoric-sdk/commit/c6770ece8dd7f3f56c40b3cb80be245a99e01c9d))
131
134
  * **cosmos:** correctly detect presence of Agoric VM ([c7e266e](https://github.com/Agoric/agoric-sdk/commit/c7e266e035cc454bf74e88e96959f862ece146f8))
132
135
  * **cosmos:** don't init controller before upgrade ([b4260af](https://github.com/Agoric/agoric-sdk/commit/b4260afd158c9f1c6faae8ee95019e1e7c385e5f))
133
136
  * **cosmos:** don't rerun store migrations on upgrade ([8738a9b](https://github.com/Agoric/agoric-sdk/commit/8738a9bee247096da1dc72e2d2ba9c338a0cb739))
134
137
  * **cosmos:** express dependency between proposals ([3cb85b8](https://github.com/Agoric/agoric-sdk/commit/3cb85b8a67fb69adf1bb0404cd101d205e05cd20))
138
+ * **cosmos:** get `agd start` running again ([ff54e13](https://github.com/Agoric/agoric-sdk/commit/ff54e1369ac9dbbc79ec2e480ea8605201009746))
139
+ * **cosmos:** ibc-go app migration up to `v7.2` ([ef4d95d](https://github.com/Agoric/agoric-sdk/commit/ef4d95d9a9c08a73b5622119a89707eaff6f41cf))
135
140
  * **cosmos:** make agd upgrade work ([1aa1d26](https://github.com/Agoric/agoric-sdk/commit/1aa1d26f05875c91fd47da1ad7386d8979f94b03))
136
141
  * **cosmos:** module order independent init and bootstrap ([e7f5b65](https://github.com/Agoric/agoric-sdk/commit/e7f5b658b67a18c0a13544515f61216598326265))
142
+ * **cosmos:** more upgrade corrections for app ([11ac62e](https://github.com/Agoric/agoric-sdk/commit/11ac62e451216f9153218ab12ef6cadeec5d6b9b))
137
143
  * **cosmos:** no global state in `vm` ([ab02669](https://github.com/Agoric/agoric-sdk/commit/ab0266908ec9f36587d3521287808f7a30ed9207))
138
144
  * **cosmos:** only allow snapshot export at latest height ([#9601](https://github.com/Agoric/agoric-sdk/issues/9601)) ([6bc363b](https://github.com/Agoric/agoric-sdk/commit/6bc363b5624bab5fd151ec4889b5f5116f2cf53c)), closes [#9600](https://github.com/Agoric/agoric-sdk/issues/9600)
139
145
  * **cosmos:** prevent Golang error wrapping stack frame divergence ([3390d90](https://github.com/Agoric/agoric-sdk/commit/3390d902f42a96e502d459cad224d97c9971e307))
146
+ * **cosmos:** resolve compilation errors ([607c136](https://github.com/Agoric/agoric-sdk/commit/607c136adddd5f9316b5be65cd861250f466bad4))
140
147
  * **cosmos:** return an error if version is unsupported ([d17e55b](https://github.com/Agoric/agoric-sdk/commit/d17e55b5d5c0a178e49ed9a0402ed52827074426))
141
148
  * **cosmos:** Support building on Linux aarch64 ([ff2e5ed](https://github.com/Agoric/agoric-sdk/commit/ff2e5ed20e52e6484a6cba126b0739b0b1fc6360))
142
149
  * **cosmos:** update more `vtransfer` app.go wiring ([a171561](https://github.com/Agoric/agoric-sdk/commit/a1715615a01fce060eb990e1b2bb9a6d6a2a3566))
@@ -149,9 +156,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
149
156
  * **golang/cosmos:** fix-up a rebase ([59fdc6f](https://github.com/Agoric/agoric-sdk/commit/59fdc6ff6fbe6f167467c15c153c71b82a54bcf4))
150
157
  * govulncheck updates ([34d5056](https://github.com/Agoric/agoric-sdk/commit/34d505671509c6883f55cca150b610a18978d1f0))
151
158
  * handle hang-on-halt behavior from agoric-labs/cosmos-sdk[#305](https://github.com/Agoric/agoric-sdk/issues/305) ([a4fd510](https://github.com/Agoric/agoric-sdk/commit/a4fd51067ff86d84c084292d1f38b2ca3de639b9))
159
+ * **libdaemon:** handle panics in `//export` functions` ([22d8d3f](https://github.com/Agoric/agoric-sdk/commit/22d8d3feb9f7bf09a31f5ed3c6999642726609a6))
152
160
  * **network:** introduce `Finalizer` to close network ([54b9b00](https://github.com/Agoric/agoric-sdk/commit/54b9b009fff3fd3ab54f731adee97195acaa238f))
153
161
  * pick up snapshot initiation fix ([38f6c3f](https://github.com/Agoric/agoric-sdk/commit/38f6c3f8dfd4a5ee35f6e7f85bc59853cb7325d9))
162
+ * remove all error on app ([22a0a7d](https://github.com/Agoric/agoric-sdk/commit/22a0a7dc73d1c61e51db100a60086bf5608f75bb))
163
+ * remove all errors from root ([982eedf](https://github.com/Agoric/agoric-sdk/commit/982eedf3b732a2a9b45bac0cd36b3ab24c9b0da9))
164
+ * remove CometBFT committing client ([4df9f70](https://github.com/Agoric/agoric-sdk/commit/4df9f707bc5a1c7582624da3487a3bde511acbe2))
154
165
  * remove unesesary error checks and returns ([5f789e8](https://github.com/Agoric/agoric-sdk/commit/5f789e8ea8079f9176723ca318c6aeabb3b1ccfa))
166
+ * simcli get flags ([a054b7e](https://github.com/Agoric/agoric-sdk/commit/a054b7e2ea1e3c570d1fd40f64ac044eb0e781ac))
155
167
  * unwrap account keeper for app module ([20a89f0](https://github.com/Agoric/agoric-sdk/commit/20a89f06061cae01166b1b2ca738815c58dc32ed))
156
168
  * update dependencies to fix tests ([75d6b1d](https://github.com/Agoric/agoric-sdk/commit/75d6b1dcc0d7286770679bd6d042b38fa76c4312))
157
169
  * update protobuf download and generation for ibc-go v4 ([9cdfaef](https://github.com/Agoric/agoric-sdk/commit/9cdfaefcf236711676a0f3ed6e47dbf3c6d77402))
package/Makefile CHANGED
@@ -3,9 +3,10 @@
3
3
  NAME := $(shell sed -ne 's/.*"name": "\([^"]*\)".*/\1/p' package.json)
4
4
  VERSION := $(shell sed -ne 's/.*"version": "\([^"]*\)".*/\1/p' package.json)
5
5
  GIT_COMMIT = $(shell hash=`git rev-parse --short HEAD 2>/dev/null`; if test -n "$$hash"; then echo $$hash`git diff --quiet || echo -dirty`; else cat git-revision.txt; fi)
6
- PR_TARGET_REPO = ../../.git
6
+ PR_TARGET_REPO = https://github.com/Agoric/agoric-sdk.git
7
7
  # TODO: figure out how to handle other branches like pismo-release
8
8
  PR_TARGET_BRANCH = master
9
+ DOCKER := $(shell which docker)
9
10
 
10
11
  default: all
11
12
 
@@ -90,22 +91,38 @@ endif
90
91
  ### Protobuf ###
91
92
  ###############################################################################
92
93
 
93
- proto-gen: proto-tools
94
- PATH="${BIN}:$$PATH" ./scripts/protocgen.sh
94
+ protoVer=0.15.3
95
+ protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
96
+ protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
95
97
 
96
- proto-lint: proto-tools
97
- ${BIN}/buf lint
98
+ proto-all: proto-format proto-lint proto-gen
98
99
 
99
- proto-check-breaking: proto-tools
100
- ${BIN}/buf breaking --against $(PR_TARGET_REPO)#branch=$(PR_TARGET_BRANCH),subdir=golang/cosmos
100
+ proto-gen:
101
+ @echo "Generating Protobuf files"
102
+ @$(protoImage) sh ./scripts/protocgen.sh
101
103
 
102
- GOGO_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/gogo/protobuf)
104
+ proto-format:
105
+ @$(protoImage) find ./proto -name "*.proto" -exec clang-format -i {} \;
106
+
107
+ proto-lint:
108
+ @$(protoImage) buf lint --error-format=json ./proto
109
+
110
+ proto-check-breaking:
111
+ @$(protoImage) buf breaking --against $(PR_TARGET_REPO)#branch=$(PR_TARGET_BRANCH),subdir=golang/cosmos
112
+
113
+ GOGO_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/gogoproto)
103
114
  # GOOGLE_API_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/googleapis/googleapis)/google/api
104
- IBC_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v6)/proto/ibc/core
115
+ IBC_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v7)/proto/ibc/core
105
116
  COSMOS_PROTO_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-proto)/proto/cosmos_proto
106
117
  COSMOS_SDK_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-sdk)/proto/cosmos
118
+ COSMOS_SDK_AMINO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-sdk)/proto/amino
119
+
120
+ # Needed for cosmic-proto.
121
+ COSMOS_ICS23_URL = https://buf.build/cosmos/ics23/raw/main/-/cosmos/ics23/v1
107
122
 
108
123
  COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto
124
+ COSMOS_ICS23_TYPES = third_party/proto/cosmos/ics23/v1
125
+ COSMOS_SDK_AMINO_TYPES = third_party/proto/amino
109
126
  GOGO_PROTO_TYPES = third_party/proto/gogoproto
110
127
  GOOGLE_API_TYPES = third_party/proto/google/api
111
128
  GOOGLE_PROTO_TYPES = third_party/proto/google/protobuf
@@ -114,12 +131,17 @@ IBC_CLIENT_TYPES = third_party/proto/ibc/core/client/v1
114
131
  SDK_BASE_TYPES = third_party/proto/cosmos/base/v1beta1
115
132
  SDK_QUERY_TYPES = third_party/proto/cosmos/base/query/v1beta1
116
133
  SDK_UPGRADE_TYPES = third_party/proto/cosmos/upgrade/v1beta1
134
+ SDK_MSG_TYPES = third_party/proto/cosmos/msg/v1
117
135
 
118
136
  proto-update-deps:
119
137
  mkdir -p $(COSMOS_PROTO_TYPES)
120
138
  url="$(COSMOS_PROTO_PROTO_URL)"; \
121
139
  curl -sSL $$url/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto
122
140
 
141
+ mkdir -p $(COSMOS_ICS23_TYPES)
142
+ url="$(COSMOS_ICS23_URL)"; \
143
+ curl -sSL $$url/proofs.proto > $(COSMOS_ICS23_TYPES)/proofs.proto
144
+
123
145
  mkdir -p $(GOGO_PROTO_TYPES)
124
146
  url="$(GOGO_PROTO_URL)"; \
125
147
  curl -sSL $$url/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto
@@ -147,66 +169,15 @@ proto-update-deps:
147
169
  mkdir -p $(SDK_QUERY_TYPES) && \
148
170
  curl -sSL $$url/base/query/v1beta1/pagination.proto > $(SDK_QUERY_TYPES)/pagination.proto && \
149
171
  mkdir -p $(SDK_UPGRADE_TYPES) && \
150
- curl -sSL $$url/upgrade/v1beta1/upgrade.proto > $(SDK_UPGRADE_TYPES)/upgrade.proto
151
-
152
- UNAME_S ?= $(shell uname -s)
153
- UNAME_M ?= $(shell uname -m)
154
-
155
- BUF_VERSION ?= 1.0.0
156
-
157
- PROTOC_VERSION ?= 3.11.2
158
- ifeq ($(UNAME_S),Linux)
159
- ifeq ($(UNAME_M),aarch64)
160
- PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-linux-aarch_64.zip
161
- else
162
- PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-linux-x86_64.zip
163
- endif
164
- endif
165
- ifeq ($(UNAME_S),Darwin)
166
- PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-osx-x86_64.zip
167
- endif
168
-
169
- proto-tools: proto-tools-stamp buf grpc-gateway-stamp
170
-
171
- proto-tools-stamp:
172
- echo "Installing protoc compiler..."
173
- mkdir -p "${BIN}"
174
- (cd /tmp; \
175
- curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"; \
176
- unzip -o ${PROTOC_ZIP} -d "${BIN}/.." bin/protoc 'include/*'; \
177
- rm -f ${PROTOC_ZIP})
178
-
179
- echo "Installing protoc-gen-gocosmos..."
180
- go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos
181
-
182
- # Create dummy file to satisfy dependency and avoid
183
- # rebuilding when this Makefile target is hit twice
184
- # in a row
185
- touch $@
186
-
187
- buf: buf-stamp
188
-
189
- buf-stamp:
190
- echo "Installing buf..."
191
- curl -sSL \
192
- "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}" \
193
- -o "${BIN}/buf" && \
194
- chmod +x "${BIN}/buf"
195
-
196
- touch $@
197
-
198
- GATEWAY_PKGS = \
199
- github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \
200
- github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \
201
- google.golang.org/protobuf/cmd/protoc-gen-go
202
-
203
- grpc-gateway-stamp:
204
- go install $(GATEWAY_PKGS)
205
- touch $@
172
+ curl -sSL $$url/upgrade/v1beta1/upgrade.proto > $(SDK_UPGRADE_TYPES)/upgrade.proto && \
173
+ mkdir -p $(SDK_MSG_TYPES) && \
174
+ curl -sSL $$url/msg/v1/msg.proto > $(SDK_MSG_TYPES)/msg.proto
206
175
 
207
- tools-clean:
208
- rm -f proto-tools-stamp buf-stamp grpc-gateway-stamp
176
+ url="$(COSMOS_SDK_AMINO_URL)"; \
177
+ mkdir -p $(COSMOS_SDK_AMINO_TYPES) && \
178
+ curl -sSL $$url/amino.proto > $(COSMOS_SDK_AMINO_TYPES)/amino.proto
209
179
 
180
+ .PHONY: proto-all proto-format proto-lint proto-gen proto-check-breaking proto-update-deps
210
181
 
211
182
  lint:
212
183
  golangci-lint run
package/ante/ante.go CHANGED
@@ -5,8 +5,8 @@ import (
5
5
  sdk "github.com/cosmos/cosmos-sdk/types"
6
6
  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
7
7
  "github.com/cosmos/cosmos-sdk/x/auth/ante"
8
- ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante"
9
- ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
8
+ ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
9
+ ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
10
10
  )
11
11
 
12
12
  // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
@@ -12,7 +12,7 @@ import (
12
12
  sdk "github.com/cosmos/cosmos-sdk/types"
13
13
  "github.com/cosmos/cosmos-sdk/types/tx"
14
14
  banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
15
- "github.com/gogo/protobuf/proto"
15
+ "github.com/cosmos/gogoproto/proto"
16
16
  )
17
17
 
18
18
  func TestInboundAnteHandle(t *testing.T) {