Author

Topic: Transaction verification time? (Read 1624 times)

legendary
Activity: 1260
Merit: 1019
May 26, 2016, 03:01:37 AM
#8
Feeling better now?
Aaaaah! Much better! (c) Duke Nukem
legendary
Activity: 2053
Merit: 1356
aka tonikt
May 26, 2016, 02:19:35 AM
#7
Depending on the speed of the host computer, it should not be more than a couple milliseconds.
Wrong. This is expensive process. Some transactions have very many inputs and SIGOPs.
Verifying them takes much more time even with secp265k1 lib

OK, mr smart ass, let me rephrase.

If the transaction has less than 30 single-signature inputs, verifying it should not* take more than a couple milliseconds, on a $100+ CPU with secp265k1 lib.

Feeling better now?


* - by should not I mean that you haven't fucked up your code and it's aspiring to be optimal (e.g. by using parallel threads or not fetching the inputs from some slow database).
legendary
Activity: 1260
Merit: 1019
May 25, 2016, 04:35:08 PM
#6
Depending on the speed of the host computer, it should not be more than a couple milliseconds.
Wrong. This is expensive process. Some transactions have very many inputs and SIGOPs.
Verifying them takes much more time even with secp265k1 lib
legendary
Activity: 2053
Merit: 1356
aka tonikt
May 25, 2016, 02:40:19 AM
#5
Ah, well, I meant the time it takes for a single node to verify the vallidity of a transaction. Not the time it takes for the entire network to accept the transaction as valid and incorporate it into the blockchain. In other words, checking the signature, checking the structure of the transaction, checking the content of the transaction fields, all that, how long does that take for a node (assumptions can be made on processor power, etc)? This should be independent of the tx fee.
Depending on the speed of the host computer, it should not be more than a couple milliseconds.

I think in bitcoin core, the most time consuming part these days would be fetching tx's input(s) from UTXO database. Unless they'd happen to be in a cache.
Then verifying ECDSA signature(s) also needs some time. But this has been hugely improved by switching to sipa's secp265k1 lib.
newbie
Activity: 17
Merit: 10
May 23, 2016, 02:56:07 PM
#4
The transaction verification time is mostly depended on the amonut of the transaction fee. The larger the transaction fee is, the higher the priority of the confirmation will be.

Ah, well, I meant the time it takes for a single node to verify the vallidity of a transaction. Not the time it takes for the entire network to accept the transaction as valid and incorporate it into the blockchain. In other words, checking the signature, checking the structure of the transaction, checking the content of the transaction fields, all that, how long does that take for a node (assumptions can be made on processor power, etc)? This should be independent of the tx fee.
legendary
Activity: 4214
Merit: 1313
staff
Activity: 3458
Merit: 6793
Just writing some code
May 20, 2016, 09:56:35 AM
#2
My questions:
1.a How long does it take to verify the validity of a single transaction (not included in a block)? I guess some assumptions must be made (CPU, memory, number of inouts/outputs in a transaction)
It depends on the number of inputs and signature operations. A transaction could theoretically take several minutes to verify.

1.b Is there a tool available with which I can test and observe the verification time (of a single and/or multiple transactions)?
I'm not sure, but you can probably write one.

2. Is transaction validation of a single transaction (not included in a block) similar to transaction validation of a transaction in a block body?

Thanks.

Yes.
newbie
Activity: 17
Merit: 10
May 20, 2016, 09:47:09 AM
#1
Hi,

As from what I understand, Bitcoin nodes transmit transactions twice. First the actual transaction is transmitted; second, the transaction is included in a block and the block is transmitted, effectively transmitting the transaction twice.

The first time a transaction is transmitted, each node verifues the validity of a transaction, before further transmitting it. Again, from what I understand, if the transaction is included in a block, the (all) transaction(s) is (in the block are) verified, before the block is transmitted to the next node.

(Note: these questions are about transaction validity, not the transaction ultimately being accepted in the blockchain)

My questions:
1.a How long does it take to verify the validity of a single transaction (not included in a block)? I guess some assumptions must be made (CPU, memory, number of inouts/outputs in a transaction)
1.b Is there a tool available with which I can test and observe the verification time (of a single and/or multiple transactions)?
2. Is transaction validation of a single transaction (not included in a block) similar to transaction validation of a transaction in a block body?

Thanks.
Jump to: