citp / BlockSci

A high-performance tool for blockchain science and exploration
https://citp.github.io/BlockSci/
GNU General Public License v3.0
1.34k stars 259 forks source link

max-block.. not working, wrongly applied or misunderstood ? #158

Closed ccmsi closed 6 years ago

ccmsi commented 6 years ago

Greetings. i run: blocksci_parser --output-directory /home/bitcoin/blocksci update --max-block 100 rpc ... The RPC arguments are added and the process starts fine. However, my assumption that this should be very quick with the intention to limit data to just a little using max-blocks of 100 to limit evaluation of just first 100 blocks in bitcoin chain appears wrong. I actually see no difference adding the option or leaving it out. What is wrong? Am i misunderstanding the option, do i apply it wrong or does it not work ? Thanks for your support.

maltemoeser commented 6 years ago

I actually see no difference adding the option or leaving it out.

Do you mean the parser is writing to disk full data for all blocks despite the option, or just that it doesn't seem to run fast (without letting it finish)? The parser will create it's own view of the longest chain by going through all block headers first, but then should only write to disk full data for the first 100 blocks. If you're querying a fully synchronized Bitcoin node through the RPC interface though, going through all headers might take some time.

ccmsi commented 6 years ago

In both cases it starts counting up how many percent of its current job have been completed, and that goes at about same speed in either case, as well as crashing out at about 91,4% during that first stage. With you stating that sifts through the entire data in the first stage in any case, then that i think counts as me not expecting that to be the way it works... and being surprised as that seems counter intuitive with limiting the work being the goal. Anyways, i take it that that's expected behavior, thanks for clarification.