-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: call stack validation optimisation. (#3387)
Closes #3060 ### Before We passed **call stack preimages** to the kernel. The kernel then hashed the preimages and check them against the hashes in the app circuits' public inputs. The public kernel also checked the addresses and contexts in the preimages were valid for the types of calls they were making (private kernel should've done the same check, but was not present in the cpp code). The hashes would be aggregated to the accumulated data. A nested execution would pop the hash from the accumulated data, and checked that it's the same as its own hash. ### Now We pass **call requests** to the kernel. The kernel checks that the addresses and contexts in those requests match the current call. The requests are aggregated to the accumulated data. A nested execution pops the call request from the accumulated data, checks that the hash is the same as its own hash, and validates the addresses and contexts are correct for the type of call. ### Other changes - Remove unnecessary checks in the protocol circuits: - Array lengths when they were already fixed sizes. - Format of the arrays from previous kernel. - Check the function exist in the tree using contract address instead of storage contract address. - Removing `yarn:remake-bindings`: Stop generating types and utils from cpp. - Deleting some types and utils generated from cpp that are not used anywhere. (A thorough cleanup will be in another PR.) # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [ ] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [ ] Every change is related to the PR description. - [ ] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist).
- Loading branch information
Showing
96 changed files
with
16,506 additions
and
12,192 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.