[RPC] Bug: RPC Batching does not work with more than 1 multi wallet #11257

issue NicolasDorier openend this issue on September 6, 2017
  1. NicolasDorier commented at 2:08 pm on September 6, 2017: contributor

    UPDATE:

    Turns out the issue was caused not by testnet, but by having 2 wallets @ryanofsky found out !


    Step to reproduce:

    This work on regtest just fine:

    0bitcoind -wallet=test -regtest -rpcpassword=abc -rpcuser=abc
    

    Try to make a batch RPC request to /wallet/test:

    0[{"jsonrpc":"1.0","id":1,"method":"getbalance","params":["*"]}]
    

    You get the expected result.

    However; same things with testnet:

    0bitcoind -wallet=test -testnet -rpcpassword=abc -rpcuser=abc
    

    Result:

    “Wallet file not specified (must request wallet RPC through /wallet/ uri-path).”

    This problem is limited to batched RPC request on testnet as just making the exact same request without the ‘[’ and ‘]’ works fine. It works also fine on regtest, which is crazy. I will look into later.

  2. NicolasDorier renamed this:
    RPC Batching does not work with multi wallet on Testnet
    [RPC] Bug: RPC Batching does not work with multi wallet on Testnet
    on Sep 6, 2017
  3. sipa commented at 3:06 pm on September 6, 2017: member
    Very strange! Does it work if you use the wallet URL?
  4. ryanofsky commented at 8:34 pm on September 6, 2017: member
    Seems to be a bug in JSONRPCExecOne. It is creating a request object without assigning a url.
  5. sipa commented at 8:54 pm on September 6, 2017: member
    Is this a 0.15.0 issue?
  6. fanquake added the label RPC/REST/ZMQ on Sep 6, 2017
  7. ryanofsky commented at 2:07 pm on September 7, 2017: member

    Is this a 0.15.0 issue?

    Actually, I’m not sure the bug I see in JSONRPCExecOne is the same one Nicolas is reporting. The bug in JSONRPCExecOne (which is only called for batch requests and not single requests) is that request uri field is not filled, so if more than one wallet file is loaded, “Wallet file not specified” errors will trigger when a wallet RPC is called. This is a bug in 0.15, but not a regression because previous releases did not support loading multiple wallets.

    Nicolas’s issue is more confusing because despite multiwallet being mentioned in issue title, steps to reproduce only show bitcoind being started with a single -wallet argument. Also, strangely the bug happens with testnet but not regtest.

  8. ryanofsky referenced this in commit 990d24a96d on Sep 7, 2017
  9. ryanofsky referenced this in commit b7205b88f0 on Sep 7, 2017
  10. ryanofsky referenced this in commit 379bd795e0 on Sep 7, 2017
  11. ryanofsky referenced this in commit c0c652ccc2 on Sep 7, 2017
  12. NicolasDorier commented at 6:03 am on September 10, 2017: contributor
    Sorry I was in holidays @ryanofsky . This bug came into a “production” testnet. I confirm that my bitcoind has two wallets, and did not tried to reproduce on a blank new bitcoind, as I have none other with testnet under the hand for now. Sorry for the misleading description. :(
  13. NicolasDorier renamed this:
    [RPC] Bug: RPC Batching does not work with multi wallet on Testnet
    [RPC] Bug: RPC Batching does not work with more than 1 multi wallet
    on Sep 10, 2017
  14. NicolasDorier commented at 6:29 am on September 10, 2017: contributor
    @sipa yes, 0.15.0 issue. Hopefully ryanosky’s fix can make it in time. Testing it now.
  15. NicolasDorier commented at 7:17 am on September 10, 2017: contributor
  16. NicolasDorier closed this on Sep 10, 2017

  17. sipa reopened this on Sep 10, 2017

  18. sipa commented at 7:27 am on September 10, 2017: member
    Please don’t close issues until the fix is actually merged.
  19. ryanofsky referenced this in commit edafc718ad on Oct 3, 2017
  20. ryanofsky referenced this in commit 1027a14f8b on Oct 3, 2017
  21. ryanofsky referenced this in commit 236a4378a3 on Oct 4, 2017
  22. ryanofsky referenced this in commit 52174747fd on Oct 4, 2017
  23. ryanofsky referenced this in commit 4526d21e52 on Oct 4, 2017
  24. laanwj closed this on Oct 12, 2017

  25. laanwj referenced this in commit f74459dba6 on Oct 12, 2017
  26. MarcoFalke referenced this in commit a7db0fd4ab on Nov 2, 2017
  27. MarcoFalke referenced this in commit 492093115e on Nov 2, 2017
  28. MarcoFalke referenced this in commit 70268454e8 on Nov 8, 2017
  29. MarcoFalke referenced this in commit 3a6cdd459c on Nov 8, 2017
  30. deadalnix referenced this in commit 6ac60ac90c on Mar 10, 2018
  31. HashUnlimited referenced this in commit fe94af2c15 on Mar 12, 2018
  32. HashUnlimited referenced this in commit 7bd5ec072d on Mar 12, 2018
  33. bambache referenced this in commit 162c35bbb0 on Jan 11, 2019
  34. bambache referenced this in commit d89e6a9825 on Jan 11, 2019
  35. codablock referenced this in commit 6a10b36925 on Sep 26, 2019
  36. codablock referenced this in commit d7119e6487 on Sep 30, 2019
  37. charlesrocket referenced this in commit 26ddafdd1e on Dec 16, 2019
  38. barrystyle referenced this in commit 5970217cb6 on Jan 22, 2020
  39. 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-11-17 12:12 UTC

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