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
Accept external URL for neutrino fee estimation. #2900
Merged
Roasbeef
merged 6 commits into
lightningnetwork:master
from
valentinewallace:neutrino-fee-est
Apr 17, 2019
Merged
Accept external URL for neutrino fee estimation. #2900
Roasbeef
merged 6 commits into
lightningnetwork:master
from
valentinewallace:neutrino-fee-est
Apr 17, 2019
Conversation
This file contains 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
valentinewallace
force-pushed
the
neutrino-fee-est
branch
2 times, most recently
from
April 7, 2019 01:53
72762de
to
dcdd33e
Compare
halseth
suggested changes
Apr 8, 2019
valentinewallace
force-pushed
the
neutrino-fee-est
branch
3 times, most recently
from
April 9, 2019 18:27
d248d83
to
570ac25
Compare
Roasbeef
requested changes
Apr 10, 2019
valentinewallace
force-pushed
the
neutrino-fee-est
branch
4 times, most recently
from
April 11, 2019 00:57
ff87ffc
to
9d3a912
Compare
halseth
suggested changes
Apr 12, 2019
valentinewallace
force-pushed
the
neutrino-fee-est
branch
from
April 12, 2019 21:45
9d3a912
to
1b0321c
Compare
Roasbeef
requested changes
Apr 16, 2019
In this commit, we add a new interface which will allow callers to drop in an arbitrary Web API for fee estimation with an arbitrary request/response schema. Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
This enables users to specify an external API for fee estimation. The API is expected to return fees in the JSON format: `{ fee_by_block_target: { a: x, b: y, ... c: z } }` where a, b, c are block targets and x, y, z are fees in sat/kb. Note that a, b, c need not be contiguous.
valentinewallace
force-pushed
the
neutrino-fee-est
branch
2 times, most recently
from
April 16, 2019 21:14
277b889
to
12c4e06
Compare
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
valentinewallace
force-pushed
the
neutrino-fee-est
branch
from
April 16, 2019 21:17
12c4e06
to
16aad1a
Compare
Roasbeef
approved these changes
Apr 17, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
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.
In this commit, we enable neutrino users to specify a URL where fee
information can be retrieved for on-chain transactions.
The fee information must be a JSON object mapping
fee_by_block_target
to fee information, e.g:
The object nested in
fee_by_block_target
maps a number of confs to afee (in satoshis per kilovbyte). Note that the API's fee information need
not start at zero confs, and only fees up to 1009 confirmations are
cached/used. The reason for this is because 1009 confirmations is the
maximum number of confs that bitcoind will return an estimate for.
Also, there may be gaps in the fee information: if the API's response
contains a fee for 2 confs and then a fee for 6 confs, it is assumed that
the fee for 3 through 5 confs is the same as the fee for 2 confs.