Author

Topic: Optimize checkblock transaction checking on Bitcoin Core (Read 1415 times)

jr. member
Activity: 38
Merit: 2
FYI. The pull request filed earlier.
https://github.com/bitcoin/bitcoin/pull/6659
jr. member
Activity: 38
Merit: 2
It seems that we might be able to optimize some transaction checkings.  
Many checkings are done twice:
1. when the transaction is placed into the pool
2. when verifying validity of the transaction in a block
Yes, may be some checks can be skipped (if not already)
But.
1) What do you want to achieve?
2) Can you calculate (in btc or bucks or kwh) the benefits of this refactoring?
3) Can you rewrite code yourself and submit a pull-request?


Thanks for the inputs, amaclin and DannyHamilton.

1) Increase the tps that a node can process.  It seems that our test machine cannot process more than 15 transactions per seconds (not talking about mining or blocksize).
3) My friend has the change already and can submit a pull-request.  
legendary
Activity: 1260
Merit: 1019
It is possible to skip ECDSA signature verification if it was passed before.
As far as I remember Bitcoin Core Client caches valid signatures (but I do not know the size of this LRU cache).

Anyway, one is able to make any changes in code and add/remove any checks.
Just do it yourself and tell us about the results.
legendary
Activity: 3472
Merit: 4801
I think it would be a problem to just check if the transaction is already in the memory pool, wouldn't it?

Isn't it possible for other transactions that are already in the block to make some transactions in the memory pool invalid?
legendary
Activity: 1260
Merit: 1019
It seems that we might be able to optimize some transaction checkings. 
Many checkings are done twice:
1. when the transaction is placed into the pool
2. when verifying validity of the transaction in a block
Yes, may be some checks can be skipped (if not already)
But.
1) What do you want to achieve?
2) Can you calculate (in btc or bucks or kwh) the benefits of this refactoring?
3) Can you rewrite code yourself and submit a pull-request?
jr. member
Activity: 38
Merit: 2
It seems that we might be able to optimize some transaction checkings. 
Many checkings are done twice:
1. when the transaction is placed into the pool
2. when verifying validity of the transaction in a block

Why don't we simply check if the transaction in a block is already in the memory pool?  The transaction is already verified when it is placed into the pool. 

Does this makes sense?  If so, is there a reason that bitcoind does not want to do this?   Huh

Thank you very much for your review.
Jump to: