forked from visoftsolutions/noir_rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Contract class registerer contract (AztecProtocol#4403)
Adds contract class registerer canonical contract, and listens to its events from the archiver. This contract is meant for broadcasting the public bytecode of any given contract class. If the public bytecode for a contract class has not been broadcasted, the public kernel should refuse to execute any calls to a contract instance of this class. More info [here](https://yp-aztec.netlify.app/docs/contract-deployment/classes#canonical-contract-class-registerer). For now the contract assigned to a hardcoded address in the archiver, computed with salt=1. And since event selectors are not yet implemented (all events are emitted with selector `5`) uses a magic number for identifying the event, which should be removed later. Other changes include: - Add serialization for an arbitrary-sized buffer into a Field array, where each field carries 31 bytes of info of the original buffer. - Increase the maximum number of args that can be passed (from 512 to 1024) to a Noir private function. - Introduce a new `ContractClassPublic` interface that represents a contract class that has info on public functions only, and uses it in the Aztec Node. - Remove the `SerializableContractClass` class in favor of serialization functions used only in the archiver. - Add an endpoint to the Aztec Node for retrieving contract classes. Pending for future PRs: - Unhardcode the registerer contract address from the archiver. - Set up a nicer API for class registration. - Generalize buffer serialization into field array. - Add methods for broadcasting private and unconstrained functions. Fixes AztecProtocol#4069 Fixes AztecProtocol#4070
- Loading branch information
1 parent
e54ecd2
commit d953090
Showing
44 changed files
with
795 additions
and
320 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
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.