Comments (5)
Fee estimation is actually pretty hard if you only look at the mempool, because you don't know the value of the inputs that are being spent. You might be able to estimate it by downloading the latest x
blocks and only considering txs spending outputs from these blocks (or the mempool itself), but it might not be optimal.
from bdk.
from bdk.
Fee estimation is actually pretty hard if you only look at the mempool, because you don't know the value of the inputs that are being spent.
Also you have no idea whether the stuff in your mempool is actually valid at all. How would you filter out invalid transaction spam?
Ah interesting. The UTXO set is needed I assume?
I think so.
I am curious how utreexo would handle this then?
It's a good question. I don't know if the vision for utreexo nodes is to have a mempool at all. You could do it you just have to have inclusion proofs for each output being spent being broadcast by the "bridge node" as the enter the mempool.
from bdk.
Well, the fact that they could be invalid is pretty much unavoidable with light clients. Even when you download blocks you are just checking the PoW, but the transactions they contain could be invalid in any sort of ways.
For some use cases that isn't a problem though, if you are a watchtower for instance. You don't care about transactions being valid, you are just looking for some specific txids.
For fee estimation specifically, I think what most light clients do is rely on centralized (trusted) services. I'm pretty sure LND does it when using neutrino and I was planning to add this here to BDK too, since currently the fee estimation in the CompactFilters
blockchain is a TODO. I'm not sure about utreexo, I've never looked too much into it.
from bdk.
Closing this for now since there doesn't seem to be a good way to monitor the mempool in light clients. A better approach for fee estimation based on prior blocks is described in the blog post series "Fee estimation for light-clients".
from bdk.
Related Issues (20)
- Introduce `bdk_persist` crate HOT 2
- need custom lookahead HOT 2
- Release 1.0.0-alpha.10 HOT 1
- Unable to `calculate_fee` when syncing with electrum HOT 1
- Upgrade rust-bitcoin to 0.32 HOT 8
- Add support for testnet4
- Create nightly job to bump clippy rust version
- Use `bitcoin::Amount` everywhere HOT 3
- ci: cronjob to bump the pin on clippy HOT 2
- example: Fix wallet examples HOT 3
- Release 1.0.0-alpha.11 HOT 2
- Help spending a tr aggregated key using musig2 HOT 5
- txout_index, `Descriptor` not needed in `keychains_to_descriptors`
- InsufficientFunds is duplicated within coin_selection::Error and CreateTxError enums HOT 1
- More tests for `bdk_electrum` fee calculation HOT 1
- Create a `bdk_floresta` chain source crate HOT 3
- `Wallet::insert_tx` should not have `position` input HOT 2
- Human Readable Names Support
- Release 1.0.0-alpha.12 HOT 1
- Add user-facing events for applying updates after syncing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bdk.