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

docs: update docs styling #636

Merged
merged 5 commits into from
Dec 4, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Full, comprehensive documentation is available here: [https://docs.zama.ai/fhevm
To support fhEVM in an EVM-based blockchain, the **fhevm-go** library can be used as it implements all the needed FHE functionalities.
It is available here: [fhevm-go](https://github.com/zama-ai/fhevm-go)

To integrate fhevm-go into any EVM-based blockchain, you can follow the [Integration Guide](https://docs.zama.ai/fhevm-go/getting-started/integration).
To integrate fhevm-go into any EVM-based blockchain, you can follow the [Integration Guide](https://docs.zama.ai/fhevm-go/getting_started/integration).

## Working with fhEVM

Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ layout:

Learn the basics of fhEVM, set it up, and make it run with ease.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>What is fhEVM</strong></td><td>Understand the basic concepts of fhEVM library.</td><td><a href=".gitbook/assets/start1.png">start1.png</a></td><td><a href="getting_started/overview.md">overview.md</a></td></tr><tr><td><strong>Write contract</strong></td><td>Start writing fhEVM smart contract using Hardhat template</td><td><a href=".gitbook/assets/start4.png">start4.png</a></td><td><a href="getting_started/write_contract/hardhat.md">hardhat.md</a></td></tr><tr><td><strong>Learn to write FHE contracts</strong></td><td>Learn how to write your first confidential smart contract</td><td><a href=".gitbook/assets/start2.png">start2.png</a></td><td><a href="fundamentals/first_step/start.md">start.md</a></td></tr><tr><td><strong>Deploy on Ethereum</strong></td><td>Be one of the first to deploy confidential smart contracts on Ethereum!</td><td><a href=".gitbook/assets/start5.png">start5.png</a></td><td><a href="getting_started/ethereum.md">ethereum.md</a></td></tr></tbody></table>
<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Overview</strong></td><td>Understand the basic concepts of fhEVM library.</td><td><a href=".gitbook/assets/start1.png">start1.png</a></td><td><a href="getting_started/key_concepts.md">key_concepts.md</a></td></tr><tr><td><strong>Write contract</strong></td><td>Start writing your first fhEVM smart contract.</td><td><a href=".gitbook/assets/start4.png">start4.png</a></td><td><a href="getting_started/first_smart_contract.md">getting_started/first_smart_contract.md</a></td></tr><tr><td><strong>Deploy on Ethereum</strong></td><td>Deploy confidential smart contracts on Ethereum.</td><td><a href=".gitbook/assets/start5.png">start5.png</a></td><td><a href="getting_started/ethereum.md">ethereum.md</a></td></tr></tbody></table>

## Develop a fhEVM smart contract

Start developing fhEVM smart contracts in Solidity by exploring its core features, discovering essential guides, and learning more with user-friendly tutorials.

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Fundamentals</strong></td><td>Explore core features.</td><td><ul><li><a href="getting_started/write_contract/hardhat.md">Write contract with Hardhat</a></li><li><a href="fundamentals/first_step/types.md">Use encrypted types</a></li></ul></td><td><a href=".gitbook/assets/build1.png">build1.png</a></td></tr><tr><td><strong>Guides</strong></td><td>Learn further.</td><td><ul><li>Coming soon</li></ul></td><td><a href=".gitbook/assets/build2.png">build2.png</a></td></tr><tr><td><strong>Tutorials</strong></td><td>Learn more with tutorials.</td><td><ul><li><a href="tutorials/see-all-tutorials.md">See all tutorials</a></li></ul></td><td><a href=".gitbook/assets/build3.png">build3.png</a></td></tr></tbody></table>
<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Fundamentals</strong></td><td>Explore core features.</td><td><ul><li><a href="getting_started/write_contract/hardhat.md">Write contract with Hardhat</a></li><li><a href="fundamentals/types.md">Use encrypted types</a></li></ul></td><td><a href=".gitbook/assets/build1.png">build1.png</a></td></tr><tr><td><strong>Guides</strong></td><td>Learn further.</td><td><ul><li><a href="guides/smart-contracts/">Smart Contracts</a></li><li><a href="guides/frontend/">Frontend</a></li></ul></td><td><a href=".gitbook/assets/build2.png">build2.png</a></td></tr><tr><td><strong>Tutorials</strong></td><td>Learn more with tutorials.</td><td><ul><li><a href="tutorials/see-all-tutorials.md">See all tutorials</a></li><li><a href="tutorials/see-all-tutorials.md#start-here">Start here</a></li><li><a href="tutorials/see-all-tutorials.md#go-further">Go further</a></li></ul></td><td><a href=".gitbook/assets/build3.png">build3.png</a></td></tr></tbody></table>

## Explore more

Expand Down
37 changes: 19 additions & 18 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
# Table of contents

- [Welcome to fhEVM](README.md)
- [Whitepaper](https://github.com/zama-ai/fhevm/blob/main/fhevm-whitepaper-v2.pdf)

## Getting Started

- [Quick overview](getting_started/overview.md)
- [Key concepts and features](getting_started/key_concepts.md)
- [Repositories](getting_started/repositories.md)
- [Whitepaper](https://github.com/zama-ai/fhevm/blob/main/fhevm-whitepaper.pdf)
- [Get started](getting_started/ethereum.md)
- [Create a smart contract]()
- [Overview](getting_started/key_concepts.md)
- [Quick start](getting_started/ethereum.md)
- [First smart contract](getting_started/first_smart_contract.md)
- [Using Hardhat](getting_started/write_contract/hardhat.md)
- [Using Remix](getting_started/write_contract/remix.md)
- [Other development environment](getting_started/write_contract/others.md)
- [Repositories](getting_started/repositories.md)

## Fundamentals

- [Architecture overview](fundamentals/architecture_overview.md)
- [FHE on blockchain](fundamentals/architecture_overview/fhe-on-blockchain.md)
- [fhEVM components](fundamentals/architecture_overview/fhevm-components.md)
- [Encryption, decryption, re-encryption, and computation](fundamentals/d_re_ecrypt_compute.md)
- [Access control list](fundamentals/acl.md)
- [Configuration](fundamentals/first_step/configure.md)
- [First smart contract](fundamentals/first_step/start.md)
- [Supported types](fundamentals/first_step/types.md)
- [Operations on encrypted types](fundamentals/first_step/operations.md)
- [Encryption](fundamentals/first_step/inputs.md)
- [Decryption](fundamentals/first_step/decrypt.md)
- [Decryption in depth](fundamentals/first_step/decrypt_details.md)
- [Reencryption](fundamentals/first_step/reencryption.md)
- [ACL examples](fundamentals/first_step/acl_examples.md)
- [Configuration](fundamentals/configure.md)
- [Supported types](fundamentals/types.md)
- [Operations on encrypted types](fundamentals/operations.md)
- [Access Control List](fundamentals/acl/README.md)
- [ACL examples](fundamentals/acl/acl_examples.md)
- [Encrypted Inputs](fundamentals/inputs.md)
- [Decryption](fundamentals/decryption/README.md)
- [Decryption](fundamentals/decryption/decrypt.md)
- [Decryption in depth](fundamentals/decryption/decrypt_details.md)
- [Re-encryption](fundamentals/decryption/reencryption.md)

## Guides

- Smart Contracts
- [Smart contracts](guides/smart-contracts/README.md)
- [fhevm-contracts](guides/contracts.md)
- [If sentances](guides/loop.md)
- [Branching in FHE](guides/conditions.md)
- [Generate random numbers](guides/random.md)
- [Error handling](guides/error_handling.md)
- Frontend
- [Frontend](guides/frontend/README.md)
- [Build a web application](guides/frontend/webapp.md)
- [Build with Node](guides/frontend/node.md)
- [Using the CLI](guides/frontend/cli.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ There are two ways to contribute to the Zama fhEVM:

Becoming an approved contributor involves signing our Contributor License Agreement (CLA)). Only approved contributors can send pull requests, so please make sure to get in touch before you do!

## Bounty Program
## Zama Bounty Program

Contribute and earn rewards:
Solve challenges and earn rewards:

- [bounty-program](https://github.com/zama-ai/bounty-program) - Zama's FHE Bounty Program
17 changes: 10 additions & 7 deletions docs/developer/roadmap.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Roadmap
# Development roadmap

This document gives an preview of the upcoming features of fhEVM. In addition to what's listed here, you can [submit your feature request](https://github.com/zama-ai/fhevm/issues/new?template=feature-request.md) on GitHub.

## Features

| name | description | ETA |
| ---------------- | ----------------------------------------------------------- | ------ |
| Foundry template | [ Forge ](https://book.getfoundry.sh/reference/forge/forge) | Q1 '25 |
| Name | Description | ETA |
| ---------------- | --------------------------------------------------------- | ------ |
| Foundry template | [Forge](https://book.getfoundry.sh/reference/forge/forge) | Q1 '25 |

## Operations

| name | function name | type | ETA |
| Name | Function name | Type | ETA |
| --------------------- | ------------------ | ------------------ | ----------- |
| Signed Integers | `eintX` | | Coming soon |
| Add w/ overflow check | `TFHE.safeAdd` | Binary, Decryption | Coming soon |
Expand All @@ -19,5 +21,6 @@
| Rem | `TFHE.rem` | Binary | - |
| Set inclusion | `TFHE.isIn()` | Binary | - |

> **_NOTE 1:_** Random encrypted integers that are generated fully on-chain. Currently, implemented as a mockup by using a PRNG in the plain.
> Not for use in production!
{% hint style="info" %}
Random encrypted integers that are generated fully on-chain. Currently, implemented as a mockup by using a PRNG in the plain. Not for use in production!
{% endhint %}
48 changes: 22 additions & 26 deletions docs/fundamentals/acl.md → docs/fundamentals/acl/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Access control list (ACL) overview
# Access Control List

This document describes the Access Control List (ACL) system in fhEVM, a core feature that governs access to encrypted data. The ACL ensures that only authorized accounts or contracts can interact with specific ciphertexts, preserving confidentiality while enabling composable smart contracts. This overview provides a high-level understanding of what the ACL is, why it's essential, and how it works.

Expand All @@ -10,36 +10,34 @@ The ACL is a permission management system designed to control who can access, co

Encrypted data in fhEVM is entirely confidential, meaning that without proper access control, even the contract holding the ciphertext cannot interact with it. The ACL enables:

- **Granular Permissions**: Define specific access rules for individual accounts or contracts.
- **Secure Computations**: Ensure that only authorized entities can manipulate or decrypt encrypted data.
- **Gas Efficiency**: Optimize permissions using transient access for temporary needs, reducing storage and gas costs.
- **Granular permissions**: Define specific access rules for individual accounts or contracts.
- **Secure computations**: Ensure that only authorized entities can manipulate or decrypt encrypted data.
- **Gas efficiency**: Optimize permissions using transient access for temporary needs, reducing storage and gas costs.

## How does the ACL work?

### Types of access

1. **Permanent Allowance**:

- Configured using `TFHE.allow(ciphertext, address)`.
- Grants long-term access to the ciphertext for a specific address.
- Stored in a dedicated contract for persistent storage.

2. **Transient Allowance**:
- Configured using `TFHE.allowTransient(ciphertext, address)`.
- Grants access to the ciphertext only for the duration of the current transaction.
- Stored in transient storage, reducing gas costs.
- Ideal for temporary operations like passing ciphertexts to external functions.
- **Permanent allowance**:
- Configured using `TFHE.allow(ciphertext, address)`.
- Grants long-term access to the ciphertext for a specific address.
- Stored in a dedicated contract for persistent storage.
- **Transient allowance**:
- Configured using `TFHE.allowTransient(ciphertext, address)`.
- Grants access to the ciphertext only for the duration of the current transaction.
- Stored in transient storage, reducing gas costs.
- Ideal for temporary operations like passing ciphertexts to external functions.

**Syntactic sugar**:

- `TFHE.allowThis(ciphertext)` is shorthand for `TFHE.allow(ciphertext, address(this))`. It authorizes the current contract to reuse a ciphertext handle in future transactions.

### Transient vs. permanent allowance

| **Allowance Type** | **Purpose** | **Storage Type** | **Use Case** |
| ------------------ | ---------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **Transient** | Temporary access during a transaction. | [Transient storage](https://eips.ethereum.org/EIPS/eip-1153) (EIP-1153) | Calling external functions or computations with ciphertexts. Use when wanting to save on gas costs. |
| **Permanent** | Long-term access across multiple transactions. | Dedicated contract storage | Persistent ciphertexts for contracts or users requiring ongoing access. |
| Allowance type | Purpose | Storage type | Use case |
| -------------- | ---------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **Transient** | Temporary access during a transaction. | [Transient storage](https://eips.ethereum.org/EIPS/eip-1153) (EIP-1153) | Calling external functions or computations with ciphertexts. Use when wanting to save on gas costs. |
| **Permanent** | Long-term access across multiple transactions. | Dedicated contract storage | Persistent ciphertexts for contracts or users requiring ongoing access. |

## Granting and verifying access

Expand All @@ -58,14 +56,12 @@ To check if an entity has permission to access a ciphertext, use functions like
- **`isAllowed`**: Verifies if a specific address has permission.
- **`isSenderAllowed`**: Simplifies checks for the current transaction sender.

---

## Practical uses of the acl
## Practical uses of the ACL

- **Confidential Parameters**: Pass encrypted values securely between contracts, ensuring only authorized entities can access them.
- **Secure Stte Management**: Store encrypted state variables while controlling who can modify or read them.
- **Privacy-Preserving Computations**: Enable computations on encrypted data with confidence that permissions are enforced.
- **Confidential parameters**: Pass encrypted values securely between contracts, ensuring only authorized entities can access them.
- **Secure state management**: Store encrypted state variables while controlling who can modify or read them.
- **Privacy-preserving computations**: Enable computations on encrypted data with confidence that permissions are enforced.

---

For a detailed explanation of the ACL's functionality, including code examples and advanced configurations, see [working with the acl](./first_step/acl_examples.md).
For a detailed explanation of the ACL's functionality, including code examples and advanced configurations, see [ACL examples](acl_examples.md).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Implementing access control with acl
# ACL examples

This page provides detailed instructions and examples on how to use and implement the ACL (Access Control List) in fhEVM. For an overview of ACL concepts and their importance, refer to the [access control list (ACL) overview](../acl.md).
This page provides detailed instructions and examples on how to use and implement the ACL (Access Control List) in fhEVM. For an overview of ACL concepts and their importance, refer to the [access control list (ACL) overview](./).

---

Expand Down Expand Up @@ -168,4 +168,4 @@ function transfer(address to, euint64 encryptedAmount) public {

---

By understanding how to grant and verify permissions, you can effectively manage access to encrypted data in your fhEVM smart contracts. For additional context, see the [ACL overview](../acl.md).
By understanding how to grant and verify permissions, you can effectively manage access to encrypted data in your fhEVM smart contracts. For additional context, see the [ACL overview](./).
Loading
Loading