Skip to content

Conversation

aarmoa
Copy link
Collaborator

@aarmoa aarmoa commented Sep 24, 2025

  • Sync dev branch with master after v1.11.2 release

Summary by CodeRabbit

  • New Features
    • Composer v2: add message to cancel Post-Only Mode.
    • Async client: optional depth parameter for spot/derivative orderbook v2 fetches.
    • Orderbook v2 responses now include height for spot and derivatives.
    • New auction and megavault RPC endpoints and data fields.
  • Documentation
    • Updated examples to use pyinjective.* imports.
    • Changelog entry for 1.11.2.
  • Chores
    • Updated dependencies for compatibility with Injective Core v1.16.4 and Indexer v1.16.91.
    • Updated official tokens URL paths.
    • Expanded OFAC address list.
    • Deprecated Composer v1 and legacy AsyncClient (use v2 equivalents).

@aarmoa aarmoa requested a review from Copilot September 24, 2025 03:07
Copy link
Contributor

coderabbitai bot commented Sep 24, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds v1 deprecations, introduces a new Composer v2 message (MsgCancelPostOnlyMode), updates proto pins and regenerated protobufs (auction, exchange v2, megavault, downtimedetector), adds orderbook V2 height fields and optional depth in AsyncClient, updates tokens URL paths, adjusts examples’ oracle_scale_factor, and refreshes OFAC entries and tests.

Changes

