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

Extend the account history plugin to store the recent oho in the memory. #2268

Closed
ofreeteam opened this issue Sep 18, 2020 · 4 comments · Fixed by #2648
Closed

Extend the account history plugin to store the recent oho in the memory. #2268

ofreeteam opened this issue Sep 18, 2020 · 4 comments · Fixed by #2648

Comments

@ofreeteam
Copy link

ofreeteam commented Sep 18, 2020

Save recent operation_history_object in the memory. It is convenient to scan 1.11.x objects and monitor various virtual ops.

Can consider configuring the number of records, or how many days have been configured recently?

In addition, consider providing an API to simply obtain the total number of records. It is convenient to stop scanning. Because the non-existent ID and the deleted ID are empty data.

@abitmore
Copy link
Member

abitmore commented Sep 25, 2020

Seems it makes sense to adopt a similar approach as done in the market_history plugin:

# Will only store this amount of matched orders for each market in order history for querying,
# or those meet the other option, which has more data (default: 1000)
max-order-his-records-per-market = 1000

# Will only store matched orders in last X seconds for each market in order history for querying,
# or those meet the other option, which has more data (default: 259200 (3 days))
max-order-his-seconds-per-market = 259200

The node may consume more RAM though.

@ofreeteam
Copy link
Author

yes, it's similar. the only difference is that this is for all types of operation history.

@abitmore
Copy link
Member

In addition, consider providing an API to simply obtain the total number of records. It is convenient to stop scanning. Because the non-existent ID and the deleted ID are empty data.

The history_api::get_block_operation_history API added in #1899 is useful for this purpose.

@abitmore
Copy link
Member

abitmore commented Oct 3, 2022

Save recent operation_history_object in the memory.

Done via #2648.

In addition, consider providing an API to simply obtain the total number of records. It is convenient to stop scanning. Because the non-existent ID and the deleted ID are empty data.

This is done via #2653.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants