Skip to content

Conversation

@aarmoa
Copy link
Collaborator

@aarmoa aarmoa commented Jul 28, 2025

  • Updated proto definitions to the v1.16 mainnet upgrade version (chain v1.16.0 and indexer v1.16.54)
  • Updated ofac list.

Summary by CodeRabbit

  • New Features

    • Added support for client order IDs in order messages.
  • Bug Fixes

    • Updated margin ratio validation to allow initial and maintenance margin ratios to be equal.
  • Chores

    • Updated repository dependencies to newer versions.
    • Added a new Ethereum address to the OFAC blocklist.
  • Documentation

    • Enhanced and clarified comments across many protobuf files, improving field descriptions, data formats, and usage examples.
    • Improved documentation for validation and market/order-related messages.
    • Updated comments for clarity in Go and protobuf files.
  • Refactor

    • Removed an unused function related to gas usage keys in EVM types.

…n (chain v1.16.0 and indexer v1.16.54). Updated ofac list.
@aarmoa aarmoa requested a review from Copilot July 28, 2025 14:41
@coderabbitai
Copy link

coderabbitai bot commented Jul 28, 2025

Walkthrough

This update primarily enhances code documentation and protobuf schema comments across numerous files, clarifying the semantics and formats of message fields. It also updates repository clone targets in the Makefile, removes a deprecated function in EVM key utilities, adjusts validation logic in market proposal types, and adds a new address to an OFAC list. No significant changes to logic, control flow, or exported interfaces were made.

Changes

Cohort / File(s) Change Summary
Protobuf Documentation Enhancements
proto/injective/exchange/v1beta1/authz.proto, proto/injective/exchange/v1beta1/exchange.proto, proto/injective/exchange/v1beta1/genesis.proto, proto/injective/exchange/v1beta1/query.proto, proto/injective/exchange/v1beta1/tx.proto, proto/injective/exchange/v2/authz.proto, proto/injective/exchange/v2/exchange.proto, proto/injective/exchange/v2/genesis.proto, proto/injective/exchange/v2/market.proto, proto/injective/exchange/v2/order.proto, proto/injective/exchange/v2/orderbook.proto, proto/injective/exchange/v2/query.proto, proto/injective/exchange/v2/tx.proto, proto/injective/auction/v1beta1/tx.proto, proto/injective/erc20/v1beta1/query.proto, proto/injective/stream/v1beta1/query.proto, proto/injective/stream/v2/query.proto
Added or improved field-level comments for clarity, specifying formats (e.g., "chain format", "human readable format"), semantics, and optionality. No structural changes to message definitions.
Repository Version Updates
Makefile
Updated repository clone targets to newer versions for injective-indexer and injective-core.
EVM Key Utility Removal
chain/evm/types/key.go
Removed the ObjectGasUsedKey function; no changes to other key generation utilities.
Exchange Market Proposal Validation
chain/exchange/types/v2/proposal.go
Changed margin ratio validation from strict less-than to less-than-or-equal-to in proposal validation logic.
OFAC List Update
injective_data/ofac.json
Added one new Ethereum address to the OFAC address list.
Exchange Order Key Comment Update
chain/exchange/types/key.go
Updated function comment to accurately describe its purpose; no logic changes.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Makefile
    participant RepoServer

    User->>Makefile: make clone-injective-indexer
    Makefile->>RepoServer: git clone injective-indexer@v1.16.54

    User->>Makefile: make clone-injective-core
    Makefile->>RepoServer: git clone injective-core@v1.16.0
Loading
sequenceDiagram
    participant Proposal
    participant Validator

    Proposal->>Validator: ValidateBasic()
    Validator->>Validator: Check InitialMarginRatio ≤ MaintenanceMarginRatio
    Validator-->>Proposal: Validation result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

