cli:passing non-integers to datacarriersize #33460

issue RandyMcMillan openend this issue on September 22, 2025
  1. RandyMcMillan commented at 7:54 pm on September 22, 2025: contributor

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    While testing #33453

    recommend reverting https://github.com/bitcoin/bitcoin/commit/63091b79e70b8e230a122fa6fb3dac91c80638e7 and adding additional tests.

    cc: @bitschmidty @hebasto

    This reminds me of an old issue. Passing di-graphs as values.

    Expected behaviour

    a non-integer value should error.

    Steps to reproduce

    ./bin/bitcoind –datacarriersize=aaa

    Relevant log output

    git at DeepSpaceM1 in /Users/Shared/bitcoincore-dev/.github/bitcoin/2025-09-datacarrier-undep on 1919/915924/909940/314c42b55bd/451ba9ada41-bitschmidty/2025-09-datacarrier-undep [?] $ ./bin/bitcoind –datacarriersize=aaa 2025-09-22T19:45:02Z Bitcoin Core version v30.99.0-451ba9ada41f (release build) 2025-09-22T19:45:02Z Using the ‘arm_shani(1way;2way)’ SHA256 implementation 2025-09-22T19:45:02Z Default data directory /Users/git/Library/Application Support/Bitcoin 2025-09-22T19:45:02Z Using data directory /Users/git/Library/Application Support/Bitcoin 2025-09-22T19:45:02Z Config file: /Users/git/Library/Application Support/Bitcoin/bitcoin.conf (not found, skipping) 2025-09-22T19:45:02Z Command-line arg: datacarriersize=“aaa”

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    bitschmidty/2025-09-datacarrier-undep

    Operating system and version

    MacOs 14.7.7 (23H723)

    Machine specifications

    No response

  2. polespinasa commented at 9:19 pm on September 22, 2025: contributor

    There’s no need to revert https://github.com/bitcoin/bitcoin/commit/63091b79e70b8e230a122fa6fb3dac91c80638e7 as the PR didn’t cause this.

    Version 29.0 (before the PR):

    0sliv3r@sliv3r-tuxedo:~/BitcoinCore/bitcoin$ ./build/bin/bitcoind -datacarriersize=aaa
    12025-09-22T21:33:01Z Bitcoin Core version v29.0 (release build)
    22025-09-22T21:33:01Z Using the 'x86_shani(1way,2way)' SHA256 implementation
    32025-09-22T21:33:01Z Using RdSeed as an additional entropy source
    42025-09-22T21:33:01Z Using RdRand as an additional entropy source
    52025-09-22T21:33:01Z Default data directory /home/sliv3r/.bitcoin
    62025-09-22T21:33:01Z Using data directory /home/sliv3r/.bitcoin
    72025-09-22T21:33:01Z Config file: /home/sliv3r/.bitcoin/bitcoin.conf
    82025-09-22T21:33:01Z Config file arg: prune="5000"
    92025-09-22T21:33:01Z Command-line arg: datacarriersize="aaa"
    

    Checking how we handle args, I saw that many numeric args accept strings without crashing. See -limitancestorcount or -bytespersigop for example.

    -dustrelayfee on the ther side does have type handling: Error: Invalid amount for -dustrelayfee=<amount>: 'aaa'

    Maybe this is a issue worth checking to add assertions on args types. I think would be good if you modify the issue to make it generic and show that init args don’t have type checks.

  3. RandyMcMillan commented at 10:49 pm on September 22, 2025: contributor
    @polespinasa - thanks for looking.
  4. RandyMcMillan commented at 10:55 pm on September 22, 2025: contributor
    I will let a mod rename and categorize the issue.
  5. maflcko commented at 7:39 am on September 23, 2025: member
    This is a known issue and should affect almost all args. See also https://github.com/bitcoin/bitcoin/issues/22978
  6. RandyMcMillan closed this on Sep 23, 2025

  7. RandyMcMillan commented at 10:34 am on September 23, 2025: contributor
    @maflcko thanks

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: 2025-09-26 15:13 UTC

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