-
Notifications
You must be signed in to change notification settings - Fork 789
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
Fix the event topic list inefficiency #371
Comments
Another possible solution is to introduce another map similar to However, this would require an extra write per used topic and would make a light client to deal with one additional layer of storage indirection. |
regarding paritytech/substrate#2491, I wonder why a storage double map is used for |
I think I should’ve mentioned this in the docs: but this is the simplest way to make all storage locations to have the same prefix in tree. Thus it will allow us e.g. to use ‘kill_prefix’ there. |
ok, I get it, I think we can optimize that by using |
@athei Can you look at this and figure a priority? |
The inefficiency I see here is one additional integer per event emitted. It doesn't contribute to storage bloat because this storage item is cleared in I rate the priority pretty low. |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
With paritytech/substrate#2491 merged, we maintain a list of topics. Each item is paired with the block number in which the item was deposited. We did that to fix the issue when a block has identical contents for two blocks, the notifications won't be triggered for the second block.
However, this scheme is clumsy, redundant and inefficient, it just was the easiest way to leverage
::append
. A better solution would be to put a block number only once instead for each item.The text was updated successfully, but these errors were encountered: