Bitcoin Forum
October 21, 2017, 08:10:13 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: What determines transaction size?  (Read 250 times)
chemodan
Member
**
Offline Offline

Activity: 87


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?
1508616613
Hero Member
*
Offline Offline

Posts: 1508616613

View Profile Personal Message (Offline)

Ignore
1508616613
Reply with quote  #2

1508616613
Report to moderator
1508616613
Hero Member
*
Offline Offline

Posts: 1508616613

View Profile Personal Message (Offline)

Ignore
1508616613
Reply with quote  #2

1508616613
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508616613
Hero Member
*
Offline Offline

Posts: 1508616613

View Profile Personal Message (Offline)

Ignore
1508616613
Reply with quote  #2

1508616613
Report to moderator
1508616613
Hero Member
*
Offline Offline

Posts: 1508616613

View Profile Personal Message (Offline)

Ignore
1508616613
Reply with quote  #2

1508616613
Report to moderator
1508616613
Hero Member
*
Offline Offline

Posts: 1508616613

View Profile Personal Message (Offline)

Ignore
1508616613
Reply with quote  #2

1508616613
Report to moderator
Coding Enthusiast
Sr. Member
****
Offline Offline

Activity: 413


Novice C♯ Coder


View Profile WWW
February 28, 2017, 05:15:14 AM
 #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
Donation link using BIP21
BitcoinTransactionTool (0.9.2): Ann - Source Code
Watch Only Bitcoin Wallet (2.2.0): Ann - Source Code
SharpPusher-broadcast transactions (0.10.0): Ann - Source Code

jonald_fyookball
Legendary
*
Offline Offline

Activity: 1218


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: 630



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.

        ▄██████████████    █████████████▄
    ▄██▀                                                       ▀██▄
   ██▀                                                              ▀██
 ██                                                                     ██
██                                                                       ██
██                                                                       ██
██                                                                       ██
██                                                                       ██
 ██▄                                                                   ██
  ▀██▄                                                            ▄██▀
     ▀██▄▄                                                    ▄██▀
          ▀█████████████   █████████████▀▀
                                         ██
Cash Poker Pro
   ♠    ♦    ♣    ♥ 
              ▒▓██ ░░░ ▓█▓▒            
           ▓██████     ██████▓         
        ░▓███▓▓███ ░░░ ▓███▓████▒      
       ▓████▓▓████████████▓██████▓     
      ░░░▓▓█████▓▓█▒▒▒██▓█████▓▒░░░    
          ░███▓▒▒▓██████▒░▒███▒        
    ▓▒   ░██▓▓█████████████▓▒██▒   ░▓  
    ███▓▒██▓░▓████      ▓███░▒██▒▒███▒ 
   ▓███████▓██████  ██▓▓█████▓████████ 
   ███▓███▓▒██████      █████▒▓██▓▓▓██ 
   ▓██▓███▓░██████████  █████▒▓██▓▓▓██ 
   ▓███████▓▓█████      █████▓███████▓ 
    ███▒▒██▓░▓██████████████░▓██▒▒███░ 
    ▒▒   ░██▓▓█████████████▓▓██▒   ░▒  
      ░   ░███▓░▒▓█▓▓▓██▒░▓███▒   ░    
       ░▒▓██████▓██▒▒▒██▓██████▓▒░     
       ▒████▓▓▓███████████▓▓▓████▓     
         ▓██▓▓▓███  ░░ ▓██▓▓███▓░      
           ▒██████     ██████▓         
              ░▒▓█ ░░░ ▓█▓░            
Anonymity Fair Play Cryptocurrency New Platforms
А platform that will change the world of poker!
               ▄▀▀▀▀▀▄▄▄▄
           ▄▄▄▄█  ▄█     ▀▀▀▀▄▄▄▄
▄▄▀▀▀▀▀▀▀▀▀   █  ▀ █            ▀▀▀▀▄
█  █▄        ▄▀                    ▄▀
▀▄ █ ▀       █         ▄           █
 █          █        ▄██▄         ▄▀
 █         ▄▀     ▄██████▄       ▄▀
 ▀▄        █    ▄█████████▄      █
  █       █      ██████████▄    ▄▀
  █      ▄▀        ▀████████   ▄▀
  ▀▄     █        ▄████▀▀▀▀    █
   █    █          ▀▀▀█       ▄▀
   █   ▄▀                    ▄▀
   ▀▄  █                     █
    █  ▀▄▄              █ ▄ ▄▀
    █     ▀▀▀▀▄▄▄       █▀ ▄▀
    ▀▄▄▄▄▄▄▄▄▀▀▀▀▀▀▀▀▀▀▄▄▄▄█
  ♠    ♦    ♣      JOIN US!
ICO Starts: Oct 26th 2017 
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!