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

Ingestion Filtering, advanced rule, include activity of trustline accounts on allowlisted asset #4226

Open
sreuland opened this issue Feb 11, 2022 · 0 comments
Labels

Comments

@sreuland
Copy link
Contributor

sreuland commented Feb 11, 2022

What problem does your feature solve?

Capturing account oriented tx/ops data during filtering which is normally one-hop away and not dynamically captured during normal asset whitelist rule processing.

What would you like to see?

As a service provider with my own Horizon installation, I want to configure a new filter rule to trigger tracking transactions and operations related to any accounts that have a trustline to a given whitelisted asset.

I don't want my horizon historical database to contain more data related to other accounts not related to trustlines, so, I expect to see my horizon db size on disk still remain relatively small with a slower growth rate compared to no-filtering(i.e. data for entire ledger was saved)

Acceptance Criteria:

  • Horizon provides additional endpoint support on the Filter Configuration API on the admin port to perform CRUD on the 'include trustline accounts' filter rule model that allows defining whitelisted asset ids that should trigger whether filtering includes tx's/ops related to accounts holding trustlines to the whitelisted assets.
  • Design the config rule model, it could be a new rule such as account_filter_by_asset_trustline that uses the standard whitelist model of a list of strings(asset ids), or it could be a new model such as a flag asset_filter_traverse_account_trust_line=[true|false], and the filter applies the flag in conjunction with existing asset_filter_by_whitelist=["USDC:root,"DOGET:def",...] rule from Ingestion Filtering by Asset #4222 .
  • All Horizon ingestion processes(current-forward/reingest) will run the same filtering that applies this rule when persisting historical data.
  • The filtering on this new rule, effectively compiles the state of accounts that have a trustline with a whitelisted asset from genesis up to present ledger, and detects when an account is added or removed to a trustline of a whitelisted asset, at which point the filtering effectively includes/removes the Account from its internal compiled 'trustline account whitelist' ruleset for filtering to apply.

Pre-requisites:

This feature is dependent on #4221 and #4222 being implemented first to establish the initial filtration framework within ingestion.

@sreuland sreuland changed the title Ingestion Filtering, advanced rule, include activity of new trustline accounts on whitelisted asset Ingestion Filtering, advanced rule, include activity of trustline accounts on whitelisted asset Feb 11, 2022
@mollykarcher mollykarcher changed the title Ingestion Filtering, advanced rule, include activity of trustline accounts on whitelisted asset Ingestion Filtering, advanced rule, include activity of trustline accounts on allowlisted asset May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant