Author

Topic: Types of Different Bitcoin Transaction and Their sizes (Read 309 times)

sr. member
Activity: 322
Merit: 363
39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD
For segwit transactions it depends on the transaction.

A typical transaction of one input, two outputs is 226 bytes legacy, 166 vbytes P2SH-P2WPKH segwit (27% less), 141 vbytes pure bech32 P2WPKH segwit (38% less).

If you have many inputs, the savings are larger (and less for many outputs). For 10 input, 1 output legacy is 1515 bytes, 953 vbytes P2SH-P2WPKH (37% less), and 722 vbytes P2WPKH (52% less).

Multisignature transactions benefit even more. Multiinput 2 of 3 multisignature transactions in bech32 P2WPKH segwit are 75% smaller.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
^^ Thanks for the explanation.

Someone please help me with the sizes of different transaction. Assuming 2 inputs and 2 outputs:
Basic - 438 bytes (https://bitcointalksearch.org/topic/how-to-calculate-size-of-transaction-1782523)
P2SH or Pay-to-Script-Hash - Same as P2PKH?
Multisig -  ?? (
RETURN - ??
Non-standard -  ??


And additionally, how much space if any does Segwit transaction save over the current ~ 438 bytes?
It's impossible to calculate multisig transactions since the size is dependent on the size of the redeem script; the more signatures you can possibly have, the larger your redeem script. Ie, 2-of-3 > 2-of-5.

OP_Return is basically considered as a single output which is limited to 83 bytes. Assuming the transaction is a P2PKH, the maximum size would be the 2input and 1 output + 83 bytes.

Depends. If you're using native P2PWKH, the size would be smaller. P2PWKH-P2SH has a larger size however.
newbie
Activity: 10
Merit: 0
^^ Thanks for the explanation.

Someone please help me with the sizes of different transaction. Assuming 2 inputs and 2 outputs:
Basic - 438 bytes (https://bitcointalksearch.org/topic/how-to-calculate-size-of-transaction-1782523)
P2SH or Pay-to-Script-Hash - Same as P2PKH?
Multisig -  ?? (
RETURN - ??
Non-standard -  ??


And additionally, how much space if any does Segwit transaction save over the current ~ 438 bytes?

newbie
Activity: 13
Merit: 4
As at 2015/2016, there are five standard transactions which are accepted by the standard client which include Basic, P2SH or Pay-to-Script-Hash, Multisig, RETURN and Non-standard – although some miners will accept a non standard transaction for a price. The most popular type of transaction is the TX_PUBKEY, or Pay to Public Key Transaction (P2PKH) with over 89% of total transaction as at 2015.

The latest transaction type  as at 2017 is SegWit


Thanks. I found a link which says there are 6 types:
https://www.cryptocompare.com/coins/guides/what-are-the-bitcoin-transaction-types/

What is the difference between Pay to public key vs pay to address?

What is estimated size of each type? Here's what I found:

Basic (P2PKH) - assuming 1-2 inputs and two outputs - 438 bytes ( https://bitcointalksearch.org/topic/how-to-calculate-size-of-transaction-1782523 )
P2SH or Pay-to-Script-Hash - Same as P2PKH?
Multisig -  ??
RETURN - ??
Non-standard -  ??
Segwit - ??


By pay to address do you mean P2PKH?

P2PK (pay-to-public-key) is a legacy format that I believe is no longer considered standard. Essentially, the full public key is included in the transaction's output script. The script is thus of the form

Code:
 OP_CHECKSIG

With P2PKH, only a hash of the public key is included in the output script. The script is of the form

Code:
OP_DUP OP_HASH160  OP_EQUALVERIFY OP_CHECKSIG

The hash is only 20 bytes, instead of the key's 32, saving some space. The spender includes the public key and signature, the same as with P2PK, but the sender has saved 9 bytes (20 bytes for the hash and 3 for the extra script ops vs 32 bytes for the full pubkey).

P2SH is a whole separate shebang. The output scripts for these are of the form

Code:
OP_HASH160 [20-byte-hash-value] OP_EQUAL

where the hash is that of the redeem script (the script specifying the conditions necessary to spend the funds).
newbie
Activity: 10
Merit: 0
As at 2015/2016, there are five standard transactions which are accepted by the standard client which include Basic, P2SH or Pay-to-Script-Hash, Multisig, RETURN and Non-standard – although some miners will accept a non standard transaction for a price. The most popular type of transaction is the TX_PUBKEY, or Pay to Public Key Transaction (P2PKH) with over 89% of total transaction as at 2015.

The latest transaction type  as at 2017 is SegWit


Thanks. I found a link which says there are 6 types:
https://www.cryptocompare.com/coins/guides/what-are-the-bitcoin-transaction-types/

What is the difference between Pay to public key vs pay to address?

What is estimated size of each type? Here's what I found:

Basic (P2PKH) - assuming 1-2 inputs and two outputs - 438 bytes ( https://bitcointalksearch.org/topic/how-to-calculate-size-of-transaction-1782523 )
P2SH or Pay-to-Script-Hash - Same as P2PKH?
Multisig -  ??
RETURN - ??
Non-standard -  ??
Segwit - ??
jr. member
Activity: 42
Merit: 2
I found this interesting take on bitcoin transaction type trends from 2015: https://tradeblock.com/blog/analysis-of-bitcoin-transaction-size-trends

As this is from 2 years ago, I am wondering:

a. Are there any newer transaction types?

b. What is the average size of each of transaction type?

c. Is there a site/way to see the number of each transaction type included in each block?

As at 2015/2016, there are five standard transactions which are accepted by the standard client which include Basic, P2SH or Pay-to-Script-Hash, Multisig, RETURN and Non-standard – although some miners will accept a non standard transaction for a price. The most popular type of transaction is the TX_PUBKEY, or Pay to Public Key Transaction (P2PKH) with over 89% of total transaction as at 2015.

The latest transaction type  as at 2017 is SegWit which is the name used for an implemented soft fork change in the transaction format of the cryptocurrency Bitcoin which has also been implemented on currencies such as Litecoin, DigiByte, Vertcoin and Groestlcoin.

The formal title "Segregated Witness (Consensus layer)" had Bitcoin Improvement Proposal number BIP141.  It is intended to mitigate a blockchain size limitation problem that reduces Bitcoin transaction speed. It does this by splitting the transaction into two segments, removing the unlocking signature ("witness" data) from the original portion and appending it as a separate structure at the end. The original section would continue to hold the sender and receiver data, and the new "witness" structure would contain scripts and signatures.

The original data segment would be counted normally, but the "witness" segment would, in effect, be counted as a quarter of its real size.
copper member
Activity: 630
Merit: 2614
If you don’t do PGP, you don’t do crypto!
Looks like this article is missing segwit transactions, be it with the "3" format or with the bech32 (bc1) format.

Expanding on what you say:  The network itself has no notion of addresses; addresses are only a human interface feature.  Transactions involving Segwit addresses starting with a “3” are P2WPKH-nested-in-P2SH (Pay To Witness Public Key Hash nested in Pay To Script Hash), paid to the hash of a script consisting of OP_0 followed by the push of a witness keyhash (0x0014<20-byte hash>).  Bech32 addresses permit use of native Segwit tranactions, but are not backward-compatible.  An address starting with a “3” may or may not be a Segwit address; there is no way to tell, just by looking at it; it’s simply an ordinary P2SH address, which is why old clients can send money to it.

(I know that you know this; I’m filling in for others.  Good call in your reply.)


I just don't get this about Segwit because the project got canceled but now it's back on again
as Segwitx2 because they are doing a fork on 28th Dec 2017

Did the Segwit team turn it on without a fork so it just worked with BTC or something or are we
talking about a message that miners can send if they want vote for it or something

Thanks in advance

Segwit is an excellent technology which activated in Bitcoin on 2017-08-24 with Block #481824.  Bitcoin already has Segwit.  The misleadingly misnamed “Segwit2X” is not Segwit and not Bitcoin.


Yes,but the project was said to be suspended actually not cancelled. However the B2X is available on some exchange and you can also find it on coinmarketcap cause the B2X project was phase into two project which is the SegWit activation and 2MB blocksize increase. Therefore, 2MB blocksize increase was the one suspended not the SegWit activation which occurs in August. SegWit Mail List Site for more information

The link you give is not to the Segwit mailing list.  It’s to the mailing list of a hostile takeover attempt which has nothing to do with Segwit, and nothing to do with Bitcoin.

Bitcoin no longer has a block size limit.  Segwit replaces the block size limit with a block weight limit, set to 4000000 bytes:

Code:
/** The maximum allowed weight for a block, see BIP 141 (network rule) */
static const unsigned int MAX_BLOCK_WEIGHT = 4000000;
newbie
Activity: 13
Merit: 4
The newest standard transaction types are P2WPKH (pay-to-witness-public-key-hash) and P2WSH (pay-to-witness-script-hash). Each of these can be expressed in two ways, native SegWit or embedded P2SH. While the former is smaller, it requires that the sending client supports bech32 addresses (see https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki). AFAIK, only Electrum does at this point, so for backwards compatibility, SegWit addresses can be wrapped in a P2SH address--thus making them understandable by essentially all clients. For a more in-depth explanation, see BIP 141 (https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki).
hero member
Activity: 2268
Merit: 579
Vave.com - Crypto Casino

Looks like this article is missing segwit transactions, be it with the "3" format or with the bech32 (bc1) format.


I just don't get this about Segwit because the project got canceled but now it's back on again
as Segwitx2 because they are doing a fork on 28th Dec 2017

Did the Segwit team turn it on without a fork so it just worked with BTC or something or are we
talking about a message that miners can send if they want vote for it or something

Thanks in advance



Yes,but the project was said to be suspended actually not cancelled. However the B2X is available on some exchange and you can also find it on coinmarketcap cause the B2X project was phase into two project which is the SegWit activation and 2MB blocksize increase. Therefore, 2MB blocksize increase was the one suspended not the SegWit activation which occurs in August. SegWit Mail List Site for more information
member
Activity: 210
Merit: 26
High fees = low BTC price

Looks like this article is missing segwit transactions, be it with the "3" format or with the bech32 (bc1) format.


I just don't get this about Segwit because the project got canceled but now it's back on again
as Segwitx2 because they are doing a fork on 28th Dec 2017

Did the Segwit team turn it on without a fork so it just worked with BTC or something or are we
talking about a message that miners can send if they want vote for it or something

Thanks in advance

legendary
Activity: 1372
Merit: 1252
I found this interesting take on bitcoin transaction type trends from 2015: https://tradeblock.com/blog/analysis-of-bitcoin-transaction-size-trends

As this is from 2 years ago, I am wondering:

a. Are there any newer transaction types?

b. What is the average size of each of transaction type?

c. Is there a site/way to see the number of each transaction type included in each block?

Looks like this article is missing segwit transactions, be it with the "3" format or with the bech32 (bc1) format.

Im not sure if you could find a website that would list each different type of transactions and its amounts embedded in a block but at least you can see segwit vs nonsegwit amounts here:

http://segwit.party/charts/

Im interested in seeing a site with charts for each format as well.

newbie
Activity: 10
Merit: 0
I found this interesting take on bitcoin transaction type trends from 2015: https://tradeblock.com/blog/analysis-of-bitcoin-transaction-size-trends

As this is from 2 years ago, I am wondering:

a. Are there any newer transaction types?

b. What is the average size of each of transaction type?

c. Is there a site/way to see the number of each transaction type included in each block?
Jump to: