-
Notifications
You must be signed in to change notification settings - Fork 707
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
Re-design datastore key queries (unify between JSON RPC API / GRPC / ABI AS / ABI WASMV1) #4721
Comments
Note priority N°1 is to address API JSONRPC+GRPC. |
This can be broken down in two steps:
and for our purposes, for now we mostly need the API side (P1). The ABI side can be "left for later" (P2). |
How it would work:
|
|
|
@modship for now we focus only on the jsonrpc and grpc APIs. Let's not do the ABI part for now |
So, why not just re-using https://github.com/massalabs/massa/blob/main/massa-api-exports/src/page.rs ? Line 568 in 2a71797
|
@modship we cannot know the total count nor list all matching keys internally for performance reasons |
After merging the API work, in order to prepare the ABI work: check TODOs in:
|
The JsonRPC API endpoint
get_addresses
lists, in the response, all the datastore keys of the given addresses.One issue with this is that there is no limits in the number of datastore entries for a given address. So if the address has a lot of keys, the response may be too large (e.g. larger than the default 50Mo response limit of the API) which causes issues.
For example, the following explorer page errors out because of it: https://explorer.massa.net/mainnet/address/AS1Ba1T2mMpHvLEhTvsNkSDqm4djno2ezVojGrtLf1wRd8ThfZD3
A request / response to the mainnet API showing the issue:
TODO:
The text was updated successfully, but these errors were encountered: