diff --git a/core/rawdb/rawdbreset/reset_stages.go b/core/rawdb/rawdbreset/reset_stages.go index f299ebb82ae..23af54ff15e 100644 --- a/core/rawdb/rawdbreset/reset_stages.go +++ b/core/rawdb/rawdbreset/reset_stages.go @@ -207,7 +207,6 @@ var stateHistoryV3Buckets = []string{ kv.TblTracesToKeys, kv.TblTracesToIdx, } var stateV3Buckets = []string{ - kv.TblAccountKeys, kv.TblStorageKeys, kv.TblCodeKeys, kv.TblCommitmentKeys, kv.TblAccountVals, kv.TblStorageVals, kv.TblCodeVals, kv.TblCommitmentVals, kv.TblCommitmentHistoryKeys, kv.TblCommitmentHistoryVals, kv.TblCommitmentIdx, kv.TblPruningProgress, diff --git a/erigon-lib/kv/tables.go b/erigon-lib/kv/tables.go index 9718d4713cb..7600d39af17 100644 --- a/erigon-lib/kv/tables.go +++ b/erigon-lib/kv/tables.go @@ -352,25 +352,21 @@ const ( // Domains/History/InvertedIndices // Contants have "Tbl" prefix, to avoid collision with actual Domain names // This constants is very rarely used in APP, but Domain/History/Idx names are widely used - TblAccountKeys = "AccountKeys" TblAccountVals = "AccountVals" TblAccountHistoryKeys = "AccountHistoryKeys" TblAccountHistoryVals = "AccountHistoryVals" TblAccountIdx = "AccountIdx" - TblStorageKeys = "StorageKeys" TblStorageVals = "StorageVals" TblStorageHistoryKeys = "StorageHistoryKeys" TblStorageHistoryVals = "StorageHistoryVals" TblStorageIdx = "StorageIdx" - TblCodeKeys = "CodeKeys" TblCodeVals = "CodeVals" TblCodeHistoryKeys = "CodeHistoryKeys" TblCodeHistoryVals = "CodeHistoryVals" TblCodeIdx = "CodeIdx" - TblCommitmentKeys = "CommitmentKeys" TblCommitmentVals = "CommitmentVals" TblCommitmentHistoryKeys = "CommitmentHistoryKeys" TblCommitmentHistoryVals = "CommitmentHistoryVals" @@ -549,25 +545,21 @@ var ChaindataTables = []string{ BorCheckpoints, BorCheckpointEnds, BorProducerSelections, - TblAccountKeys, TblAccountVals, TblAccountHistoryKeys, TblAccountHistoryVals, TblAccountIdx, - TblStorageKeys, TblStorageVals, TblStorageHistoryKeys, TblStorageHistoryVals, TblStorageIdx, - TblCodeKeys, TblCodeVals, TblCodeHistoryKeys, TblCodeHistoryVals, TblCodeIdx, - TblCommitmentKeys, TblCommitmentVals, TblCommitmentHistoryKeys, TblCommitmentHistoryVals, @@ -717,20 +709,16 @@ var ChaindataTablesCfg = TableCfg{ }, CallTraceSet: {Flags: DupSort}, - TblAccountKeys: {Flags: DupSort}, TblAccountVals: {Flags: DupSort}, TblAccountHistoryKeys: {Flags: DupSort}, TblAccountHistoryVals: {Flags: DupSort}, TblAccountIdx: {Flags: DupSort}, - TblStorageKeys: {Flags: DupSort}, TblStorageVals: {Flags: DupSort}, TblStorageHistoryKeys: {Flags: DupSort}, TblStorageHistoryVals: {Flags: DupSort}, TblStorageIdx: {Flags: DupSort}, - TblCodeKeys: {Flags: DupSort}, TblCodeHistoryKeys: {Flags: DupSort}, TblCodeIdx: {Flags: DupSort}, - TblCommitmentKeys: {Flags: DupSort}, TblCommitmentVals: {Flags: DupSort}, TblCommitmentHistoryKeys: {Flags: DupSort}, TblCommitmentHistoryVals: {Flags: DupSort}, diff --git a/erigon-lib/state/domain_test.go b/erigon-lib/state/domain_test.go index d8f2b0fa634..8d16d61ddb1 100644 --- a/erigon-lib/state/domain_test.go +++ b/erigon-lib/state/domain_test.go @@ -1583,16 +1583,16 @@ func TestPruneProgress(t *testing.T) { tx, err := db.BeginRw(context.Background()) require.NoError(t, err) defer tx.Rollback() - err = SaveExecV3PruneProgress(tx, kv.TblAccountKeys, latestKey) + err = SaveExecV3PruneProgress(tx, kv.TblAccountVals, latestKey) require.NoError(t, err) - key, err := GetExecV3PruneProgress(tx, kv.TblAccountKeys) + key, err := GetExecV3PruneProgress(tx, kv.TblAccountVals) require.NoError(t, err) require.EqualValuesf(t, latestKey, key, "key %x", key) - err = SaveExecV3PruneProgress(tx, kv.TblAccountKeys, nil) + err = SaveExecV3PruneProgress(tx, kv.TblAccountVals, nil) require.NoError(t, err) - key, err = GetExecV3PruneProgress(tx, kv.TblAccountKeys) + key, err = GetExecV3PruneProgress(tx, kv.TblAccountVals) require.NoError(t, err) require.Nil(t, key) }) @@ -1601,17 +1601,17 @@ func TestPruneProgress(t *testing.T) { tx, err := db.BeginRw(context.Background()) require.NoError(t, err) defer tx.Rollback() - err = SaveExecV3PruneProgress(tx, kv.TblAccountKeys, latestKey) + err = SaveExecV3PruneProgress(tx, kv.TblAccountVals, latestKey) require.NoError(t, err) - key, err := GetExecV3PruneProgress(tx, kv.TblAccountKeys) + key, err := GetExecV3PruneProgress(tx, kv.TblAccountVals) require.NoError(t, err) require.EqualValues(t, latestKey, key) - err = SaveExecV3PruneProgress(tx, kv.TblAccountKeys, nil) + err = SaveExecV3PruneProgress(tx, kv.TblAccountVals, nil) require.NoError(t, err) - key, err = GetExecV3PruneProgress(tx, kv.TblAccountKeys) + key, err = GetExecV3PruneProgress(tx, kv.TblAccountVals) require.NoError(t, err) require.Nil(t, key) }) @@ -1621,17 +1621,17 @@ func TestPruneProgress(t *testing.T) { require.NoError(t, err) defer tx.Rollback() expected := []byte{} - err = SaveExecV3PruneProgress(tx, kv.TblAccountKeys, expected) + err = SaveExecV3PruneProgress(tx, kv.TblAccountVals, expected) require.NoError(t, err) - key, err := GetExecV3PruneProgress(tx, kv.TblAccountKeys) + key, err := GetExecV3PruneProgress(tx, kv.TblAccountVals) require.NoError(t, err) require.EqualValues(t, expected, key) - err = SaveExecV3PruneProgress(tx, kv.TblAccountKeys, nil) + err = SaveExecV3PruneProgress(tx, kv.TblAccountVals, nil) require.NoError(t, err) - key, err = GetExecV3PruneProgress(tx, kv.TblAccountKeys) + key, err = GetExecV3PruneProgress(tx, kv.TblAccountVals) require.NoError(t, err) require.Nil(t, key) })