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
1
vote
1
answer
368
views
get source address of a transaction
I have been conducting research on the web and Bitcoin Stack Exchange to find a method for obtaining the source address of a transaction. I have come across multiple answers, some suggesting the use ...
0
votes
3
answers
112
views
Move p2pk with addresses
This is strange for me that there exist over 30 000 of p2pk with addresses mainly with very high balance and these funds weren't moved yet. There are Linux tools to scan blockchain for them and note ...
0
votes
1
answer
87
views
Do p2pk and SIGHASH_SINGLE still working nowadays?
Seems like p2pk - pay to public key may be working or not in modern wallet apps. Is it still working or not?
EDIT: Can old p2pk addresses be used to move balance to new addresses (for example bc1q...)?...
3
votes
1
answer
130
views
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 ...
2
votes
2
answers
313
views
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 ...
2
votes
2
answers
945
views
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 ...
1
vote
2
answers
210
views
Retrieve address corresponding to pubkey using bitcoin-cli/RPC
We are using jgarzik/python-bitcoinrpc and in some cases curl to retrieve data from bitcoin core using RPC.
However, for some txns where pubkey is used, bitcoin-cli/rpc gives no address in ...
0
votes
1
answer
200
views
P2SH to P2PK transaction - mandatory-script-verify-flag-failed (Opcode missing or not understood) (error 26)
I am trying to spend a P2SH UTXO based on a redeem script that requires no signatures and simply needs the correct input to equal the OP_HASH160 digest in the corresponding P2SH locking script.
My ...
2
votes
3
answers
365
views
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 ...
1
vote
1
answer
371
views
Need a detailed step-by-step P2PK signature validation example
In the process of validating transactions by hand with a new library in elixir. I am starting with f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16, which is one of the first P2PK ...
1
vote
1
answer
177
views
Can I create a P2PK tx?
Is it still possible to send to a pub key directly?
How would I construct such a tx in raw hex, and would the mempool accept it?
Thanks
7
votes
1
answer
530
views
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 ...
0
votes
1
answer
483
views
How bitcoin browsers check P2PK and P2SH balance?
Suppose someone sends bitcoins to me using P2PK, I only enter my address starting with 1 in the bitcoin browser, can i get results? my public key hash doesn't appear in either UTXO, only one UTXO has ...
0
votes
1
answer
999
views
Get Address from pubkey scriptPubKey
Given that address is a "convenience" field, it makes sense that it is not provided by default in many transactions. However, it seems to be possible to extract address from hex. I am ...
0
votes
2
answers
168
views
Block 170 transaction validation in the old days
I'm trying to understand how to validate the first non-coinbase transaction, that is transaction 1 of block 169, as it was validated in the old days.
This transaction has one input, which decoded ...
-1
votes
1
answer
212
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 ...
3
votes
1
answer
531
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
1
answer
364
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
1
answer
115
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
1
answer
192
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 ...
2
votes
2
answers
250
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 "...
5
votes
2
answers
1k
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
1
answer
968
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
2
answers
215
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
1
answer
963
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
1
answer
130
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 ...
7
votes
2
answers
2k
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 ...
8
votes
2
answers
2k
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 ...
16
votes
3
answers
6k
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 ...
30
votes
1
answer
30k
views
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 ...
0
votes
1
answer
727
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
1
answer
982
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 ...
20
votes
2
answers
7k
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
1
answer
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
3
answers
170
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 ...