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

Fetch table rows from EOS in pages #98

Open
yarkinwho opened this issue Feb 23, 2024 · 1 comment
Open

Fetch table rows from EOS in pages #98

yarkinwho opened this issue Feb 23, 2024 · 1 comment

Comments

@yarkinwho
Copy link
Contributor

Currently when the frontend trys to fetch table rows from EOS, it will fetch v1/chain/get-table-rows in one shot instead of doing any paging.

The result will be limited to 10 rows by default. It is not enough if the FE want to read things like the ERC token list. Currently the limit is set to 20 in the query and can be further relaxed without caused major trouble given the amount of data per row is quite small.

In the future we should optimize the way we query the rows.

Note that current code can work for quite a while as long as we do not open the registration of tokens to public. So it's fine to ignore this issue in this case. But we should solve this issue when we are doing the rework of the FE for opening the registration to public.

@heifner
Copy link
Member

heifner commented Feb 23, 2024

In 5.0, the serialization of get_table_rows is off the main thread. See AntelopeIO/leap#1054 . Also the time constraints are different in 5.0, see AntelopeIO/leap#1139 and get_table_rows calls are run in read-only mode meaning it can use the full read-only-threads setting of nodeos to process them in parallel.

You can safely increase the default request from 10 rows to a much larger number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants