Questions tagged [p2pk]

Pay-To-PubKey is a transaction format that refers directly to the public key of the recipient.

Filter by
Sorted by
Tagged with
0
votes
1answer
48 views

What is scriptpubkey for in the coinbase transaction ? (and more..)

I'm about to mine and I reached a part when I want to generate the coinbase transaction. I won't complicate things by putting in the new block transactions and getting the fees for them. All that ...
2
votes
1answer
58 views

p2pkh vs. p2pk keeping public key private

I just got into learning Bitcoin programming through Jimmy Song's Programming Bitcoin. Jimmy says that some of p2pkh's advantages over p2pk include: a smaller ScriptPubKey keeping one's public key ...
2
votes
1answer
88 views

How Bitcoin decide which scriptPubKey use?

I'm studying Bitcoin protocol, and I'm able to create address by my bash script. The addresses "P2PKH" and "P2PK" have the same procedure. Compressed or uncompressed public key – ...
0
votes
1answer
40 views

cannot decode block 0 to find the output address. I can decode much higher blocks. what am i missing?

Can you please decode block 0 output transaction manually showing me how to get the output address namely: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
1
vote
1answer
52 views

Does getreceivedbyaddress or listreceivedbyaddress or listunspent shows pay to pubkey and bare mutlisig transactions?

Couldn’t find the answer inside the source code. If I receive a pay to pubkey transaction to the pubkey of a 1r address, will it shows up using getreceivedbyaddress or listreceivedbyaddress or ...
1
vote
2answers
70 views

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 "...
4
votes
2answers
364 views

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....
1
vote
1answer
559 views

bitcoinj java library not decoding input addresses for some transactions

I'm trying to "extract" sender's addresses from OP_RETURN Bitcoin transactions, but my code is not working properly. getWalletAddressOfSender(final Transaction tx) public static Address ...
0
votes
2answers
88 views

Why most of pubkeys in the first batch of blocks in blk00000.dat are different

For example: the pubkey in the first 3 coinbase's output are 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f ...
0
votes
1answer
688 views

bitcoin public key vs public key hash vs. pub key [duplicate]

I am not talking about the privacy related concerns just the security aspect and the ability for someone to 'break my private key'. The addresses that my wallet generates are p2pkh addresses. If i ...
0
votes
1answer
81 views

P2PUBKEY in witness program (P2WPUBKEY)

Old standard transactions format included 3 types: P2PUBKEY, P2PKH, P2SH. After Segwit soft fork, we have got 2 additional types: P2WPKH and P2WSH. If we compare the cost of spending inputs (in bytes ...
5
votes
2answers
792 views

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 ...
6
votes
2answers
871 views

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 ...
15
votes
3answers
3k views

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 ...
0
votes
1answer
462 views

What is type 'pubkey' in a scriptpubkey output from getrawtransaction?

Here is an output from getrawtransaction: { ... "vout": [ { "value": 12.50000000, "n": 0, "scriptPubKey": { "asm": "...
4
votes
1answer
793 views

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 ...
16
votes
2answers
5k views

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 ...
9
votes
1answer
4k views

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; ...
2
votes
3answers
149 views

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

What if I had a scriptPubKey of <pubKey>OP_CHECKSIG And an scriptSig of <sig> Question Would that work in the standard client? Why do we need to check the hash? The only possible ...