Cohort / File(s) Summary
Release notes
CHANGELOG.md
Adds 1.11.2 entry: Composer v2 supports MsgCancelPostOnlyMode; proto updates for core v1.16.4/indexer v1.16.91; marks Composer v1 deprecated.
Build & proto pins
Makefile, buf.gen.yaml
Updates indexer clone to v1.16.91; bumps Cosmos/CometBFT/Injective Core tags in buf.gen.yaml.
Docs import path updates
README.md
Replaces import references from injective.* to pyinjective.* in examples.
Example oracle scale changes
examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py, .../4_MsgInstantPerpetualMarketLaunch.py, .../5_MsgInstantExpiryFuturesMarketLaunch.py
Sets oracle_scale_factor from 6 to 0 in example market launch messages.
Client deprecations + depth param
pyinjective/async_client.py, pyinjective/composer.py, tests/test_async_client_deprecation_warnings.py, tests/test_composer_deprecation_warnings.py
Emits DeprecationWarning for AsyncClient (v1) and Composer (v1); adds optional depth to spot/derivative orderbook v2 fetch methods; adds corresponding tests.
Composer v2 new message
pyinjective/composer_v2.py, tests/test_composer_v2.py
Adds msg_cancel_post_only_mode(sender) constructor; tests assert type and payload.
Tokens URL path change
pyinjective/core/network.py, tests/core/test_tokens_file_loader.py
Updates official_tokens_list_url to /json/tokens/*.json; updates tests’ mocked URLs.
OFAC list update
pyinjective/ofac.json
Appends new blocked addresses; no removals.
Auction RPC changes
pyinjective/proto/exchange/injective_auction_rpc_pb2*.py, pyinjective/proto/injective/auction/v1beta1/auction_pb2.py, tests/client/chain/grpc/test_chain_grpc_auction_api.py
Adds Auction V2 RPCs and descriptors; adds Params.bidders_whitelist; updates tests to include biddersWhitelist in outputs.
Exchange v2 params/tx updates
pyinjective/proto/injective/exchange/v2/exchange_pb2.py, .../tx_pb2.py, .../tx_pb2_grpc.py, tests/client/chain/grpc/test_chain_grpc_exchange_v2_api.py
Updates Params fields (new post-only, upgrade, gas, auction caps, etc.); adds MsgCancelPostOnlyMode and SetDelegationTransferReceivers RPCs; tests include new params fields.
Orderbook V2 height field
pyinjective/proto/exchange/injective_spot_exchange_rpc_pb2.py, .../injective_derivative_exchange_rpc_pb2.py, tests/client/indexer/grpc/test_indexer_grpc_spot_api.py, .../test_indexer_grpc_derivative_api.py, tests/client/indexer/stream_grpc/test_indexer_grpc_spot_stream.py, .../test_indexer_grpc_derivative_stream.py
Generated protos adjust; Spot/Derivative LimitOrderbookV2 now include height; tests expect height in REST/stream payloads.
Megavault RPC expansion
pyinjective/proto/exchange/injective_megavault_rpc_pb2*.py
Renames GetVaultRequest.vault → vault_address; expands Vault schema; adds GetUser/ListSubscriptions/ListRedemptions/GetOperatorRedemptionBuckets/TvlHistory/PnlHistory RPCs.
Downtimedetector new protos
pyinjective/proto/injective/downtimedetector/v1beta1/*
Adds downtime_duration, genesis, and query protos with corresponding gRPC stubs, including Query.RecoveredSinceDowntimeOfLength.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant App
  participant AsyncClient(v1)
  participant IndexerClient

  rect rgba(230,240,255,0.5)
  note over AsyncClient(v1): New optional depth parameter
  App->>AsyncClient(v1): fetch_spot_orderbook_v2(market_id, depth?)
  AsyncClient(v1)->>IndexerClient: fetch_spot_orderbook_v2(market_id, depth or 0)
  IndexerClient-->>AsyncClient(v1): OrderbookV2{bids, asks, height}
  AsyncClient(v1)-->>App: Dict payload (includes height)
  end

  note over App,AsyncClient(v1): Instantiation emits DeprecationWarning (use async_client_v2)
Loading
sequenceDiagram
  autonumber
  participant App
  participant ComposerV2
  participant MsgService(gRPC)
  participant Chain

  rect rgba(240,255,240,0.5)
  note over ComposerV2: New message constructor
  App->>ComposerV2: msg_cancel_post_only_mode(sender)
  ComposerV2-->>App: MsgCancelPostOnlyMode{sender}
  App->>MsgService(gRPC): CancelPostOnlyMode(msg)
  MsgService(gRPC)->>Chain: Apply cancel post-only mode
  Chain-->>MsgService(gRPC): MsgCancelPostOnlyModeResponse
  MsgService(gRPC)-->>App: Response
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • release/v1_11_2 #398 — Mirrors these updates: adds MsgCancelPostOnlyMode, deprecates Composer v1, refreshes compiled protos.

Poem

A rabbit taps keys with delight and glee,
New msgs hop in: “Cancel Post-Only!”
Orderbooks grew taller—height on display,
Depth now optional shows the way.
Protos refreshed, old paths set free—
On to v2 burrows, swift as can be. 🐇✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/sync_dev_with_master_after_v1_11_2

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 26b9e06 and 0c7e085.

⛔ Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (38)
  • CHANGELOG.md (1 hunks)
  • Makefile (1 hunks)
  • README.md (2 hunks)
  • buf.gen.yaml (1 hunks)
  • examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py (1 hunks)
  • examples/chain_client/exchange/4_MsgInstantPerpetualMarketLaunch.py (1 hunks)
  • examples/chain_client/exchange/5_MsgInstantExpiryFuturesMarketLaunch.py (1 hunks)
  • pyinjective/async_client.py (3 hunks)
  • pyinjective/composer.py (1 hunks)
  • pyinjective/composer_v2.py (1 hunks)
  • pyinjective/core/network.py (4 hunks)
  • pyinjective/ofac.json (4 hunks)
  • pyinjective/proto/exchange/injective_auction_rpc_pb2.py (2 hunks)
  • pyinjective/proto/exchange/injective_auction_rpc_pb2_grpc.py (4 hunks)
  • pyinjective/proto/exchange/injective_derivative_exchange_rpc_pb2.py (2 hunks)
  • pyinjective/proto/exchange/injective_megavault_rpc_pb2.py (2 hunks)
  • pyinjective/proto/exchange/injective_megavault_rpc_pb2_grpc.py (4 hunks)
  • pyinjective/proto/exchange/injective_spot_exchange_rpc_pb2.py (2 hunks)
  • pyinjective/proto/injective/auction/v1beta1/auction_pb2.py (2 hunks)
  • pyinjective/proto/injective/downtimedetector/v1beta1/downtime_duration_pb2.py (1 hunks)
  • pyinjective/proto/injective/downtimedetector/v1beta1/downtime_duration_pb2_grpc.py (1 hunks)
  • pyinjective/proto/injective/downtimedetector/v1beta1/genesis_pb2.py (1 hunks)
  • pyinjective/proto/injective/downtimedetector/v1beta1/genesis_pb2_grpc.py (1 hunks)
  • pyinjective/proto/injective/downtimedetector/v1beta1/query_pb2.py (1 hunks)
  • pyinjective/proto/injective/downtimedetector/v1beta1/query_pb2_grpc.py (1 hunks)
  • pyinjective/proto/injective/exchange/v2/exchange_pb2.py (3 hunks)
  • pyinjective/proto/injective/exchange/v2/tx_pb2.py (3 hunks)
  • pyinjective/proto/injective/exchange/v2/tx_pb2_grpc.py (4 hunks)
  • tests/client/chain/grpc/test_chain_grpc_auction_api.py (6 hunks)
  • tests/client/chain/grpc/test_chain_grpc_exchange_v2_api.py (2 hunks)
  • tests/client/indexer/grpc/test_indexer_grpc_derivative_api.py (4 hunks)
  • tests/client/indexer/grpc/test_indexer_grpc_spot_api.py (4 hunks)
  • tests/client/indexer/stream_grpc/test_indexer_grpc_derivative_stream.py (2 hunks)
  • tests/client/indexer/stream_grpc/test_indexer_grpc_spot_stream.py (2 hunks)
  • tests/core/test_tokens_file_loader.py (2 hunks)
  • tests/test_async_client_deprecation_warnings.py (1 hunks)
  • tests/test_composer_deprecation_warnings.py (1 hunks)
  • tests/test_composer_v2.py (1 hunks)

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

Copy link

@Copilot 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 syncs the dev branch with master after the v1.11.2 release, bringing in new features and updates including new protobuf definitions, test coverage improvements, and version updates.

  • Added new downtimedetector module with protobuf definitions and query interfaces
  • Enhanced MegaVault RPC with additional endpoints for user management and analytics
  • Updated multiple protobuf definitions to include new fields and parameters
  • Added comprehensive test coverage for deprecation warnings and new functionality

Reviewed Changes

Copilot reviewed 40 out of 41 changed files in this pull request and generated no comments.

File Description
pyproject.toml Version bump to 1.12.0-rc1
tests/ Enhanced test coverage with new test cases for composer, async client deprecation, and updated API responses
pyinjective/proto/ Updated protobuf definitions with new downtimedetector module, enhanced MegaVault RPC, and additional fields in exchange and auction modules

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@aarmoa aarmoa force-pushed the feat/sync_dev_with_master_after_v1_11_2 branch from 810d121 to 0c7e085 Compare September 24, 2025 03:09
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedckzg@​2.1.1 ⏵ 2.1.410010090100100
Updatedbitarray@​3.5.2 ⏵ 3.7.194 +2100100100100
Updatedclick@​8.2.1 ⏵ 8.3.096100100100100
Updatedcffi@​1.17.1 ⏵ 2.0.098 +1100100100100
Updatedcharset-normalizer@​3.4.2 ⏵ 3.4.399 +1100100100100
Addedcoincurve@​21.0.0100100100100100
Updatedcertifi@​2025.7.14 ⏵ 2025.8.310010010010070
Addedcoincurve@​18.0.0100100100100100
Addedcoincurve@​20.0.0100100100100100

View full report

@aarmoa aarmoa merged commit 15adf6d into dev Sep 24, 2025
9 checks passed
@aarmoa aarmoa deleted the feat/sync_dev_with_master_after_v1_11_2 branch September 24, 2025 03:11
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