Skip to content

Commit

Permalink
fix issues #11 #12 #13 #14
Browse files Browse the repository at this point in the history
  • Loading branch information
zklimaleo committed Jan 24, 2025
1 parent edc06fd commit e0aa09b
Show file tree
Hide file tree
Showing 46 changed files with 100 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It was formalised and implemented in the Aleo Network as [ARC-0002](https://gith

## **AVM’s Architecture and Design**

The AVM is virtual machine that operates on a last-in, first-out (LIFO) principle where data is stacked and the most recently added data is the first to be accessed or removed. This design is conducive to the execution of complex arithmetic circuits that are essential for the privacy-preserving features of Aleo. The AVM's architecture is designed to support the execution of private applications by leveraging zero-knowledge proofs. It uses Leo (high-level programming language), which compiles down into an intermediate representation known as AVM opcodes. These opcodes are then used to construct the R1CS, which are essential for generating zero-knowledge proofs. Check the full list [here](../../../guides/aleo/04_opcodes.md)
The AVM is virtual machine that operates on a last-in, first-out (LIFO) principle where data is stacked and the most recently added data is the first to be accessed or removed. This design is conducive to the execution of complex arithmetic circuits that are essential for the privacy-preserving features of Aleo. The AVM's architecture is designed to support the execution of private applications by leveraging zero-knowledge proofs. It uses Leo (high-level programming language), which compiles down into an intermediate representation known as AVM opcodes. These opcodes are then used to construct the R1CS, which are essential for generating zero-knowledge proofs. Check the full list [here](../../guides/aleo/04_opcodes.md)

The AVM architecture can be broken down into several key components and characteristics:

Expand Down
File renamed without changes.
79 changes: 0 additions & 79 deletions documentation/concepts/beginner/03A_transaction_fees.md

This file was deleted.

38 changes: 38 additions & 0 deletions documentation/concepts/fundamentals/03A_transaction_fees.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
id: transaction_fees
title: Transaction Fees
sidebar_label: Transaction Fees
---

# Transaction Fees

A **transaction fee** is a fee that is required in order to process a transaction on the Aleo network. Below, we describe the way in which **Deploy** and **Execute** transactions are priced. At the time of writing, puzzle solutions are free.

## Aleo Credits Denomination Table

|Denomination|Size of Transaction|Value|Example|
|:-:|:-:|:-:|:-:|
|`microcredit`|Byte|1|Smallest denomination|
|`millicredit`|Kilobyte (KB)|1000 microcredits|Most transactions average between 3 and 10 millicredits|
|`credit`|Megabyte (MB)|1000 millicredits|Largest denomination|

## Types of Transaction Fees
### Deployment Base Fee
This is what you pay for deploying a program to the Aleo network. Deployment fees consist of the following parts:

- There is a size cost, determined by the amount of raw bytes of your program.
- There is a namespace cost, the smaller your program name the more you pay. There is no namespace cost if your program name is 10 characters or longer.
- There is a synthesize cost to process your program. The more complicated operations which your program has, the more time it takes for the network to convert this to a circuit to create zero knowledge proofs for.

### Execution Base Fee
This is what you pay for executing program functions on the Aleo network.

- There is a size cost, determined by the amount of raw bytes of your program. A quadratic fee kicks in above 5 KB.
- There is a finalize cost, determined by the amount of operations in your function's finalize scope.
- There is no execution cost, because verifying the associated zero knowledge proof is cheap.

### Priority Fee
Priority fees are optional fees which can help speed up the processing of your transaction during high traffic. They are not yet supported, but will soon be.

### Estimating fees
The fee determination logic is defined in [a file called cost.rs](https://github.com/ProvableHQ/snarkVM/blob/mainnet/synthesizer/process/src/cost.rs#L26). If you want to quickly estimate fees using a website, [provable.tools](https://www.provable.tools/develop) has some limited support.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ sidebar_label: Public vs. Private State
---

## Introduction
<!-- markdown-link-check-disable -->

The concept of Zero Knowledge proofs was first introduced in 1985 in the paper [The Knowledge Complexity of Interactive Proof Systems](https://epubs.siam.org/doi/10.1137/0218012?utm_source=the+new+stack&utm_medium=referral&utm_content=inline-mention&utm_campaign=tns+platform). However, it is only in recent years that the groundbreaking technology has been feasible to be applicable to blockchains.
<!-- markdown-link-check-enable -->


Zcash was one of the earliest chains to utilize the power of zero knowledge proofs to provide privacy to an account's balance. Unlike traditional cryptocurrencies like Bitcoin, where transaction details are publicly visible on the blockchain, Zcash enables users to shield their transactions, rendering them completely opaque to outside observers. It utilizes zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge), a type of zero-knowledge proof system that allows parties to verify the validity of a computation without revealing the underlying data.

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions documentation/concepts/network/network/consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Check this [FAQs](https://aleo.org/faq/) out in regards of the groups mentioned

Everyone can become a staker by locking up their Aleo Credits for a certain period of time to support the security of the Aleo Network. While the minimum amount to stake is 1 AC, stakers will only start earning rewards once they have staked at least 10 ACs. Stakers help lower the barriers to becoming a validator by delegating their stakes to validators of their choice.

<!-- markdown-link-check-disable -->

Learn more about **stakers** at [here](./stakers).

Provers are required to run specialized GPUs and CPUs to generate solutions in SNARK proofs for PoSW (Proof-of-Succinct-Work) coinbase puzzles. They are rewarded based on their efficiency and effectiveness in generating solutions to the puzzles. It's important to note that provers do not produce blocks, but they are incentivized to improve the process of generating proofs, reducing costs, and decreasing latency for program execution.
Expand All @@ -27,7 +27,7 @@ Validators play a crucial role in securing the network through AleoBFT (to be di

Learn more about **validators** at [here](./validators).

<!-- markdown-link-check-enable -->


## AleoBFT
AleoBFT is a new hybrid architecture for consensus. It is a DAG-based BFT protocol inspired by Narwhal and Bullshark. It incentivises validators to preserve network liveness and provers to scale proving capacity for Aleo ecosystem.
Expand Down
4 changes: 2 additions & 2 deletions documentation/concepts/network/zkcloud/snarkos.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ An Aleo node can be run in three modes.

<!-- ### [Client](../network/) -->

<!-- markdown-link-check-disable -->

- [Client](../network/client)
- [Prover](../network/provers)
- [Validator](../network/validators)

<!-- markdown-link-check-enable -->


## Who uses snarkOS ?
Everyone involved in Aleo uses snarkOS both to submit transactions and to fetch their data.
Expand Down
7 changes: 3 additions & 4 deletions documentation/contribute/00_contribution_guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ Once a proposal is up:
5. The relevant parties should complete the implementation. Updates can be made to the ARC as needed through new PRs, which do not need votes.
6. Once the implementation is finalized, the status will change from "approved" to "completed."

<!-- markdown-link-check-disable -->

### Contributing to Aleo
Every component that forms Aleo is open-sourced and welcomes contributions of all kinds including [this documentation](./documentation_contribute). Each component has its own specific contribution guidelines, which are provided below for easy reference:
- [DevDocs](./documentation_contribute) - This developer documentation
- [Leo](https://docs.leo-lang.org/leo/resources#contributing) - Rust-based DSL to write programs on Aleo
- [Provable SDK](https://github.com/ProvableHQ/sdk/tree/testnet3/sdk) - Javascript/Typescript tools for creating zero knowledge apps
- [Create-leo-app](https://github.com/ProvableHQ/sdk/tree/testnet3/create-leo-app) - Scaffolding your first Aleo project
- [Provable SDK](https://github.com/ProvableHQ/sdk/tree/mainnet/sdk) - Javascript/Typescript tools for creating zero knowledge apps
- [Create-leo-app](https://github.com/ProvableHQ/sdk/tree/mainnet/create-leo-app) - Scaffolding your first Aleo project
- [Aleo Instruction](../guides/aleo/00_aleo_overview.md) - IR that Leo language compiles into
- [SnarkOS](./snarkos_contribute) - The operating system or blockchain node client of Aleo
- [SnarkVM](./snarkvm_contribute) - The virtual machine that performs verifiable computation
<!-- markdown-link-check-enable -->
3 changes: 1 addition & 2 deletions documentation/contribute/01_documentation_contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: documentation_contribute
title: DevDocs Contribution
sidebar_label: DevDocs Contribution
---
<!-- markdown-link-check-disable -->

Welcome to the Aleo DevDocs contribution guide! We invite you to help improve our documentation, making it more comprehensive and up-to-date. Your contributions, big or small, are valuable in enhancing the Aleo ecosystem for developers. This guide will walk you through the process of contributing effectively to our documentation.

## Providing Feedback
Expand Down Expand Up @@ -77,4 +77,3 @@ Your feedback helps us identify areas for improvement and ensures the documentat
If you have any questions or need assistance, please don't hesitate to open an issue in the [welcome](https://github.com/AleoNet/welcome) repository or reach out to the maintainers.

Thank you for contributing to the Aleo documentation!
<!-- markdown-link-check-enable -->
4 changes: 2 additions & 2 deletions documentation/guides/aleo/07_tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Aleo instructions support for Sublime's LSP plugin is provided through a languag

### Install

<!-- markdown-link-check-disable -->

1. Install [LSP](https://packagecontrol.io/packages/LSP) and [LSP-leo](https://packagecontrol.io/packages/LSP-leo) from Package Control.
2. Restart Sublime.
<!-- markdown-link-check-enable -->


### Usage

Expand Down
4 changes: 2 additions & 2 deletions documentation/guides/introduction/00_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ To verify if you have snarkOS, open your terminal and type `snarkos`. You should
![snarkOS](./images/snarkos-cli.png)


<!-- markdown-link-check-disable -->


## 3. Next Steps

Once you have successfully completed the installation of both Leo and snarkOS, you are ready to begin your journey with Aleo.

To get started quickly and see Aleo in action, we recommend proceeding to the [Quick Start Guide](./quick_start). This guide will walk you through creating your first Aleo application, deploying it to the network, and executing it. This hands-on experience will give you a practical understanding of the Aleo platform's core features and workflow.

<!-- markdown-link-check-enable -->

12 changes: 6 additions & 6 deletions documentation/guides/introduction/00_quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ sidebar_label: Quick Start
---
Learn how to deploy and execute a basic "hello world!" program on Aleo's network using Leo and snarkOS.

<!-- markdown-link-check-disable -->


## 1. Prerequisites

Make sure you have both `Leo` and `snarkOS` installed on your machine. If you have not installed these yet, you can do so by following the instructions [here](./getting_started).

<!-- markdown-link-check-enable -->


## 2. Generate your test keys and wallet address

Expand All @@ -34,7 +34,7 @@ Save your **Address**, **View Key**, and **Private Key** in a safe place, you'll
:::

## 3. Seeding your wallet with credits
<!-- markdown-link-check-disable -->


To seed your wallet, you'll need to request credits from faucet provided by the ecosystem wallets at:
* [Leo Wallet Discord](https://www.leo.app/) (Scroll to bottom of the landing page to find Discord invite)
Expand All @@ -43,7 +43,7 @@ To seed your wallet, you'll need to request credits from faucet provided by the

The credits received from faucet will be public credits, which means they are publicly visible on the Aleo network before converting to private credits.

<!-- markdown-link-check-enable -->


:::tip
While waiting for the credits to be sent to your wallet, you can proceed to the next step of creating a Leo application.
Expand Down Expand Up @@ -103,7 +103,7 @@ leo deploy
```

You should have seen a confirmation that your Aleo application was deployed in the form of a transaction ID that looks like the following `at1rkkpqu5k4rt86zzccczw6cxeyvrl7hxydvvv7dhl7zr7p9w40c8s70kwm8`. Copy your transaction ID to view the details of your deployment transaction on the Aleo block explorers:
<!-- markdown-link-check-disable -->

- [Provable Explorer](https://testnet.explorer.provable.com/)
- [Aleoscan](https://testnet.aleoscan.io/)
- [Aleo123](https://testnet.aleo123.io/)
Expand All @@ -113,7 +113,7 @@ You should have seen a confirmation that your Aleo application was deployed in t

Finally, it is time to execute the application you just deployed!

<!-- markdown-link-check-enable -->


Make sure you are in the root of your Leo application and paste the following command in your terminal

Expand Down
4 changes: 2 additions & 2 deletions documentation/guides/leo/00_leo_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ The `leo query` command supports querying different types of data from your loca
## Testing with Aleo Testnet
The Aleo Testnet closely mimics the environment of the mainnet, providing a realistic testing scenario for developers. One important note to keep in mind is that since the Testnet is continuously running and the network identifies each program with its unique ID, developers cannot redeploy a program with the exact same ID once it has been deployed to the Testnet.
<!-- markdown-link-check-disable -->
To start testing with the Aleo Testnet, simply make a REST API request to either the public endpoint at https://api.explorer.provable.com/v1/testnet or use a private endpoint provided by infrastructure providers. For further information, refer to the [default REST API endpoints](../../references/apis/01_latest_height.md) available from a validator node.
<!-- markdown-link-check-enable -->
6 changes: 3 additions & 3 deletions documentation/guides/sdk/00_sdk_overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
id: sdk
id: overview
title: Provable SDK
sidebar_label: Overview
---
Expand Down Expand Up @@ -77,9 +77,9 @@ The official Aleo Python SDK providing tools for creating zero knowledge apps. I
Both libraries are in an early development stage. They can be installed through `pip install aleo` respectively `pip install zkml`. The
[documentation on the aleo library](./python/00_aleo_sdk.md) and the [documentation on the zkml library](./python/01_zkml_transpiler.md) provide more information on installation and usage.

<!-- markdown-link-check-disable -->

Source: [`python-sdk`](https://github.com/provablehq/python-sdk)
<!-- markdown-link-check-enable -->


## 📚 Documentation

Expand Down
8 changes: 4 additions & 4 deletions documentation/guides/sdk/create-leo-app/01_create_leo_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ npm install
npm run install-leo
npm run dev
```
<!-- markdown-link-check-disable -->


This installs all the required modules and also Leo, our statically-typed programming language built for writing private applications. Lastly, we've initialized a local instance of your React application at http://localhost:5173.

Expand All @@ -35,7 +35,7 @@ The `helloworld` folder is your Leo program. This is where you’ll use Leo.

Navigate to http://localhost:5173 and open up the developer console in your browser

<!-- markdown-link-check-enable -->


Hit “execute helloworld.aleo”.

Expand All @@ -60,11 +60,11 @@ Write down your private key, view key, and public address in a safe place. Treat
### Faucet

Once you have your account, use our faucet to get some Aleo credits! Our ecosystem wallets have faucets that you can use to get credits.
<!-- markdown-link-check-disable -->

* [Leo Wallet Discord](https://www.leo.app/) (Scroll to bottom of the landing page to find Discord invite)
* [Puzzle Wallet Faucet](https://dev.puzzle.online/faucet)
* [Soter Wallet Faucet](https://faucetbeta.sotertech.io/)
<!-- markdown-link-check-enable -->


### Leo & `helloworld`

Expand Down
12 changes: 6 additions & 6 deletions documentation/guides/sdk/python/00_aleo_sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ title: Provable Python SDK
sidebar_label: Provable Python SDK
---

<!-- markdown-link-check-disable -->

[![github]](https://github.com/provablehq/python-sdk/tree/master/sdk)
<!-- markdown-link-check-enable -->


[github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github

Expand All @@ -29,9 +29,9 @@ Ensure you have Python 3.11 or newer installed. If your operating system is supp
pip3 install aleo
```

<!-- markdown-link-check-disable -->

Alternatively, you can also install from a `.whl` file, either from the [GitHub repository](https://github.com/provablehq/python-sdk/tree/master/sdk/target/wheels), or by building it yourself. For the installation, use a command like this:
<!-- markdown-link-check-enable -->


```bash
pip3 install aleo-0.0.3-cp311-cp311-macosx_11_0_arm64.whl
Expand All @@ -47,13 +47,13 @@ private_key = aleo.PrivateKey()
print(private_key.to_string())
```

<!-- markdown-link-check-disable -->

### Build Instructions
To build it, first clone the [GitHub repository](https://github.com/provablehq/python-sdk/tree/master/sdk). Then, run the following command:
```bash
bash build.sh
```
<!-- markdown-link-check-enable -->


After successful building, you will find a new `.whl` file in the `target/wheels` directory that you can install using the command from above.

Expand Down
Loading

0 comments on commit e0aa09b

Please sign in to comment.