-
Notifications
You must be signed in to change notification settings - Fork 20
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
What happens when an IDGraph bloats up? #1442
Comments
The first question that comes to mind then would be, how would IDHub retrieve the full IDGraph for a given user (assuming we have the shielding key)? Would we need to scrape the whole chain and/or maintain an index? 🤔 |
Thank you, Kai, I am also lacking data and Parachain implementation details to answer this, so I'd appreciate it if you could elaborate how much is "too many identities" and why it may prevent users to submit more extrinsics. Also if it helps, The Identity Hub, and in general, any client, doesn't need to get the IDGraph as part of every response (#1080). We introduced it as a quick workaround as there was no other way for a client to retrieve it, say from the Parachain's Storage pallet. From a client perspective, the current solution is inconvenient and we need another way of retrieving the IdGraph without involving a user transaction to happen. Would revisiting it solve this issue too? |
Thanks @grumpygreenguy @jonalvarezz
Short answer is IDHub shouldn't be able to retrieve it without the user's signature (agreement) :)
We need test ourselves. But I have the impression that each extrinsic has a limit of several MB (like 5-6?) and the extrinsic needs to be packed into a PoV (proof of validity) which has a hard limit too (also several MB), otherwise the validators on the relaychain won't be able to verify the PoV in time. But even if the size is not a problem, submitting a long extrinsic can be very slow. It bloats up the block size as well - so theoretically an attacker can try to clog the network and fill your node disk quickly by keeping sending the identity-related extrinsics.
We can have a synchronous RPC - either via parachain or directly to the worker, but that requires the user signature too. So it's a privileged RPC request. |
This is possible and actually we don't know what will happen afterwards. A test is needed. |
Thank you for elaborating, Kai and Eric.
Would it incur fees too? if it doesn't, how about:
Impact for clients
|
It won't incur any fees.
|
Yes, it is – Although, limitting the number of returned entries to a small number only makes sense if we have an alternative to get the entire list.
I don't know 😂 – is this something we can scale and offer to any client wanting to use our Parachain? Maybe we can start by introducing a defensive change and cap the IDGraph to the first 100 items (I leave the number to you/ I am using a magic number that should be safe for the alpha releases). The how to independently get the entire IDGraph in one call (point 2) seems to need further discussion and research. Additionally, the IDHub is updating the local IDGraph on |
Thanks @jonalvarezz We'll take the following actions (correct me if I'm wrong):
|
It sounds good to me. Thanks for the wrap-up, Kai. |
Will address the first two items in the PR linked to this issue. |
sounds good, thanks! |
Context
We included the encrypted IDGraph in the returning event in #1080
But what if a user links too many identities and the IDGraph grows into a huge object? Maybe you can't even submit extrinsic anymore.
We need to:
@jonalvarezz maybe we have to discuss the necessity of having such IDGraph in the returning event again.
✔️ Please set appropriate labels and assignees if applicable.
The text was updated successfully, but these errors were encountered: