2

I don't understand that, why does bitcoin need to use different types of addresses for making the different types of transactions? Is'nt it possible to generate different transactions having a transaction type configuration while using one address?

4 Answers 4

2

why does bitcoin need to use different types of addresses for making the different types of transactions?

I think a fundamental reason is that the recipient (payee) has to be involved in specifying how they want to be paid, they have to be involved in the choice of transaction type. The address is really nothing other than the way in which the payee communicates their needs to the payer. It has to contain a specification that is sufficient for the payer to construct a locking script that the payee has the means to unlock. The address is not used in the Bitcoin network at all.

Is'nt it possible to generate different transactions having a transaction type configuration while using one address?

It is, but the address would be insufficient for a payee to be paid properly when the payer might choose a new transaction type that the payee's software did not yet support. As a payee you'd have to specify not just an address but a list of acceptable payment types too. The address is a concept that was supposed to do the whole of that job.

Again, it is worth remembering that addresses don't exist anywhere in the Bitcoin network protocols and don't exist in the blockchain.

1

It helps prevent confusion and loss of funds.

Different version bytes are reserved for different uses and result in different address types. For example version bytes 0x00 (mainnet address starts with 1), version bytes 0x6F (testnet address starts with m or n).

Imagine if both mainnet and testnet had the same version bytes. It would be very confusing.

See this answer for more reasons why we have different version bytes: https://bitcoin.stackexchange.com/a/552/26873

As for whether it can be done with a single address type Legacy P2SH (addresses that start with a 3) was probably the closest to a single address type that handled multiple spend cases. It could behave like a P2WPKH via a P2SH script (P2SH-P2WPKH) as well as ability to do multisig, and even other non-standard scripts. But it was a temporary work around until native segwit addresses became the standard which have slight variations as well to distinguish output types.

0

Because need for changes emerges overtime, and in a decentralized system that relies on consensus you need to insure if the changes are backwards-compatible to those who might not agree with. If they are, you can introduce them without the disagreeing's consent.

But, if they aren't backwards-compatible, you can't force them upgrade. You might choose to introduce the changes, but you'll be forked off the network, which isn't desirable in the end.

As for your question. We have multiple types of addresses, or to be precise, multiple scripts to spend bitcoin. We have P2PKH, P2PK, P2SH, P2WPKH, P2TR etc., because there were needs for that, say, P2PKH alone couldn't give us the solution by its own.

2
  • P2PK isn't a way around P2PKH
    – Mercedes
    Oct 1, 2022 at 16:31
  • Didn't say it is. Both P2PK and P2PKH were standard from the beginning. Unless I misunderstood you.
    – Angelo
    Oct 1, 2022 at 16:34
0

Why doesn't Bitcoin use different types of transactions with only one type of address?

Too late to ask this question. It would have been possible with certain trade-offs for sure but privacy was never a priority.

Example: I wanted to look at a few exchanges for some transactions and first thing I checked was if they had segwit deposit address. In some cases legacy addresses helped. Developers love and maybe need different types of addresses but it helps other people.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.