Skip to content

Remove deprecated fee rate option --sat_per_byte#10889

Open
MPins wants to merge 4 commits into
lightningnetwork:masterfrom
MPins:remove_deprecated_sat_per_byte
Open

Remove deprecated fee rate option --sat_per_byte#10889
MPins wants to merge 4 commits into
lightningnetwork:masterfrom
MPins:remove_deprecated_sat_per_byte

Conversation

@MPins

@MPins MPins commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

As defined at release doc v0.21.0 we now remove the option --sat_per_byte.

Change Description

The sat_per_byte field was deprecated back in v0.13.0 in favor of sat_per_vbyte. This PR completes its removal: the deprecated field is no longer honored by the RPC server, the CLI, or the wallet RPC, and any request that still sets it is now explicitly rejected.

Behavior change

Previously, sat_per_byte was still accepted and silently converted, with a guard preventing both fields from being set at once.

Now, if a request sets sat_per_byte the ErrSatPerByteRemoved is returned.

The --sat_per_byte flag was hidden and deprecated in v0.13.0 in favor of
--sat_per_vbyte. Remove it from the sendcoins, sendmany, openchannel,
closechannel, closeallchannels, bumpfee, bumpclosefee and
bumpforceclosefee commands, and simplify the fee-rate flag validation
accordingly.
@github-actions github-actions Bot added the severity-critical Requires expert review - security/consensus critical label Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

🔴 PR Severity: CRITICAL

Highest-severity file determines label | 7 non-test files | ~225 lines changed

🔴 Critical (1 file)
  • rpcserver.go - Core server coordination file; listed explicitly as CRITICAL in classification rules
🟠 High (2 files)
  • lnrpc/rpc_utils.go - RPC/API utility code
  • lnrpc/walletrpc/walletkit_server.go - RPC/API wallet kit server implementation
🟡 Medium (3 files)
  • cmd/commands/cmd_open_channel.go - CLI client command (cmd/* -> MEDIUM regardless of filename keywords)
  • cmd/commands/commands.go - CLI client commands
  • cmd/commands/walletrpc_active.go - CLI client walletrpc command (MEDIUM, not HIGH -- under cmd/*)
🟢 Low / Excluded (4 files)
  • docs/release-notes/release-notes-0.22.0.md - Release notes (docs/*)
  • itest/lnd_wallet_import_test.go - Integration test (excluded from severity count)
  • lnrpc/walletrpc/walletkit_server_test.go - Test file (excluded from severity count)
  • rpcserver_test.go - Test file (excluded from severity count)

Analysis

This PR touches rpcserver.go, the core server coordination file, which is explicitly listed as a CRITICAL-tier file requiring expert review. The PR also modifies RPC/API layer files under lnrpc/ (HIGH) and CLI client commands under cmd/ (MEDIUM).

Severity bump rules were checked:

  • File count: 7 non-test/non-generated files (threshold: >20) -- no bump
  • Lines changed: ~225 (threshold: >500) -- no bump
  • Multiple distinct critical packages: Only one critical file (rpcserver.go) -- no bump

The CRITICAL classification stands based on the presence of rpcserver.go alone.


To override, add a severity-override-{critical,high,medium,low} label.
<!-- pr-severity-bot -->

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request finalizes the removal of the deprecated sat_per_byte field, which has been superseded by sat_per_vbyte. By enforcing this change at the RPC and CLI layers, the codebase is simplified and technical debt is reduced. The implementation ensures that any legacy usage is now explicitly rejected, maintaining consistency across the API.

Highlights

  • Removal of Deprecated Field: The sat_per_byte field, deprecated since v0.13.0, has been completely removed from the CLI, RPC server, and wallet RPC interfaces.
  • Explicit Rejection: Requests that still include the sat_per_byte field are now explicitly rejected with the lnrpc.ErrSatPerByteRemoved error.
  • Codebase Cleanup: Removed redundant validation logic, simplified helper functions like CalculateFeeRate, and cleaned up CLI flags across multiple commands.
  • Test and Documentation Updates: Updated integration and unit tests to use sat_per_vbyte and added a breaking change entry to the release notes.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request removes the deprecated --sat_per_byte fee rate option across multiple CLI commands and RPCs (including CloseChannel, OpenChannel, SendCoins, SendMany, and BumpFee) in favor of sat_per_vbyte. It also updates the corresponding tests and release notes. The review feedback identifies a broken markdown link in the release notes that needs to be corrected.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docs/release-notes/release-notes-0.22.0.md Outdated
@MPins MPins changed the title Remove deprecated sat per byte Remove deprecated sat_per_byte field Jun 9, 2026
@MPins MPins changed the title Remove deprecated sat_per_byte field Remove deprecated fee rate option --sat_per_byte Jun 9, 2026
@saubyk saubyk added this to lnd v0.22 Jun 9, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in lnd v0.22 Jun 9, 2026
@saubyk saubyk moved this from Backlog to In progress in lnd v0.22 Jun 9, 2026
@saubyk saubyk added this to the v0.22.0 milestone Jun 9, 2026
MPins added 2 commits June 9, 2026 12:24
The sat_per_byte field was deprecated in v0.13.0 in favor of
sat_per_vbyte. Until now the server silently treated sat_per_byte as
sat/vbyte, which was misleading. Rather than honoring it, the affected
RPCs (SendCoins, SendMany, OpenChannel, OpenChannelSync, CloseChannel
and walletrpc.BumpFee) now return an explicit error when the field is
set, so that an old client talking to a new daemon fails loudly instead
of having its requested fee rate silently dropped.

CalculateFeeRate and maybeUseDefaultConf are simplified to only take the
sat_per_vbyte value now that the deprecated field is no longer honored.
The wallet import test set the deprecated SatPerByte field on
SendCoinsRequest, which the server now rejects. Switch it to
SatPerVbyte, which carries the same sat/vbyte value.
@MPins MPins force-pushed the remove_deprecated_sat_per_byte branch from 3ee7637 to ff14956 Compare June 9, 2026 15:25
@MPins MPins force-pushed the remove_deprecated_sat_per_byte branch from ff14956 to 0207a05 Compare June 9, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

severity-critical Requires expert review - security/consensus critical

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants