-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
Getting error logs - Invalid receipt array RLP hash error #23245
Comments
Was there any unclean shutdown? Can you provide more log please (especially the beginning). Also is it a unmodified geth and with which parameters do you start it? |
The cause is in this PR #22852, we remove the support for legacy scheme receipts. But in theory it shouldn't effect the users since we have the background thread to move the ancient chain data around. And the receipts will be re-encoded with the new format. I am curious how old the legacy receipts are. Are you enable to compile the Geth manually? If so could you please add these diff into the Geth and post the error information here? diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go
index 76132bf37..871ab0b64 100644
--- a/core/rawdb/accessors_chain.go
+++ b/core/rawdb/accessors_chain.go
@@ -572,7 +572,7 @@ func ReadRawReceipts(db ethdb.Reader, hash common.Hash, number uint64) types.Rec
// Convert the receipts from their storage form to their internal representation
storageReceipts := []*types.ReceiptForStorage{}
if err := rlp.DecodeBytes(data, &storageReceipts); err != nil {
- log.Error("Invalid receipt array RLP", "hash", hash, "err", err)
+ log.Error("Invalid receipt array RLP", "number", number, "hash", hash.Hex(), "err", err)
return nil
}
receipts := make(types.Receipts, len(storageReceipts)) |
No, the background freezer won't re-encode the legacy receipts. I guess we may break the database compatibility by mistake. |
@ligi About your question:
No, shutdown was not performed at that time or anytime close to the logs. The logs happened abruptly by itself. And yes, it is unmodified geth version. We use below param to run geth node:
Logs :
|
@rjl493456442 coming here from #22852. Let me see if we can indeed recompile with the diff you suggested there and will share the output here. |
@shoenseiwaso I can confirm that the database compatibility is broken. Working on the fix now. Thanks! |
Got it! I ended up recompiling anyway. In case you still need it, here's some of the output:
|
@shoenseiwaso @binary-tanya Can you guys please test this PR #23247? Hopefully it can fix the problem. |
Just tried, it appears to fix it. Thanks! |
@sahni-tanya @shoenseiwaso Hi! Do you by any chance still have those nodes that produced the errors? We have a PR #24028 which migrates the legacy receipts to the new format. I'd appreciate if somebody with a realistic database could try it and see if it works fine. If you're willing to help with this, please make sure to make a backup of (at least) the receipt tables in the ancients, e.g.: cp /path/to/ancients/receipts* backup-dir When you start geth built against that PR you should get a warning that says there are legacy receipts in the db and asks you to do a ./build/bin/geth --datadir /path/to/datadir db freezer-migrate Running the same command should say no legacy receipts to convert. Can you please share the logs of If you happened to have access to a node with a non-legacy database (e.g. a recently fast-synced node), you'll be able to verify the correctness of the migrated db via ./build/bin/geth --datadir /path/to/migrated/datadir db freezer-compare /path/to/correct/datadir receipts Please feel free to contact me Eth R&D or geth discord if you decided to try this out. |
@s1na let me see if we can dig up an old chaindata to test this against! |
System information
Geth version: Voyager Cluster (v1.10.4)
Issue
We are currently getting some below logs in mainnet :
The text was updated successfully, but these errors were encountered: