Skip to content

feat(proto): publish proto on BSR#7

Open
Vritra4 wants to merge 1 commit intomainfrom
feat/proto-actions
Open

feat(proto): publish proto on BSR#7
Vritra4 wants to merge 1 commit intomainfrom
feat/proto-actions

Conversation

@Vritra4
Copy link
Copy Markdown

@Vritra4 Vritra4 commented Mar 18, 2026

Summary by CodeRabbit

  • New Features

    • Added ProviderConfig support for enhanced market data provider configuration.
    • Added GetPrices batch query method to efficiently retrieve multiple currency pair prices.
    • Extended Ticker with decimals, minimum provider count, and enabled status fields.
    • Added currency pair management capabilities (add/remove operations) with response messages.
    • Added module authority configuration for improved governance.
  • Chores

    • Updated Protobuf tooling version to 0.16.0.
    • Updated module configuration and lint standards.

@Vritra4 Vritra4 requested review from a team and songwongtp March 18, 2026 06:42
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 18, 2026

The latest Buf updates on your PR. Results from workflow Protobuf / buf-build (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 18, 2026, 6:50 AM

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 18, 2026

Walkthrough

This PR removes two Buf-related GitHub Actions workflows, introduces a consolidated Protobuf workflow, updates the Buf version to 0.16.0, reorganizes proto configuration and imports, and extends marketmap and oracle proto messages with new fields, RPC methods, and standardized formatting conventions.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/buf_breaking.yml, .github/workflows/buf_push.yml, .github/workflows/proto.yml
Removed breaking changes and push workflows; added unified Protobuf workflow triggering on main/tag pushes, PRs affecting proto/*, and delete events with buf-build action.
Configuration Files
Makefile, proto/buf.yaml
Updated protoVer from 0.15.1 to 0.16.0; changed Buf module name from buf.build/skip-mev/connect to buf.build/initia-labs/connect; updated lint rules from DEFAULT to STANDARD with exclusions for RPC_RESPONSE_STANDARD_NAME, ENUM_VALUE_PREFIX, and ENUM_ZERO_VALUE_SUFFIX.
Marketmap Proto Definitions
proto/connect/marketmap/v2/market.proto, proto/connect/marketmap/v2/query.proto, proto/connect/marketmap/v2/tx.proto, proto/connect/marketmap/v2/genesis.proto, proto/connect/marketmap/module/v2/module.proto
Added ProviderConfig message; extended Ticker with decimals, min_provider_count, and enabled fields; standardized field option formatting; added authority field to Module message; reorganized imports and consolidated multi-line annotations to single-line format.
Oracle Proto Definitions
proto/connect/oracle/v2/query.proto, proto/connect/oracle/v2/tx.proto, proto/connect/oracle/v2/genesis.proto, proto/connect/oracle/module/v2/module.proto
Added GetPrices RPC method with GetPricesRequest and GetPricesResponse messages; added GetAllCurrencyPairsRequest and CurrencyPairMapping messages; added MsgAddCurrencyPairsResponse and MsgRemoveCurrencyPairsResponse; standardized field annotations and HTTP bindings to single-line format; updated imports and option formatting.
Service Definitions
proto/connect/service/v2/oracle.proto
Updated import declarations; consolidated HTTP options to single-line format; standardized field option formatting for prices and timestamp fields.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 With proto messages now refined and new,
APIs bloom in organized review,
Buf workflows merge in streamlined grace,
While lint rules find their proper place! 🌿

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(proto): publish proto on BSR' clearly summarizes the main change: publishing proto files on the Buf Schema Registry (BSR). It directly relates to the primary modifications across the pull request, including removal of old proto workflows, addition of new consolidated proto workflow, and proto configuration updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/proto-actions
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable the changed files summary in the walkthrough.

Disable the reviews.changed_files_summary setting to disable the changed files summary in the walkthrough.

@Vritra4 Vritra4 marked this pull request as draft March 18, 2026 06:43
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
.github/workflows/proto.yml (2)

13-16: Add explicit pull_request event types if using buf skip breaking label for re-runs.

According to Buf's official documentation, the workflow must include labeled and unlabeled event types so toggling the buf skip breaking label re-runs checks. Without these types, the workflow will not respond to label changes.

🔧 Suggested trigger update
   pull_request:
+    types: [opened, synchronize, reopened, labeled, unlabeled]
     paths:
       - "proto/**"
       - ".github/workflows/proto.yml"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/proto.yml around lines 13 - 16, The pull_request trigger
must include explicit event types so label changes (like toggling the "buf skip
breaking" label) re-run the workflow; update the pull_request trigger in the
workflow to add types including at minimum "labeled" and "unlabeled" (you can
also keep other types you need such as "opened", "synchronize", "reopened");
ensure the YAML block containing pull_request (the existing pull_request: paths:
...) is modified to include a types: [labeled, unlabeled, ...] entry so label
toggles correctly retrigger the Buf check.

28-29: Pin GitHub Actions to immutable commit SHAs.

Using moving major tags (@v6, @v1) weakens workflow reproducibility and supply-chain hardening.

🔧 Suggested hardening
-      - uses: actions/checkout@v6
-      - uses: bufbuild/buf-action@v1
+      - uses: actions/checkout@<full-length-commit-sha>
+      - uses: bufbuild/buf-action@<full-length-commit-sha>

To find the commit SHAs, check the release page for each action or use:

git ls-remote https://github.com/actions/checkout refs/tags/v6 | awk '{print $1}'
git ls-remote https://github.com/bufbuild/buf-action refs/tags/v1 | awk '{print $1}'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/proto.yml around lines 28 - 29, Replace the floating
action tags with immutable commit SHAs: locate the uses of actions/checkout@v6
and bufbuild/buf-action@v1 in the workflow and replace each tag with the
corresponding full commit SHA for the specific released tag (e.g.,
actions/checkout@<FULL_SHA> and bufbuild/buf-action@<FULL_SHA>); verify the SHAs
against each repo's release/tag to ensure accuracy and update the workflow file
so the two identified lines reference the immutable SHAs instead of v6 and v1.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/proto.yml:
- Around line 13-16: The pull_request trigger must include explicit event types
so label changes (like toggling the "buf skip breaking" label) re-run the
workflow; update the pull_request trigger in the workflow to add types including
at minimum "labeled" and "unlabeled" (you can also keep other types you need
such as "opened", "synchronize", "reopened"); ensure the YAML block containing
pull_request (the existing pull_request: paths: ...) is modified to include a
types: [labeled, unlabeled, ...] entry so label toggles correctly retrigger the
Buf check.
- Around line 28-29: Replace the floating action tags with immutable commit
SHAs: locate the uses of actions/checkout@v6 and bufbuild/buf-action@v1 in the
workflow and replace each tag with the corresponding full commit SHA for the
specific released tag (e.g., actions/checkout@<FULL_SHA> and
bufbuild/buf-action@<FULL_SHA>); verify the SHAs against each repo's release/tag
to ensure accuracy and update the workflow file so the two identified lines
reference the immutable SHAs instead of v6 and v1.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2639df45-b636-447f-8176-1656987385f4

📥 Commits

Reviewing files that changed from the base of the PR and between 2252a29 and 9617c4c.

⛔ Files ignored due to path filters (10)
  • api/connect/marketmap/v2/query_grpc.pb.go is excluded by !**/*.pb.go
  • api/connect/marketmap/v2/tx_grpc.pb.go is excluded by !**/*.pb.go
  • api/connect/oracle/v2/query_grpc.pb.go is excluded by !**/*.pb.go
  • api/connect/oracle/v2/tx_grpc.pb.go is excluded by !**/*.pb.go
  • service/servers/oracle/types/oracle.pb.go is excluded by !**/*.pb.go
  • x/marketmap/types/market.pb.go is excluded by !**/*.pb.go
  • x/marketmap/types/query.pb.go is excluded by !**/*.pb.go
  • x/marketmap/types/tx.pb.go is excluded by !**/*.pb.go
  • x/oracle/types/query.pb.go is excluded by !**/*.pb.go
  • x/oracle/types/tx.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (17)
  • .github/workflows/buf_breaking.yml
  • .github/workflows/buf_push.yml
  • .github/workflows/proto.yml
  • Makefile
  • api/connect/marketmap/v2/market.pulsar.go
  • api/connect/marketmap/v2/query.pulsar.go
  • api/connect/marketmap/v2/tx.pulsar.go
  • api/connect/oracle/v2/genesis.pulsar.go
  • api/connect/oracle/v2/query.pulsar.go
  • api/connect/oracle/v2/tx.pulsar.go
  • proto/buf.yaml
  • proto/connect/marketmap/v2/market.proto
  • proto/connect/marketmap/v2/query.proto
  • proto/connect/marketmap/v2/tx.proto
  • proto/connect/oracle/v2/query.proto
  • proto/connect/oracle/v2/tx.proto
  • proto/connect/service/v2/oracle.proto
💤 Files with no reviewable changes (3)
  • .github/workflows/buf_push.yml
  • .github/workflows/buf_breaking.yml
  • proto/connect/service/v2/oracle.proto

@Vritra4 Vritra4 force-pushed the feat/proto-actions branch from 9617c4c to 937f475 Compare March 18, 2026 06:49
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
proto/connect/oracle/v2/tx.proto (1)

54-57: ⚠️ Potential issue | 🟡 Minor

Amino name mismatch with message name.

The amino.name option is set to "connect/x/oracle/MsgSetCurrencyPairs" but the message is MsgRemoveCurrencyPairs. This is a copy-paste error. The amino name should be "connect/x/oracle/MsgRemoveCurrencyPairs" to match the message name, consistent with the pattern used in MsgAddCurrencyPairs above.

🔧 Proposed fix
 message MsgRemoveCurrencyPairs {
   option (cosmos.msg.v1.signer) = "authority";
-  option (amino.name) = "connect/x/oracle/MsgSetCurrencyPairs";
+  option (amino.name) = "connect/x/oracle/MsgRemoveCurrencyPairs";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@proto/connect/oracle/v2/tx.proto` around lines 54 - 57, The proto message
MsgRemoveCurrencyPairs has an incorrect amino.name option (copy-pasted as
"connect/x/oracle/MsgSetCurrencyPairs"); update the option in the
MsgRemoveCurrencyPairs message to option (amino.name) =
"connect/x/oracle/MsgRemoveCurrencyPairs" so the amino name matches the message
symbol MsgRemoveCurrencyPairs (follow the same pattern used by
MsgAddCurrencyPairs).
🧹 Nitpick comments (1)
proto/connect/oracle/v2/query.proto (1)

32-37: Empty additional_bindings arrays appear unnecessary.

The additional_bindings: [] declarations on lines 35-36 and 45-46 define empty arrays that don't add any HTTP bindings. Unless there's a specific reason (e.g., placeholder for future bindings or a tooling requirement), these could be removed for cleanliness.

♻️ Proposed cleanup
   rpc GetCurrencyPairMapping(GetCurrencyPairMappingRequest) returns (GetCurrencyPairMappingResponse) {
-    option (google.api.http) = {
-      get: "/connect/oracle/v2/get_currency_pair_mapping"
-      additional_bindings: []
-    };
+    option (google.api.http) = {get: "/connect/oracle/v2/get_currency_pair_mapping"};
   }

   rpc GetCurrencyPairMappingList(GetCurrencyPairMappingListRequest) returns (GetCurrencyPairMappingListResponse) {
-    option (google.api.http) = {
-      get: "/connect/oracle/v2/get_currency_pair_mapping_list"
-      additional_bindings: []
-    };
+    option (google.api.http) = {get: "/connect/oracle/v2/get_currency_pair_mapping_list"};
   }

Also applies to: 42-47

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@proto/connect/oracle/v2/query.proto` around lines 32 - 37, Remove the empty
additional_bindings: [] entries in the gRPC HTTP options for the RPCs (e.g., rpc
GetCurrencyPairMapping(GetCurrencyPairMappingRequest) and the other affected RPC
shown around lines 42-47) — these empty arrays are no-ops; edit the option
blocks for GetCurrencyPairMapping and the other RPC to omit the
additional_bindings field entirely so the (google.api.http) option only contains
the relevant get: "/connect/oracle/v2/get_currency_pair_mapping" (and the
corresponding path for the other RPC).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@proto/connect/oracle/v2/tx.proto`:
- Around line 54-57: The proto message MsgRemoveCurrencyPairs has an incorrect
amino.name option (copy-pasted as "connect/x/oracle/MsgSetCurrencyPairs");
update the option in the MsgRemoveCurrencyPairs message to option (amino.name) =
"connect/x/oracle/MsgRemoveCurrencyPairs" so the amino name matches the message
symbol MsgRemoveCurrencyPairs (follow the same pattern used by
MsgAddCurrencyPairs).

---

Nitpick comments:
In `@proto/connect/oracle/v2/query.proto`:
- Around line 32-37: Remove the empty additional_bindings: [] entries in the
gRPC HTTP options for the RPCs (e.g., rpc
GetCurrencyPairMapping(GetCurrencyPairMappingRequest) and the other affected RPC
shown around lines 42-47) — these empty arrays are no-ops; edit the option
blocks for GetCurrencyPairMapping and the other RPC to omit the
additional_bindings field entirely so the (google.api.http) option only contains
the relevant get: "/connect/oracle/v2/get_currency_pair_mapping" (and the
corresponding path for the other RPC).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2b93765d-374e-48dd-9092-54582e335767

📥 Commits

Reviewing files that changed from the base of the PR and between 9617c4c and 937f475.

📒 Files selected for processing (15)
  • .github/workflows/buf_breaking.yml
  • .github/workflows/buf_push.yml
  • .github/workflows/proto.yml
  • Makefile
  • proto/buf.yaml
  • proto/connect/marketmap/module/v2/module.proto
  • proto/connect/marketmap/v2/genesis.proto
  • proto/connect/marketmap/v2/market.proto
  • proto/connect/marketmap/v2/query.proto
  • proto/connect/marketmap/v2/tx.proto
  • proto/connect/oracle/module/v2/module.proto
  • proto/connect/oracle/v2/genesis.proto
  • proto/connect/oracle/v2/query.proto
  • proto/connect/oracle/v2/tx.proto
  • proto/connect/service/v2/oracle.proto
💤 Files with no reviewable changes (2)
  • .github/workflows/buf_push.yml
  • .github/workflows/buf_breaking.yml
✅ Files skipped from review due to trivial changes (2)
  • proto/connect/marketmap/v2/genesis.proto
  • proto/connect/oracle/module/v2/module.proto
🚧 Files skipped from review as they are similar to previous changes (5)
  • .github/workflows/proto.yml
  • proto/buf.yaml
  • Makefile
  • proto/connect/marketmap/v2/tx.proto
  • proto/connect/service/v2/oracle.proto

@Vritra4 Vritra4 marked this pull request as ready for review March 18, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant