-
Notifications
You must be signed in to change notification settings - Fork 648
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
get_key_references performance issue? #1472
Comments
IMO,it is api design issue,unless you can limit the searching depth and get the right result. |
wasn't this always standard behaviour? has something changed? |
Are you worried about the performance of querying for all of them? Or are you worried about the performance of all those subscriptions? Or both? If we limit the subscriptions, how would we communicate to the user that may be expecting us to subscribe to all of them? |
This issue is related to UI issue bitshares/bitshares-ui#2367. Please check there for more info. |
|
I would be surprised if that works, as you are subscribing to a vector, and not individual accounts. Is there some magic happening here, or is my surprise warranted? |
LOL. I don't think it will work. So, due to this, we effectively didn't subscribe to anything? As discussed in the pull request, let's remove the code completely. |
I think it's still problematic if the returned nested vector is too large. OP updated. |
thing is, UI still does a get_full_accounts on them after received...so it effectively/eventually does subscribe to all of them. we've had a discussion on UI group about this and it seems this will need some major refactoring (to fix other performance issues as well) |
Every account ID in returned vector is around 16 bytes, so if the JSON-RPC interface is able to return data packets greater than 1M bytes, that means 64K accounts, so it is a bit hard to attack although possible. |
@jmjatlanta @pmconrad is this hard coded part to be changed and added to the config file? |
Yes. We hard-coded that the user should be limited to passing no more than 100 keys. We would like that to be configurable, so that a node can easily customize the quantity their client can request. |
Bug Description
If a key is in authorities of many accounts,
get_key_references
API will return all of themand will subscribe to all of them, this could lead to potential performance issues. This API is used by GUI to get related accounts when importing a key.bitshares/bitshares-ui#2367 is related.
Update:
due to a bug, (I believe) the API is not subscribing to the returned accounts, so we can
The result can still be too large, E.G. containing thousands of accounts, thus can be problematic.
Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.
CORE TEAM TASK LIST
The text was updated successfully, but these errors were encountered: