rpc: pipe support for submitblock #19819

issue Sjors opened this issue on August 27, 2020
  1. Sjors commented at 11:03 AM on August 27, 2020: member

    If you use the submitblock RPC with a large enough block you'll run into "argument list too long". Using a pipe should fix this, at least on Linux / macOS.

    The submitblock RPC can be useful to check validity of a stale block that never made it into the main chain (and that your node never fetched): call invalidateblock on its same-height-sibling and then feed it the raw block.

    Easiest workaround is to use a library that connects directly to bitcoind via RPC (be careful to avoid a line break character at the end). Using the GUI console fails with "Block decode failed" for me, but haven't tested that extensively.

  2. Sjors added the label Feature on Aug 27, 2020
  3. MarcoFalke commented at 11:09 AM on August 27, 2020: member

    Previous reports:

  4. Sjors commented at 11:39 AM on August 28, 2020: member

    Sadly not. The max macOS allows is ulimit -s 65532 which doesn't make the error go away.

  5. laanwj added the label RPC/REST/ZMQ on Sep 3, 2020
  6. laanwj commented at 11:41 AM on September 3, 2020: member

    Did you try bitcoin-cli -stdin?

  7. Sjors commented at 6:15 PM on September 7, 2020: member

    Genious!

    cat block.txt | bitcoin-cli -stdin submitblock
    
  8. Sjors closed this on Sep 7, 2020

  9. 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: 2026-04-13 15:14 UTC

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