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

#2119 - implemented trace_filter intersection mode for #3167

Merged
merged 3 commits into from
Jan 5, 2022
Merged

#2119 - implemented trace_filter intersection mode for #3167

merged 3 commits into from
Jan 5, 2022

Conversation

awskii
Copy link
Member

@awskii awskii commented Dec 25, 2021

Implemented intersection mode for Trace API Filter call.
I'm not sure I used correct way to generate blocks for testing, please correct me if i'm wrong.

@mandrigin
Copy link
Collaborator

@awskii some comments

1. Instead err != ethdb.ErrKeyNotFound need use !errors.Is
2. in default section no check for err != ethdb.ErrKeyNotFound
everything else looks good to me

@awskii
Copy link
Member Author

awskii commented Jan 4, 2022

@awskii some comments

1. Instead err != ethdb.ErrKeyNotFound need use !errors.Is
2. in default section no check for err != ethdb.ErrKeyNotFound
everything else looks good to me

Done,
@AskAlexSharov, could you please check PR?

@AskAlexSharov
Copy link
Collaborator

run

make lintci-deps
make lint

@AskAlexSharov AskAlexSharov merged commit 0655e58 into erigontech:devel Jan 5, 2022
@awskii awskii deleted the feature/trace_filter_mode_intersect branch January 5, 2022 15:52
@AlexeyAkhunov
Copy link
Contributor

Sorry for the delay, I have just reviewed it to decide whether to put it in stable, and it seems to me this does not perform what it is supposed to do. The intersection needs to happen not on the level of picking which addresses to use, but on the level of operating with bitmaps. In the union mode, the resulting bitmap looks like this:

bitmap(from_1) | bitmap(from_2) | .... | bitmap(to_1) | bitmap(to_2)

in the intersection mode, the resulting bitmap should look like:

(bitmap(from_1) | bitmap(from_2) | ... ) & (bitmap(to_1) | bitmap(to_2) | ... )

i.e. intersection happens where & sign is. The selection of set of bitmaps to retrieve from the database does not change

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.

4 participants