Re: Error at Block #481815 Reading the blockchain from Block #1 to the end

2018-04-07 Thread Andreas Schildbach
Just to let you know: the issue is fixed with PR
https://github.com/bitcoinj/bitcoinj/pull/1552.


On 04/04/2018 02:44 AM, chenpeng...@gmail.com wrote:
> Okay, at least it works. If you get some other solutions, please let me
> know, thank you.
> 
> 在 2018年4月3日星期二 UTC+8下午5:54:55,Olivér Zsámár写道:
> 
> Hi!
> 
> I couldn't solve this using bitcoinj.
> Maybe you could use Blockchain Data Api at blockchain.info
>  for the SegWit blocks.
> 
> Its very slow for that and you have to download the segwit blocks by
> using that api. But at least it works.
> 
> 
>  ezt írta (időpont: 2018. ápr. 3., K 11:47):
> 
> Hi, do you solve this problem? I get the same one.
> 
> 在 2018年3月20日星期二 UTC+8上午5:38:14,Olivér Zsámár写道:
> 
> Hello!
> 
> I'm new to bitcoinj, and before doing anything, I just want
> to try some easy stuff.
> I want to read the whole blockchain from Block #1, and doing
> some statistics.
> 
> I have this program:
> https://pastebin.com/avszTeAK
> 
> It doesn't suppose to do anything. The only thing it should
> do: just count all the blocks!
> 
> When I compile my code, I always get this warning:
> 
> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context getOrCreate
> WARNING: Implicitly creating context. This is a migration
> step and this message will eventually go away.
> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context 
> INFO: Creating bitcoinj 0.14.6 context.
> 
> After this, it starts counting the blocks.
> 
> But at Block #481815 there is always an exception.
> 
> Block #481814
> Block #481815
> Debugging
> java.lang.NegativeArraySizeException
>     at org.bitcoinj.core.Message.readBytes(Message.java:334)
>     at
> 
> org.bitcoinj.core.TransactionInput.parse(TransactionInput.java:143)
>     at org.bitcoinj.core.Message.(Message.java:96)
>     at org.bitcoinj.core.Message.(Message.java:128)
>     at
> org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
>     at
> 
> org.bitcoinj.core.TransactionInput.(TransactionInput.java:133)
>     at org.bitcoinj.core.Transaction.parse(Transaction.java:564)
>     at org.bitcoinj.core.Message.(Message.java:96)
>     at org.bitcoinj.core.Message.(Message.java:128)
>     at
> org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
>     at
> org.bitcoinj.core.Transaction.(Transaction.java:232)
>     at org.bitcoinj.core.Block.parseTransactions(Block.java:242)
>     at org.bitcoinj.core.Block.parse(Block.java:266)
>     at org.bitcoinj.core.Message.(Message.java:96)
>     at org.bitcoinj.core.Message.(Message.java:128)
>     at org.bitcoinj.core.Block.(Block.java:162)
>     at
> 
> org.bitcoinj.core.BitcoinSerializer.makeBlock(BitcoinSerializer.java:270)
>     at
> 
> org.bitcoinj.core.MessageSerializer.makeBlock(MessageSerializer.java:72)
>     at
> 
> org.bitcoinj.utils.BlockFileLoader.loadNextBlock(BlockFileLoader.java:154)
>     at
> 
> org.bitcoinj.utils.BlockFileLoader.hasNext(BlockFileLoader.java:87)
>     at com.company.BitcoinReader.read(BitcoinReader.java:33)
>     at com.company.BitcoinReader.main(BitcoinReader.java:68)
> 
> 
> First I downloaded the Bitcoin blockchain from here:
> https://getbitcoinblockchain.com/
> 
> Then I tried to solve my problem after a few failed attempts
> by downloading the blockchain using BitcoinCore:
> https://bitcoin.org/en/download
> 
> Sadly it didn't solve the problem.
> 
> Please help.
> :)
> 
> -- 
> You received this message because you are subscribed to a topic
> in the Google Groups "bitcoinj" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/bitcoinj/fGWBPbTORAg/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email
> to bitcoinj+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout
> .
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "bitcoinj" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bitcoinj+un

Re: Error at Block #481815 Reading the blockchain from Block #1 to the end

2018-04-03 Thread chenpeng609
Okay, at least it works. If you get some other solutions, please let me 
know, thank you.

在 2018年4月3日星期二 UTC+8下午5:54:55,Olivér Zsámár写道:
>
> Hi!
>
> I couldn't solve this using bitcoinj.
> Maybe you could use Blockchain Data Api at blockchain.info for the SegWit 
> blocks.
>
> Its very slow for that and you have to download the segwit blocks by using 
> that api. But at least it works.
>
>
> > ezt írta (időpont: 2018. ápr. 3., K 
> 11:47):
>
>> Hi, do you solve this problem? I get the same one.
>>
>> 在 2018年3月20日星期二 UTC+8上午5:38:14,Olivér Zsámár写道:
>>>
>>> Hello!
>>>
>>> I'm new to bitcoinj, and before doing anything, I just want to try some 
>>> easy stuff.
>>> I want to read the whole blockchain from Block #1, and doing some 
>>> statistics.
>>>
>>> I have this program:
>>> https://pastebin.com/avszTeAK
>>>
>>> It doesn't suppose to do anything. The only thing it should do: just 
>>> count all the blocks!
>>>
>>> When I compile my code, I always get this warning:
>>>
>>> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context getOrCreate
>>> WARNING: Implicitly creating context. This is a migration step and this 
>>> message will eventually go away.
>>> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context 
>>> INFO: Creating bitcoinj 0.14.6 context.
>>>
>>> After this, it starts counting the blocks.
>>>
>>> But at Block #481815 there is always an exception.
>>>
>>> Block #481814
>>> Block #481815
>>> Debugging
>>> java.lang.NegativeArraySizeException
>>> at org.bitcoinj.core.Message.readBytes(Message.java:334)
>>> at 
>>> org.bitcoinj.core.TransactionInput.parse(TransactionInput.java:143)
>>> at org.bitcoinj.core.Message.(Message.java:96)
>>> at org.bitcoinj.core.Message.(Message.java:128)
>>> at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
>>> at 
>>> org.bitcoinj.core.TransactionInput.(TransactionInput.java:133)
>>> at org.bitcoinj.core.Transaction.parse(Transaction.java:564)
>>> at org.bitcoinj.core.Message.(Message.java:96)
>>> at org.bitcoinj.core.Message.(Message.java:128)
>>> at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
>>> at org.bitcoinj.core.Transaction.(Transaction.java:232)
>>> at org.bitcoinj.core.Block.parseTransactions(Block.java:242)
>>> at org.bitcoinj.core.Block.parse(Block.java:266)
>>> at org.bitcoinj.core.Message.(Message.java:96)
>>> at org.bitcoinj.core.Message.(Message.java:128)
>>> at org.bitcoinj.core.Block.(Block.java:162)
>>> at 
>>> org.bitcoinj.core.BitcoinSerializer.makeBlock(BitcoinSerializer.java:270)
>>> at 
>>> org.bitcoinj.core.MessageSerializer.makeBlock(MessageSerializer.java:72)
>>> at 
>>> org.bitcoinj.utils.BlockFileLoader.loadNextBlock(BlockFileLoader.java:154)
>>> at 
>>> org.bitcoinj.utils.BlockFileLoader.hasNext(BlockFileLoader.java:87)
>>> at com.company.BitcoinReader.read(BitcoinReader.java:33)
>>> at com.company.BitcoinReader.main(BitcoinReader.java:68)
>>>
>>>
>>> First I downloaded the Bitcoin blockchain from here: 
>>> https://getbitcoinblockchain.com/
>>> Then I tried to solve my problem after a few failed attempts by 
>>> downloading the blockchain using BitcoinCore: 
>>> https://bitcoin.org/en/download
>>> Sadly it didn't solve the problem.
>>>
>>> Please help.
>>> :)
>>>
>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "bitcoinj" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/bitcoinj/fGWBPbTORAg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> bitcoinj+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error at Block #481815 Reading the blockchain from Block #1 to the end

2018-04-03 Thread Olivér Zsámár
Hi!

I couldn't solve this using bitcoinj.
Maybe you could use Blockchain Data Api at blockchain.info for the SegWit
blocks.

Its very slow for that and you have to download the segwit blocks by using
that api. But at least it works.


 ezt írta (időpont: 2018. ápr. 3., K 11:47):

> Hi, do you solve this problem? I get the same one.
>
> 在 2018年3月20日星期二 UTC+8上午5:38:14,Olivér Zsámár写道:
>>
>> Hello!
>>
>> I'm new to bitcoinj, and before doing anything, I just want to try some
>> easy stuff.
>> I want to read the whole blockchain from Block #1, and doing some
>> statistics.
>>
>> I have this program:
>> https://pastebin.com/avszTeAK
>>
>> It doesn't suppose to do anything. The only thing it should do: just
>> count all the blocks!
>>
>> When I compile my code, I always get this warning:
>>
>> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context getOrCreate
>> WARNING: Implicitly creating context. This is a migration step and this
>> message will eventually go away.
>> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context 
>> INFO: Creating bitcoinj 0.14.6 context.
>>
>> After this, it starts counting the blocks.
>>
>> But at Block #481815 there is always an exception.
>>
>> Block #481814
>> Block #481815
>> Debugging
>> java.lang.NegativeArraySizeException
>> at org.bitcoinj.core.Message.readBytes(Message.java:334)
>> at org.bitcoinj.core.TransactionInput.parse(TransactionInput.java:143)
>> at org.bitcoinj.core.Message.(Message.java:96)
>> at org.bitcoinj.core.Message.(Message.java:128)
>> at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
>> at
>> org.bitcoinj.core.TransactionInput.(TransactionInput.java:133)
>> at org.bitcoinj.core.Transaction.parse(Transaction.java:564)
>> at org.bitcoinj.core.Message.(Message.java:96)
>> at org.bitcoinj.core.Message.(Message.java:128)
>> at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
>> at org.bitcoinj.core.Transaction.(Transaction.java:232)
>> at org.bitcoinj.core.Block.parseTransactions(Block.java:242)
>> at org.bitcoinj.core.Block.parse(Block.java:266)
>> at org.bitcoinj.core.Message.(Message.java:96)
>> at org.bitcoinj.core.Message.(Message.java:128)
>> at org.bitcoinj.core.Block.(Block.java:162)
>> at
>> org.bitcoinj.core.BitcoinSerializer.makeBlock(BitcoinSerializer.java:270)
>> at
>> org.bitcoinj.core.MessageSerializer.makeBlock(MessageSerializer.java:72)
>> at
>> org.bitcoinj.utils.BlockFileLoader.loadNextBlock(BlockFileLoader.java:154)
>> at org.bitcoinj.utils.BlockFileLoader.hasNext(BlockFileLoader.java:87)
>> at com.company.BitcoinReader.read(BitcoinReader.java:33)
>> at com.company.BitcoinReader.main(BitcoinReader.java:68)
>>
>>
>> First I downloaded the Bitcoin blockchain from here:
>> https://getbitcoinblockchain.com/
>> Then I tried to solve my problem after a few failed attempts by
>> downloading the blockchain using BitcoinCore:
>> https://bitcoin.org/en/download
>> Sadly it didn't solve the problem.
>>
>> Please help.
>> :)
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "bitcoinj" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/bitcoinj/fGWBPbTORAg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> bitcoinj+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error at Block #481815 Reading the blockchain from Block #1 to the end

2018-04-03 Thread chenpeng609
Hi, do you solve this problem? I get the same one.

在 2018年3月20日星期二 UTC+8上午5:38:14,Olivér Zsámár写道:
>
> Hello!
>
> I'm new to bitcoinj, and before doing anything, I just want to try some 
> easy stuff.
> I want to read the whole blockchain from Block #1, and doing some 
> statistics.
>
> I have this program:
> https://pastebin.com/avszTeAK
>
> It doesn't suppose to do anything. The only thing it should do: just count 
> all the blocks!
>
> When I compile my code, I always get this warning:
>
> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context getOrCreate
> WARNING: Implicitly creating context. This is a migration step and this 
> message will eventually go away.
> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context 
> INFO: Creating bitcoinj 0.14.6 context.
>
> After this, it starts counting the blocks.
>
> But at Block #481815 there is always an exception.
>
> Block #481814
> Block #481815
> Debugging
> java.lang.NegativeArraySizeException
> at org.bitcoinj.core.Message.readBytes(Message.java:334)
> at org.bitcoinj.core.TransactionInput.parse(TransactionInput.java:143)
> at org.bitcoinj.core.Message.(Message.java:96)
> at org.bitcoinj.core.Message.(Message.java:128)
> at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
> at org.bitcoinj.core.TransactionInput.(TransactionInput.java:133)
> at org.bitcoinj.core.Transaction.parse(Transaction.java:564)
> at org.bitcoinj.core.Message.(Message.java:96)
> at org.bitcoinj.core.Message.(Message.java:128)
> at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
> at org.bitcoinj.core.Transaction.(Transaction.java:232)
> at org.bitcoinj.core.Block.parseTransactions(Block.java:242)
> at org.bitcoinj.core.Block.parse(Block.java:266)
> at org.bitcoinj.core.Message.(Message.java:96)
> at org.bitcoinj.core.Message.(Message.java:128)
> at org.bitcoinj.core.Block.(Block.java:162)
> at 
> org.bitcoinj.core.BitcoinSerializer.makeBlock(BitcoinSerializer.java:270)
> at 
> org.bitcoinj.core.MessageSerializer.makeBlock(MessageSerializer.java:72)
> at 
> org.bitcoinj.utils.BlockFileLoader.loadNextBlock(BlockFileLoader.java:154)
> at org.bitcoinj.utils.BlockFileLoader.hasNext(BlockFileLoader.java:87)
> at com.company.BitcoinReader.read(BitcoinReader.java:33)
> at com.company.BitcoinReader.main(BitcoinReader.java:68)
>
>
> First I downloaded the Bitcoin blockchain from here: 
> https://getbitcoinblockchain.com/
> Then I tried to solve my problem after a few failed attempts by 
> downloading the blockchain using BitcoinCore: 
> https://bitcoin.org/en/download
> Sadly it didn't solve the problem.
>
> Please help.
> :)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error at Block #481815 Reading the blockchain from Block #1 to the end

2018-04-02 Thread chenpeng609
The program works.

在 2018年3月20日星期二 UTC+8上午5:38:14,Olivér Zsámár写道:
>
> Hello!
>
> I'm new to bitcoinj, and before doing anything, I just want to try some 
> easy stuff.
> I want to read the whole blockchain from Block #1, and doing some 
> statistics.
>
> I have this program:
> https://pastebin.com/avszTeAK
>
> It doesn't suppose to do anything. The only thing it should do: just count 
> all the blocks!
>
> When I compile my code, I always get this warning:
>
> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context getOrCreate
> WARNING: Implicitly creating context. This is a migration step and this 
> message will eventually go away.
> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context 
> INFO: Creating bitcoinj 0.14.6 context.
>
> After this, it starts counting the blocks.
>
> But at Block #481815 there is always an exception.
>
> Block #481814
> Block #481815
> Debugging
> java.lang.NegativeArraySizeException
> at org.bitcoinj.core.Message.readBytes(Message.java:334)
> at org.bitcoinj.core.TransactionInput.parse(TransactionInput.java:143)
> at org.bitcoinj.core.Message.(Message.java:96)
> at org.bitcoinj.core.Message.(Message.java:128)
> at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
> at org.bitcoinj.core.TransactionInput.(TransactionInput.java:133)
> at org.bitcoinj.core.Transaction.parse(Transaction.java:564)
> at org.bitcoinj.core.Message.(Message.java:96)
> at org.bitcoinj.core.Message.(Message.java:128)
> at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
> at org.bitcoinj.core.Transaction.(Transaction.java:232)
> at org.bitcoinj.core.Block.parseTransactions(Block.java:242)
> at org.bitcoinj.core.Block.parse(Block.java:266)
> at org.bitcoinj.core.Message.(Message.java:96)
> at org.bitcoinj.core.Message.(Message.java:128)
> at org.bitcoinj.core.Block.(Block.java:162)
> at 
> org.bitcoinj.core.BitcoinSerializer.makeBlock(BitcoinSerializer.java:270)
> at 
> org.bitcoinj.core.MessageSerializer.makeBlock(MessageSerializer.java:72)
> at 
> org.bitcoinj.utils.BlockFileLoader.loadNextBlock(BlockFileLoader.java:154)
> at org.bitcoinj.utils.BlockFileLoader.hasNext(BlockFileLoader.java:87)
> at com.company.BitcoinReader.read(BitcoinReader.java:33)
> at com.company.BitcoinReader.main(BitcoinReader.java:68)
>
>
> First I downloaded the Bitcoin blockchain from here: 
> https://getbitcoinblockchain.com/
> Then I tried to solve my problem after a few failed attempts by 
> downloading the blockchain using BitcoinCore: 
> https://bitcoin.org/en/download
> Sadly it didn't solve the problem.
>
> Please help.
> :)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error at Block #481815 Reading the blockchain from Block #1 to the end

2018-03-21 Thread Andreas Schildbach
Something has changed in the format Bitcoin Core uses for persistence to
disk. Either use an old version of Bitcoin Core (0.13?) for creating the
files or you will need to investigate into the changes and adapt
bitcoinj to it.


On 03/19/2018 10:45 PM, Jameson Lopp wrote:
> 20 millibits says that the block parser is choking on a transaction that
> spends a SegWit UTXO.
> 
> On Mon, Mar 19, 2018 at 5:38 PM, Olivér Zsámár  > wrote:
> 
> Hello!
> 
> I'm new to bitcoinj, and before doing anything, I just want to try
> some easy stuff.
> I want to read the whole blockchain from Block #1, and doing some
> statistics.
> 
> I have this program:
> https://pastebin.com/avszTeAK
> 
> It doesn't suppose to do anything. The only thing it should do: just
> count all the blocks!
> 
> When I compile my code, I always get this warning:
> 
> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context getOrCreate
> WARNING: Implicitly creating context. This is a migration step and
> this message will eventually go away.
> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context 
> INFO: Creating bitcoinj 0.14.6 context.
> 
> After this, it starts counting the blocks.
> 
> But at Block #481815 there is always an exception.
> 
> Block #481814
> Block #481815
> Debugging
> java.lang.NegativeArraySizeException
>     at org.bitcoinj.core.Message.readBytes(Message.java:334)
>     at
> org.bitcoinj.core.TransactionInput.parse(TransactionInput.java:143)
>     at org.bitcoinj.core.Message.(Message.java:96)
>     at org.bitcoinj.core.Message.(Message.java:128)
>     at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
>     at
> org.bitcoinj.core.TransactionInput.(TransactionInput.java:133)
>     at org.bitcoinj.core.Transaction.parse(Transaction.java:564)
>     at org.bitcoinj.core.Message.(Message.java:96)
>     at org.bitcoinj.core.Message.(Message.java:128)
>     at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
>     at org.bitcoinj.core.Transaction.(Transaction.java:232)
>     at org.bitcoinj.core.Block.parseTransactions(Block.java:242)
>     at org.bitcoinj.core.Block.parse(Block.java:266)
>     at org.bitcoinj.core.Message.(Message.java:96)
>     at org.bitcoinj.core.Message.(Message.java:128)
>     at org.bitcoinj.core.Block.(Block.java:162)
>     at
> org.bitcoinj.core.BitcoinSerializer.makeBlock(BitcoinSerializer.java:270)
>     at
> org.bitcoinj.core.MessageSerializer.makeBlock(MessageSerializer.java:72)
>     at
> org.bitcoinj.utils.BlockFileLoader.loadNextBlock(BlockFileLoader.java:154)
>     at
> org.bitcoinj.utils.BlockFileLoader.hasNext(BlockFileLoader.java:87)
>     at com.company.BitcoinReader.read(BitcoinReader.java:33)
>     at com.company.BitcoinReader.main(BitcoinReader.java:68)
> 
> 
> First I downloaded the Bitcoin blockchain from here:
> https://getbitcoinblockchain.com/ 
> Then I tried to solve my problem after a few failed attempts by
> downloading the blockchain using BitcoinCore:
> https://bitcoin.org/en/download 
> Sadly it didn't solve the problem.
> 
> Please help.
> :)
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "bitcoinj" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to bitcoinj+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout
> .
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "bitcoinj" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bitcoinj+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error at Block #481815 Reading the blockchain from Block #1 to the end

2018-03-19 Thread Jameson Lopp
20 millibits says that the block parser is choking on a transaction that
spends a SegWit UTXO.

On Mon, Mar 19, 2018 at 5:38 PM, Olivér Zsámár  wrote:

> Hello!
>
> I'm new to bitcoinj, and before doing anything, I just want to try some
> easy stuff.
> I want to read the whole blockchain from Block #1, and doing some
> statistics.
>
> I have this program:
> https://pastebin.com/avszTeAK
>
> It doesn't suppose to do anything. The only thing it should do: just count
> all the blocks!
>
> When I compile my code, I always get this warning:
>
> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context getOrCreate
> WARNING: Implicitly creating context. This is a migration step and this
> message will eventually go away.
> mar. 19, 2018 10:00:04 DU org.bitcoinj.core.Context 
> INFO: Creating bitcoinj 0.14.6 context.
>
> After this, it starts counting the blocks.
>
> But at Block #481815 there is always an exception.
>
> Block #481814
> Block #481815
> Debugging
> java.lang.NegativeArraySizeException
> at org.bitcoinj.core.Message.readBytes(Message.java:334)
> at org.bitcoinj.core.TransactionInput.parse(TransactionInput.java:143)
> at org.bitcoinj.core.Message.(Message.java:96)
> at org.bitcoinj.core.Message.(Message.java:128)
> at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
> at org.bitcoinj.core.TransactionInput.(
> TransactionInput.java:133)
> at org.bitcoinj.core.Transaction.parse(Transaction.java:564)
> at org.bitcoinj.core.Message.(Message.java:96)
> at org.bitcoinj.core.Message.(Message.java:128)
> at org.bitcoinj.core.ChildMessage.(ChildMessage.java:57)
> at org.bitcoinj.core.Transaction.(Transaction.java:232)
> at org.bitcoinj.core.Block.parseTransactions(Block.java:242)
> at org.bitcoinj.core.Block.parse(Block.java:266)
> at org.bitcoinj.core.Message.(Message.java:96)
> at org.bitcoinj.core.Message.(Message.java:128)
> at org.bitcoinj.core.Block.(Block.java:162)
> at org.bitcoinj.core.BitcoinSerializer.makeBlock(
> BitcoinSerializer.java:270)
> at org.bitcoinj.core.MessageSerializer.makeBlock(
> MessageSerializer.java:72)
> at org.bitcoinj.utils.BlockFileLoader.loadNextBlock(
> BlockFileLoader.java:154)
> at org.bitcoinj.utils.BlockFileLoader.hasNext(BlockFileLoader.java:87)
> at com.company.BitcoinReader.read(BitcoinReader.java:33)
> at com.company.BitcoinReader.main(BitcoinReader.java:68)
>
>
> First I downloaded the Bitcoin blockchain from here:
> https://getbitcoinblockchain.com/
> Then I tried to solve my problem after a few failed attempts by
> downloading the blockchain using BitcoinCore: https://bitcoin.org/en/
> download
> Sadly it didn't solve the problem.
>
> Please help.
> :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "bitcoinj" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to bitcoinj+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.