-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
core: drop legacy receipt types #26225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM! (haven't tested the code)
And also drop https://github.com/ethereum/go-ethereum/blob/f5ee9060ef2108b8fda4e51fada37eac0eb24464/core/types/legacy.go
@s1na IIUC, if people keep using For these users, they MUST But if they directly upgrade to new version, Just try to list all the possible scenarios ensure we can handle all of them. |
@@ -672,7 +672,7 @@ func DeleteReceipts(db ethdb.KeyValueWriter, hash common.Hash, number uint64) { | |||
type storedReceiptRLP struct { | |||
PostStateOrStatus []byte | |||
CumulativeGasUsed uint64 | |||
Logs []*types.LogForStorage | |||
Logs []*types.Log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a nitpick and you can ignore it
Is it possible to re-use the definition in core/types package soomehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can mark a TODO here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have an idea how to do it without exporting an additional type in core/types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's possible to reuse the definition in core/types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be kind of nice to remove the DecodeRLP
method of receiptLogs
. I think you could just rename the type storedReceiptRLP
to receiptLogs
. It would save a lot of reflect indirection during decoding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nitpicks, but generally lgtm.
I think we need to deploy it on some benchmark nodes, just double-check nothing broken
|
This removes references to types removed in ethereum/go-ethereum#26225
This PR drops the legacy receipt types, the freezer-migrate command and the startup check. The previous attempt ethereum#22852 at this failed because there were users who still had legacy receipts in their db, so it had to be reverted ethereum#23247. Since then we added a command to migrate legacy dbs ethereum#24028. As of the last hardforks all users either must have done the migration, or used the --ignore-legacy-receipts flag which will stop working now.
This PR drops the legacy receipt types, the
freezer-migrate
command and the startup check. The previous attempt #22852 at this failed because there were users who still had legacy receipts in their db, so it had to be reverted #23247. Since then we added a command to migrate legacy dbs #24028.As of the last hardforks all users either must have done the migration, or used the
--ignore-legacy-receipts
flag which will stop working now.