Questions tagged [p2pkh]

Pay-to-PubKey-Hash is the standard format for making payments on the Bitcoin network.

Filter by
Sorted by
Tagged with
57
votes
3answers
67k views

How to calculate transaction size before sending (Legacy Non-Segwit - P2PKH/P2SH)

I know that I pay the transaction fee per kB, so how can I calculate how large the transaction will be before I send it via the RPC api. I run a site using bitcoins, and I cannot let the user's ...
9
votes
3answers
2k 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 ...
4
votes
1answer
376 views

How is Public Key extracted from (message, digital signature, address)

I'm under the impression that a public key is revealed when you sign a message. Given these 3 inputs. P2PKH Address, Digital Signature, Message. Is the public key exposed? If so, how do you extract ...
5
votes
1answer
770 views

How big is the input of a P2PKH transaction?

How many bytes does a P2PKH input have? I'm finding a few different numbers: Why does the default miner implementation use pay-to-pubkey? states: push + sig + push + key = 1 + 72 + 1 + 61 = 139 ...
3
votes
3answers
664 views

How it is possible to validate existing Pay to Public Key Hash transaction without public key?

These are my understanding or assumptions. Sign a document requires secret key and message only as below SignDocument(secret key, message) => signature And verification of signature requires ...
4
votes
4answers
296 views

Why doesn't address contain a full scriptPubKey?

This is a general question, but let's suppose a P2PKH transaction. P2PKH address starts with "1" and the sender incorporates it into the scriptPubKey as: OP_DUP OP_HASH160 <PublicKeyHash> ...
2
votes
1answer
140 views

scriptcode, scriptsig, pubkeyscript confusion

I've been banging my head on a desk for a few days trying to understand the segwit protocol properly. Another roadblock has thrown me off-guard and I am struggling to grasp the concept of "scriptCode:...