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
As a followup to #4721 let's allow the ABIs in the AS and WASMV1 runtimes to list datastore keys (both for the current and for other addresses) similarly to the APIs with the following extra optional arguments:
The behavior must be deterministic. Therefore, contrary to the API case in which the user can choose stuff like the max count, in the case of the ABIs, all limits must come from protocol constants.
Impact minimization
In the AS runtime try to make the current datastore key listing ABI retro-compatible if possible (eg. by appending optional arguments) so that we don't add extra ABIs and ensure that previous projects work. If it appears impossible, we need to resort to creating a new ABI.
For WASMV1, protobuf is used, therefore it should not be an issue to add extra numbered proto fields of the existing ABIs while maintaining retro-compatibility.
One breaking thing however is the choice of the max count constant. As a starter, it should be chosen to be the smallest possible such that if a smart contract would have requested that number of items, it would have ran out of at least one of those (and hence failed anyway):
VM RAM
slot gas
return values max size
The text was updated successfully, but these errors were encountered:
Goal
As a followup to #4721 let's allow the ABIs in the AS and WASMV1 runtimes to list datastore keys (both for the current and for other addresses) similarly to the APIs with the following extra optional arguments:
Existing TODOs to solve
Complete the code TODOs introduced by #4809 in:
Determinism
The behavior must be deterministic. Therefore, contrary to the API case in which the user can choose stuff like the max count, in the case of the ABIs, all limits must come from protocol constants.
Impact minimization
In the AS runtime try to make the current datastore key listing ABI retro-compatible if possible (eg. by appending optional arguments) so that we don't add extra ABIs and ensure that previous projects work. If it appears impossible, we need to resort to creating a new ABI.
For WASMV1, protobuf is used, therefore it should not be an issue to add extra numbered proto fields of the existing ABIs while maintaining retro-compatibility.
One breaking thing however is the choice of the max count constant. As a starter, it should be chosen to be the smallest possible such that if a smart contract would have requested that number of items, it would have ran out of at least one of those (and hence failed anyway):
The text was updated successfully, but these errors were encountered: