Skip to content

Commit

Permalink
Update protocol specs
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Apr 17, 2024
1 parent e8252ea commit 7d1e48c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 46 deletions.
19 changes: 7 additions & 12 deletions docs/docs/protocol-specs/circuits/private-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,13 @@ After generating a proof for a private function circuit, that proof (and associa

### `CallContext`

| Field | Type | Description |
| -------------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_sender` | `AztecAddress` | Address of the caller contract. |
| `storage_contract_address` | `AztecAddress` | Address of the contract against which all state changes will be stored. (It is not called `contract_address`, because in the context of delegate calls, that would be an ambiguous name.) |
| `portal_contract_address` | `AztecAddress` | Address of the portal contract to the storage contract. |
| `is_delegate_call` | `bool` | A flag indicating whether the call is a [delegate call](../calls/delegate-calls.md). |
| `is_static_call` | `bool` | A flag indicating whether the call is a [static call](../calls/static-calls.md). |
| `gas_settings` | [`GasSettings`](#gassettings) | User-defined limits and max fees per each gas dimension for the transaction. |
| `gas_left.da_gas` | `u32` | How much DA gas is available for this call. |
| `gas_left.l1_gas` | `u32` | How much L1 gas is available for this call. |
| `gas_left.l2_gas` | `u32` | How much L2 gas is available for this call. |
| `transaction_fee` | `field` | Accumulated transaction fee, only set during teardown phase. |
| Field | Type | Description |
| -------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `msg_sender` | `AztecAddress` | Address of the caller contract. |
| `storage_contract_address` | `AztecAddress` | Address of the contract against which all state changes will be stored. (It is not called `contract_address`, because in the context of delegate calls, that would be an ambiguous name.) |
| `portal_contract_address` | `AztecAddress` | Address of the portal contract to the storage contract. |
| `is_delegate_call` | `bool` | A flag indicating whether the call is a [delegate call](../calls/delegate-calls.md). |
| `is_static_call` | `bool` | A flag indicating whether the call is a [static call](../calls/static-calls.md). |

### `GasSettings`

Expand Down
3 changes: 0 additions & 3 deletions docs/docs/protocol-specs/circuits/private-kernel-initial.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,6 @@ class CallContext {
portal_contract_address: AztecAddress
is_delegate_call: bool
is_static_call: bool
gas_left: Gas
gas_settings: GasSettings
transaction_fee: field
}
CallContext ..> CallerContext : call_context
Expand Down
3 changes: 0 additions & 3 deletions docs/docs/protocol-specs/circuits/private-kernel-inner.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,6 @@ class CallContext {
portal_contract_address: AztecAddress
is_delegate_call: bool
is_static_call: bool
gas_left: Gas
gas_settings: GasSettings
transaction_fee: field
}
CallContext ..> CallerContext : call_context

Expand Down
26 changes: 3 additions & 23 deletions docs/docs/protocol-specs/rollup-circuits/base-rollup.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ class PublicDataRead {
value: Fr
}
class NewContractData {
function_tree_root: Fr
address: Address
portal: EthAddress
}
class CombinedAccumulatedData {
aggregation_object: AggregationObject
read_requests: List~Fr~
Expand All @@ -139,7 +133,6 @@ class CombinedAccumulatedData {
nullified_note_hashes: List~Fr~
l2_to_l1_messages: List~Fr~
contracts: List~NewContractData~
public_update_requests: List~PublicDataUpdateRequest~
public_reads: List~PublicDataRead~
logs: Logs
Expand All @@ -153,37 +146,24 @@ class CombinedAccumulatedData {
gas_used.l1_gas: u32
gas_used.l2_gas: u32
}
CombinedAccumulatedData *-- "m" NewContractData: contracts
CombinedAccumulatedData *-- "m" PublicDataUpdateRequest: public_update_requests
CombinedAccumulatedData *-- "m" PublicDataRead: public_reads
CombinedAccumulatedData *-- Logs : logs
class ContractDeploymentData {
deployer_public_key: Point
constructor_vk_hash: Fr
constructor_args_hash: Fr
function_tree_root: Fr
salt: Fr
portal_address: Fr
}
class TxContext {
fee_context: FeeContext
is_contract_deployment: bool
chain_id: Fr
version: Fr
contract_deployment_data: ContractDeploymentData
gas_settings: GasSettings
}
TxContext *-- ContractDeploymentData: contract_deployment_data
TxContext *-- GasSettings : gas_settings
class CombinedConstantData {
historical_header: Header
tx_context: TxContext
gas_settings: GasSettings
}
CombinedConstantData *-- Header : historical_header
CombinedConstantData *-- TxContext : tx_context
CombinedConstantData *-- GasSettings : gas_settings
class GasSettings {
da.gas_limit: u32
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/protocol-specs/rollup-circuits/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,19 +275,19 @@ CombinedAccumulatedData *-- "m" PublicDataRead: public_reads
CombinedAccumulatedData *-- Logs : logs
class TxContext {
fee_context: FeeContext
chain_id: Fr
version: Fr
gas_settings: GasSettings
}
TxContext *-- GasSettings : gas_settings
class CombinedConstantData {
historical_header: Header
tx_context: TxContext
gas_settings: GasSettings
}
CombinedConstantData *-- Header : historical_header
CombinedConstantData *-- TxContext : tx_context
CombinedConstantData *-- GasSettings : gas_settings
class GasSettings {
da.gas_limit: u32
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/protocol-specs/transactions/local-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ A transaction execution request has the following structure. Note that, since Az
| `origin` | `AztecAddress` | Address of the contract where the transaction is initiated. |
| `functionSelector` | u32 | Selector (identifier) of the function to be called as entrypoint in the origin contract. |
| `argsHash` | `Field` | Hash of the arguments to be used for calling the entrypoint function. |
| `txContext` | `TxContext` | Includes chain id, and protocol version. |
| `txContext` | `TxContext` | Includes chain id, protocol version, and gas settings. |
| `packedArguments` | `PackedValues[]` | Preimages for argument hashes. When executing a function call with the hash of the arguments, the PXE will look for the preimage of that hash in this list, and expand the arguments to execute the call. |
| `authWitnesses` | `AuthWitness[]` | Authorization witnesses. When authorizing an action identified by a hash, the PXE will look for the authorization witness identified by that hash and provide that value to the account contract. |

Expand Down
1 change: 0 additions & 1 deletion docs/docs/protocol-specs/transactions/tx-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Output of the last iteration of the private kernel circuit. Includes _accumulate
| unencryptedLogsHash | Field[] | Accumulated unencrypted logs hash from all the previous kernel iterations. |
| encryptedLogPreimagesLength | Field | Total accumulated length of the encrypted log preimages emitted in all the previous kernel iterations. |
| unencryptedLogPreimagesLength | Field | Total accumulated length of the unencrypted log preimages emitted in all the previous kernel iterations. |
| newContracts | NewContractData[] | All the new contracts deployed in this transaction. |
| maxBlockNum | Field | Maximum block number (inclusive) for inclusion of this transaction in a block. |

**Block header**
Expand Down

0 comments on commit 7d1e48c

Please sign in to comment.