Transactions chain and testmempoolaccept #18480

issue darosior openend this issue on March 31, 2020
  1. darosior commented at 8:42 am on March 31, 2020: member

    I use testmempoolaccept for sanity-checking transactions I produce are valid in some app.

    Wanted to propose a PR, but reading the original testmempoolaccept PR it seems to have some precedent, so asking here before about the conceptual validity : what do you think of making testmempoolaccept (accept a array which len >1 and) test each transaction passed in the array as if all valid precedent transactions of the array were into the mempool ?

    (Edited after reading the doc more carefully..)

  2. fjahr commented at 2:26 pm on April 2, 2020: member
    Could you link the precedent in the original PR that you are referring to?
  3. darosior commented at 3:22 pm on April 2, 2020: member
    The original testmempoolaccept PR is #11742, and by precedent I meant that it was a lot of previous attempt to do this (see #11742 (comment) and the response) and apparently the scope of what it should “verify” / test. Maybe “precedent” was not the right term?
  4. fjahr commented at 5:21 pm on April 22, 2020: member
    Hm, I guess that comment is mainly referring to these previous attempts: #11201 and #7552 but I don’t see any explicit argument against implementing this feature (just skimmed the conversation though). The error message in #11742 states “Array must contain exactly one raw transaction for now”, if there had been a consensus that there should not be an array of multiple txs, then this RPC would not have been implemented with an array and this error message would be different. So I don’t see a reason why you should not work on it. The only open question that came to me: Is it intuitive that the transactions in the array depend on each other to be accepted to the mempool? It could also just be for convenience to test multiple txs that don’t depend on each other. So maybe think about how both use cases could be made possible. Maybe by default, the txs don’t depend on each other but if you give an additional parameter -chain or so, then they do.
  5. MarcoFalke added the label TX fees and policy on Apr 28, 2020
  6. glozow commented at 4:22 pm on August 19, 2020: member

    The fact that MemPoolAccept::AcceptSingleTransaction exists and that the RPC accepts an array seems to suggest this is planned but I don’t know much about who’s working on/thinking about what. Is there ongoing work that would enable this as a side effect?

    I think this would be very nice to have. Doing this for non-chained transactions would probably have little value (just make separate calls), but I definitely see why we’d want to test accept chained transactions.

    I’m not 100% sure what needs to be done to implement this. My intuition is that this requires making a temporary copy of chainstate/mempool on which we apply each transaction so that we can use it for the ones that come after it. Also, won’t ordering matter? If a child comes before a parent in the array, should we make a temporary orphan pool too? Seems nontrivial 🤔

  7. JeremyRubin commented at 7:36 pm on August 19, 2020: contributor

    Leaning to concept nack, there are too many cases where mempool validity is not the thing you want to check (e.g., suppose an input has a 1 block relative sequence, such arrays will always fail).

    Concept ACK on generally having an AnalyzePackage RPC to help a user figure out if all txns can go in within some time bound?

  8. laanwj closed this on May 27, 2021

  9. DrahtBot locked this on Aug 18, 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-12-18 21:12 UTC

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