In fields of code where comments bloom,
The rabbits hop and sweep the room.
With docs now clear and keys removed,
The margin checks are slightly smoothed.
A new address joins the OFAC crew—
All tidy, crisp, and fresh as dew!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/final_v1_16_alignment_for_release

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates protocol buffer definitions to align with the v1.16 mainnet upgrade, specifically updating to chain v1.16.0 and indexer v1.16.54. The changes include extensive documentation improvements across the Injective exchange and stream API definitions, along with an update to the OFAC sanctions list.

  • Adds comprehensive field-level documentation to protobuf messages for better API clarity
  • Updates format specifications to distinguish between "human readable" and "chain format" values
  • Adds a new address to the OFAC sanctions list
  • Includes a minor validation fix for margin ratio comparisons in derivative markets

Reviewed Changes

Copilot reviewed 37 out of 38 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
proto/injective/stream/v2/query.proto Adds comprehensive field documentation for streaming API v2
proto/injective/stream/v1beta1/query.proto Adds field documentation for streaming API v1beta1
proto/injective/exchange/v2/tx.proto Documents transaction message fields with format specifications
proto/injective/exchange/v2/query.proto Documents query message fields with human/chain format clarity
proto/injective/exchange/v2/orderbook.proto Documents orderbook metadata fields
proto/injective/exchange/v2/order.proto Documents order-related message fields
proto/injective/exchange/v2/market.proto Documents market-related message fields
proto/injective/exchange/v2/genesis.proto Documents genesis state fields
proto/injective/exchange/v2/exchange.proto Documents core exchange message fields
proto/injective/exchange/v2/authz.proto Documents authorization message fields
proto/injective/exchange/v1beta1/*.proto Documents v1beta1 API fields
proto/injective/auction/v1beta1/tx.proto Documents auction transaction fields
injective_data/ofac.json Adds new sanctioned address
chain//types/**/.pb.go Generated Go code reflecting proto documentation updates
chain/exchange/types/v2/proposal.go Fixes margin ratio validation logic

