Change fee settings from UI#516
Merged
Merged
Conversation
…mplement it in LightningClientService
…age channel fee policies
…s to manage channel fee policies
…s in ChannelRepository and Lightning services
Jossec101
requested changes
May 18, 2026
Contributor
Jossec101
left a comment
There was a problem hiding this comment.
Please introduce validation so:
- Inbound base and fee rate are negative only
- In abs terms, both inbound base and fee rate cannot be bigger than it's counterparter (you cannot surcharge positively a routing, only discount)
- The ui shall require negatives values
- Introduce a default for CLTV (40 blocks its ok), add to constants pls
- Also modify channel request view to set fee rates at creation https://lightning.engineering/api-docs/api/lnd/lightning/open-channel/#lnrpcopenchannelrequest
db6c3ba to
1859a5a
Compare
Contributor
@markettes I guess you are still on this |
- Introduced a new column `RequestMetadata` in the `ChannelOperationRequests` table to store additional request information. - Updated the `ApplicationDbContextModelSnapshot` to reflect the new `RequestMetadata` column. - Enhanced the Channel Requests page to include fields for setting the initial channel base fee and fee rate. - Implemented logic in the `LightningService` to handle the new fee policy parameters when creating open channel requests. - Added unit tests to verify the creation of open channel requests with the initial channel fee policy.
Contributor
Author
Yep, you can check now |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds UI and backend support for configuring Lightning channel fee policy both at channel creation time (initial routing policy) and for existing channels (fee policy management), persisting new request metadata to survive approval/execution.
Changes:
- Persist initial channel fee policy (base fee / fee rate) on
ChannelOperationRequestvia a newRequestMetadatacolumn and expose it throughNotMappedconvenience properties. - Apply initial fee policy values when building LND
OpenChannelRequestinLightningService, with range validation. - Extend the Channels UI with a “Fee Policy” management tab (incl. inbound fee policy fields) and add UI fields to Channel Requests for initial fee policy input/display.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/NodeGuard.Tests/Services/LightningServiceTests.cs | Adds a test covering OpenChannelRequest creation when initial fee policy is provided. |
| src/Services/LightningService.cs | Applies optional initial fee policy values onto LND OpenChannelRequest with validation. |
| src/Pages/Channels.razor | Adds a tabbed channel management modal with a new Fee Policy form and save flow. |
| src/Pages/ChannelRequests.razor | Adds UI to enter/display initial channel fee policy values on open-channel requests. |
| src/Data/Models/ChannelOperationRequest.cs | Introduces RequestMetadata persistence and InitialChannel* accessors backed by JSON. |
| src/Helpers/Constants.cs | Adds configurable default timelock delta constant for fee policy form defaults. |
| src/Migrations/20260522125854_AddRequestMetadata.cs | Migration adding RequestMetadata to ChannelOperationRequests. |
| src/Migrations/20260522125854_AddRequestMetadata.Designer.cs | EF migration designer snapshot for the added column. |
| src/Migrations/ApplicationDbContextModelSnapshot.cs | Updates model snapshot to include RequestMetadata on ChannelOperationRequest. |
Files not reviewed (1)
- src/Migrations/20260522125854_AddRequestMetadata.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Jossec101
reviewed
May 25, 2026
- Created a new migration to add InitialChannelBaseFeeMsat and InitialChannelFeeRatePpm columns to the ChannelOperationRequests table. - Updated the ApplicationDbContextModelSnapshot to reflect the new columns in the ChannelOperationRequests entity.
Jossec101
reviewed
May 26, 2026
Jossec101
reviewed
May 26, 2026
Jossec101
reviewed
May 26, 2026
Jossec101
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhance the UI for changing fee settings.