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

feat: dynamic / reloadable config #1320

Open
typedarray opened this issue Dec 9, 2024 · 0 comments
Open

feat: dynamic / reloadable config #1320

typedarray opened this issue Dec 9, 2024 · 0 comments

Comments

@typedarray
Copy link
Collaborator

Requirement / story

  1. I want to index a list of contracts that is stored offchain (e.g. the factory pattern doesn't work). Specifically, I want to be able to add to this list of contracts without restarting the server, just like how factory contracts work.

  2. I want to index a large number of chains in the same way (configuration stored off-chain).

Possible solution

Add a dynamic address function, similar to factory, which polls an external HTTP endpoint to fetch the list of addresses. When the list changes, the indexer fetches & syncs the new contract accordingly.

The complexity here is that if the app's indexing logic for the contract is not "isolated" (such that events across all addresses must be indexed in EVM execution order to achieve the correct database state) you'll end up with an inconsistent/non-deterministic database state. One way to solve this would be to treat every config update the same way we handle a reorg (revert all indexing back to the new contract's start block) but I don't think that's what folks are looking for.

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

No branches or pull requests

1 participant