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

core/vm, core/state/snapshot: remove unused code #23956

Merged
merged 2 commits into from
Nov 25, 2021

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Nov 23, 2021

This PR removes the 'wiper', which was used in an early version of snap sync to clean out snap data. It was deprecated since we figured out how to use the mostly-correct-but-partially-corrupt snapshot data without wiping it fully.
This PR also removes some "unofficial opcodes used for parsing", which, actually, aren't used for parsing.

@@ -30,95 +30,50 @@ import (
func TestWipe(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason for removing the storage slot entries from this test?

Copy link
Contributor Author

@holiman holiman Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scope of things being tested is different. Previously, the test tested more thoroughly the snapshot wiping. Since we removed the wiper, the only thing being tested is the wipeKeyRange. For wipeKeyRange, I felt that the only parts of interest were longer keys and shorter keys.

I don't think the test becomes any better just because we test on one set of 33-byte keys and one set of 65-byte keys.

I mean, we could even remove the whole notion of accounts/storage from this test, and just use blob data.

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@karalabe karalabe added this to the 1.10.14 milestone Nov 25, 2021
@karalabe karalabe merged commit 9055cc1 into ethereum:master Nov 25, 2021
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Nov 25, 2021
* core/state/snapshot: remove wiper functionality

* core/vm: remove unused 'unofficial' opcodes
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this pull request May 26, 2022
* core/state/snapshot: remove wiper functionality

* core/vm: remove unused 'unofficial' opcodes
gzliudan pushed a commit to gzliudan/XDPoSChain that referenced this pull request Mar 1, 2024
* core/state/snapshot: remove wiper functionality

* core/vm: remove unused 'unofficial' opcodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants