-
Notifications
You must be signed in to change notification settings - Fork 283
Configurable transaction confirmation target #1083
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
4293514
Use feeEstimator in NodeParams with custom confirmationTarget
araspitzu 5f4ee9a
Introduce FeeConf object and config block for confirmation targets, r…
araspitzu 527499b
Use a custom confirmation target for commitment transaction
araspitzu dade6fd
Use a custom confirmation target for funding transaction
araspitzu 3e4ad7a
Use custom confirmation target for mutual close transaction
araspitzu 214494b
Use custom confirmation target for claim transactions
araspitzu de55d92
Add confirmation target block 144
araspitzu 83763ef
Fix bitgo fee provider test
araspitzu 7ec7e3a
Add copyright header to FeeEstimator.scala
araspitzu f0649dd
Reorg parametres order, pass `FeeEstimator` from Setup, move `FeeTarg…
araspitzu a04eed8
Formatting
araspitzu 45100ad
Update eclair-core/src/main/resources/reference.conf
araspitzu 7e31ebb
Use underlyingActor to access `NodeParams` and feeEstimator during test
araspitzu c66b3b8
Change position order of `receiveFee` parameters
araspitzu d577d07
Merge branch 'master' into custom_confirmation_target
araspitzu 1c21959
Use feeEstimator from underlyingActor
araspitzu b652fb6
Group together on-chain fees related configurations
araspitzu 4cf6359
Use helper functions to get 'OnChainFeeConf' during test
araspitzu a75a931
Use block target = 12 as default for claim transactions
araspitzu f768ec5
Move default-feerates configuration block inside on-chain-fees, renaming
araspitzu 9da4996
Remove helper methods in favor of pimp pattern
araspitzu e16763d
Merge branch 'master' into custom_confirmation_target
araspitzu 5db1271
Rename default-feerates section, remove blank line
araspitzu d240dfe
Move `OnChainFeeConf` to FeeEstimator.scala
araspitzu 419bf60
When computing the first mutual-closing fee use the minimum between t…
araspitzu f350b87
Do not compare confirmation targets when choosing a 'firstClosingFee'…
araspitzu 8f1bcc0
Move `OnChainFeeConf` value close to other on-chain fee related value
araspitzu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
29 changes: 29 additions & 0 deletions
29
eclair-core/src/main/scala/fr/acinq/eclair/blockchain/fee/FeeEstimator.scala
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| * Copyright 2019 ACINQ SAS | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package fr.acinq.eclair.blockchain.fee | ||
|
|
||
| trait FeeEstimator { | ||
|
|
||
| def getFeeratePerKb(target: Int) : Long | ||
|
|
||
| def getFeeratePerKw(target: Int) : Long | ||
|
|
||
|
sstone marked this conversation as resolved.
|
||
| } | ||
|
|
||
| case class FeeTargets(fundingBlockTarget: Int, commitmentBlockTarget: Int, mutualCloseBlockTarget: Int, claimMainBlockTarget: Int) | ||
|
|
||
| case class OnChainFeeConf(feeTargets: FeeTargets, feeEstimator: FeeEstimator, maxFeerateMismatch: Double, updateFeeMinDiffRatio: Double) | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.