Questions tagged [p2pk]

Pay To Public Key is an output format that refers directly to a public key. It is the earliest used output format and has no associated address standard.

35 questions
30
votes
1 answer

What is P2PK, P2PKH, P2SH, P2WPKH - ELI5

Explain like I'm 5 years old and my other half of the brain is surgically removed :) I don't want to put a lot of stress on my brain Also what is the difference between BTC held in P2SH and Unspent P2SH Output…
user380208
  • 613
  • 1
  • 6
  • 11
20
votes
2 answers

Why do you use Bitcoin addresses instead of public keys?

Why do you hash the public key twice? Are there security benefits to abstracting away from the public key? Is it because the address can represent multiple things? I'm missing something. Could you theoretically send bitcoins directly to the public…
ihtkwot
  • 331
  • 2
  • 6
16
votes
3 answers

Why is P2PKH used instead of the simpler P2PK?

If elliptic curve cryptography is secure enough to be able to give away a public key without fear of anyone being able to calculate our private key from it, what's the reason for hashing our public key for use in P2PKH? In other words, what's the…
inersha
  • 2,928
  • 1
  • 17
  • 41
9
votes
1 answer

Why does the default miner implementation use pay-to-pubkey?

Looking at the v0.9.3 source in miner.cpp: CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { CPubKey pubkey; if (!reservekey.GetReservedKey(pubkey)) return NULL; CScript scriptPubKey = CScript() << pubkey <<…
morsecoder
  • 14,008
  • 2
  • 42
  • 92
8
votes
2 answers

Why don't P2PK scripts have their own address?

If I understand addresses correctly, different types of addresses are used to map to a particular locking script (scriptPubKey). So based on the leading character of an address, a wallet will decode the address, and then form the appropriate locking…
inersha
  • 2,928
  • 1
  • 17
  • 41
7
votes
1 answer

How were P2PK transactions made?

I understand that P2PK scripts do not have a corresponding address type. However, we see a lot of P2PK transactions, both coinbase outputs and non-coinbase outputs. What software was used to make these transactions? Did Bitcoin Core support sending…
Casey Rodarmor
  • 524
  • 2
  • 9
6
votes
2 answers

How did pay-to-pubkey hash come about? What is its history?

We know that early blocks all used pay-to-pubkey (p2pk) and at some point, we mostly switched to pay-to-pubkey-hash (p2pkh). What is the history behind this? Who made the changes and when did p2pkh become standard? Also, does this have anything to…
Jimmy Song
  • 7,709
  • 16
  • 35
5
votes
2 answers

Why does vout sometimes not have address?

I am trying to parse all transactions. I found that some transactions do not have addresses in their vout. There are two situations that vout does not have addresses. The first one is the miner reward. For example, run this: bitcoin-cli…
Mars Lee
  • 173
  • 7
4
votes
1 answer

Trying to understand Pay-to-Public-Key-Hash

I am new to bitcoin and I am trying to understand Pay-to-Public-Key-Hash (P2PKH) from the book: Mastering Bitcoin: Unlocking Digital Cryptocurrencies (p. 127). I understand that digital keys (which are derived from private-keys) are not actually…
Node.JS
  • 143
  • 3
3
votes
1 answer

Different balances between fullnode and bitcoin explorer

I looked up Block 200 at https://www.blockchain.com/explorer/blocks/btc/200 and found out that coinbase transaction was made and sent 50 BTC to 1HwmP33SaknLYShXfjVU8KmVThU3JiuVgH. But if I check utxos that 1HwmP33SaknLYShXfjVU8KmVThU3JiuVgH has by…
Jin
  • 61
  • 3
2
votes
2 answers

How to extract all the bitcoin addresses with bitcoin-cli?

I am trying to get all existing addresses on the bitcoin blockchain with bitcoin-cli. It seems that I can get addresses from vout that are of type "pubkeyhash". If the type of vout is "pubkey" there are no addresses. pubkeyhash type: "vout": [ …
Daniel
  • 37
  • 4
2
votes
3 answers

Could the standard pay to address script be simpler? e.g. no compare of the HASH160?

What if I had a scriptPubKey of OP_CHECKSIG And an scriptSig of Question Would that work in the standard client? Why do we need to check the hash? The only possible reason I could come up with is that it makes a DDOS much more…
makerofthings7
  • 12,656
  • 11
  • 60
  • 129
2
votes
2 answers

How to figure out the output address when there is no "address" key in vout["scriptPubKey"]

Context: I have a bitcoin core node(v.24), and using bitcoinrpc library. So, when I am running the getrawtransaction() function, sometimes the vout doesn't have the key "address", and the key "desc" looks like pk(....)#.... . How can I figure out…
Block_Mole
  • 23
  • 4
2
votes
2 answers

How to recover and sweep P2PK coins

In an effort to recover some old dust, I've been working on a sweep script to be used on a bunch of old private keys with a little BTC locked inside multiple p2pk utxos. First I tried using python's bitcoinlib, but after creating and signing the…
2
votes
3 answers

A question about the role of OP_DUP in the P2PK(H) transaction specification, and possibility of slightly smaller single address transactions

Original Thread: Why OP_DUP instead of providing the PubKey twice in P2PKH? I am struggling to understand the logic in the most popular answer and my "reputation" is < 50 so I cannot comment my response. If the specification for a different single…
Poseidon
  • 599
  • 2
  • 20
1
2 3