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

initial ethwal filter index #9

Merged
merged 28 commits into from
Nov 1, 2024
Merged

initial ethwal filter index #9

merged 28 commits into from
Nov 1, 2024

Conversation

Shubhaankar-Sharma
Copy link
Contributor

No description provided.

Copy link
Contributor

@marino39 marino39 left a 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?
Copy link
Contributor

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

Copy link
Contributor

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 {
Copy link
Contributor

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.

@marino39 marino39 marked this pull request as ready for review October 31, 2024 15:36
@marino39 marino39 changed the title wip: initial ethwal filter index initial ethwal filter index Oct 31, 2024
@pkieltyka pkieltyka merged commit e64b20b into master Nov 1, 2024
1 check passed
@pkieltyka pkieltyka deleted the ethwal-filter branch November 1, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants