Bitcoin Forum
December 14, 2024, 10:35:56 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to know the size of transaction before you send using electrum?  (Read 1419 times)
john2231 (OP)
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1001



View Profile
December 11, 2016, 11:39:08 PM
 #1

Hi guys i would like to ask if how we can know the size of transaction before we send bitcoin to the target address. so that i can put my manual fee for better speed of my transaction..  i notice sometimes my transaction with the same amount but different size that actually it takes time before its confirm.. So i am looking how to know it but i could not find it.
steven0021
Hero Member
*****
Offline Offline

Activity: 629
Merit: 501


Experientia docet


View Profile
December 11, 2016, 11:54:04 PM
 #2

You can already put a manual fee per KB from Tools > Preferences. 10 satoshi/byte is 0.0001/KB, 50s/b is 0.0005/kb, etc.

You can also use it to calculate the size of your tx by dividing the recommended fee by your fee per KB and multiply it by 1000.
So if you get recommended 0.000113 and your fee per kb is 0.0005 that's 0.000113/0.0005*1000 = 226 bytes transaction. I don't think there's an easier way to calculate it.

                                                                       
    ▄▄███████▄▄                           ▄      ▄
   ██████████████▄                       ███    ███
  ███▀ ▄▄▄▄▄▄▄ ▀████                     ███    ███
  █████████████▄ ▀███                    ███    ███   █▄ ▄▄
   ▀████▄  ▄▄███  ▀███                   ███    ███  ▄████
   ▄███████████   ▄███                  ███    ███  ▀▀███▀▀
   ███           ▄███         ▄▄▄▄      ███    ███     █    ▄▄  ▄▄▄▄
  ▄███     ▄▄▄▄█████        ▄█████▄    ▄██▀   ▄██▀    ███   █████████
  ███▄    ████████         ▄███▀▀███   ███    ███    ███▀   █████▀████
   ███     ▀▀█████▄      ▄█████▄ ███   ███    ███    ███    ████   ███
   ███         ▀███▄     ███▀███ ███  ███▀   ███▀    ███    ███▀   ███
   ███           ███▄    ███  ▀▀ ███  ███    ███    ███▀   ▄███    ███
   ▀██▄           ███    ███▄  ▄███   ███    ███    ███    ███    ███▀
    ███           ▀███▄   ████████    ███    ███    ███    ███    ███
    ▀██            ▀████   ▀████▀      ██     ██    ▀██    ▀█▀    ▀█▀


.
.
.
        ▄▄▀                ▀▄▄
     ▄ ▀▀                    ▀▀ ▄
   ▄ ▀▀▀                      ▀▀▀ ▄
  ▄▀▀▀                          ▀▀▀▄
 ▀█▄▄                            ▄▄█▀
▄█  ▄                            ▄  █▄
▀█ █▀                            ▀█ █▀
█▄  ▄                            ▄  ▄█
▀█ █                              █ █▀
█▄   █                          █   ▄█
 ██▄█▀                          ▀█▄██
  ▀▀  ▄█                      █▄  ▀▀
  ▀██▄ ▀  █▄              ▄█  ▀ ▄██▀
    ▀▀▀   ██  █▄      ▄█  ██   ▀▀▀
     ▀███▄▄▀  ███    ███  ▀▄▄███▀
        ▀▀▀▀▄▄▄▄▀    ▀▄▄▄▄▀▀▀▀
          ▀▀█████▀▀▀▀█████▀▀
.
.
Free Bitcoins
Chat Lottery & Games
Level Up System with Rewards
▄████████▄  ▄████████▄
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
 ████████    ████████
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
▀████████▀  ▀████████▀
.
Abdussamad
Legendary
*
Offline Offline

Activity: 3710
Merit: 1586



View Profile
December 12, 2016, 10:49:02 AM
 #3

Hi guys i would like to ask if how we can know the size of transaction before we send bitcoin to the target address. so that i can put my manual fee for better speed of my transaction..  i notice sometimes my transaction with the same amount but different size that actually it takes time before its confirm.. So i am looking how to know it but i could not find it.
I have an idea.

Use the preview option on the send tab. Sign the tx. Then use the copy option to copy the hex code. What next? Is the hex code saved to an ascii text file going to use the same amount of space as on the blockchain? i'm not sure but maybe this will get you half way there.
steven0021
Hero Member
*****
Offline Offline

Activity: 629
Merit: 501


Experientia docet


View Profile
December 12, 2016, 09:30:35 PM
 #4

Hi guys i would like to ask if how we can know the size of transaction before we send bitcoin to the target address. so that i can put my manual fee for better speed of my transaction..  i notice sometimes my transaction with the same amount but different size that actually it takes time before its confirm.. So i am looking how to know it but i could not find it.
I have an idea.

Use the preview option on the send tab. Sign the tx. Then use the copy option to copy the hex code. What next? Is the hex code saved to an ascii text file going to use the same amount of space as on the blockchain? i'm not sure but maybe this will get you half way there.

Well 1 hex = 4 bits and 4 bits = 0.5 byte so just dividing the number of hex character by 2 should get you the size.
Or since it's already signed you can just decode from https://coinb.in/decode-raw-transaction.html.

                                                                       
    ▄▄███████▄▄                           ▄      ▄
   ██████████████▄                       ███    ███
  ███▀ ▄▄▄▄▄▄▄ ▀████                     ███    ███
  █████████████▄ ▀███                    ███    ███   █▄ ▄▄
   ▀████▄  ▄▄███  ▀███                   ███    ███  ▄████
   ▄███████████   ▄███                  ███    ███  ▀▀███▀▀
   ███           ▄███         ▄▄▄▄      ███    ███     █    ▄▄  ▄▄▄▄
  ▄███     ▄▄▄▄█████        ▄█████▄    ▄██▀   ▄██▀    ███   █████████
  ███▄    ████████         ▄███▀▀███   ███    ███    ███▀   █████▀████
   ███     ▀▀█████▄      ▄█████▄ ███   ███    ███    ███    ████   ███
   ███         ▀███▄     ███▀███ ███  ███▀   ███▀    ███    ███▀   ███
   ███           ███▄    ███  ▀▀ ███  ███    ███    ███▀   ▄███    ███
   ▀██▄           ███    ███▄  ▄███   ███    ███    ███    ███    ███▀
    ███           ▀███▄   ████████    ███    ███    ███    ███    ███
    ▀██            ▀████   ▀████▀      ██     ██    ▀██    ▀█▀    ▀█▀


.
.
.
        ▄▄▀                ▀▄▄
     ▄ ▀▀                    ▀▀ ▄
   ▄ ▀▀▀                      ▀▀▀ ▄
  ▄▀▀▀                          ▀▀▀▄
 ▀█▄▄                            ▄▄█▀
▄█  ▄                            ▄  █▄
▀█ █▀                            ▀█ █▀
█▄  ▄                            ▄  ▄█
▀█ █                              █ █▀
█▄   █                          █   ▄█
 ██▄█▀                          ▀█▄██
  ▀▀  ▄█                      █▄  ▀▀
  ▀██▄ ▀  █▄              ▄█  ▀ ▄██▀
    ▀▀▀   ██  █▄      ▄█  ██   ▀▀▀
     ▀███▄▄▀  ███    ███  ▀▄▄███▀
        ▀▀▀▀▄▄▄▄▀    ▀▄▄▄▄▀▀▀▀
          ▀▀█████▀▀▀▀█████▀▀
.
.
Free Bitcoins
Chat Lottery & Games
Level Up System with Rewards
▄████████▄  ▄████████▄
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
 ████████    ████████
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
▀████████▀  ▀████████▀
.
john2231 (OP)
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1001



View Profile
December 12, 2016, 10:39:01 PM
 #5

You can already put a manual fee per KB from Tools > Preferences. 10 satoshi/byte is 0.0001/KB, 50s/b is 0.0005/kb, etc.

You can also use it to calculate the size of your tx by dividing the recommended fee by your fee per KB and multiply it by 1000.
So if you get recommended 0.000113 and your fee per kb is 0.0005 that's 0.000113/0.0005*1000 = 226 bytes transaction. I don't think there's an easier way to calculate it.
This one is for setting or manually change the fee but i am looking for a way that before you send you can see first the transaction size before you send..


Hi guys i would like to ask if how we can know the size of transaction before we send bitcoin to the target address. so that i can put my manual fee for better speed of my transaction..  i notice sometimes my transaction with the same amount but different size that actually it takes time before its confirm.. So i am looking how to know it but i could not find it.
I have an idea.

Use the preview option on the send tab. Sign the tx. Then use the copy option to copy the hex code. What next? Is the hex code saved to an ascii text file going to use the same amount of space as on the blockchain? i'm not sure but maybe this will get you half way there.

It is a long way method to see the size of transaction do you have any methods that easy to do. or other method that you can easily seen it using electrum..
steven0021
Hero Member
*****
Offline Offline

Activity: 629
Merit: 501


Experientia docet


View Profile
December 12, 2016, 11:52:51 PM
 #6

There's no way to do it in electrum I'm afraid. Which is why we're suggesting alternative ways.

You can already put a manual fee per KB from Tools > Preferences. 10 satoshi/byte is 0.0001/KB, 50s/b is 0.0005/kb, etc.

You can also use it to calculate the size of your tx by dividing the recommended fee by your fee per KB and multiply it by 1000.
So if you get recommended 0.000113 and your fee per kb is 0.0005 that's 0.000113/0.0005*1000 = 226 bytes transaction. I don't think there's an easier way to calculate it.
This one is for setting or manually change the fee but i am looking for a way that before you send you can see first the transaction size before you send..

You don't need to send to see the recommended fee.

                                                                       
    ▄▄███████▄▄                           ▄      ▄
   ██████████████▄                       ███    ███
  ███▀ ▄▄▄▄▄▄▄ ▀████                     ███    ███
  █████████████▄ ▀███                    ███    ███   █▄ ▄▄
   ▀████▄  ▄▄███  ▀███                   ███    ███  ▄████
   ▄███████████   ▄███                  ███    ███  ▀▀███▀▀
   ███           ▄███         ▄▄▄▄      ███    ███     █    ▄▄  ▄▄▄▄
  ▄███     ▄▄▄▄█████        ▄█████▄    ▄██▀   ▄██▀    ███   █████████
  ███▄    ████████         ▄███▀▀███   ███    ███    ███▀   █████▀████
   ███     ▀▀█████▄      ▄█████▄ ███   ███    ███    ███    ████   ███
   ███         ▀███▄     ███▀███ ███  ███▀   ███▀    ███    ███▀   ███
   ███           ███▄    ███  ▀▀ ███  ███    ███    ███▀   ▄███    ███
   ▀██▄           ███    ███▄  ▄███   ███    ███    ███    ███    ███▀
    ███           ▀███▄   ████████    ███    ███    ███    ███    ███
    ▀██            ▀████   ▀████▀      ██     ██    ▀██    ▀█▀    ▀█▀


.
.
.
        ▄▄▀                ▀▄▄
     ▄ ▀▀                    ▀▀ ▄
   ▄ ▀▀▀                      ▀▀▀ ▄
  ▄▀▀▀                          ▀▀▀▄
 ▀█▄▄                            ▄▄█▀
▄█  ▄                            ▄  █▄
▀█ █▀                            ▀█ █▀
█▄  ▄                            ▄  ▄█
▀█ █                              █ █▀
█▄   █                          █   ▄█
 ██▄█▀                          ▀█▄██
  ▀▀  ▄█                      █▄  ▀▀
  ▀██▄ ▀  █▄              ▄█  ▀ ▄██▀
    ▀▀▀   ██  █▄      ▄█  ██   ▀▀▀
     ▀███▄▄▀  ███    ███  ▀▄▄███▀
        ▀▀▀▀▄▄▄▄▀    ▀▄▄▄▄▀▀▀▀
          ▀▀█████▀▀▀▀█████▀▀
.
.
Free Bitcoins
Chat Lottery & Games
Level Up System with Rewards
▄████████▄  ▄████████▄
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
 ████████    ████████
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
▀████████▀  ▀████████▀
.
pooya87
Legendary
*
Offline Offline

Activity: 3668
Merit: 11107


Crypto Swap Exchange


View Profile
December 13, 2016, 05:10:44 AM
 #7

the transaction size is the number of Unconfirmed Transaction Outputs (UTXOs) that you include in your transaction to spend (these are those transactions that you see when you check your balance on an online block explorer) and before you sign the transaction you don't know the real size of it but you can make an estimate based on experience.

every output (think of it as number of addresses that you send to) adds approximately 34 bytes (8 byte amount + 1 byte pk_script length + 25 byte pk_script)

every input adds approximately 180 bytes (32 byte TX hash + 4 byte output Index + 1(or more) byte scriptSig length + ~140 byte scriptSig + 4 byte - sequence)

add to this 10 bytes (4 byte version + 1(or more) tx_in count + 1(or more) tx_out count + 4 byte lock time)

The result for 1 input and 2 outputs is 180 + 34 + 34 + 10 = ~258 bytes example
remember that many of these sizes are approximate like scriptSig bytes

reference: https://bitcoin.org/en/developer-guide#transactions

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
RealBitcoin
Hero Member
*****
Offline Offline

Activity: 854
Merit: 1009


JAYCE DESIGNS - http://bit.ly/1tmgIwK


View Profile
December 25, 2016, 04:20:30 PM
 #8

Hi guys i would like to ask if how we can know the size of transaction before we send bitcoin to the target address. so that i can put my manual fee for better speed of my transaction..  i notice sometimes my transaction with the same amount but different size that actually it takes time before its confirm.. So i am looking how to know it but i could not find it.


Save the transaction file to your desktop before broadcasting, and look at the byte size of the file itself.

I mean the real size not the size on disk as in Windows, you want to look at the real size.

So if you open it with a text editor it should be visible how many bytes there are composed of. Then you see how much the size is.

john2231 (OP)
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1001



View Profile
December 25, 2016, 04:36:37 PM
 #9

Hi guys i would like to ask if how we can know the size of transaction before we send bitcoin to the target address. so that i can put my manual fee for better speed of my transaction..  i notice sometimes my transaction with the same amount but different size that actually it takes time before its confirm.. So i am looking how to know it but i could not find it.


Save the transaction file to your desktop before broadcasting, and look at the byte size of the file itself.

I mean the real size not the size on disk as in Windows, you want to look at the real size.

So if you open it with a text editor it should be visible how many bytes there are composed of. Then you see how much the size is.
But where i can get that file in electrum? so i need to preview and sign and don't broadcast but the problem where i can see that file like you metion.. i tried to find it in electrum folder but i do not know if what file..
ranochigo
Legendary
*
Offline Offline

Activity: 3052
Merit: 4443


Crypto Swap Exchange


View Profile
December 25, 2016, 04:42:59 PM
 #10

Hi guys i would like to ask if how we can know the size of transaction before we send bitcoin to the target address. so that i can put my manual fee for better speed of my transaction..  i notice sometimes my transaction with the same amount but different size that actually it takes time before its confirm.. So i am looking how to know it but i could not find it.


Save the transaction file to your desktop before broadcasting, and look at the byte size of the file itself.

I mean the real size not the size on disk as in Windows, you want to look at the real size.

So if you open it with a text editor it should be visible how many bytes there are composed of. Then you see how much the size is.
It doesn't really work. The .txn file actually includes additional words which will inflate the size slightly.

Even if you copy out the raw transaction, it would seem to be bigger than the actual size.

But where i can get that file in electrum? so i need to preview and sign and don't broadcast but the problem where i can see that file like you metion.. i tried to find it in electrum folder but i do not know if what file..
Press save and you can save it and use a text editor to open it.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
john2231 (OP)
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1001



View Profile
December 25, 2016, 04:51:35 PM
Last edit: December 25, 2016, 05:06:29 PM by john2231
 #11

Hi guys i would like to ask if how we can know the size of transaction before we send bitcoin to the target address. so that i can put my manual fee for better speed of my transaction..  i notice sometimes my transaction with the same amount but different size that actually it takes time before its confirm.. So i am looking how to know it but i could not find it.


Save the transaction file to your desktop before broadcasting, and look at the byte size of the file itself.

I mean the real size not the size on disk as in Windows, you want to look at the real size.

So if you open it with a text editor it should be visible how many bytes there are composed of. Then you see how much the size is.
It doesn't really work. The .txn file actually includes additional words which will inflate the size slightly.

Even if you copy out the raw transaction, it would seem to be bigger than the actual size.

