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

Accounts for Signer endpoint in Horizon using new ingestion system #1472

Closed
11 tasks done
bartekn opened this issue Jul 3, 2019 · 3 comments
Closed
11 tasks done

Accounts for Signer endpoint in Horizon using new ingestion system #1472

bartekn opened this issue Jul 3, 2019 · 3 comments
Labels
horizon ingest New ingestion system

Comments

@bartekn
Copy link
Contributor

bartekn commented Jul 3, 2019

We're going to test new exp/ingest package by creating a simple "Accounts for Signer" endpoint in Horizon (#432). The new ingestion system will be completely separated from an existing ingestion of Horizon. There will be no synchronization so it's possible that "Accounts for Signer" data will not be presenting data at the same ledger as other Horizon endpoints.

Here's a proposed list of steps to achieve this is below. Each step will be moved to another issue once the plan is approved.

@ire-and-curses @tamirms would you like to add/modify something?

@bartekn bartekn added horizon ingest New ingestion system labels Jul 3, 2019
@ire-and-curses
Copy link
Member

I think it looks good. Do you think the in-memory reader will be sufficient for this, or do we also need to look at #1457? Maybe the tests @tamirms is working on will help us decide.

How will we test the final endpoint? Might be worth a card for that as well.

@bartekn
Copy link
Contributor Author

bartekn commented Jul 3, 2019

I think it looks good. Do you think the in-memory reader will be sufficient for this, or do we also need to look at #1457?

Good question. I actually forgot to mention that this new feature should by behind a feature flag (default=off). So in the worst case we can just include a note that new feature requires ~4GB of RAM.

How will we test the final endpoint?

OK, will add a new point.

bartekn added a commit that referenced this issue Jul 18, 2019
The goal of this commit is to add a new endpoint that presents "Accounts
For Signer" data (close #1486) and integrate all features listed in
#1472 to actually process the data and expose it. This required us to
add a new `expingest` package to Horizon that is completely independent
of the old `ingest` package and is using the new `exp/ingest` system.
The pipeline currently saves signers data to the DB but can be easily
extended with more features in the future.

The new endpoint (`/accounts`) is future-proof. It currently works only
with `signer` GET parameter set but when more processors are added to
the ingestion pipeline we can add new params that will allow filtering
accounts by assets, by home domain, by inflation destination etc. When
the rest of Horizon is migrated to the new system, `/accounts` will be a
collection of Account Details resources (like in `/accounts/{id}`).

Known limitations & issues:

- Enabling this feature requires around 4GB of RAM for processing
  initial state and a space for around 3M rows in `accounts_signers`
  table for pubnet.
- The endpoint will not be available until the state from history
  archives is not fully parsed. This usually takes a couple minutes.
  Before then we display `StillIngesting` problem in `/accounts`.
- New ingestion system is independent of the old one so new endpoint
  data may not be up to date with the rest of the data in Horizon.
@bartekn
Copy link
Contributor Author

bartekn commented Jul 19, 2019

It's live on horizon-testnet:

https://horizon-testnet.stellar.org/accounts?signer=GCJ57EPSX4RX6TPO2QVE7GOJXNGUJARVQYPYFJPFK5Z7SL2USHGNVP2T

Please check it out .

@bartekn bartekn closed this as completed Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
horizon ingest New ingestion system
Projects
None yet
Development

No branches or pull requests

2 participants