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

Custom reth-based indexer #502

Open
1 of 9 tasks
naps62 opened this issue Nov 15, 2023 · 3 comments
Open
1 of 9 tasks

Custom reth-based indexer #502

naps62 opened this issue Nov 15, 2023 · 3 comments
Labels
epic A high-level tracker for a broad feature

Comments

@naps62
Copy link
Member

naps62 commented Nov 15, 2023

NOTICE: Indexer migrated to its own repo: ethui/indexer#1


We want to provide, as a SaaS, an indexer, possibly based on reth-indexer, to provide enhanced abilities for users.

Namely:

  • faster indexing of transaction history, without relying on alchemy (aka: remove the need for a key in the onboarding flow, and bypass their rate limit restrictions)
  • indexing additional data for wallets, such as ERC20 allowances (which would allow us to implement a revoke.cash like solution in the wallet)

The service should be available to a whitelist of addresses, comprised of:

  • our own wallets, for testing purposes
  • test first few addresses of the test test test ... junk mnemonic, as a way to showcase the feature to every incoming user
  • to any address that signs up through a yet-to-be-defined sign up process, but which would be kept as simple as possible in initial stages (e.g.: by making a one-off donation to iron-wallet.eth)

Tracking

  • binary / crate - indexer: initial setup #534
  • HTTP server - indexer: basic actix setup #535
  • HTTP auth via address signature
  • postgres database connection
  • db table to hold list of whitelisted addresses
  • db data to hold sync progress per address
  • db tables to hold indexed data
  • syncing data from current block into db
  • one-off jobs for syncing past data for new addresses
@naps62 naps62 added the epic A high-level tracker for a broad feature label Nov 15, 2023
@ABZerra
Copy link

ABZerra commented Nov 16, 2023

Looks good to me, I liked that you specified some usecases! Would only add the Revoke.cash link since you also linked the reth one

https://revoke.cash/

@joshstevens19
Copy link

This is super cool - would love to help change reth-indexer to be able to be consumed like a package instead of a singleton runner as it’s wrote now! Really open to changing the code and working with you on it!

Also loving what you guys are trying to build here let me know how I can help? 🔥

@naps62
Copy link
Member Author

naps62 commented Nov 26, 2023

@joshstevens19 thanks! for now I'm trying to speedrun an initial implementation.
basic idea is to index up-to-date balances, as well as all relevant txs for a wallet's history (so not only from/to, but also any tx where a given address is mentioned in event logs).

I also have an additional requirement: the list of addresses to track grows at runtime.
so for new joiners, I also need to back-fill info from past blocks. I'm thinking here of launching an additional one-off task for each address, with much less priority and probably a cut-off date.
no idea what the real-world performance here will look like, but appreciate any input you may have

your work & docs were already helpful, particularly the CSV copy optimization, which I had no idea about

This was referenced Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic A high-level tracker for a broad feature
Projects
None yet
Development

No branches or pull requests

3 participants