Code Monkey home page Code Monkey logo

Comments (5)

afilini avatar afilini commented on June 8, 2024

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.

moneyball avatar moneyball commented on June 8, 2024

from bdk.

LLFourn avatar LLFourn commented on June 8, 2024

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.

afilini avatar afilini commented on June 8, 2024

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.

notmandatory avatar notmandatory commented on June 8, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.