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

triage(Misc): Potential underconstrained code #6001

Closed
Tracked by #5070
LHerskind opened this issue Apr 24, 2024 · 1 comment
Closed
Tracked by #5070

triage(Misc): Potential underconstrained code #6001

LHerskind opened this issue Apr 24, 2024 · 1 comment
Assignees

Comments

@LHerskind
Copy link
Contributor

As part of #5947 an issue was encountered in one of the simulation tests where changing the storage slots of the notes, did not make the transaction simulation fail, even though the logic of the transaction should be constraining tat storage slot to another value.

Investigate this to figure out why it did not fail, and if the check is skipped or what happened.

@LHerskind
Copy link
Contributor Author

The storage slots stored locally are used ONLY for helping the node figure out what to return when an oracle requests data, and is not actually returned as part of the data.

The contract are fully constraining and require that the note actually exists, so it don't have an issue. The reason that it seems to pass here, is that even though the oracle is requesting data for storage slot a the mock chooses to completely ignore it and just provide the data it have for slot b anyway.

As the specific test in question don't actually have state but is more interested in seeing the emissions etc, it will behave as if slot a was used.

In an end-to-end test where notes were stored wrongly on b in the pxe, it would simply not be returned, and fail the test.

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

No branches or pull requests

1 participant