Initial support for multisignature transactions #541

pull gavinandresen wants to merge 2 commits into bitcoin:master from gavinandresen:multisig changing 3 files +434 −75
  1. gavinandresen commented at 2:46 PM on September 29, 2011: contributor

    This adds initial support for three new types of transactions: (a and b) (a or b) (a and b) or c

    ... where a/b/c are keys. These new transaction types will enable better wallet security and backup in future versions of bitcoin.

    I've taken a conservative approach with this initial pull; the new transaction types will be relayed and included in blocks, but are ignored by the wallet code, so will not affect the balance and will never be considered available to spend. I'm going to start a discussion on bitcoin-dev to do a bit of a brain-dump on what NOT to do with multi-signature transactions (there are several potential attacks that we'll need to be careful to avoid).

    I'll be creating a multisig_testing branch in the gavinandresen github fork that WILL add multisig transactions to the balance, will have a new RPC call to create multisig transactions, and will be able to spend the multisig transactions; that will be for testing this PULL only for now.

  2. Collapse no-op ExtractAddress/ExtractAddressInner 2499f59a67
  3. Support 3 new multisignature IsStandard transactions
    Initial support for (a and b), (a or b), ((a and b) or c)
    transactions (where a, b, and c are keys). These will be
    relayed and included in blocks, but, for this release,
    will be ignored by the wallet (even if keys a/b/c are
    in the wallet).
    9f461095c5
  4. gavinandresen commented at 2:50 PM on September 30, 2011: contributor

    multisig_testing tree is up: https://github.com/gavinandresen/bitcoin-git/tree/multisig_testing

    It adds a "sendmultisig" RPC command to generate multisignature transactions. And adds public key information to the output of the "validateaddress" RPC command, so you can get the full public key for addresses in your wallet.

    Good tests for THIS pull would be:

    • Setup a testnet-in-a-box testing environment
    • Compile two bitcoind's : one with this pull request and one with the multisig_testing pull request
    • Get three full public keys from a testnet wallet by running the multisig_testing bitcoind against that wallet. Then shutdown that bitcoind, and run bitcoind with THIS pull request against that wallet.

    Then:

    Running the multisig_testing bitcoind against another testnet wallet, send multisig transactions to the first wallet. EXPECT: balance in the first wallet does not change, transactions are ignored. EXPECT: eventually the transactions are confirmed and included in blocks and shown in the testnet block explorer (testnet allows non-standard transactions)

    Syntax for the sendmultisig RPC command is:

    bitcoind sendmultisig "" and_or '["...key1...","...key2...","...key3..."]' 11.11

    ... where "" is the account you're sending from and 11.11 is the amount.

    I am NOT submitting a pull request for sendmultisig, and you shouldn't spend time testing it right now. I may submit a separate pull request for the validateaddress extension.

  5. gavinandresen commented at 2:41 PM on October 4, 2011: contributor

    The OP_EVAL idea/discussion is making me re-evalute this. Closing for now.

  6. gavinandresen closed this on Oct 4, 2011

  7. ptschip referenced this in commit 359fcd9c69 on May 10, 2017
  8. ptschip referenced this in commit 0969d1c1ad on May 10, 2017
  9. kallewoof referenced this in commit 09e20ab819 on Oct 4, 2019
  10. DrahtBot locked this on Sep 8, 2021
Contributors
Labels

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-05-02 12:16 UTC

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