But where i can get that file in electrum? so i need to preview and sign and don't broadcast but the problem where i can see that file like you metion.. i tried to find it in electrum folder but i do not know if what file..
Press save and you can save it and use a text editor to open it.
Now i found it now how do i know it since i just saw the hex codes.. how do i know the size or there is some software to decrypt the hex code?
Code:
    "hex": "01000000014cc27b70f3237024987538cf2ef048b352ce9de2f299e39622afa1d3da163296000000005701ff4c53ff0488b21e000000000000000000ee43c49b1c67efc72ef560b725feb9ebdb882ddcf8f8737f6d1b8483683c1a5603d65a4e739b87d3ec7ce7edeaf23660db02566b7b978d95e4ce9f9e645bc51b3001002c00ffffffff020b550000000000001976a91459275cec98772c20867cab83ee633956b118784288ac94bd00000000000017a914d2a90181bd395f850baf44059fd6b7db592861028700000000", 
    "complete": false,
    "final": true
}
I just already decode the hex but i cant read the result..
RealBitcoin
Hero Member
*****
Offline Offline

Activity: 854
Merit: 1009


JAYCE DESIGNS - http://bit.ly/1tmgIwK


View Profile
December 25, 2016, 06:03:10 PM
 #12

Hi guys i would like to ask if how we can know the size of transaction before we send bitcoin to the target address. so that i can put my manual fee for better speed of my transaction..  i notice sometimes my transaction with the same amount but different size that actually it takes time before its confirm.. So i am looking how to know it but i could not find it.


Save the transaction file to your desktop before broadcasting, and look at the byte size of the file itself.

I mean the real size not the size on disk as in Windows, you want to look at the real size.

So if you open it with a text editor it should be visible how many bytes there are composed of. Then you see how much the size is.
It doesn't really work. The .txn file actually includes additional words which will inflate the size slightly.

Even if you copy out the raw transaction, it would seem to be bigger than the actual size.

But where i can get that file in electrum? so i need to preview and sign and don't broadcast but the problem where i can see that file like you metion.. i tried to find it in electrum folder but i do not know if what file..
Press save and you can save it and use a text editor to open it.
Now i found it now how do i know it since i just saw the hex codes.. how do i know the size or there is some software to decrypt the hex code?
Code:
    "hex": "01000000014cc27b70f3237024987538cf2ef048b352ce9de2f299e39622afa1d3da163296000000005701ff4c53ff0488b21e000000000000000000ee43c49b1c67efc72ef560b725feb9ebdb882ddcf8f8737f6d1b8483683c1a5603d65a4e739b87d3ec7ce7edeaf23660db02566b7b978d95e4ce9f9e645bc51b3001002c00ffffffff020b550000000000001976a91459275cec98772c20867cab83ee633956b118784288ac94bd00000000000017a914d2a90181bd395f850baf44059fd6b7db592861028700000000", 
    "complete": false,
    "final": true
}
I just already decode the hex but i cant read the result..

Just copy that long hex code into a word editor and you can see how many bytes there are. Usually 1 character = 1 byte. Exclude the spaces and tabs.

For example the example above is 408 character and therefore it's 408 byte.

steven0021
Hero Member
*****
Offline Offline

Activity: 629
Merit: 501


Experientia docet


View Profile
December 25, 2016, 11:01:31 PM
Last edit: December 26, 2016, 04:54:32 AM by steven0021
 #13


Just copy that long hex code into a word editor and you can see how many bytes there are. Usually 1 character = 1 byte. Exclude the spaces and tabs.

For example the example above is 408 character and therefore it's 408 byte.

Quote
Well 1 hex = 4 bits and 4 bits = 0.5 byte so just dividing the number of hex character by 2 should get you the size.

It's 204 bytes.

It'll get bigger when it's signed btw.
https://blockchain.info/tx/963216dad3a1af2296e399f2e29dce52b348f02ecf387598247023f3707bc24c

                                                                       
    ▄▄███████▄▄                           ▄      ▄
   ██████████████▄                       ███    ███
  ███▀ ▄▄▄▄▄▄▄ ▀████                     ███    ███
  █████████████▄ ▀███                    ███    ███   █▄ ▄▄
   ▀████▄  ▄▄███  ▀███                   ███    ███  ▄████
   ▄███████████   ▄███                  ███    ███  ▀▀███▀▀
   ███           ▄███         ▄▄▄▄      ███    ███     █    ▄▄  ▄▄▄▄
  ▄███     ▄▄▄▄█████        ▄█████▄    ▄██▀   ▄██▀    ███   █████████
  ███▄    ████████         ▄███▀▀███   ███    ███    ███▀   █████▀████
   ███     ▀▀█████▄      ▄█████▄ ███   ███    ███    ███    ████   ███
   ███         ▀███▄     ███▀███ ███  ███▀   ███▀    ███    ███▀   ███
   ███           ███▄    ███  ▀▀ ███  ███    ███    ███▀   ▄███    ███
   ▀██▄           ███    ███▄  ▄███   ███    ███    ███    ███    ███▀
    ███           ▀███▄   ████████    ███    ███    ███    ███    ███
    ▀██            ▀████   ▀████▀      ██     ██    ▀██    ▀█▀    ▀█▀


.
.
.
        ▄▄▀                ▀▄▄
     ▄ ▀▀                    ▀▀ ▄
   ▄ ▀▀▀                      ▀▀▀ ▄
  ▄▀▀▀                          ▀▀▀▄
 ▀█▄▄                            ▄▄█▀
▄█  ▄                            ▄  █▄
▀█ █▀                            ▀█ █▀
█▄  ▄                            ▄  ▄█
▀█ █                              █ █▀
█▄   █                          █   ▄█
 ██▄█▀                          ▀█▄██
  ▀▀  ▄█                      █▄  ▀▀
  ▀██▄ ▀  █▄              ▄█  ▀ ▄██▀
    ▀▀▀   ██  █▄      ▄█  ██   ▀▀▀
     ▀███▄▄▀  ███    ███  ▀▄▄███▀
        ▀▀▀▀▄▄▄▄▀    ▀▄▄▄▄▀▀▀▀
          ▀▀█████▀▀▀▀█████▀▀
.
.
Free Bitcoins
Chat Lottery & Games
Level Up System with Rewards
▄████████▄  ▄████████▄
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
 ████████    ████████
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
▀████████▀  ▀████████▀
.
RealBitcoin
Hero Member
*****
Offline Offline

Activity: 854
Merit: 1009


JAYCE DESIGNS - http://bit.ly/1tmgIwK


View Profile
December 26, 2016, 11:34:22 AM
 #14


Just copy that long hex code into a word editor and you can see how many bytes there are. Usually 1 character = 1 byte. Exclude the spaces and tabs.

For example the example above is 408 character and therefore it's 408 byte.

Quote
Well 1 hex = 4 bits and 4 bits = 0.5 byte so just dividing the number of hex character by 2 should get you the size.

It's 204 bytes.

It'll get bigger when it's signed btw.
https://blockchain.info/tx/963216dad3a1af2296e399f2e29dce52b348f02ecf387598247023f3707bc24c

How? If I save that string to a file, the file will be 409 bytes, the 408 + 1 end of line character.

steven0021
Hero Member
*****
Offline Offline

Activity: 629
Merit: 501


Experientia docet


View Profile
December 26, 2016, 02:05:06 PM
 #15

How? If I save that string to a file, the file will be 409 bytes, the 408 + 1 end of line character.

I think that's because text files uses encoding (UTF-8, 8-bits ASCII, etc) that puts the minimal size per character to 1 byte (or more for other encodings) even though they're actually smaller to make it readable. Non-text files created by programming like blockchain files stores the data in binary which make things nigh unreadable if you open them with text editor (but you can read the hex if you open them with hex editor).

                                                                       
    ▄▄███████▄▄                           ▄      ▄
   ██████████████▄                       ███    ███
  ███▀ ▄▄▄▄▄▄▄ ▀████                     ███    ███
  █████████████▄ ▀███                    ███    ███   █▄ ▄▄
   ▀████▄  ▄▄███  ▀███                   ███    ███  ▄████
   ▄███████████   ▄███                  ███    ███  ▀▀███▀▀
   ███           ▄███         ▄▄▄▄      ███    ███     █    ▄▄  ▄▄▄▄
  ▄███     ▄▄▄▄█████        ▄█████▄    ▄██▀   ▄██▀    ███   █████████
  ███▄    ████████         ▄███▀▀███   ███    ███    ███▀   █████▀████
   ███     ▀▀█████▄      ▄█████▄ ███   ███    ███    ███    ████   ███
   ███         ▀███▄     ███▀███ ███  ███▀   ███▀    ███    ███▀   ███
   ███           ███▄    ███  ▀▀ ███  ███    ███    ███▀   ▄███    ███
   ▀██▄           ███    ███▄  ▄███   ███    ███    ███    ███    ███▀
    ███           ▀███▄   ████████    ███    ███    ███    ███    ███
    ▀██            ▀████   ▀████▀      ██     ██    ▀██    ▀█▀    ▀█▀


.
.
.
        ▄▄▀                ▀▄▄
     ▄ ▀▀                    ▀▀ ▄
   ▄ ▀▀▀                      ▀▀▀ ▄
  ▄▀▀▀                          ▀▀▀▄
 ▀█▄▄                            ▄▄█▀
▄█  ▄                            ▄  █▄
▀█ █▀                            ▀█ █▀
█▄  ▄                            ▄  ▄█
▀█ █                              █ █▀
█▄   █                          █   ▄█
 ██▄█▀                          ▀█▄██
  ▀▀  ▄█                      █▄  ▀▀
  ▀██▄ ▀  █▄              ▄█  ▀ ▄██▀
    ▀▀▀   ██  █▄      ▄█  ██   ▀▀▀
     ▀███▄▄▀  ███    ███  ▀▄▄███▀
        ▀▀▀▀▄▄▄▄▀    ▀▄▄▄▄▀▀▀▀
          ▀▀█████▀▀▀▀█████▀▀
.
.
Free Bitcoins
Chat Lottery & Games
Level Up System with Rewards
▄████████▄  ▄████████▄
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
 ████████    ████████
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
▀████████▀  ▀████████▀
.
pooya87
Legendary
*
Offline Offline

Activity: 3668
Merit: 11107


Crypto Swap Exchange


View Profile
December 27, 2016, 06:45:15 AM
 #16

How? If I save that string to a file, the file will be 409 bytes, the 408 + 1 end of line character.

I think that's because text files uses encoding (UTF-8, 8-bits ASCII, etc) that puts the minimal size per character to 1 byte (or more for other encodings) even though they're actually smaller to make it readable. Non-text files created by programming like blockchain files stores the data in binary which make things nigh unreadable if you open them with text editor (but you can read the hex if you open them with hex editor).

or maybe it is because he is looking at the "size on disk" instead of size. the size on disk is 446 bytes of hex which is twice the byte value when sent aka 223 bytes (what blockchain.info in the link he quoted is showing by the way)

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
RealBitcoin
Hero Member
*****
Offline Offline

Activity: 854
Merit: 1009


JAYCE DESIGNS - http://bit.ly/1tmgIwK


View Profile
December 27, 2016, 06:16:06 PM
 #17

How? If I save that string to a file, the file will be 409 bytes, the 408 + 1 end of line character.

I think that's because text files uses encoding (UTF-8, 8-bits ASCII, etc) that puts the minimal size per character to 1 byte (or more for other encodings) even though they're actually smaller to make it readable. Non-text files created by programming like blockchain files stores the data in binary which make things nigh unreadable if you open them with text editor (but you can read the hex if you open them with hex editor).

Yes that is a good explanation, binary encoding is more efficient, thanks.

How? If I save that string to a file, the file will be 409 bytes, the 408 + 1 end of line character.

I think that's because text files uses encoding (UTF-8, 8-bits ASCII, etc) that puts the minimal size per character to 1 byte (or more for other encodings) even though they're actually smaller to make it readable. Non-text files created by programming like blockchain files stores the data in binary which make things nigh unreadable if you open them with text editor (but you can read the hex if you open them with hex editor).

or maybe it is because he is looking at the "size on disk" instead of size. the size on disk is 446 bytes of hex which is twice the byte value when sent aka 223 bytes (what blockchain.info in the link he quoted is showing by the way)

I dont really know which one is what, but yes try converting the text file into binary and then it will shink in size to the TX size.



Text file = 408 bytes + 1 byte EOF character

Bin file = 204 bytes (it's the TX size)

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!