Skip to content
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

Array modification events are not instrumented #5

Open
shaunazzopardi opened this issue Oct 20, 2019 · 0 comments
Open

Array modification events are not instrumented #5

shaunazzopardi opened this issue Oct 20, 2019 · 0 comments

Comments

@shaunazzopardi
Copy link
Collaborator

The current implementation is not able to deal with array instrumentation events, e.g. if list is a uint[] then both events list@(true) and list[id]@(true) are ignored by the instrumentation engine.

Implementing this is not straightforward. Keeping the whole previous state of an array is not viable from a gas-point of view. Thus although we may allow events of the kind list@(true) allowing reference to the previous value of list (LARVA_previous_list) is not viable.

A more viable approach is to simply capture modification of points in the array, list[id]@(true), and keep the previous value at that point.

Here we also need to consider the push() and pop() syntactic sugar of arrays when instrumenting a smart contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant