Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error storing block #146

Closed
bitcoinmarketmaker opened this issue Jan 15, 2016 · 12 comments
Closed

Error storing block #146

bitcoinmarketmaker opened this issue Jan 15, 2016 · 12 comments

Comments

@bitcoinmarketmaker
Copy link

I get the (repeating) error(s) below while using bs-linux-x64-consensus-mainnet version 2.2.0 (binary copy of BS)

16:47:56.131840 WARNING [validate] Failure fetching input transaction.
16:47:56.131940 WARNING [validate] Invalid input [b02ff20220431ca245b495a15306eae935b84d77b02f46b0aa587028dcc45ecf:1]
16:47:56.132058 WARNING [validate] Invalid block [000000000000000000f689874cc6cb09ca932ba373f923da9ed11263a6cc74a2] validation of inputs failed
16:47:56.132103 ERROR [poller] Error storing block [000000000000000000f689874cc6cb09ca932ba373f923da9ed11263a6cc74a2] validation of inputs failed
@evoskuil evoskuil added the bug label Jan 15, 2016
@evoskuil
Copy link
Member

How large is your block pool?

[blockchain]
block_pool_capacity = 20

https://github.com/libbitcoin/libbitcoin-server/wiki/Configuration-Settings#default-settings

Also, I tagged version 2.3.0 yesterday, and will be uploading binaries for it today. This is a minor update with a couple of important fixes. It also includes an additional log message that would help in this situation.

@evoskuil evoskuil removed the bug label Jan 15, 2016
@bitcoinmarketmaker
Copy link
Author

I started without specifying a config file in order to get in sync.
I will try 2.3.0 when it is available and will update with additional log info.
Thank you.

@evoskuil
Copy link
Member

Ok, I suspect you have an orphaned block at your top and are unable to clear it because of your (default) orphan pool size (1). Following initial sync you need to modify your config.

@bitcoinmarketmaker
Copy link
Author

Do I have to wait or do I have to start with a specific config file now? (I already tried with the config file from https://github.com/libbitcoin/libbitcoin-server/wiki/Configuration-Settings changing the block_pool_capacity to 20)

@evoskuil
Copy link
Member

If the issue is that you have an orphan block and a 1-sized block pool, all you would need to do is modify your configuration to increase the block pool size and restart the server. The block pool must be 1 block larger than any orphan chain that you intend to be able to overcome. Sync (under checkpoints) is optimal with a 1-sized block pool, so this is the default. If you restart with the updated config and send me a section of the log I'll look it over.

@evoskuil
Copy link
Member

The other possibility is this: libbitcoin/libbitcoin-blockchain#142

TL;RD - blockchain corruption (lost tx) due to hard shutdown, must be rebuilt. This would only occur from a hard shutdown (during block write), though write is frequent during sync, so hard shutdown during sync is much more likely to create a problem than after sync is complete.

@bitcoinmarketmaker
Copy link
Author

I tried to set the block_pool_capacity higher, no success. I did do a couple of shutdown and restarts of the server while syncing earlier today, so I think (following your message) this might have caused the problem. I will do a rebuilt now. Thank you Eric.

@evoskuil
Copy link
Member

Shutdowns are fine as long as you use close the service out gracefully. It can take a couple of minutes on a HDD, much faster on a SSD.

@evoskuil
Copy link
Member

@bitcoinmarketmaker Any update?

@bitcoinmarketmaker
Copy link
Author

@evoskuil I started a rebuild after my last message and it's currently after 5 days at block 336015 and it is still catching up. The server is an intel dual-core G530, SATA2, 4GB DDR3,1000Mbps full-duplex connectivity. I think I will need to upgrade the memory to 16GB and/or use SSD to speed things up.

@evoskuil
Copy link
Member

SSD is strongly recommended, more RAM would help (I use 8GB). The luck you have with peers can make a big difference, so restarting or limiting connection lifetime can also help.

@evoskuil
Copy link
Member

I'm going to tag this as duplicate of libbitcoin/libbitcoin-blockchain#141 and close, as I'm pretty sure it's as described. Please feel free to reopen if you determine otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants