Skip to content

Utility to replace RPC calls that don't need wallet or chain context  #14671

@Sjors

Description

@Sjors

There's a number of RPC calls currently that don't need to know anything about the blockchain or the users wallet, and also don't need p2p network access:

  • createmultisig
  • signmessagewithprivkey
  • verifymessage
  • validateaddress
  • combinepsbt
  • converttopsbt
  • decodepsbt
  • decodescript
  • finalizepsbt

Arguably also:

  • decoderawtransaction (but createrawtransaction needs the node)

There's also a few being proposed:

We could call the new thing bitcoin-util. The deprecation notice for bitcoin-cli method would simply be Use "bitcoin-util method" instead.

A bigger issue is that some application may depend on calling bitcoind via RPC, perhaps on a different machine. A few things we could do:

  1. take a very long time to deprecate
  2. add a parameter to bitcoind that adds all utility functions via RPC, like e.g. bitcoin-cli util-deriveaddress
  3. let bitcoin-util run its own RPC server on a different port

However (2 & 3): maintaining RPC wrappers around utility functions is some overhead, and extra complexity.

Ideally bitcoin-util comes with a library that's easy to include in ruby gems, npm modules, etc.

One additional benefit of a separate utility is that you can switch between testnet and mainnet without restarting the node.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions