Skip to content

Commit

Permalink
Remove unused history config: withLocalityIndex (#13109)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmitsuda authored Dec 16, 2024
1 parent a216fd5 commit ac20eac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
12 changes: 6 additions & 6 deletions erigon-lib/state/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func NewAggregator(ctx context.Context, dirs datadir.Dirs, aggregationStep uint6
valuesTable: kv.TblAccountHistoryVals,
compression: seg.CompressNone,

withLocalityIndex: false, historyLargeValues: false,
historyLargeValues: false,

iiCfg: iiCfg{salt: salt, dirs: dirs, db: db, withExistence: false, compressorCfg: seg.DefaultCfg,
aggregationStep: aggregationStep, keysTable: kv.TblAccountHistoryKeys, valuesTable: kv.TblAccountIdx},
Expand All @@ -184,7 +184,7 @@ func NewAggregator(ctx context.Context, dirs datadir.Dirs, aggregationStep uint6
valuesTable: kv.TblStorageHistoryVals,
compression: seg.CompressNone,

withLocalityIndex: false, historyLargeValues: false,
historyLargeValues: false,

iiCfg: iiCfg{salt: salt, dirs: dirs, db: db, withExistence: false, compressorCfg: seg.DefaultCfg,
aggregationStep: aggregationStep, keysTable: kv.TblStorageHistoryKeys, valuesTable: kv.TblStorageIdx},
Expand All @@ -205,7 +205,7 @@ func NewAggregator(ctx context.Context, dirs datadir.Dirs, aggregationStep uint6
valuesTable: kv.TblCodeHistoryVals,
compression: seg.CompressKeys | seg.CompressVals,

withLocalityIndex: false, historyLargeValues: true,
historyLargeValues: true,

iiCfg: iiCfg{salt: salt, dirs: dirs, db: db, withExistence: false, compressorCfg: seg.DefaultCfg,
aggregationStep: aggregationStep, keysTable: kv.TblCodeHistoryKeys, valuesTable: kv.TblCodeIdx},
Expand All @@ -226,8 +226,8 @@ func NewAggregator(ctx context.Context, dirs datadir.Dirs, aggregationStep uint6
valuesTable: kv.TblCommitmentHistoryVals,
compression: seg.CompressNone,

snapshotsDisabled: true,
withLocalityIndex: false, historyLargeValues: false,
snapshotsDisabled: true,
historyLargeValues: false,

iiCfg: iiCfg{salt: salt, dirs: dirs, db: db, withExistence: false, compressorCfg: seg.DefaultCfg,
aggregationStep: aggregationStep, keysTable: kv.TblCommitmentHistoryKeys, valuesTable: kv.TblCommitmentIdx},
Expand All @@ -245,7 +245,7 @@ func NewAggregator(ctx context.Context, dirs datadir.Dirs, aggregationStep uint6
valuesTable: kv.TblReceiptHistoryVals,
compression: seg.CompressNone,

withLocalityIndex: false, historyLargeValues: false,
historyLargeValues: false,

iiCfg: iiCfg{salt: salt, dirs: dirs, db: db, withExistence: false, compressorCfg: seg.DefaultCfg,
aggregationStep: aggregationStep, keysTable: kv.TblReceiptHistoryKeys, valuesTable: kv.TblReceiptIdx},
Expand Down
4 changes: 2 additions & 2 deletions erigon-lib/state/domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ func testDbAndDomainOfStep(t *testing.T, aggStep uint64, logger log.Logger) (kv.
cfg := domainCfg{
name: kv.AccountsDomain, valuesTable: valsTable,
hist: histCfg{
valuesTable: historyValsTable,
withLocalityIndex: false, compression: seg.CompressNone, historyLargeValues: true,
valuesTable: historyValsTable,
compression: seg.CompressNone, historyLargeValues: true,

iiCfg: iiCfg{salt: &salt, dirs: dirs, db: db, withExistence: false,
aggregationStep: aggStep, keysTable: historyKeysTable, valuesTable: indexTable},
Expand Down
1 change: 0 additions & 1 deletion erigon-lib/state/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ type histCfg struct {
// vals: key1+key2+txNum -> value (not DupSort)
historyLargeValues bool
snapshotsDisabled bool // don't produce .v and .ef files, keep in db table. old data will be pruned anyway.
withLocalityIndex bool
historyDisabled bool // skip all write operations to this History (even in DB)

indexList idxList
Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/state/history_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func testDbAndHistory(tb testing.TB, largeValues bool, logger log.Logger) (kv.Rw
iiCfg: iiCfg{salt: &salt, dirs: dirs, db: db, withExistence: false,
aggregationStep: 16, filenameBase: "hist", keysTable: keysTable, valuesTable: indexTable,
},
withLocalityIndex: false, compression: seg.CompressNone, historyLargeValues: largeValues,
compression: seg.CompressNone, historyLargeValues: largeValues,
}
h, err := NewHistory(cfg, logger)
require.NoError(tb, err)
Expand Down

0 comments on commit ac20eac

Please sign in to comment.