Skip to content

Commit

Permalink
Fixes for docusaurus
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Dec 7, 2023
1 parent 2a98685 commit ec6ea4e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions yellow-paper/docs/contract-deployment/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ The structure of a contract class is defined as:

A contract class is registered by calling a `register` function in a canonical `ClassRegisterer` contract. The `register` function receives a `ContractClass` struct as defined above, and performs the following checks:

<!-- TODO: Should register be private or public? Or both? -->

- `version` is 1 for the initial release
- `registerer_address` equals to self
- `bytecode` for each function hashes to the `bytecode_hash`
Expand All @@ -66,7 +64,10 @@ The `register` function then:
- Computes the class identifier as the hash of the `ContractClass` object.
- Returns the computed class identifier as a `new_contract_classes` public input.

<!-- TODO: Define the format of the unencrypted event -->
<!-- TODO: Define how to compute the hash -->

The kernel circuit then validates that the contract emitting the new contract classes is the canonical `ClassRegisterer`, and emits the `new_contract_classes` so they are added to the contract class tree in global state. Upon seeing a new contract class registration in a mined transaction, nodes are expected to store the contract class, so they can retrieve it when executing a public function for that class.

<!--
TODO: Should register be private or public? Or both?
TODO: Define the format of the unencrypted event
TODO: Define how to compute the hash
-->
11 changes: 6 additions & 5 deletions yellow-paper/docs/contract-deployment/instances.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ The structure of a contract instance is defined as:

A new contract instance can be created by calling a private `deploy` function in a canonical `Deployer` contract. This function receives a `ContractInstance` struct as described above, and executes the following actions:

<!-- TODO: Should deploy be private or public? Or both? -->

- Validates the referenced `contract_class_id` exists.
- Computes the resulting contract address from the hash of the contract instance.
- Emits the address in the `new_contract_instances` public inputs.
Expand All @@ -32,6 +30,9 @@ A new contract instance can be created by calling a private `deploy` function in

The kernel circuit validates that the contract emitting the `new_contract_instances` is the canonical `Deployer`, and emits those values so they can be added to the global contract instances tree. Upon seeing a new contract deployed event, nodes are expected to store the address and preimage.

<!-- TODO: Define how address is computed -->
<!-- TODO: Define what info is emitted -->
<!-- TODO: Define the format of the unencrypted event -->
<!--
TODO: Should deploy be private or public? Or both?
TODO: Define how address is computed
TODO: Define what info is emitted
TODO: Define the format of the unencrypted event
-->

0 comments on commit ec6ea4e

Please sign in to comment.