Bitcoin Forum
July 29, 2024, 11:10:18 PM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What determines transaction size?  (Read 414 times)
chemodan (OP)
Member
**
Offline Offline

Activity: 99
Merit: 12


View Profile
February 28, 2017, 04:57:01 AM
 #1

Sometimes transaction size is 1847 bytes and sometimes 225 bytes . What does it depend? And how learn what will be transaction size before transaction to put proper fee?
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1040
Merit: 2784


Bitcoin and C♯ Enthusiast


View Profile WWW
February 28, 2017, 05:15:14 AM
Last edit: February 28, 2017, 05:26:18 AM by Coding Enthusiast
 #2

Number of tx_ins and tx_outs
In other words if you have multiple outputs (UTXO or transactions to spend) and if you are paying to multiple keys (sending bitcoin to many bitcoin addresses) your transaction size is bigger.
https://bitcoin.org/en/developer-guide#transactions

You can read about the structure of a transaction here (Raw Transaction Format) https://bitcoin.org/en/developer-reference#raw-transaction-format

So when you are spending 1 output and creating 1 new output your transaction size becomes ~225 bytes
example: https://blockchain.info/tx/ee33588fced298248c9e693b4eee72e2aae6963381b63cf5850ba2e94abe2d90?show_adv=true

But when you are spending multiple outputs (for example 10) and create 1 new output your transaction size becomes 1847 (with uncompressed private keys will be smaller with compressed)
Example of 1 output to multiple:
https://blockchain.info/tx/db8b1751c00bce986f833022fb4ed4b55406597eb0c11ad0fb8347765ddbdf39?show_adv=true
Example of multiple outputs:
https://blockchain.info/tx/16398c9e7261ec72c09bc5e5b712049882a7f857e363f9ac591e5a53cf37b410?show_adv=true
* These two were taken from the last block mined

And how learn what will be transaction size before transaction to put proper fee?

Use a wallet that tells you how much fee is appropriate, there is no need for you to "learn" what the transaction size will be.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
February 28, 2017, 05:15:19 AM
 #3

Sometimes transaction size is 1847 bytes and sometimes 225 bytes . What does it depend? And how learn what will be transaction size before transaction to put proper fee?

it mostly depends on how many inputs you have.  If you have a lot of different change addresses in your wallet, and your wallet has to use many of them, it will make the size
bigger.  Presumably, a good wallet should tell you the appropriate fee but in this era of congestion, it becomes more difficult to calculate as it is dynamic.

Check this:

https://bitcoinfees.21.co/


n0ne
Hero Member
*****
Offline Offline

Activity: 2618
Merit: 548


SecureShift.io | Crypto-Exchange


View Profile WWW
February 28, 2017, 05:40:42 AM
 #4

It depends upon the transaction fee input to the transaction to the number of output it makes on the particular transactions.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!