-
Notifications
You must be signed in to change notification settings - Fork 1k
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 DataCache functions have inconsistent behaviour #1193
Conversation
I don't think these changes are correct... |
@erikzhang can you be more explicit what part you think is incorrect about it?
|
Let's say we have a contract doing the following steps:
It reads 100 entries, and update 1 entry. If we allow both |
I agree it will attempt to modify 101 entries (assuming LevelDB doesn't do anything smart if it sees no changes). However, we need to keep in mind that everything is put into a neo/neo/Persistence/LevelDB/DbCache.cs Lines 51 to 54 in cd85039
My fear is that there is a security issue lurking around the corner because some people believe
and this is not true as shown in this table (case 1 + 6) |
What about if we use a different dictionaries for caching Option B, if it's already in the cache, return a copy when use |
Option B, a copy would streamline the behaviour in all situations. Alternatively, an optional |
fix #1186