RPC Feature: option for prevouts in getrawtransaction #13108

issue jimpo openend this issue on April 28, 2018
  1. jimpo commented at 5:49 am on April 28, 2018: contributor

    I think it might be useful for certain applications to be able to get transaction fees from the RPC API. The problem is that loading all prevouts from disk could be pretty expensive depending on the number of inputs, so it should be made optional with a flag. One way to expose this in the API is to include the prevout (scriptPubKey & amount) with every input in vin, as well as adding a “fee” field to the top level of the response payload.

    How would people feel about this?

  2. fanquake added the label RPC/REST/ZMQ on Apr 28, 2018
  3. sipa commented at 5:51 am on April 28, 2018: member

    NACK. getrawtransaction shouldn’t do more than getting raw transactions.

    If applications need transaction fees, they should have the wallet watch for it. Not rely on having a fully indexed chain available; that does not scale.

  4. jimpo commented at 5:10 pm on April 29, 2018: contributor
    I’m not asking for wallet applications, but for fee estimators, explorer-type applications, and the like. Is there an alternative you suggest, or is the answer to build a full auxiliary indexing service? Or two just make the getrawtransaction RPC requests for all prevouts at the client level?
  5. promag commented at 11:42 pm on July 25, 2018: member

    NACK. getrawtransaction shouldn’t do more than getting raw transactions.

    Agree on that.

    I think it might be useful for certain applications to be able to get transaction fees from the RPC API.

    I’m not asking for wallet applications, but for fee estimators, explorer-type applications, and the like. Is there an alternative you suggest, or is the answer to build a full auxiliary indexing service?

    I feel this is not the best place to serve that data. A “full auxiliary indexing service” sounds more scalable!

    Or two just make the getrawtransaction RPC requests for all prevouts at the client level?

    That looks insane?

  6. MarcoFalke commented at 1:43 am on April 26, 2020: member

    Something like this has been implemented here: #16083 It is up for grabs (needs rebase).

    Let’s continue discussion in #18771

  7. MarcoFalke closed this on Apr 26, 2020

  8. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-04 19:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me