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

Question about utxo_by_address filtering #14

Open
BeJF opened this issue May 27, 2022 · 1 comment
Open

Question about utxo_by_address filtering #14

BeJF opened this issue May 27, 2022 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@BeJF
Copy link
Contributor

BeJF commented May 27, 2022

Hello,

As per the documentation, there is a todo "Document filtering options per collection".

I had a look at the code and from what I understood, it doesn't seem like address filtering is already implemented for that Reducer.

The relevant steps I identified where it could have been implemented are when:

  1. The block is reduced into the different TXs (reduce_byron/alonzo_tx).
  2. Each TX is transformed into CRDT (send_set_add) and sent for the storage step.

I saw nothing like an address filtering in that part of the code. The questions are then:

=> Is it implemented and I'm not looking at it the right way OR it is not implemented yet and you already have an idea of how it could be?

@scarmuega
Copy link
Member

hi @BeJF good question. Filtering isn't yet implemented. As you mention, the idea is that each reducer will contain its own filtering logic (as opposed to one single filter step for the whole pipeline). The goal is to make each reducer as standalone as possible, with room for custom filters that are particular to the data structure of each collection.

Now, where should we add the code within the reducer? That's not strictly defined. Personally, I would add include a new function that gets called as a predicate from the iteration that happens inside the reduce_byron/alonzo_tx).

Any configurable options (eg: which addresses to filter by) should be added to the serializable Config struct of the reducer. This will make the options available to be entered in the toml file.

Is this something you would like code yourself? PRs are very welcome!

@scarmuega scarmuega added enhancement New feature or request question Further information is requested labels May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants