-
Notifications
You must be signed in to change notification settings - Fork 3
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
Consider discarding items rewrittable storage #22
Comments
I decided against this |
Revisiting this. There are upsides I missed:
another cool thing about this is, some lists would be able to keep the entire history of the item, without the current issue of
with this structure, instead, a list policy can enforce that the item has to be reclaimed. then, the history of the item (evidence thread + editions) wont be lost. this makes special sense for wiki use case. |
Additionally, it could make sense to also stop making Dispute structs rewrittable. If so, then they should be set to zero to trigger refunds. But, this is not as important. |
This is a hard call to make but I wanted to write it somewhere so that I can reflect on it later.
Currently, stake-curate has rewrittable item storage. This means that creating new items should be significantly cheaper if you're choosing used slots. More even so taking into account the saving is in L2 gas, since stake-curate will live in a rollup.
Recently, a decision involved allowing to write arbitrary data as bytes in the items (#17). In order to make it easier for other contracts to interface with stake-curate, the id of an item should be predictable.
This is not compatible with rewrittable storage.
we can either approach it as "not our problem" and keep the position of the items unpredictable, and force proxies to deal with that complexity. This will mean significantly cheaper item submissions in reused slots.
(It's not that hard to deal with that complexity, it's just annoying. proxies would have to deal with timestamps, etc. But they probably would need that anyway.)
Or we can dump the rewrittable storage idea entirely. This makes reading data onchain easier. It also simplifies a few methods. It also reduces some complexity off the user, and eliminates the need for the user to understand the slot system. Two routes:
This is going to be a hard call so I'll take my time figuring out what better for the project
The text was updated successfully, but these errors were encountered: