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/filtermaps: two dimensional log filter data structure #30370

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4ebce68
core/filtermaps: two dimensional log filter
zsfelfoldi Jul 20, 2024
f85658f
core/filtermaps: use rawdb.ReadRawReceipts
zsfelfoldi Sep 17, 2024
8b5c87e
core/filtermaps: add filtermaps tests
zsfelfoldi Sep 17, 2024
932769e
core/filtermaps: safe concurrent index update and search
zsfelfoldi Sep 19, 2024
197c777
core/filtermaps: revert to legacy filter in case of "match all" search
zsfelfoldi Sep 26, 2024
66ab6aa
core/bloombits, eth/filters: removed bloombits
zsfelfoldi Sep 27, 2024
189705f
core/filtermaps: remove bloombits database
zsfelfoldi Sep 27, 2024
39ab872
core/filtermaps: added history.logs parameter
zsfelfoldi Sep 27, 2024
950ca52
core/filtermaps: moved math stuff to separate file, added Params
zsfelfoldi Sep 28, 2024
0d676dc
core/filtermaps: add indexer test
zsfelfoldi Sep 29, 2024
9a5332b
core/filtermaps: fixed tail pointer bug, added more failing checks
zsfelfoldi Sep 30, 2024
ce7cf98
core/filtermaps: fixed map pruning
zsfelfoldi Sep 30, 2024
d34c1b6
core/filtermaps: use unindexed search as a fallback
zsfelfoldi Oct 1, 2024
d1f492e
eth/filters: fixed tests, added more
zsfelfoldi Oct 1, 2024
1424486
core/filtermaps: added license text
zsfelfoldi Oct 3, 2024
1901c7d
core/filtermaps: added more tests
zsfelfoldi Oct 3, 2024
edb6f77
core/filtermaps: trigger undindexing after 1000 blocks
zsfelfoldi Oct 3, 2024
1017be0
core/filtermaps: improved unindexer
zsfelfoldi Oct 3, 2024
95cbcdf
core/filtermaps: nice log info during indexing/unindexing
zsfelfoldi Oct 3, 2024
1c9e0d8
core/filtermaps: simplified locking scheme
zsfelfoldi Oct 6, 2024
4ecb311
core/filtermaps: fixed comment
zsfelfoldi Oct 6, 2024
05f8d20
core/filtermaps: ensure 8 byte alignment of struct fields
zsfelfoldi Oct 6, 2024
262b82d
core/filtermaps, eth/filters: fixed linter issues
zsfelfoldi Oct 6, 2024
d60c38a
core/filtermaps: improved log messages
zsfelfoldi Oct 14, 2024
f431db1
core/filtermaps: improved head indexing
zsfelfoldi Oct 15, 2024
077ab86
core/filtermaps: always use correct absolute log index
zsfelfoldi Oct 15, 2024
7db1987
core/filtermaps: use new ChainEvent format
zsfelfoldi Oct 23, 2024
38194a0
core/filtermaps: use DeleteRange, checkpoint init of log value pointer
zsfelfoldi Oct 23, 2024
08a345e
core/filtermaps: fixed tests and rebase issues
zsfelfoldi Oct 30, 2024
78b5918
core/filtermaps: removed unused function
zsfelfoldi Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/geth/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ if one is set. Otherwise it prints the genesis from the datadir.`,
utils.VMTraceFlag,
utils.VMTraceJsonConfigFlag,
utils.TransactionHistoryFlag,
utils.LogHistoryFlag,
utils.LogNoHistoryFlag,
utils.StateHistoryFlag,
}, utils.DatabaseFlags),
Description: `
Expand Down
2 changes: 2 additions & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ var (
utils.SnapshotFlag,
utils.TxLookupLimitFlag, // deprecated
utils.TransactionHistoryFlag,
utils.LogHistoryFlag,
utils.LogNoHistoryFlag,
utils.StateHistoryFlag,
utils.LightServeFlag, // deprecated
utils.LightIngressFlag, // deprecated
Expand Down
17 changes: 17 additions & 0 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,17 @@ var (
Value: ethconfig.Defaults.TransactionHistory,
Category: flags.StateCategory,
}
LogHistoryFlag = &cli.Uint64Flag{
Name: "history.logs",
Usage: "Number of recent blocks to maintain log search index for (default = about one year, 0 = entire chain)",
Value: ethconfig.Defaults.LogHistory,
Category: flags.StateCategory,
}
LogNoHistoryFlag = &cli.BoolFlag{
Name: "history.logs.disable",
Usage: "Do not maintain log search index",
Category: flags.StateCategory,
}
// Beacon client light sync settings
BeaconApiFlag = &cli.StringSliceFlag{
Name: "beacon.api",
Expand Down Expand Up @@ -1662,6 +1673,12 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
cfg.StateScheme = rawdb.HashScheme
log.Warn("Forcing hash state-scheme for archive mode")
}
if ctx.IsSet(LogHistoryFlag.Name) {
cfg.LogHistory = ctx.Uint64(LogHistoryFlag.Name)
}
if ctx.IsSet(LogNoHistoryFlag.Name) {
cfg.LogNoHistory = true
}
if ctx.IsSet(CacheFlag.Name) || ctx.IsSet(CacheTrieFlag.Name) {
cfg.TrieCleanCache = ctx.Int(CacheFlag.Name) * ctx.Int(CacheTrieFlag.Name) / 100
}
Expand Down
2 changes: 1 addition & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ func (bc *BlockChain) setHeadBeyondRoot(head uint64, time uint64, root common.Ha
rawdb.DeleteBody(db, hash, num)
rawdb.DeleteReceipts(db, hash, num)
}
// Todo(rjl493456442) txlookup, bloombits, etc
// Todo(rjl493456442) txlookup, log index, etc
}
// If SetHead was only called as a chain reparation method, try to skip
// touching the header chain altogether, unless the freezer is broken
Expand Down
92 changes: 0 additions & 92 deletions core/bloom_indexer.go

This file was deleted.

18 changes: 0 additions & 18 deletions core/bloombits/doc.go

This file was deleted.

98 changes: 0 additions & 98 deletions core/bloombits/generator.go

This file was deleted.

100 changes: 0 additions & 100 deletions core/bloombits/generator_test.go

This file was deleted.

Loading