Bitcoin Forum
May 26, 2024, 06:20:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Doubt in tx  (Read 433 times)
FabioCarpi (OP)
Sr. Member
****
Offline Offline

Activity: 375
Merit: 254



View Profile
December 23, 2016, 03:58:29 PM
 #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"
        ]
      }
    }
  ]
}
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3402
Merit: 6657


Just writing some code


View Profile WWW
December 23, 2016, 04:00:39 PM
 #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.

FabioCarpi (OP)
Sr. Member
****
Offline Offline

Activity: 375
Merit: 254



View Profile
December 23, 2016, 04:30:31 PM
 #3

Strange....
Normally the pubkey come after the der sign...
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3402
Merit: 6657


Just writing some code


View Profile WWW
December 23, 2016, 04:37:44 PM
 #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.

FabioCarpi (OP)
Sr. Member
****
Offline Offline

Activity: 375
Merit: 254



View Profile
December 23, 2016, 04:59:42 PM
 #5

I got it
The coinbase sent to a pubkey....
The script part of Bitcoin intrigued me yet...
Ty
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!