wip: fix Err syscall wrongly loaded #327
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Still havent found the fix but looking into it
while doing lambdaclass/starknet_in_rust#1102 i found a bug, the felt error was not there and the deserialization crashed (its now fixed with a deserialization error, but it should find the felt because its passed)
When a syscall returns a Err (that always contains a vec of felts) it wont see the vec of felts but they are there
I think the problem here is how we handle the return syscall payload in the starknet libfuncs, when the return type is () we use a hack to get the enum type have 2 variants (but we cant make a concretetypeid from nowhere so we copy the variant from the other err branch)
We also build the ok and err payload always regardless of whether the enum tag is 0 or 1 for each variant, i think the problem lies there (edited)