return types.ErrFeeRatesRelation
}
if p.InitialMarginRatio.LT(p.MaintenanceMarginRatio) {
if p.InitialMarginRatio.LTE(p.MaintenanceMarginRatio) {
Copy link

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

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

The validation logic change from LT to LTE appears incorrect. Initial margin ratio should be strictly greater than maintenance margin ratio, not greater than or equal to. The LTE condition would allow initial margin ratio to equal maintenance margin ratio, which violates the fundamental principle that initial margin must be higher than maintenance margin.

Suggested change
if p.InitialMarginRatio.LTE(p.MaintenanceMarginRatio) {
if p.InitialMarginRatio.LT(p.MaintenanceMarginRatio) {

Copilot uses AI. Check for mistakes.
return types.ErrFeeRatesRelation
}
if p.InitialMarginRatio.LT(p.MaintenanceMarginRatio) {
if p.InitialMarginRatio.LTE(p.MaintenanceMarginRatio) {
Copy link

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

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

The validation logic change from LT to LTE appears incorrect. Initial margin ratio should be strictly greater than maintenance margin ratio, not greater than or equal to. The LTE condition would allow initial margin ratio to equal maintenance margin ratio, which violates the fundamental principle that initial margin must be higher than maintenance margin.

Suggested change
if p.InitialMarginRatio.LTE(p.MaintenanceMarginRatio) {
if p.InitialMarginRatio.LT(p.MaintenanceMarginRatio) {

Copilot uses AI. Check for mistakes.
Copy link

@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.

Actionable comments posted: 0

🧹 Nitpick comments (15)
chain/exchange/types/key.go (1)

429-432: Comment refers to the wrong function name

The comment now mentions orderIndexByMarketDirectionSubaccountPrefix, but the function that immediately follows is still named ordersByMarketDirectionPricePrefix. This mismatch will confuse readers and tooling that rely on the comment to reference the correct symbol.

-// orderIndexByMarketDirectionSubaccountPrefix allows to obtain prefix of exchange against a particular marketID, direction and price
+// ordersByMarketDirectionPricePrefix returns the prefix for a given marketID, direction and price
Makefile (1)

3-7: Extract versions into variables to simplify future upgrades

Hard-coding versions in multiple places is error-prone; promoting them to top-level variables makes bumping easier and avoids missed updates.

+# ---- configurable versions --------------------------------------------------
+INDEXER_VERSION ?= v1.16.54
+CORE_VERSION    ?= v1.16.0
+# -----------------------------------------------------------------------------
+
 clone-injective-indexer:
-	git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.16.54 --depth 1 --single-branch
+	git clone https://github.com/InjectiveLabs/injective-indexer.git -b $(INDEXER_VERSION) --depth 1 --single-branch
@@
 clone-injective-core:
-	git clone https://github.com/InjectiveLabs/injective-core.git -b v1.16.0 --depth 1 --single-branch
+	git clone https://github.com/InjectiveLabs/injective-core.git -b $(CORE_VERSION) --depth 1 --single-branch
proto/injective/exchange/v2/tx.proto (2)

237-254: Clarify the meaning of “human readable format”

The newly-added comments repeatedly say “in human readable format”, but that phrase is vague:
• Is it meant to be plain-decimal with no exponent (e.g. "0.0001")?
• Should it be base-10 with the same exponent scaling used by LegacyDec?
• Are thousand separators or scientific notation forbidden?

Since these fields are user-facing and also parsed by automated tooling, consider tightening the wording to something along the lines of:

/* value encoded as a plain-decimal string using the full precision of
 * cosmossdk.io/math.LegacyDec, e.g. "0.0001" for 10-4. No scientific
 * notation or thousand separators. */

Doing so once and referencing that convention everywhere will prevent misunderstandings for integrators.

Also applies to: 273-289, 285-289


335-341: Inconsistent terminology between “chain format” and “human readable format”

MsgDeposit / MsgWithdraw now describe amount as “in chain format”, whereas many other places use “in human readable format”. Using two different phrases for the same encoding could confuse clients. Consider standardising on one term and documenting it in a single place (see previous comment).

Also applies to: 355-361

proto/injective/exchange/v1beta1/tx.proto (1)

273-279: Align deposit/withdraw wording with v2 proto

Same observation as in v2: “in chain format” vs “human readable format”. Harmonising the phrasing across versions will reduce friction for downstream code generators that rely on comments for SDK hints.

Also applies to: 293-299

proto/injective/exchange/v1beta1/query.proto (2)

660-677: Clarify “chain format” once at file / package level

Many newly-added comments (e.g. limit_cumulative_notional, limit_cumulative_quantity) specify “in chain format”. Developers who are not already familiar with the Injective SDK still have to jump elsewhere to understand what that numeric representation exactly is (base-10? base-18? fixed point?).

Consider adding a short paragraph at the top of the proto file (or referencing a central doc) that formally defines chain format vs human-readable format. This keeps every field comment concise while still being unambiguous.


760-782: Boolean field naming deviates from proto-style conventions

bool isBuy = 4; / string cid = 6; were pre-existing, but the new comments keep reinforcing camelCase (isBuy).
Across the same file we now also have bool is_long and bool isLimit. Mixing snake_case and camelCase in the same proto package makes generated code and JSON output inconsistent.

If a rename is impossible for backward-compatibility, consider at least adding a style-note explaining the discrepancy, or introduce JSON tags so all booleans are exported with a single style.

proto/injective/exchange/v2/exchange.proto (1)

201-217: Consistent wording for numeric formats

Here the wording was changed to “human readable format” whereas v1beta1 keeps using “chain format”. Make sure downstream docs/tooling explicitly map both terms to the same or to different encodings, otherwise integrators may assume a behavioural change between v1 and v2 that does not actually exist.

proto/injective/exchange/v1beta1/exchange.proto (1)

865-884: Same style concern — camelCase vs snake_case

maker_discount_rate / taker_discount_rate are snake_case while isPerpetual, isLong, isBuy remain camelCase. Consider aligning future additions to one style for easier code-generation & filtering in REST/JSON responses.

proto/injective/stream/v1beta1/query.proto (1)

161-193: Trade messages: consider re-using v2 naming

executionType, is_buy, trade_id mix different styles again; if possible reuse the exact field names/types from the v2 exchange protos to avoid translation glue in stream gateways.

proto/injective/exchange/v2/order.proto (1)

60-62: Add JSON tag & nullable option for the new cid field

The newly-introduced cid string is missing the (gogoproto.jsontag) and (gogoproto.nullable) options that all other OrderInfo scalar fields already specify.
For JSON marshalling consistency and to avoid pointer vs. value surprises in Go structs, consider:

-  string cid = 5;
+  string cid = 5 [
+    (gogoproto.jsontag) = "cid",
+    (gogoproto.nullable) = false
+  ];
proto/injective/exchange/v2/query.proto (4)

768-789: TrimmedSpotLimitOrder: keep JSON tags & field style consistent

isBuy already carries an explicit (gogoproto.jsontag), but the newly-added cid and the existing order_hash do not. Down-stream APIs and SDK-generated structs will expose mixed casing (Cid, OrderHash) unless explicit tags are provided.

-  string order_hash = 5;
-  string cid = 6;
+  string order_hash = 5 [ (gogoproto.jsontag) = "order_hash" ];
+  string cid = 6 [ (gogoproto.jsontag) = "cid" ];

956-983: TrimmedDerivativeLimitOrder: align with other trimmed-order messages

Same inconsistency here: order_hash and the new cid lack JSON tags while isBuy has one. Apply the same tags to avoid unexpected casing in REST/JSON clients.

-  string order_hash = 6;
-  string cid = 7;
+  string order_hash = 6 [ (gogoproto.jsontag) = "order_hash" ];
+  string cid        = 7 [ (gogoproto.jsontag) = "cid" ];

1322-1352: Field-name style drifts (subaccountId, difference, …)

The BalanceMismatch message mixes camelCase (subaccountId) with snake_case used elsewhere (subaccount_id, order_hash, etc.). Consider renaming to subaccount_id for schema coherence. Similar drift exists in BalanceWithMarginHold.

Renaming now (pre-release) avoids permanent API friction because protobuf field numbers, not names, determine wire compatibility.


1458-1462: Optional: clarify TradeHistoryOptions nesting

trade_history_options is marked optional via the comment only. If truly optional, prefer marking the field gogoproto.nullable = true (like other optional numeric/decimal fields) to allow distinguishing “unset” from “zero-value struct”.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 500561a and 3d69450.

⛔ Files ignored due to path filters (16)
  • chain/auction/types/tx.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/authz.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/exchange.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/genesis.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/query.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/tx.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/v2/authz.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/v2/exchange.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/v2/genesis.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/v2/market.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/v2/order.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/v2/orderbook.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/v2/query.pb.go is excluded by !**/*.pb.go
  • chain/exchange/types/v2/tx.pb.go is excluded by !**/*.pb.go
  • chain/stream/types/query.pb.go is excluded by !**/*.pb.go
  • chain/stream/types/v2/query.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (22)
  • Makefile (1 hunks)
  • chain/evm/types/key.go (0 hunks)
  • chain/exchange/types/key.go (1 hunks)
  • chain/exchange/types/v2/proposal.go (2 hunks)
  • injective_data/ofac.json (1 hunks)
  • proto/injective/auction/v1beta1/tx.proto (1 hunks)
  • proto/injective/erc20/v1beta1/query.proto (1 hunks)
  • proto/injective/exchange/v1beta1/authz.proto (2 hunks)
  • proto/injective/exchange/v1beta1/exchange.proto (11 hunks)
  • proto/injective/exchange/v1beta1/genesis.proto (1 hunks)
  • proto/injective/exchange/v1beta1/query.proto (17 hunks)
  • proto/injective/exchange/v1beta1/tx.proto (18 hunks)
  • proto/injective/exchange/v2/authz.proto (2 hunks)
  • proto/injective/exchange/v2/exchange.proto (9 hunks)
  • proto/injective/exchange/v2/genesis.proto (1 hunks)
  • proto/injective/exchange/v2/market.proto (6 hunks)
  • proto/injective/exchange/v2/order.proto (3 hunks)
  • proto/injective/exchange/v2/orderbook.proto (1 hunks)
  • proto/injective/exchange/v2/query.proto (21 hunks)
  • proto/injective/exchange/v2/tx.proto (30 hunks)
  • proto/injective/stream/v1beta1/query.proto (4 hunks)
  • proto/injective/stream/v2/query.proto (2 hunks)
💤 Files with no reviewable changes (1)
  • chain/evm/types/key.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: run-tests
  • GitHub Check: lint
🔇 Additional comments (29)
proto/injective/erc20/v1beta1/query.proto (1)

64-64: Whitespace cleanup looks good
Stray space removed; file now matches formatting conventions. No further action needed.

Makefile (2)

4-4: Confirm injective-indexer repo URL and v1.16.54 tag exist

The CI currently fails with “Repository not found.” Before merging, please verify:

  • Makefile (line 4): ensure the GitHub repo path (https://github.com/InjectiveLabs/injective-indexer.git) is correct and accessible in CI (public or via credentials).
  • Confirm the v1.16.54 tag is pushed to that repo.

You can run:

git ls-remote --tags https://github.com/InjectiveLabs/injective-indexer.git \
  | grep -q 'refs/tags/v1\.16\.54$' && echo "✅ tag found"

7-7: Verify repository URL and v1.16.0 tag

  • File: Makefile, line 7
  • Snippet:
    git clone https://github.com/InjectiveLabs/injective-core.git -b v1.16.0 --depth 1 --single-branch

It looks like git ls-remote against that URL returns “repository not found,” so we can’t confirm the v1.16.0 tag. Please ensure:

  • The clone URL is correct and accessible (public or with proper credentials).
  • The v1.16.0 tag actually exists in the remote.

You can verify locally with:

git ls-remote --tags https://github.com/InjectiveLabs/injective-core.git \
  | grep -q 'refs/tags/v1\.16\.0$'

If it’s a private repo, try SSH:

git ls-remote --tags git@github.com:InjectiveLabs/injective-core.git \
  | grep -q 'refs/tags/v1\.16\.0$'

A missing or mismatched tag (e.g. v1.16.0-rc) will silently fall back to the default branch and break reproducible builds.

proto/injective/auction/v1beta1/tx.proto (1)

30-30: LGTM! Documentation enhancement improves clarity.

The added comment clearly describes the sender field, improving the protobuf definition's readability and developer experience.

injective_data/ofac.json (1)

58-58: LGTM! OFAC list update for compliance.

The new Ethereum address follows the correct format and pattern consistent with existing entries. This aligns with the PR's compliance update objectives.

proto/injective/exchange/v2/genesis.proto (1)

183-185: LGTM! Clear field documentation enhances protobuf clarity.

The added comments for subaccount_id and subaccount_trade_nonce fields provide clear descriptions that improve the protobuf definition's readability and align with the broader documentation improvement effort.

chain/exchange/types/v2/proposal.go (2)

888-888: Verify the margin ratio validation logic change.

The validation logic was changed from InitialMarginRatio.LT(MaintenanceMarginRatio) to InitialMarginRatio.LTE(MaintenanceMarginRatio), allowing initial margin ratio to equal maintenance margin ratio. This is a significant business logic change that could have financial implications.

Please confirm this change is intentional, as traditionally initial margin should be higher than maintenance margin to provide a safety buffer.


991-991: Consistent validation change - same verification needed.

This change mirrors the one at line 888, maintaining consistency between PerpetualMarketLaunchProposal and ExpiryFuturesMarketLaunchProposal. The same verification regarding the business logic implications applies here.

proto/injective/exchange/v1beta1/authz.proto (9)

14-17: LGTM! Comprehensive documentation improvements.

The added comments for subaccount_id and market_ids fields across all authorization messages provide clear descriptions that significantly improve the protobuf definition's readability and developer experience.


23-26: LGTM! Consistent field documentation.

Documentation follows the same clear pattern established in the previous message.


32-35: LGTM! Maintains documentation consistency.

Clear field descriptions align with the broader documentation enhancement effort.


41-44: LGTM! Continues consistent documentation pattern.

Field descriptions are clear and follow the established format.


50-53: LGTM! Documentation consistency maintained.

Comments provide clear field descriptions following the established pattern.


60-63: LGTM! Clear derivative authorization documentation.

Field descriptions for derivative authorization messages maintain consistency with spot authorization patterns.


69-72: LGTM! Consistent derivative field documentation.

Documentation follows the same clear pattern across all authorization types.


78-81: LGTM! Maintains documentation standards.

Field descriptions are consistent with the established documentation pattern.


102-107: LGTM! Enhanced documentation for batch operations.

The comments clearly distinguish between spot and derivative market IDs in the BatchUpdateOrdersAuthz message, providing excellent clarity for this multi-market authorization type.

proto/injective/exchange/v2/orderbook.proto (1)

42-62: Documentation clarity improved – looks good

The added comments clearly distinguish vanilla vs reduce-only orders and explicitly state that aggregate quantities are human-readable. This removes previous ambiguity without touching the wire format, so it is safe for backward compatibility.

proto/injective/exchange/v2/market.proto (1)

58-75: Consistent “human readable” annotations – no issues

All newly-added remarks consistently declare units/format on price, quantity, notional and volume fields. This keeps the proto self-documenting and prevents client confusion. No field numbers or types changed, so generated code remains intact.

Also applies to: 129-151, 210-227, 253-270, 292-303, 334-341

proto/injective/exchange/v2/authz.proto (1)

15-18: Authz field comments added – helpful

The new per-field descriptions (subaccount IDs, market IDs) tighten the contract for downstream implementers. Everything else remains identical, so there is zero integration risk.

Also applies to: 24-37, 42-55, 61-65, 71-83, 95-99, 105-111

proto/injective/stream/v2/query.proto (1)

15-38: Extensive streaming-API docs – appreciated

The streaming-service proto now fully documents every filter and payload field. This is a sizable DX win and does not alter any serialized representation. Great work keeping naming and style uniform with the rest of v2.

Also applies to: 41-67, 70-84, 86-299

proto/injective/exchange/v1beta1/genesis.proto (1)

212-218: Genesis message comments aligned with v2 – good

Adding explicit notes on subaccount_id, denom, positions and nonces makes the v1beta1 genesis file consistent with the newer schemas. No technical impact observed.

Also applies to: 224-230, 236-241

proto/injective/exchange/v2/tx.proto (1)

421-447: LGTM – descriptive comments greatly improve SDK ergonomics

The additional inline comments attached to market-launch messages are thorough and align with the broader documentation refresh in v1.16. No functional impact; just clearer proto docs.

Also applies to: 465-521, 575-591

proto/injective/exchange/v1beta1/tx.proto (2)

312-316: Nice touch – sender address comment makes intent explicit

Calling out “the sender’s Injective address” removes any doubt for newcomers who might assume a Cosmos bech32 account. Good addition.

Also applies to: 338-342


631-657: Duplication reads well – no issues

The expanded comments in batch-update / cancel messages correctly describe the optionality and mutual exclusivity of order_hash vs cid. Looks solid.

Also applies to: 754-765, 798-807

proto/injective/exchange/v1beta1/query.proto (1)

1304-1334: Great – balance mismatch fields are now fully documented

The expanded comments for BalanceMismatch make the troubleshooting API much clearer.

proto/injective/exchange/v2/exchange.proto (1)

424-444: 👍 Fee-discount tier fields are self-explanatory now

The extra context for staked_amount and volume removes prior ambiguity.

proto/injective/exchange/v1beta1/exchange.proto (1)

253-270: Doc string alignment – min_price / min_quantity / min_notional

Nice touch adding “in chain format” qualifiers; this should reduce integration mistakes when converting to decimals.

proto/injective/stream/v1beta1/query.proto (1)

123-150: Helpful position field comments

The added detail (entry price, margin, funding entry) is spot-on for real-time monitoring. No further issues spotted.

@aarmoa aarmoa merged commit a95aae8 into dev Jul 28, 2025
6 checks passed
@aarmoa aarmoa deleted the chore/final_v1_16_alignment_for_release branch July 28, 2025 15:21
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.

2 participants