Skip to content

Conversation

GeorgeTsagk
Copy link
Member

@GeorgeTsagk GeorgeTsagk commented May 16, 2025

Description

Allows the user to define the maximum ratio of fees to total output amounts that is used when funding a PSBT with our wallet. The default value is configured to be 0.75.

@GeorgeTsagk GeorgeTsagk self-assigned this May 16, 2025
@coveralls
Copy link

coveralls commented May 16, 2025

Pull Request Test Coverage Report for Build 17555793621

Details

  • 27 of 27 (100.0%) changed or added relevant lines in 3 files are covered.
  • 45 unchanged lines in 15 files lost coverage.
  • Overall coverage increased (+0.01%) to 56.938%

Files with Coverage Reduction New Missed Lines %
commitment/tap.go 1 85.19%
address/mock.go 2 96.2%
rfqmsg/records.go 2 70.8%
tapdb/sqlc/universe.sql.go 2 75.78%
tapdb/universe.go 2 81.11%
universe/archive.go 2 82.16%
itest/assertions.go 3 89.05%
itest/multisig.go 3 97.94%
tapchannel/aux_leaf_signer.go 3 43.53%
tapdb/assets_store.go 3 79.61%
Totals Coverage Status
Change from base Build 17508260862: 0.01%
Covered Lines: 61593
Relevant Lines: 108175

💛 - Coveralls

@GeorgeTsagk GeorgeTsagk force-pushed the bump-psbt-maxfeeratio branch from 99bb86a to e9d48fa Compare May 16, 2025 14:46
@levmi levmi moved this from 🆕 New to 🏗 In progress in Taproot-Assets Project Board May 19, 2025
@GeorgeTsagk GeorgeTsagk force-pushed the bump-psbt-maxfeeratio branch from e9d48fa to 2028e61 Compare August 4, 2025 13:59
@GeorgeTsagk
Copy link
Member Author

Made the value configurable by the user via wallet.psbt-max-fee-ratio, more on the rationale here

@levmi levmi moved this from 🏗 In progress to 👀 In review in Taproot-Assets Project Board Aug 4, 2025
@GeorgeTsagk GeorgeTsagk requested review from guggero and ffranr August 5, 2025 13:25
Copy link
Contributor

@guggero guggero left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@lightninglabs-deploy
Copy link

@ffranr: review reminder

@Roasbeef
Copy link
Member

Roasbeef commented Sep 3, 2025

I think after this is rebased, with the comments addressed, we can land it.

This commit allows the user to set their own value for the maximum
allowed fees to total output amount ratio that is used by the wallet
when funding PSBTs.
@GeorgeTsagk GeorgeTsagk force-pushed the bump-psbt-maxfeeratio branch from 68cba5f to 74a8303 Compare September 8, 2025 15:23
@GeorgeTsagk GeorgeTsagk requested a review from jtobin September 8, 2025 15:24
Copy link
Member

@jtobin jtobin left a comment

Choose a reason for hiding this comment

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

Just one question re: bounds checking, otherwise LGTM.

// use when funding PSBTs for asset transfers. Since taproot assets can
// be anchored to outpoints that may carry relatively small bitcoin
// amounts it is useful to pick a high value for this argument as in
// high fee environments the total fees paid may outweight the anchor
Copy link
Member

Choose a reason for hiding this comment

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

nit: s/outweight/outweigh

walletAnchor := lndservices.NewLndRpcWalletAnchor(lndServices)
walletAnchor := lndservices.NewLndRpcWalletAnchor(
lndServices,
lndservices.WithPsbtMaxFeeRatio(cfg.Wallet.PsbtMaxFeeRatio),
Copy link
Member

@jtobin jtobin Sep 8, 2025

Choose a reason for hiding this comment

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

I'm guessing this eventually gets checked by lnd, but worth doing any bounds checking on the argument before we get here, possibly in tapcfg.ValidateConfig?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

6 participants