-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Variable length returns (#5633)
This PR adds variable length (different per function) returns for both public and private functions. In private land and non-avm public functions, the macros introduce an oracle call for the simulator to store the returns in the packed values cache (this is not necessary for avm functions since they do return actual values instead of some public inputs). The macros previously serialized the returns to the public inputs, now, the public inputs only contains the hash. Two new structs, PackedReturns (for private) and FunctionReturns (for public) are used as return values for the context functions that call other external functions. They allow easy casting to other types, and PackedReturns in particular also deals with the fact that in private you get only the hash back from the call. None of the new oracles are necessary in the AVM context.
- Loading branch information
1 parent
44e0d8a
commit b4a6f17
Showing
89 changed files
with
1,029 additions
and
1,025 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.