Author

Topic: Doubt in tx (Read 427 times)

sr. member
Activity: 375
Merit: 255
December 23, 2016, 11:59:42 AM
#5
I got it
The coinbase sent to a pubkey....
The script part of Bitcoin intrigued me yet...
Ty
staff
Activity: 3458
Merit: 6793
Just writing some code
December 23, 2016, 11:37:44 AM
#4
Strange....
Normally the pubkey come after the der sign...
No, not strange at all. The pubkey did that for pay-to-pubkey-hash outputs. The output you are spending from is pay-to-pubkey so it already has the pubkey in the output.
sr. member
Activity: 375
Merit: 255
December 23, 2016, 11:30:31 AM
#3
Strange....
Normally the pubkey come after the der sign...
staff
Activity: 3458
Merit: 6793
Just writing some code
December 23, 2016, 11:00:39 AM
#2
Check the output that you are spending from. It is likely to be a pay-to-pubkey output, so the pubkey is in that output and thus not in the spending transaction.

The p2pk outputs are created by default by the internal miner in Bitcoin Core as that behavior has not been changed since the switch to p2pkh.
sr. member
Activity: 375
Merit: 255
December 23, 2016, 10:58:29 AM
#1
Playing in the regtest mode....
Where is the pubkey?

Code:
{
  "txid": "1e6d1fe8b3cbda4a2824e322cddea7e76529f0e9817a631af8f0290e433b51f9",
  "hash": "1e6d1fe8b3cbda4a2824e322cddea7e76529f0e9817a631af8f0290e433b51f9",
  "size": 158,
  "vsize": 158,
  "version": 1,
  "locktime": 0,
  "vin": [
    {
      "txid": "66a4042702dd726b86b265fd6c7438c082b2ebcbbf3a765ce9af304e46499264",
      "vout": 0,
      "scriptSig": {
        "asm": "3045022100b8e09b4c9fadede9c1fbecb0031227d477736e8c8f897f08adf8abb50d8d2e770220247e312a95bc9bc4941ad029bdeb83f7e2ef22edda54bfb76c50d7ea8e4bfc6b[ALL]",
        "hex": "483045022100b8e09b4c9fadede9c1fbecb0031227d477736e8c8f897f08adf8abb50d8d2e770220247e312a95bc9bc4941ad029bdeb83f7e2ef22edda54bfb76c50d7ea8e4bfc6b01"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 49.99900000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 a65fc62dfa044a906421459fd5d8592b47d62e64 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a914a65fc62dfa044a906421459fd5d8592b47d62e6488ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "mvgfCQFcgvzEQuoxBVoSHBE51TZ8kMjs22"
        ]
      }
    }
  ]
}
Jump to: