Verify transaction without propagating #4162

issue sidazhang openend this issue on May 9, 2014
  1. sidazhang commented at 5:37 pm on May 9, 2014: none

    Current Behaviour

    If I use RPC command sendrawtransaction and supply an tx hex that is not acceptable (e.g. 1. if a signature is invalid, 2. contains a double spend) bitcoind will reject it, and if the transaction is verified, bitcoind will then propagate the transaction

    Feature Request

    It would be great if there could be a RPC call that allows verifyrawtransaction, which means it will only verify the transaction without propagating.

  2. gmaxwell commented at 6:01 pm on May 9, 2014: contributor

    One thing such a feature should have is the ability to take a list of transactions— since you may need to also provide the parents which you also don’t want to broadcast yet.

    An interesting question is should it be validating against the blockchain or against the memorypool?

  3. sidazhang commented at 7:31 pm on May 9, 2014: none

    +1 on taking a list of transactions

    I feel that it should be validated against the memorypool. In other words, if verifyrawtransaction returns true, then it should be also propagatable with sendrawtransaction

  4. laanwj added the label Feature on May 13, 2014
  5. laanwj added the label Priority Low on May 13, 2014
  6. dexX7 commented at 5:23 pm on August 24, 2015: contributor

    I agree with the general idea, and think this could be pretty useful.

    While "decoderawtransaction" can be used to check the structure of transactions, and in a hacky way "signrawtransaction" can be used to verify scripts and signatures, it’s feels more like an incomplete workaround.

    A few random use cases that come to my mind, more or less related to this topic:

    • User doesn’t want to run a node (for whatever reason), and instead uses a third party API provider; Bitcoin Core could be used to double check the results, at least to some degree
    • User wants to know which inputs are signed in a partially signed transaction
    • User signs a raw transaction offline, and wants to verify the signatures on another machine, before moving the signing keys on paper back to a vault
    • User receives a time-locked refund transaction, say for example from greenaddress.it, and wants to ensure the refund transaction is valid
    • Someone fools blockchain.info’ pushtx API and “spoofs” a transaction, seemingly spending Satoshi’s coins; Bitcoin Core could again be used to double check, whether it really may have happened
    • In the broader context: user wants to verify that a transaction is really included in a block (although this may already be covered by "verifytxoutproof")

    Related to the first point is a discussion over at https://github.com/CryptoConsortium/CCSS/issues/15, which indicates that relying on external API providers seems to be pretty common.

    It should probably be differentiated between stateless and stateful verification (e.g. consider the mempool, or be able to check transactions to a limited degree with an unsynchronized offline client).

  7. laanwj added the label RPC on Feb 16, 2016
  8. laanwj commented at 4:23 pm on February 16, 2016: member

    We’ve discussed this on IRC a while ago, and this still seems useful.

    One thing such a feature should have is the ability to take a list of transactions— since you may need to also provide the parents which you also don’t want to broadcast yet.

    Yes, it should definitely be able to take a list of transactions.

    An interesting question is should it be validating against the blockchain or against the memorypool?

    Probably either - should be a parameter, like for gettxout.

  9. laanwj removed the label Priority Low on Feb 16, 2016
  10. dcousens commented at 10:20 pm on February 16, 2016: contributor

    What is intended by:

    validating against the mempool

    Do we mean simply checking it against policy? (no double spends, RBF, yada yada)

  11. NicolasDorier commented at 6:26 am on February 17, 2016: contributor

    For information, such feature would be very useful for LN. There is several rule (like dust one) which can make a tx commitment unbroadcastable. This would result into theft.

    If such function existed, a LN node would just have to check verifyrawtransaction before releasing the revocation hash of the previous commitment.

  12. laanwj commented at 12:16 pm on February 17, 2016: member

    Do we mean simply checking it against policy? (no double spends, RBF, yada yada)

    See it as the difference between ’take into account 0conf’ (blockchain+mempool) and ‘don’t take into account 0-conf’ (blockchain).

  13. laanwj assigned laanwj on Feb 17, 2016
  14. laanwj referenced this in commit 68131d8504 on Feb 17, 2016
  15. laanwj referenced this in commit e464634cf0 on Feb 17, 2016
  16. laanwj referenced this in commit 4492928564 on Feb 17, 2016
  17. laanwj commented at 9:58 am on February 18, 2016: member
    See #7552
  18. laanwj referenced this in commit d9cf03536f on Mar 14, 2016
  19. laanwj referenced this in commit add22596b1 on Mar 18, 2016
  20. laanwj unassigned laanwj on Aug 15, 2017
  21. MarcoFalke commented at 0:11 am on June 24, 2018: member
    See #11742
  22. MarcoFalke closed this on Jun 24, 2018

  23. MarcoFalke locked this on Sep 8, 2021

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-12-18 15:12 UTC

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