GUI: testmempoolaccept in console cuts the end of the txhex #17618

issue nopara73 openend this issue on November 27, 2019
  1. nopara73 commented at 6:54 am on November 27, 2019: none
    How to reproduce: Build a transaction with ~190 inputs, get the hex and issue testmempoolaccept [\"{txhex}\"] in the GUI console. It’ll give back a TX decode failed (code -22) with a stripped txhex where the end is cut down.
  2. nopara73 added the label good first issue on Nov 27, 2019
  3. 0xB10C commented at 9:39 am on November 27, 2019: member
    How long (in chars) is the is your txhex? How many chars are cut off? How long is the returned txhex?
  4. laanwj added the label GUI on Nov 27, 2019
  5. laanwj removed the label good first issue on Nov 27, 2019
  6. laanwj added the label RPC/REST/ZMQ on Nov 27, 2019
  7. laanwj commented at 10:34 am on November 27, 2019: member

    I think this is a known issue. Qt cannot handle very large data input, it cuts off at some point. Fixing this would mean implementing a “scalable” input field that still performs well with large amount of pasted data, which is a non-trivial feat of UI engineering, so I’ve removed the “Good first issue” label.

    Does this also happen if you use RPC through the cli? (if your shell runs into problems too, try input from stdin with -stdin, it’s one reason that option was added)

  8. nopara73 commented at 1:06 pm on November 27, 2019: none

    Does this also happen if you use RPC through the cli? (if your shell runs into problems too, try input from stdin with -stdin, it’s one reason that option was added)

    Yes, I’m on Windows though. I tried it both with command line and powershell and both of them are cutting it. @0xB10C After reading @laanwj’s reply I think answers for your questions are irrelevant. If you think it’s still helpful, I can dig it up and give you exact numbers.

    Overall, it’s a bit annoying, but oh well, if nobody feels like fixing it, it’s not the end of the world, in that case just let the robot to autoclose the issue after it gets too old.

  9. instagibbs commented at 3:28 pm on November 27, 2019: member
    if you can share the exact setup/hex somewhere I can take a stab diagnosing at least. I’m not sure the Core wallet is even allowed to make something so large :)
  10. laanwj commented at 12:13 pm on November 28, 2019: member

    Yes, I’m on Windows though. I tried it both with command line and powershell and both of them are cutting it.

    At the same length?

    @0xB10C After reading @laanwj’s reply I think answers for your questions are irrelevant.

    If it also happens with -cli, even in -stdin mode (so when piping in arguments instead of on the command line). I don’t think so. It may be something else than the GUI issue that I expected.

  11. 0xB10C commented at 3:39 pm on November 28, 2019: member

    Did some experimenting on Linux with bitcoin-cli, not the GUI console. Can’t comment on Windows.


    • 95ba007be428dba2a4ec725a878437ce7033fb41e56a994a4174444106bffede
    • 202 inputs
    • 59737 chars
    0bitcoin-cli testmempoolaccept [\"$(bitcoin-cli getrawtransaction 95ba007be428dba2a4ec725a878437ce7033fb41e56a994a4174444106bffede)\"]
    

    works fine.


    • 1324108af3d8193095b0b5e19bf3d4d678e976a12be28f0c7fcca303a1c9a586
    • 378 inputs
    • 111605 chars
    0bitcoin-cli testmempoolaccept [\"$(bitcoin-cli getrawtransaction 1324108af3d8193095b0b5e19bf3d4d678e976a12be28f0c7fcca303a1c9a586)\"]
    

    works fine.


    • 6723a56bdf434633315ae78acfd08ef8a2fb5ff15a84bf4c729f09d9e8eb9aac
    • 533 inputs
    • 157277 chars
    0bitcoin-cli testmempoolaccept [\"$(bitcoin-cli getrawtransaction 6723a56bdf434633315ae78acfd08ef8a2fb5ff15a84bf4c729f09d9e8eb9aac)\"]
    1-bash: /usr/bin/bitcoin-cli: Argument list too long
    

    Does not work, but that’s a Linux kernel restriction. Works with -stdin as expected.

    0echo [\"$(bitcoin-cli getrawtransaction 6723a56bdf434633315ae78acfd08ef8a2fb5ff15a84bf4c729f09d9e8eb9aac)\"] | bitcoin-cli --stdin testmempoolaccept
    

    edit: over read that the issue is on the GUI console and not on the RPC interface.

  12. nopara73 commented at 2:55 am on November 30, 2019: none

    At the same length?

    No. That’s why I did not report it in my original post, because the cut happens before the command is sent, so that has nothing to do with Core.

  13. laanwj commented at 9:18 am on December 3, 2019: member

    According to the documentation of QLineEdit on the maxLength property (https://doc.qt.io/qt-5/qlineedit.html#maxLength-prop)

    0By default, this property contains a value of 32767.
    

    It doesn’t say that the value can’t be increased to a larger number. Though, it would have to be tested that the GUI doesn’t become unusably slow, which I expect to be the reason for the limit.

  14. MarcoFalke renamed this:
    `testmempoolaccept` cuts the end of the txhex
    GUI: testmempoolaccept in console cuts the end of the txhex
    on Dec 3, 2019
  15. fanquake closed this on Jul 9, 2020

  16. sidhujag referenced this in commit 01c1227dea on Jul 9, 2020
  17. PastaPastaPasta referenced this in commit efc7836a07 on Jun 27, 2021
  18. PastaPastaPasta referenced this in commit f0ec1cd1fe on Jun 28, 2021
  19. PastaPastaPasta referenced this in commit 44ae4b6fd9 on Jun 29, 2021
  20. PastaPastaPasta referenced this in commit 3193ddc6ce on Jul 1, 2021
  21. PastaPastaPasta referenced this in commit 9251480fa8 on Jul 1, 2021
  22. PastaPastaPasta referenced this in commit 9a486ef89a on Jul 15, 2021
  23. PastaPastaPasta referenced this in commit 959a031bf8 on Jul 16, 2021
  24. Fabcien referenced this in commit 4e58da2388 on Aug 31, 2021
  25. MarcoFalke locked this on Feb 15, 2022
  26. gades referenced this in commit e08d68e4cc on May 9, 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-22 03:12 UTC

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