Skip to content

DRAFT Deprecation of features#242

Closed
nullpointer0x00 wants to merge 1 commit into
mainfrom
nullpointer0x00/240-deprecation-sweep
Closed

DRAFT Deprecation of features#242
nullpointer0x00 wants to merge 1 commit into
mainfrom
nullpointer0x00/240-deprecation-sweep

Conversation

@nullpointer0x00

@nullpointer0x00 nullpointer0x00 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

closes: #240

Summary by CodeRabbit

  • Deprecations
    • Marked mixed-denom vault concepts and payment-denom configuration for future removal.
    • Deprecated direct principal deposit and withdrawal APIs; use the exchange-backed payments flow instead.
    • Deprecated related principal-management events and legacy NAV fields.
    • Deprecated redeem_denom; leave it empty to receive the underlying asset.
  • Documentation
    • Added migration guidance and clarified the transition to single-underlying-denom vaults.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The vault API now marks mixed-denom fields, direct-principal RPCs, related messages, and events as deprecated. Generated bindings, specifications, changelog content, and lint exclusions reflect the deprecation guidance and migration toward single-denom and exchange-backed flows.

Changes

Vault API deprecation

Layer / File(s) Summary
Protobuf deprecation contracts
proto/provlabs/vault/v1/*.proto
Deprecation options and guidance were added for payment-denom, initial NAV, redeem-denom, principal mutation, and related event APIs.
Generated API metadata
api/provlabs/vault/v1/*.pulsar.go
Generated comments and embedded descriptors were updated to match the protobuf deprecations; pause-event field documentation was expanded.
Documentation and tooling
spec/*.md, .changelog/..., .golangci.yml
Specifications and changelog content describe the deprecated surface and replacement direction, while lint exclusions cover expected deprecation warnings.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

Suggested labels: enhancement, mvp 1

Suggested reviewers: iramiller, Taztingo

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too generic to clearly describe the PR’s main deprecation changes. Rename it to mention deprecating payment-denom and direct-principal APIs for single-denom vaults.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR covers the #240 deprecations, docs, and changelog updates for the payment-denom and direct-principal surfaces.
Out of Scope Changes check ✅ Passed The changes stay on the deprecation surface and related docs/linting; no unrelated code appears introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nullpointer0x00/240-deprecation-sweep

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.44.1)
api/provlabs/vault/v1/tx.pulsar.go

ast-grep timed out on this file


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR marks the mixed-denom and direct-principal API surface as deprecated. The main changes are:

  • Deprecation options on affected proto fields, messages, events, and RPCs.
  • Regenerated Go, gRPC, and Pulsar protobuf outputs.
  • Updated specs and changelog text for the planned removal.
  • Staticcheck suppression for internal deprecated-symbol use.

Confidence Score: 4/5

The redeem-denom deprecation guidance needs a fix before merging.

  • Empty redeem_denom still means different things in estimate and tx paths.
  • Mixed-denom vault callers can estimate one payout denom and receive another.
  • The generated service and message surfaces appear to stay registered and callable.

proto/provlabs/vault/v1/tx.proto, proto/provlabs/vault/v1/query.proto

Important Files Changed

Filename Overview
proto/provlabs/vault/v1/tx.proto Adds deprecation metadata for direct-principal endpoints and mixed-denom fields; the swap-out empty-denom guidance conflicts with the current tx default.
proto/provlabs/vault/v1/query.proto Marks estimate swap-out redeem_denom deprecated; its empty default remains different from the tx path for mixed-denom vaults.
proto/provlabs/vault/v1/vault.proto Marks payment_denom and InitialVaultNAV deprecated while preserving field numbers and compatibility.
proto/provlabs/vault/v1/events.proto Marks direct-principal events deprecated while keeping the event messages available.
.golangci.yml Adds a staticcheck exclusion for internal use of the newly deprecated API surface.

Reviews (1): Last reviewed commit: "add deprecation" | Re-trigger Greptile

Comment on lines 244 to +249
// - Must be either the vault’s underlying_asset or its payment_denom.
string redeem_denom = 4;
//
// Deprecated: The underlying-or-payment payout choice collapses to the
// underlying asset only as vaults move to a single denom. Leave this empty;
// the field will be removed in a future release.
string redeem_denom = 4 [deprecated = true];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Empty Redeem Denom Diverges

When redeem_denom is omitted for an existing mixed-denom vault, the swap-out tx still defaults to vault.PaymentDenom, but the estimate query defaults to vault.UnderlyingAsset. The new “Leave this empty” guidance can make callers estimate one denom and receive another denom in the actual payout.

Comment on lines +184 to +187
// Deprecated: The underlying-or-payment payout choice collapses to the
// underlying asset only as vaults move to a single denom. Leave this empty;
// the field will be removed in a future release.
string redeem_denom = 3 [deprecated = true];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Estimate Uses Different Default

This comment tells callers to leave redeem_denom empty, and this query then estimates the underlying asset. The matching MsgSwapOut path still pays the payment denom when the same field is omitted, so mixed-denom vault callers can compare an underlying-asset estimate against a payment-denom payout.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.golangci.yml:
- Around line 170-175: The SA1019 exclusion in the golangci configuration is too
broad and may suppress unrelated deprecation warnings. Scope the suppression to
the vault payment-denom and direct-principal symbols or replace it with targeted
//nolint:staticcheck directives at their internal call sites, while preserving
warnings elsewhere.

In `@spec/02_state.md`:
- Line 34: Update the state specification bullet to remove the “must differ from
underlying” requirement for payment denom, and describe it as optional and
deprecated, collapsing to the underlying asset; keep the wording consistent with
the single-denom contract defined by the payment_denom field in vault.proto.

In `@spec/03_messages.md`:
- Around line 133-135: Update the deprecation note for redeem_denom to document
the current legacy behavior: an empty value resolves to the underlying asset for
single-denom vaults, while existing mixed-denom vaults retain the payment_denom
default. Keep the note that the field is deprecated and will be removed in a
future release.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4c4d98eb-abb5-4745-8cfa-e5cbae49d815

📥 Commits

Reviewing files that changed from the base of the PR and between a41548a and 6301ed4.

⛔ Files ignored due to path filters (5)
  • api/provlabs/vault/v1/tx_grpc.pb.go is excluded by !**/*.pb.go
  • types/events.pb.go is excluded by !**/*.pb.go
  • types/query.pb.go is excluded by !**/*.pb.go
  • types/tx.pb.go is excluded by !**/*.pb.go
  • types/vault.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (15)
  • .changelog/unreleased/deprecated/240-deprecation-sweep.md
  • .golangci.yml
  • api/provlabs/vault/v1/events.pulsar.go
  • api/provlabs/vault/v1/query.pulsar.go
  • api/provlabs/vault/v1/tx.pulsar.go
  • api/provlabs/vault/v1/vault.pulsar.go
  • proto/provlabs/vault/v1/events.proto
  • proto/provlabs/vault/v1/query.proto
  • proto/provlabs/vault/v1/tx.proto
  • proto/provlabs/vault/v1/vault.proto
  • spec/01_concepts.md
  • spec/02_state.md
  • spec/03_messages.md
  • spec/04_events.md
  • spec/05_queries.md

Comment thread .golangci.yml
Comment on lines +170 to +175
# The module must keep implementing its own deprecated payment-denom and
# direct-principal surface until it is removed; the deprecation warnings
# are aimed at external integrators, not this repo's internals.
- linters:
- staticcheck
text: 'SA1019: .*(removed in a future release|removed with the mixed-denom vault concept)'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Scope the SA1019 suppression to this vault surface.

This repository-wide regex can hide unrelated deprecated API usages whenever their deprecation text contains the same phrases. Restrict the rule by path/symbol, or use narrow //nolint:staticcheck directives at the known internal call sites.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.golangci.yml around lines 170 - 175, The SA1019 exclusion in the golangci
configuration is too broad and may suppress unrelated deprecation warnings.
Scope the suppression to the vault payment-denom and direct-principal symbols or
replace it with targeted //nolint:staticcheck directives at their internal call
sites, while preserving warnings elsewhere.

Comment thread spec/02_state.md
Each vault is an `x/auth` account implementing `VaultAccountI`. The canonical record contains:

- Admin address, share denom, underlying asset, optional **payment denom** (must differ from underlying)
- Admin address, share denom, underlying asset, optional **payment denom** (must differ from underlying; deprecated, collapses to the underlying asset)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Remove the contradictory “must differ” constraint.

proto/provlabs/vault/v1/vault.proto allows payment_denom to be omitted or equal to underlying_asset; only legacy mixed-denom values differ. Update this bullet so it does not contradict the single-denom contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@spec/02_state.md` at line 34, Update the state specification bullet to remove
the “must differ from underlying” requirement for payment denom, and describe it
as optional and deprecated, collapsing to the underlying asset; keep the wording
consistent with the single-denom contract defined by the payment_denom field in
vault.proto.

Comment thread spec/03_messages.md
Comment on lines +133 to +135
> **Deprecated:** `redeem_denom` is deprecated. The underlying-or-payment payout choice collapses
> to the underlying asset only as vaults move to a single denom. Leave it empty; the field will be
> removed in a future release.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Document the current legacy default explicitly.

proto/provlabs/vault/v1/tx.proto:145-189 says an empty redeem_denom currently defaults to the vault’s payment_denom. Clarify that leaving it empty resolves to the underlying asset for single-denom vaults, but retains the payment-denom default on existing mixed-denom vaults.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@spec/03_messages.md` around lines 133 - 135, Update the deprecation note for
redeem_denom to document the current legacy behavior: an empty value resolves to
the underlying asset for single-denom vaults, while existing mixed-denom vaults
retain the payment_denom default. Keep the note that the field is deprecated and
will be removed in a future release.

@nullpointer0x00

Copy link
Copy Markdown
Collaborator Author

PR #243

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.

Deprecate payment-denom and direct-principal API surface ahead of single-denom vaults

1 participant