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

Port account_fetcher.rs to mango-feeds #5

Open
grooviegermanikus opened this issue May 30, 2023 · 2 comments
Open

Port account_fetcher.rs to mango-feeds #5

grooviegermanikus opened this issue May 30, 2023 · 2 comments
Milestone

Comments

@grooviegermanikus
Copy link
Collaborator

grooviegermanikus commented May 30, 2023

A account/cain data retrieval utility has been implemented in Rust in the course of mango-v4 project.

Problem:

Maintaining and replicating account state is cumbersome to implement and imposes risk of high traffic on RPC-Nodes.

Proposed solution:

Take the Rust account_fetcher.rs and *chain_data_fetcher.rs' util and make it reusable as part of mango-feeds-connector.

Features:

  • RPC sync client to request accounts without delay
  • Stream-based async account replicate
  • Read-Caching Wrapper

note: chain_data_fetcher.rs is about account state - all other data (e.g. slot) is required to implement the replication

Architecture:

  • must not depend on anchor or mango - anchor/-mango-related convenience methods must go into mango-client
  • support only async (although sync would sometimes make more sense)

Milestones:

  1. Design a Rust ABI based on research of current users of account_fetcher.rs.
  2. Extract account store interface and refactor existing in-memory as a reference implementation.
@mschneider mschneider added this to the v1 milestone May 30, 2023
@grooviegermanikus
Copy link
Collaborator Author

grooviegermanikus commented Oct 12, 2023

Donatello account_fetcher.rs is actual a copy of chain_data_fetcher.rs. Yet the name AccountFetcher clashes.
The account_fetcher.rs in mango-v4 implements an account rpc client + cache.

@grooviegermanikus
Copy link
Collaborator Author

some mango services use sync rust code to fetch accounts; yet we do not want to maintain sync+async code for account_fetcher -> isolate the sync-code and refactor only the async code

current work on refactoring is mango and connector

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

2 participants