You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, game data accumulates in the game contract, with a minimal amount of cleanup done. In the future we might wish to archive it somewhere so that appchain validators do not need to know about the old game data.
(Note regarding cleanup: we can safely erase the final game state, but we need to keep at least the list of participants, the winner(s), and the listing of cards used in each player's deck.)
One option would be to (1) compress the game data (e.g. using something like zipped-contracts) and (2) send it to contract storage (e.g. using SSTORE2)
Writing to contract storage not only cost less gas when using the Ethereum gas schedule (though we could depart from that), but also means that validators would only need a single hash for the game assuming they do not care about historical games. To achieve this, we would need to guarantee that either tx cannot call these storage contracts (i.e. it is illegal).
For now this is way way premature optimization, but I think it's pretty neat and wanted to write about it.
The text was updated successfully, but these errors were encountered:
(This will only be relevant in the far future.)
Currently, game data accumulates in the game contract, with a minimal amount of cleanup done. In the future we might wish to archive it somewhere so that appchain validators do not need to know about the old game data.
(Note regarding cleanup: we can safely erase the final game state, but we need to keep at least the list of participants, the winner(s), and the listing of cards used in each player's deck.)
One option would be to (1) compress the game data (e.g. using something like zipped-contracts) and (2) send it to contract storage (e.g. using SSTORE2)
Writing to contract storage not only cost less gas when using the Ethereum gas schedule (though we could depart from that), but also means that validators would only need a single hash for the game assuming they do not care about historical games. To achieve this, we would need to guarantee that either tx cannot call these storage contracts (i.e. it is illegal).
For now this is way way premature optimization, but I think it's pretty neat and wanted to write about it.
The text was updated successfully, but these errors were encountered: