Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: piotr_n on October 24, 2016, 04:01:36 PM



Title: Very slow parsing of blocks that spend SegWit coins [SOLVED]
Post by: piotr_n on October 24, 2016, 04:01:36 PM
It's probably a known problem, so maybe someone could give me a hint before I start digging into the problem, trying to reinvent the wheel.

My client has no support for SegWit (yet).
When it parses new testnet blocks (ones that spend segwit outputs), it takes ages to process them...

Does anyone know what is going on?


Title: Re: Very slow parsing of blocks that spend SegWit coins
Post by: achow101 on October 24, 2016, 04:21:09 PM
It's probably some optimization issue with your client. I don't know of any known issues with slow parsing of the blocks.

You might want to ask this on the #bitcoin-core-dev IRC channel.


Title: Re: Very slow parsing of blocks that spend SegWit coins
Post by: piotr_n on October 24, 2016, 05:23:15 PM
Thanks.

I think I figured it out.

It was the core's consensus lib, which I use for cross-checking scripts (to make sure that my script processor returns the same result).

It was happening for blocks containing txs with 10000+ inputs, so if the script processing function needed extra ~6ms to finish, it was creating the problem.
Not sure whether it is the consensus lib itself (from 0.13.0) that is slow, or is it rather the (slow) way my app's engine calls the external dll...
Can't say, but after switch off the cross-checking, it's all good now.

Cheers