getblocktemplate
corrupted claimtrie database #71
Labels
No labels
ci
claimtrie
consider soon
Epic
good first issue
hacktoberfest
help wanted
mempool
mining
peer
priority: blocker
priority: high
priority: low
priority: medium
rpc
runtime
test
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
ux
wallet
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbcd#71
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Failed to create new block template: in reset height: unable to restore the hash at height 1193913
Waiting for feedback if the database is recoverable using
reconsiderblock blockhash
What version? It would be interesting to know if this is related to the node cache or not. I thought that I had it so that it wouldn't modify the database from getblocktemplate (in current code).
Database "corruption" might not be accurate. It maybe just the block marked as invalided in the database.
It happened on v0.22.102, which is a pretty recent commit (2022-07-06)
And it was recoverable by
From the log below, the ClaimTrie root calculation mismatches the actual hash in the header.
Not sure the claimtrie was fully rebuilt (in the claimtrie.ResetHeight) or not in this case though.
Some update:
It just happened again on block 1194911 (07/20/2022).
We're restarting it with v0.22.104 to see if the RamTrie was fully or partially rebuilt when in case it happens again.
And when it happens again before we fixing it, we'll revert to v0.22.100-rc2 to exclude the node cache optimization and see if that help narrow down the scope.
The node-cache optimization was a substantial speedup on the getblocktemplate call. It might be worth it to test the single-threaded version (with the node cache).
We'll set up a small long-running node dedicated to
getblocktemplate
related stuff including this one (single-threaded version).Can you rebase that change to the current master, and test it in your environment or the CI.
The following was my attempt to rebase, but it runs twice as longer rebuilding the RamTrie (3min vs 6min) on my machine. It could be me dropping something during the merge.
https://github.com/lbryio/lbcd/tree/single_thread_cache-rebased
Your rebase looks okay; the RamTrie rebuild is slower in the single-threaded case. That's expected.