Author

Topic: Question about Transaction Size (Read 1025 times)

legendary
Activity: 1092
Merit: 1001
March 23, 2015, 07:59:23 PM
#7
The wallet should have you specify the fee PER KB so you don't need to know the txn size.  Miners sort txns by fee/kb so a 2000 sat fee on a 2 KB txn is no better or worse than a 1000 sat on a 1KB txn.
My understanding is for every 1000 bytes, you should use 10,000sat, if you want to be in the next block.
Are you saying at 1000 bytes, you can use 1,000sat, and still be in the next block or within a few blocks?

I would assume blockchain.info does that as well but if it doesn't then that is a poor design.
Blockchain.info has two options for sending (not including Shared Coin).
(1) Quick Send - you enter the receiving address and amount of btc, and blockchain.info will broadcast from any address in your wallet and pay miners fee in proportion.
(2) Custom - you select your address(s) from your wallet , you enter the receiving address, you enter amount of btc, you enter miner fee, then blockchain.info broadcasts it.

My original question was how can I determine the my data size prior to broadcasting with blockchain.info.

But anyway, from my understanding, it does not do that within the custom setting and seems like it should provide that information.
donator
Activity: 1218
Merit: 1079
Gerald Davis
March 23, 2015, 07:01:34 PM
#6
The wallet should have you specify the fee PER KB so you don't need to know the txn size.  Miners sort txns by fee/kb so a 2000 sat fee on a 2 KB txn is no better or worse than a 1000 sat on a 1KB txn. I would assume blockchain.info does that as well but if it doesn't then that is a poor design.
legendary
Activity: 1092
Merit: 1001
March 23, 2015, 05:06:03 PM
#5
...
It can be more and less. 146+/-1 byte is the typcial size of an input with compressed key, which is the most common currently. An input that needs a script (pay2script hash) can differ in size greatly [1][2].
Ok. Thank you.

...
Coin control is a feature of bitcoin core that lets you pick the inputs to use by hand before creating a transaction, thus allowing you control over which input(s) will be used. I am not sure if any other wallet has this feature yet. It also gives you a prediction of the size and calculates a fee in estmation of the time (in blocks) it takes for confirmation. You could e.g. set it to 10 blocks target confirmation time and bitcoin core might say 2134 satoshi per 1000 byte is enough for that, your TX is 500 bytes, thus the fee will be 1067 satoshi. Sorry for the bitcoin core is awesome parade.
I understand now. No, blockchain.info does not allow selecting individual inputs within the address. Only individual addresses within the wallet.

...
There is no actual "from" address, its just shown that way on blockchain.info and other block explorers. A transaction allways refers to another transaction never to an address. If bc.i allows you to select the "from" address though you can at least narrow down which inputs it will be using as they must have been received with the address in question in the past. You could also force it to use all available inputs by explicitly sending the "rest" to one of your own addresses. E.g. in the above example you would 0.5 to someone else and 0.2-fee to yourself, forcing the wallet to use all seven inputs.
[1] https://blockchain.info/tx/6a26d2ecb67f27d1fa5524763b49029d7106e91e3cc05743073461a719776192
[2] https://blockchain.info/tx/295ce081b9ca209f30edfab59116691566c2e65698b86c5f594b6ad6362e654c

No, I understand that there is no "from" address. But you are correct. I'm using incorrect terminology.
Fyi, I sent the whole balance to another address, since all the inputs in that one address was lagging blockchain.info wallet updates and etc.
Now that I consolidated it (around 80 small inputs(faucets)) into one new address (and archived the old), I have no blockchain.info lag.

Thank you again.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
March 23, 2015, 03:55:26 PM
#4
-snip-
One more question, is the cap or average on each input around 150 bytes, or can be more?

It can be more and less. 146+/-1 byte is the typcial size of an input with compressed key, which is the most common currently. An input that needs a script (pay2script hash) can differ in size greatly [1][2].

In reference to your statement about coin control, blockchain.info's shows the inputs/outputs, all its btc amounts, and fee, but doesn't show it with data sizes.

Coin control is a feature of bitcoin core that lets you pick the inputs to use by hand before creating a transaction, thus allowing you control over which input(s) will be used. I am not sure if any other wallet has this feature yet. It also gives you a prediction of the size and calculates a fee in estmation of the time (in blocks) it takes for confirmation. You could e.g. set it to 10 blocks target confirmation time and bitcoin core might say 2134 satoshi per 1000 byte is enough for that, your TX is 500 bytes, thus the fee will be 1067 satoshi. Sorry for the bitcoin core is awesome parade.

I might not understand what you mean by coin control though. I can choose which address to take from and where to send as custom. No data sizes though.

Thanks.

There is no actual "from" address, its just shown that way on blockchain.info and other block explorers. A transaction allways refers to another transaction never to an address. If bc.i allows you to select the "from" address though you can at least narrow down which inputs it will be using as they must have been received with the address in question in the past. You could also force it to use all available inputs by explicitly sending the "rest" to one of your own addresses. E.g. in the above example you would 0.5 to someone else and 0.2-fee to yourself, forcing the wallet to use all seven inputs.


[1] https://blockchain.info/tx/6a26d2ecb67f27d1fa5524763b49029d7106e91e3cc05743073461a719776192
[2] https://blockchain.info/tx/295ce081b9ca209f30edfab59116691566c2e65698b86c5f594b6ad6362e654c
legendary
Activity: 1092
Merit: 1001
March 23, 2015, 03:40:59 PM
#3
-snip-
Is there a way, with a block explorer or anything, where I can calculate my transaction size with all the inputs, before broadcasting it?

Thanks.

The size depends on the number of inputs and outputs used. You could try to guess the number of inputs that will be used. E.g. you have received 7 transactions with 0.1 bitcoin in the past and want to send 0.5 with a fee now. In this case your wallet would have to use at least 6 inputs and create change of 0.6-.5-fee, thus two outputs. One - as change - to yourself and one to the other party.

An input is ~150 byte, an output 34 byte, thus the estimated size for this example would be 6*150 + 2*34 = 968 and a fee of 10k satoshi would still be enough.

Keep in mind that this is a very rough estimation and can vary greatly. Your wallet software might also pick inputs based on different factors. Is there no such thing as coin control for bc.i? Im really spoiled by that feature in bitcoin core.

Thank you for your answer.
For now on, I guess I can just assume each input is 150 bytes and output is 34 bytes. Then I can say for every 1000 bytes, I'll add a 0.0001 fee.
This was helpful and when calculated, was very close to what my transaction data size actually was.

One more question, is the cap or average on each input around 150 bytes, or can be more?

In reference to your statement about coin control, blockchain.info's shows the inputs/outputs, all its btc amounts, and fee, but doesn't show it with data sizes.
I might not understand what you mean by coin control though. I can choose which address to take from and where to send as custom. No data sizes though.

Thanks.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
March 23, 2015, 03:26:05 PM
#2
-snip-
Is there a way, with a block explorer or anything, where I can calculate my transaction size with all the inputs, before broadcasting it?

Thanks.

The size depends on the number of inputs and outputs used. You could try to guess the number of inputs that will be used. E.g. you have received 7 transactions with 0.1 bitcoin in the past and want to send 0.5 with a fee now. In this case your wallet would have to use at least 6 inputs and create change of 0.6-.5-fee, thus two outputs. One - as change - to yourself and one to the other party.

An input is ~150 byte, an output 34 byte, thus the estimated size for this example would be 6*150 + 2*34 = 968 and a fee of 10k satoshi would still be enough.

Keep in mind that this is a very rough estimation and can vary greatly. Your wallet software might also pick inputs based on different factors. Is there no such thing as coin control for bc.i? Im really spoiled by that feature in bitcoin core.
legendary
Activity: 1092
Merit: 1001
March 23, 2015, 03:18:43 PM
#1
Sorry, if this posted before, but I searched and could not find it.

I do most of my btc transactions with online wallets, such as blockchain.info.
Every time I send a transaction, I have no idea how large it will be, so I can not place an appropriate tx fee for priority in the next block.
I can only find what my data size was after it was broadcasted.
Blockchain.info wallet does not show proposed data size in its description of input/output before the actual transmission.


Question:
Is there a way, with a block explorer or anything, where I can calculate my transaction size with all the inputs, before broadcasting it?

Thanks.





Jump to: