multi signature – Query relating to MultiSig outputs

0
12


Check out this transaction

055f9c6dc094cf21fa224e1eb4a54ee3cc44ae9daa8aa47f98df5c73c48997f9 (Bitcoin mainnet)

(https://www.blockchain.com/btc/tx/055f9c6dc094cf21fa224e1eb4a54ee3cc44ae9daa8aa47f98df5c73c48997f9)

Nevertheless, the net explorers fail to current these correctly, so here is what you get in case you decode it with your individual node:

{
    "txid": "055f9c6dc094cf21fa224e1eb4a54ee3cc44ae9daa8aa47f98df5c73c48997f9",
    "model": 1,
    "locktime": 0,
    "vin": [
        {
            "txid": "b187426f2fdd5a7ac2f49d822f68e07f48486ee53a8a45de2494f12acb37a0d8",
            "vout": 3,
            "scriptSig": {
                "asm": "3046022100d78c31a20fa11533475be893b229eb4d252e600dcc2a0735d360c541b6aec813022100e3eaa72c915ef47d94ccbd18c2ba6d9ae5b98be6e9fbf968d4bbbb003e06d68701 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc"
            },
            "sequence": 4294967295,
            "n": 0,
            "addr": "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao",
            "valueSat": 1114144,
            "value": 0.01114144,
            "doubleSpentTxID": null
        }
    ],
    "vout": [
        {
            "value": "0.00010860",
            "n": 0,
            "scriptPubKey": {
                "asm": "1 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc 20434e545250525459000000140001a9e0e85838b5000000174876e800010053b6 2 OP_CHECKMULTISIG",
                "reqSigs": 1,
                "type": "multisig",
                "addresses": [
                    "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao",
                    "1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E"
                ]
            }
        },
        {
            "worth": "0.00010860",
            "n": 1,
            "scriptPubKey": {
                "asm": "1 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc 20a3c3000000000000000000000000000000000000000000000000000000000000 2 OP_CHECKMULTISIG",
                "reqSigs": 1,
                "kind": "multisig",
                "addresses": [
                    "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao",
                    "1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E"
                ]
            }
        },
        {
            "worth": "0.00010860",
            "n": 2,
            "scriptPubKey": {
                "asm": "1 030e001332b43924be343986cca3df669f57b0dedd120990e727787f8dea50fdbc 100000000000000000000000000000000000000000000000000000000000000000 2 OP_CHECKMULTISIG",
                "reqSigs": 1,
                "kind": "multisig",
                "addresses": [
                    "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao",
                    "1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E"
                ]
            }
        },
        {
            "worth": "0.01061564",
            "n": 3,
            "scriptPubKey": {
                "asm": "OP_DUP OP_HASH160 a2f2d251cc06ec1e789800127e3fa6ed9e515651 OP_EQUALVERIFY OP_CHECKSIG",
                "reqSigs": 1,
                "kind": "pubkeyhash",
                "addresses": [
                    "1FrbMcddiM1v3HMpUqygjZYCamBykWCWao"
                ]
            }
        }
    ],
    "blockhash": "0000000000000000491fdff68a1c99de7798278a791e461b8d5bebdd9df9de46",
    "confirmations": 1,
    "time": 1401911255,
    "blocktime": 1401911255,
    "valueOut": 0.01094144,
    "dimension": 433,
    "valueIn": 0.01114144,
    "charges": 0.0002
}

I am truly the one that requested this query and after plenty of analysis, I am fairly certain this type of transaction can’t happen in a state of affairs once you give your customers distinctive bitcoin addresses for deposits. I feel this may solely occur when the addresses have been deliberately made multisig, nevertheless, I am undecided how and why.

I’ve completed a small experiment the place I’ve made a testnet multisig tackle and despatched some funds to it. I have been anticipating it to behave precisely like within the transaction above, nevertheless, it did not. I feel the explanation for it’s as a result of there needs to be a special kind of script and I need to know what’s it and the best way to work with it.

This is what I did:

First I’ve created 2 new addresses.

[email protected]:~$ btc getnewaddress
2MsTYs9Ymsh332Ctou3dyxVe5PoTW4fLp2o
[email protected]:~$ btc getnewaddress
2N2yDtoRTChgrD675GJ12JE3wXzk3hMzgoP

Then I bought their public keys utilizing the getaddressinfo rpc.

[email protected]:~$ btc getaddressinfo 2MsTYs9Ymsh332Ctou3dyxVe5PoTW4fLp2o
{
  "tackle": "2MsTYs9Ymsh332Ctou3dyxVe5PoTW4fLp2o",
  "scriptPubKey": "a9140254bfce5627cc6267eb2aaa75dce00f03bc13dc87",
  "ismine": true,
  "solvable": true,
  ...
  "pubkey": "02d01d8e315567fb3571f31d86eb53d21729c6072751276d0c2617d787d48b2af8",
  ...

}
[email protected]:~$ btc getaddressinfo 2N2yDtoRTChgrD675GJ12JE3wXzk3hMzgoP
{
  "tackle": "2N2yDtoRTChgrD675GJ12JE3wXzk3hMzgoP",
  "scriptPubKey": "a9146aaa8606a93804de00e4e91c683dbfd5e1caa7d887",
  "ismine": true,
  "solvable": true,
  ...
  "pubkey": "0236240c39790e770bc0c378bebb1a86d2ac24f835b6e81e69c623262b1f0e0326",
  ...
}

Then I created the multisig tackle.

[email protected]:~$ btc createmultisig 1 '["0236240c39790e770bc0c378bebb1a86d2ac24f835b6e81e69c623262b1f0e0326", "02d01d8e315567fb3571f31d86eb53d21729c6072751276d0c2617d787d48b2af8"]'
{
  "tackle": "2Mu6J8iXwzCgWxJzVNkzfQ8yZwJ92YWW6es",
  "redeemScript": "51210236240c39790e770bc0c378bebb1a86d2ac24f835b6e81e69c623262b1f0e03262102d01d8e315567fb3571f31d86eb53d21729c6072751276d0c2617d787d48b2af852ae"
}

Lastly, I despatched some bitcoin to the tackle.

[email protected]:~$ btc sendtoaddress 2Mu6J8iXwzCgWxJzVNkzfQ8yZwJ92YWW6es 0.00999744
1373fd7a2da3199e0f4ead0a5456266b52263356a86b726882dbc03da1625ed1

I decoded that transaction (Testnet) and bought this

{
  "txid": "1373fd7a2da3199e0f4ead0a5456266b52263356a86b726882dbc03da1625ed1",
  "hash": "290a0ec0c306a4485a7099c1f7813d9f9a741a9b4fcc68c5decc68de5ddb1b14",
  "model": 2,
  "dimension": 338,
  "vsize": 173,
  "weight": 692,
  "locktime": 1572217,
  "vin": [
    {
      "txid": "7e57de9ce9797e8c5face7c3ed7ce89eb3107b05e00c129f336cebc1b1113dcb",
      "vout": 1,
      "scriptSig": {
        "asm": "00205a010c52d33bfac812f62f2cb7f917a3b84f67c66c1ac9ac1701c7caa4e5da7c",
        "hex": "2200205a010c52d33bfac812f62f2cb7f917a3b84f67c66c1ac9ac1701c7caa4e5da7c"
      },
      "txinwitness": [
        "",
        "304402206b7f9fcdf972a2aaa6a734e921d1f76b3da3a0f7a98e2bf3657241ed0cc4433a022040b1f0f31b6231ff73465986c3379ce15cbf2b33e28b09460aac8812d8e9826801",
        "304402200ffeeb246535a312f33c05652f9ef5d696fd26883659e6429731e5f0416be9fc022067a5852e99f96c5def0f7288b9a7ba567e3df258fd79071a60694580ac3de1fc01",
        "522103a8f863c198bfa005273ae53d9db239e3be2cabcd5cbf34f52318795166f5cdff2102cff91271435f4f121aa90f3babc5551090f862575e5eb12429acb8e6daf4d8cd52ae"
      ],
      "sequence": 4294967294
    }
  ],
  "vout": [
    {
      "value": 0.00999744,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 143ff7e3677973ecd914d8d134efde5adff4a96b OP_EQUAL",
        "hex": "a914143ff7e3677973ecd914d8d134efde5adff4a96b87",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "2Mu6J8iXwzCgWxJzVNkzfQ8yZwJ92YWW6es"
        ]
      }
    }
  ]
}

Which is a very normal-looking one.

Although I am nearly sure this may not occur within the state of affairs I described, I would like I remaining affirmation from somebody who understands how these transaction work and clarify.



Supply hyperlink

Leave a reply