Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual fee rate support #595

Merged
merged 6 commits into from
Oct 18, 2023
Merged

Manual fee rate support #595

merged 6 commits into from
Oct 18, 2023

Conversation

jharveyb
Copy link
Collaborator

@jharveyb jharveyb commented Oct 17, 2023

Fixes #587
Fixes #538

Updates the planter and freighter to accept a fee rate in sat/kw, the same unit as the fee estimator, to use for the anchor transaction. The fee rate is checked against a minimum but not maximum, so users should be careful with fee units to avoid accidental overpayment.

tapgarden/caretaker.go Outdated Show resolved Hide resolved
tapscript/send.go Outdated Show resolved Hide resolved
tapgarden/planter.go Show resolved Hide resolved
log.Infof("sending with manual fee rate")

default:
feeRate, err = p.cfg.ChainBridge.EstimateFee(
Copy link
Member

Choose a reason for hiding this comment

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

Rather than conditionally call estimation here, we could instead lift it up to the rpcserver. So then we can drop the pointer to fee rate, as we compute that head of time.

rpcserver.go Outdated Show resolved Hide resolved
In this commit, we add support for overriding the fee estimator and
providing a target fee rate to the planter when finalizing a batch.
Provided fee rates are only checked against a minimum value and not
a maximum fee rate.
In this commit, we add support for overriding the fee estimator and
providing a target fee rate to the freighter when performing a transfer.
This only applies to sends to addresses and not via interactive vPSBTs.
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🦚

@Roasbeef Roasbeef merged commit b489d04 into main Oct 18, 2023
14 checks passed
@Liongrass
Copy link
Contributor

In line with our other software, this flag could be called --sat_per_vbyte and be measured in sat/vB. We use the term fee_rate a bit differently in LND.

@guggero guggero deleted the manual_fee_rate_support branch October 18, 2023 07:22
@jharveyb
Copy link
Collaborator Author

Good point, will add that change in the upcoming fee PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants