-
Notifications
You must be signed in to change notification settings - Fork 0
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
initial ethwal filter index #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice, we are moving in a right direction. Please read comments and let's have a talk about this later today or tomorrow.
filter_reader.go
Outdated
} | ||
|
||
func (c *chainLensReader[T]) Seek(ctx context.Context, blockNum uint64) error { | ||
// TODO: how should seek function? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please implement it as defined here: https://pkg.go.dev/sort#Search
@@ -6,6 +6,8 @@ type FS storage.FS | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need in-mem cache for fs. Please see if it's available. If nor maybe we need to implement to update indexes efficiently.
filter_index.go
Outdated
return bmap, nil | ||
} | ||
|
||
func (i *index[T]) Store(ctx context.Context, block Block[T]) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be highly in-effcient, too much IO. Please consider using IndexBuilder that will collect all of the changes and flush them less frequently.
c316494
to
2c9d4fe
Compare
c88651f
to
63cbb03
Compare
Ethwal filter improvements
No description provided.