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 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2047650
core/filtermaps: two dimensional log filter
zsfelfoldi Jul 20, 2024
61d04dc
core/filtermaps: use rawdb.ReadRawReceipts
zsfelfoldi Sep 17, 2024
8fe1504
core/filtermaps: add filtermaps tests
zsfelfoldi Sep 17, 2024
27652f2
core/filtermaps: safe concurrent index update and search
zsfelfoldi Sep 19, 2024
c04968b
core/filtermaps: revert to legacy filter in case of "match all" search
zsfelfoldi Sep 26, 2024
f187df1
core/bloombits, eth/filters: removed bloombits
zsfelfoldi Sep 27, 2024
348c6f0
core/filtermaps: remove bloombits database
zsfelfoldi Sep 27, 2024
bf2d00d
core/filtermaps: added history.logs parameter
zsfelfoldi Sep 27, 2024
77318f1
core/filtermaps: moved math stuff to separate file, added Params
zsfelfoldi Sep 28, 2024
b73ed9c
core/filtermaps: add indexer test
zsfelfoldi Sep 29, 2024
db83e03
core/filtermaps: fixed tail pointer bug, added more failing checks
zsfelfoldi Sep 30, 2024
94c869e
core/filtermaps: fixed map pruning
zsfelfoldi Sep 30, 2024
ee9caee
core/filtermaps: use unindexed search as a fallback
zsfelfoldi Oct 1, 2024
d5f2af2
eth/filters: fixed tests, added more
zsfelfoldi Oct 1, 2024
5c17d79
core/filtermaps: added license text
zsfelfoldi Oct 3, 2024
28cdf15
core/filtermaps: added more tests
zsfelfoldi Oct 3, 2024
37d9fd5
core/filtermaps: trigger undindexing after 1000 blocks
zsfelfoldi Oct 3, 2024
455dd20
core/filtermaps: improved unindexer
zsfelfoldi Oct 3, 2024
2d8fc05
core/filtermaps: nice log info during indexing/unindexing
zsfelfoldi Oct 3, 2024
9dbcb1d
core/filtermaps: simplified locking scheme
zsfelfoldi Oct 6, 2024
b63fce0
core/filtermaps: fixed comment
zsfelfoldi Oct 6, 2024
665ff3e
core/filtermaps: ensure 8 byte alignment of struct fields
zsfelfoldi Oct 6, 2024
026d498
core/filtermaps, eth/filters: fixed linter issues
zsfelfoldi Oct 6, 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 @@ -101,6 +101,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 @@ -88,6 +88,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 @@ -279,6 +279,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 @@ -1727,6 +1738,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 @@ -896,7 +896,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