Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove old contract deployment flow #4970

Merged
merged 12 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ On this page, you'll learn

- The details and functionalities of the private context in Aztec.nr
- Difference between the private and public contexts and their unified APIs
- Components of the private context, such as inputs, block header, and contract deployment data
- Components of the private context, such as inputs and block header.
- Elements like return values, read requests, new note hashes, and nullifiers in transaction processing
- Differences between the private and public contexts, especially the unique features and variables in the public context

Expand Down Expand Up @@ -42,7 +42,7 @@ The context inputs includes all of the information that is passed from the kerne

#include_code private-context-inputs /noir-projects/aztec-nr/aztec/src/context/inputs/private_context_inputs.nr rust

As shown in the snippet, the application context is made up of 4 main structures. The call context, the block header, the contract deployment data and the private global variables.
As shown in the snippet, the application context is made up of 4 main structures. The call context, the block header, and the private global variables.

First of all, the call context.

Expand All @@ -67,7 +67,6 @@ The call context contains information about the current call being made:
- Furthermore there are a series of flags that are stored within the application context:
- is_delegate_call: Denotes whether the current call is a delegate call. If true, then the storage contract address will be the address of the sender.
- is_static_call: This will be set if and only if the current call is a static call. In a static call, state changing altering operations are not allowed.
- is_contract_deployment: This will be set if and only if the current call is the contract's constructor.

### Header

Expand All @@ -77,12 +76,6 @@ In the public context this header is set by sequencer (sequencer executes public

#include_code header /noir-projects/noir-protocol-circuits/crates/types/src/header.nr rust

### Contract Deployment Data

Just like with the `is_contract_deployment` flag mentioned earlier. This data will only be set to true when the current transaction is one in which a contract is being deployed.

#include_code contract-deployment-data /noir-projects/noir-protocol-circuits/crates/types/src/contrakt/contract_deployment_data.nr rust

### Private Global Variables

In the private execution context, we only have access to a subset of the total global variables, we are restricted to those which can be reliably proven by the kernel circuits.
Expand Down Expand Up @@ -137,7 +130,7 @@ The Public Context includes all of the information passed from the `Public VM` i

### Public Context Inputs

In the current version of the system, the public context is almost a clone of the private execution context. It contains the same call context data, access to the same historical tree roots, however it does NOT have access to contract deployment data, this is due to traditional contract deployments only currently being possible from private transactions.
In the current version of the system, the public context is almost a clone of the private execution context.

#include_code public-context-inputs /noir-projects/aztec-nr/aztec/src/context/inputs/public_context_inputs.nr rust

Expand Down
15 changes: 0 additions & 15 deletions docs/docs/developers/getting_started/aztecjs-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ A successful run should show something like this:
token outboxAddress: EthAddress {
token buffer: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
token },
token contractDeploymentEmitterAddress: EthAddress {
token buffer: <Buffer 5f c8 d3 26 90 cc 91 d4 c3 9d 9d 3a bc bd 16 98 9f 87 57 07>
token }
token }
token } +0ms
```
Expand Down Expand Up @@ -182,9 +179,6 @@ Now that we have our accounts loaded, let's move on to deploy our pre-compiled t
token outboxAddress: EthAddress {
token buffer: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
token },
token contractDeploymentEmitterAddress: EthAddress {
token buffer: <Buffer 5f c8 d3 26 90 cc 91 d4 c3 9d 9d 3a bc bd 16 98 9f 87 57 07>
token }
token }
token } +0ms
token Loaded alice's account at 0x25048e8c...70d0 +4s
Expand Down Expand Up @@ -233,9 +227,6 @@ Running now should yield output:
token outboxAddress: EthAddress {
token buffer: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
token },
token contractDeploymentEmitterAddress: EthAddress {
token buffer: <Buffer 5f c8 d3 26 90 cc 91 d4 c3 9d 9d 3a bc bd 16 98 9f 87 57 07>
token }
token }
token } +0ms
token Loaded alice's account at 0x25048e8c...70d0 +4s
Expand Down Expand Up @@ -294,9 +285,6 @@ Our output should now look like this:
token outboxAddress: EthAddress {
token buffer: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
token },
token contractDeploymentEmitterAddress: EthAddress {
token buffer: <Buffer 5f c8 d3 26 90 cc 91 d4 c3 9d 9d 3a bc bd 16 98 9f 87 57 07>
token }
token }
token } +0ms
token Loaded alice's account at 0x25048e8c...70d0 +4s
Expand Down Expand Up @@ -350,9 +338,6 @@ Our complete output should now be something like:
token outboxAddress: EthAddress {
token buffer: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
token },
token contractDeploymentEmitterAddress: EthAddress {
token buffer: <Buffer 5f c8 d3 26 90 cc 91 d4 c3 9d 9d 3a bc bd 16 98 9f 87 57 07>
token }
token }
token } +0ms
token Loaded alice's account at 0x25048e8c...70d0 +4s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ REGISTRY_CONTRACT_ADDRESS=0x01234567890abcde01234567890abcde
INBOX_CONTRACT_ADDRESS=0x01234567890abcde01234567890abcde
OUTBOX_CONTRACT_ADDRESS=0x01234567890abcde01234567890abcde
ROLLUP_CONTRACT_ADDRESS=0x01234567890abcde01234567890abcde
CONTRACT_DEPLOYMENT_EMITTER_ADDRESS=0x01234567890abcde01234567890abcde

## Sequencer variables ##
SEQ_PUBLISHER_PRIVATE_KEY=0x01234567890abcde01234567890abcde # Private key of an ethereum account that will be used by the sequencer to publish blocks.
Expand Down
6 changes: 0 additions & 6 deletions l1-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ It is the job of the rollup contract to store the state of the rollup and progre

Currently not running any proofs _nor_ access control so blocks can be submitted by anyone and can be complete garbage.

### ContractDeploymentEmitter

Job: Share Contract Deployment public data on chain.

For now, this include bytecode for contract deployment, but over time this will be verified for public functions.

---

# Linter
Expand Down
3 changes: 0 additions & 3 deletions l1-contracts/scripts/ci_deploy_contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ while IFS= read -r line; do
elif [[ $line == *"Outbox"* ]]; then
export TF_VAR_OUTBOX_CONTRACT_ADDRESS=$address
echo "TF_VAR_OUTBOX_CONTRACT_ADDRESS=$TF_VAR_OUTBOX_CONTRACT_ADDRESS"
elif [[ $line == *"Emitter"* ]]; then
export TF_VAR_CONTRACT_DEPLOYMENT_EMITTER_ADDRESS=$address
echo "TF_VAR_CONTRACT_DEPLOYMENT_EMITTER_ADDRESS=$TF_VAR_CONTRACT_DEPLOYMENT_EMITTER_ADDRESS"
elif [[ $line == *"Oracle"* ]]; then
export TF_VAR_AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$address
echo "TF_VAR_AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$TF_VAR_AVAILABILITY_ORACLE_CONTRACT_ADDRESS"
Expand Down
Loading
Loading