kevinejohn / bsv-p2p

Communicate on the Bitcoin P2P network
MIT License
24 stars 13 forks source link

Big blocks crash heap #12

Open mkpuig opened 8 months ago

mkpuig commented 8 months ago

Hi, the block bsv-mainnet height 826363 crashes node

peer.getBlock("000000000000000007a591825ac273c21c421f8a15c67b1d7e8babb123e39b2d", 120000) Spends some time downloading Ok the block, but then crashes processing it.

kevinejohn commented 8 months ago

I just tried it and it worked for me. Are you using the latest version of bsv-p2p (v2.0.1+)?

That is a 1.5GB block so on earlier bsv-p2p versions if the initializer option was not stream = true it would crash if your computer did not have enough RAM. The latest version automatically streams and processes the block in chunks if it is too large for RAM.

mkpuig commented 8 months ago

Hi, will try and come back. We were using "bsv-p2p": "^2.0.0" thank you!

mkpuig commented 8 months ago

Hi, sorry again. Now seems to process big blocks !!! thank you!

But is there any fast way to get an event which returns same as tx_block, but only txidslist instead of whole txlist ? (if not, any clue of where we should "cut" some code?) Thank you in advance!