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
With foreign procedure invocation it's possible to read data from a foreign account, for example from a storage map. Such storage maps could get very large in practice, but since they are a sparse merkle tree, only the key-value pair that needs to be accessed (and its merkle path) must be present in the transaction where it is read.
How should it be done?
There are two options I think:
We could consider adding a test to make sure we can do this, which also serves as an example of how this can be done.
We can change get_mock_fpi_adv_inputs to take as an input the key-value pairs that should be added to the advice input's merkle store, so that instead of adding all storage maps to the merkle store, we only selectively add the provided key-value pairs. In that case we don't need a new test, but the existing test_fpi_memory would serve as the example because a part of this test already uses get_map_item.
I would suggest going with option 2 if there aren't unforeseen complications, and option 1 otherwise.
When is this task done?
When we can successfully execute a test where not the entire storage map was added to the advice input's merkle store.
What should be done?
With foreign procedure invocation it's possible to read data from a foreign account, for example from a storage map. Such storage maps could get very large in practice, but since they are a sparse merkle tree, only the key-value pair that needs to be accessed (and its merkle path) must be present in the transaction where it is read.
How should it be done?
There are two options I think:
get_mock_fpi_adv_inputs
to take as an input the key-value pairs that should be added to the advice input's merkle store, so that instead of adding all storage maps to the merkle store, we only selectively add the provided key-value pairs. In that case we don't need a new test, but the existingtest_fpi_memory
would serve as the example because a part of this test already usesget_map_item
.I would suggest going with option 2 if there aren't unforeseen complications, and option 1 otherwise.
When is this task done?
When we can successfully execute a test where not the entire storage map was added to the advice input's merkle store.
Additional context
Follow-up from #918.
The text was updated successfully, but these errors were encountered: