Skip to content

Commit

Permalink
Remove links.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeilaWang committed Oct 22, 2024
1 parent f2b7bc1 commit 67c60d5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 48 deletions.
2 changes: 1 addition & 1 deletion docs/docs/protocol-specs/addresses-and-keys/precompiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Encrypts and tags the given plaintext using the provided public keys, and return
encrypt_and_broadcast(public_keys_hash: Field, encryption_type: EncryptionType, recipient: AztecAddress, plaintext: Field[MAX_PLAINTEXT_LENGTH]): Field[MAX_TAGGED_CIPHERTEXT_LENGTH]
```

Encrypts and tags the given plaintext using the provided public keys, broadcasts them as an event, and returns the encrypted note prefixed with its tag for note discovery. These functions should be invoked via a [delegate call](../calls/delegate-calls.md), so that the broadcasted event is emitted as if it were from the caller contract.
Encrypts and tags the given plaintext using the provided public keys, broadcasts them as an event, and returns the encrypted note prefixed with its tag for note discovery.

```
encrypt<N>([call_context: CallContext, public_keys_hash: Field, encryption_type: EncryptionType, recipient: AztecAddress, plaintext: Field[MAX_PLAINTEXT_LENGTH] ][N]): Field[MAX_CIPHERTEXT_LENGTH][N]
Expand Down
57 changes: 28 additions & 29 deletions docs/docs/protocol-specs/circuits/private-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,42 +38,41 @@ Some tweaks might be needed following this discussion: https://docs.google.com/s

The public inputs of _every_ private function _must_ adhere to the following ABI:

| Field | Type | Description |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `call_context` | [`CallContext`](#callcontext) | Context of the call corresponding to this function execution. |
| `args_hash` | `field` | Hash of the function arguments. |
| `return_values` | [`field`; [`RETURN_VALUES_LENGTH`](../constants.md#circuit-constants)] | Return values of this function call. |
| `note_hashes` | [[`NoteHash`](#notehash); [`MAX_NOTE_HASHES_PER_CALL`](../constants.md#circuit-constants)] | New note hashes created in this function call. |
| `nullifiers` | [[`Nullifier`](#nullifier); [`MAX_NULLIFIERS_PER_CALL`](../constants.md#circuit-constants)] | New nullifiers created in this function call. |
| `l2_to_l1_messages` | [[`L2toL1Message`](#l2tol1message); [`MAX_L2_TO_L1_MSGS_PER_CALL`](../constants.md#circuit-constants)] | New L2 to L1 messages created in this function call. |
| `unencrypted_log_hashes` | [[`UnencryptedLogHash`](#unencryptedloghash); [`MAX_UNENCRYPTED_LOG_HASHES_PER_CALL`](../constants.md#circuit-constants)] | Hashes of the unencrypted logs emitted in this function call. |
| `encrypted_log_hashes` | [[`EncryptedLogHash`](#encryptedloghash); [`MAX_ENCRYPTED_LOG_HASHES_PER_CALL`](../constants.md#circuit-constants)] | Hashes of the encrypted logs emitted in this function call. |
| `encrypted_note_preimage_hashes` | [[`EncryptedNotePreimageHash`](#encryptednotepreimagehash); [`MAX_ENCRYPTED_NOTE_PREIMAGE_HASHES_PER_CALL`](../constants.md#circuit-constants)] | Hashes of the encrypted note preimages emitted in this function call. |
| `note_hash_read_requests` | [[`ReadRequest`](#readrequest); [`MAX_NOTE_HASH_READ_REQUESTS_PER_CALL`](../constants.md#circuit-constants)] | Requests to prove the note hashes being read exist. |
| `nullifier_read_requests` | [[`ReadRequest`](#readrequest); [`MAX_NULLIFIER_READ_REQUESTS_PER_CALL`](../constants.md#circuit-constants)] | Requests to prove the nullifiers being read exist. |
| `key_validation_requests` | [[`ParentSecretKeyValidationRequest`](#parentsecretkeyvalidationrequest); [`MAX_KEY_VALIDATION_REQUESTS_PER_CALL`](../constants.md#circuit-constants)] | Requests to validate keys used in this function call. |
| `public_call_requests` | [[`PublicCallRequest`](#publiccallrequest); [`MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL`](../constants.md#circuit-constants)] | Requests to call public functions. |
| `private_call_requests` | [[`PrivateCallRequest`](#privatecallrequest); [`MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL`](../constants.md#circuit-constants)] | Requests to call Private functions. |
| `counter_start` | `u32` | Counter at which the function call was initiated. |
| `counter_end` | `u32` | Counter at which the function call ended. |
| `min_revertible_side_effect_counter` | `u32` | Counter below which the side effects are non-revertible. |
| `block_header` | [`BlockHeader`](#blockheader) | Information about the trees used for the transaction. |
| `chain_id` | `field` | Chain ID of the transaction. |
| `version` | `field` | Version of the transaction. |
| Field | Type | Description |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| `call_context` | [`CallContext`](#callcontext) | Context of the call corresponding to this function execution. |
| `args_hash` | `field` | Hash of the function arguments. |
| `return_values` | [`field`; [`RETURN_VALUES_LENGTH`](../constants.md#circuit-constants)] | Return values of this function call. |
| `note_hashes` | [[`NoteHash`](#notehash); [`MAX_NOTE_HASHES_PER_CALL`](../constants.md#circuit-constants)] | New note hashes created in this function call. |
| `nullifiers` | [[`Nullifier`](#nullifier); [`MAX_NULLIFIERS_PER_CALL`](../constants.md#circuit-constants)] | New nullifiers created in this function call. |
| `l2_to_l1_messages` | [[`L2toL1Message`](#l2tol1message); [`MAX_L2_TO_L1_MSGS_PER_CALL`](../constants.md#circuit-constants)] | New L2 to L1 messages created in this function call. |
| `unencrypted_log_hashes` | [[`UnencryptedLogHash`](#unencryptedloghash); [`MAX_UNENCRYPTED_LOG_HASHES_PER_CALL`](../constants.md#circuit-constants)] | Hashes of the unencrypted logs emitted in this function call. |
| `encrypted_log_hashes` | [[`EncryptedLogHash`](#encryptedloghash); [`MAX_ENCRYPTED_LOG_HASHES_PER_CALL`](../constants.md#circuit-constants)] | Hashes of the encrypted logs emitted in this function call. |
| `encrypted_note_preimage_hashes` | [[`EncryptedNotePreimageHash`](#encryptednotepreimagehash); [`MAX_ENCRYPTED_NOTE_PREIMAGE_HASHES_PER_CALL`](../constants.md#circuit-constants)] | Hashes of the encrypted note preimages emitted in this function call. |
| `note_hash_read_requests` | [[`ReadRequest`](#readrequest); [`MAX_NOTE_HASH_READ_REQUESTS_PER_CALL`](../constants.md#circuit-constants)] | Requests to prove the note hashes being read exist. |
| `nullifier_read_requests` | [[`ReadRequest`](#readrequest); [`MAX_NULLIFIER_READ_REQUESTS_PER_CALL`](../constants.md#circuit-constants)] | Requests to prove the nullifiers being read exist. |
| `key_validation_requests` | [[`ParentSecretKeyValidationRequest`](#parentsecretkeyvalidationrequest); [`MAX_KEY_VALIDATION_REQUESTS_PER_CALL`](../constants.md#circuit-constants)] | Requests to validate keys used in this function call. |
| `public_call_requests` | [[`PublicCallRequest`](#publiccallrequest); [`MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL`](../constants.md#circuit-constants)] | Requests to call public functions. |
| `private_call_requests` | [[`PrivateCallRequest`](#privatecallrequest); [`MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL`](../constants.md#circuit-constants)] | Requests to call Private functions. |
| `counter_start` | `u32` | Counter at which the function call was initiated. |
| `counter_end` | `u32` | Counter at which the function call ended. |
| `min_revertible_side_effect_counter` | `u32` | Counter below which the side effects are non-revertible. |
| `block_header` | [`BlockHeader`](#blockheader) | Information about the trees used for the transaction. |
| `chain_id` | `field` | Chain ID of the transaction. |
| `version` | `field` | Version of the transaction. |

After generating a proof for a private function circuit, that proof (and associated public inputs) will be passed-into a private kernel circuit as private inputs. Private kernel circuits use the private function's proof, public inputs, and verification key, to verify the correct execution of the private function. Private kernel circuits then perform a number of checks and computations on the private function's public inputs.

## Types

### `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). |
| Field | Type | Description |
| ------------------------- | -------------- | -------------------------------------------------------------------------------- |
| `msg_sender` | `AztecAddress` | Address of the caller contract. |
| `contract_address` | `AztecAddress` | Address of the contract against which all state changes will be stored. |
| `portal_contract_address` | `AztecAddress` | Address of the portal contract to the storage contract. |
| `is_static_call` | `bool` | A flag indicating whether the call is a [static call](../calls/static-calls.md). |

### `GasSettings`

Expand Down
23 changes: 10 additions & 13 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const path = require("path");
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
export default {
sidebar: [

{
type: "html",
value: '<span class="sidebar-title">Aztec Protocol</span>',
Expand Down Expand Up @@ -63,16 +62,15 @@ export default {
{
type: "doc",
label: "Building in Public",
id: "aztec"
id: "aztec",
},

],

guidesSidebar: [
{
type: "doc",
label: "Popular Guides",
id: "guides/index"
id: "guides/index",
},
{
type: "html",
Expand All @@ -81,7 +79,7 @@ export default {
},
{
type: "autogenerated",
dirName: "guides/developer_guides"
dirName: "guides/developer_guides",
},
{
type: "html",
Expand All @@ -90,14 +88,14 @@ export default {
{
type: "doc",
label: "Privacy Considerations",
id: "guides/privacy_considerations"
id: "guides/privacy_considerations",
},
],
tutorialsSidebar: [
{
type: "doc",
label: "Tutorials and Examples",
id: "tutorials/index"
id: "tutorials/index",
},
{
type: "html",
Expand All @@ -106,7 +104,7 @@ export default {
},
{
type: "autogenerated",
dirName: "tutorials/codealong"
dirName: "tutorials/codealong",
},
{
type: "html",
Expand All @@ -115,15 +113,15 @@ export default {
},
{
type: "autogenerated",
dirName: "tutorials/examples"
dirName: "tutorials/examples",
},
],

referenceSidebar: [
{
type: "doc",
label: "References",
id: "reference/index"
id: "reference/index",
},
{
type: "html",
Expand All @@ -132,7 +130,7 @@ export default {
},
{
type: "autogenerated",
dirName: "reference/developer_references"
dirName: "reference/developer_references",
},
{
type: "doc",
Expand All @@ -151,7 +149,7 @@ export default {
roadmapSidebar: [
{
type: "autogenerated",
dirName: "aztec/roadmap"
dirName: "aztec/roadmap",
},
],
protocolSpecSidebar: [
Expand Down Expand Up @@ -252,7 +250,6 @@ export default {
"protocol-specs/calls/enqueued-calls",
"protocol-specs/calls/batched-calls",
"protocol-specs/calls/static-calls",
"protocol-specs/calls/delegate-calls",
"protocol-specs/calls/unconstrained-calls",
"protocol-specs/calls/public-private-messaging",
],
Expand Down
6 changes: 1 addition & 5 deletions yarn-project/end-to-end/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ e2e-crowdfunding-and-claim:
LOCALLY
RUN ./scripts/e2e_test.sh ./src/e2e_crowdfunding_and_claim.test.ts

e2e-delegate-calls:
LOCALLY
RUN ./scripts/e2e_test.sh ./src/e2e_delegate_calls

e2e-deploy-contract:
LOCALLY
RUN ./scripts/e2e_test.sh ./src/e2e_deploy_contract
Expand Down Expand Up @@ -301,6 +297,6 @@ kind-network-smoke:
kind-network-transfer:
ARG values_file
LOCALLY
# TODO(https://github.com/AztecProtocol/aztec-packages/issues/9166):
# TODO(https://github.com/AztecProtocol/aztec-packages/issues/9166):
# This has || true so it does NOT report failure in github actions job. To be reenabled once stable
RUN NAMESPACE=transfer FRESH_INSTALL=true VALUES_FILE=${values_file:-default.yaml} ./scripts/network_test.sh ./src/spartan/transfer.test.ts || true

0 comments on commit 67c60d5

Please sign in to comment.