Skip to content

Commit

Permalink
Merge pull request #15 from AleoNet/fix-issues
Browse files Browse the repository at this point in the history
Fix issues
  • Loading branch information
zklimaleo authored Jan 24, 2025
2 parents edc06fd + e3f8770 commit 9b0a14e
Show file tree
Hide file tree
Showing 59 changed files with 129 additions and 166 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 @@ -9,6 +9,7 @@ sidebar_label: Public vs. Private State
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.

In even more recent times, we have seen several Ethereum virtual machine-compatible Layer-2 chains that have employed zero-knowledge cryptography techniques to solve Ethereum's scalability issues. They use zk-rollups, which compute multiple state changes off-chain, followed by posting the summary of those transactions and proofs on-chain. This helps to reduce transaction fees significantly. However, all of them utilize zero-knowledge technology mainly for scalability reasons.
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions documentation/concepts/network/network/consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ 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).

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

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.

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

Validators play a crucial role in securing the network through AleoBFT (to be discussed further below) and must have at least 10 million AC of stakes to get started. The main function of validators is to verify ZK proofs and validate transactions before including them in a confirmed block.

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


<!-- 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
10 changes: 5 additions & 5 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 -->
- [Client](../network/client.md)
- [Prover](../network/provers.md)
- [Validator](../network/validators.md)



## Who uses snarkOS ?
Everyone involved in Aleo uses snarkOS both to submit transactions and to fetch their data.
Expand Down
15 changes: 7 additions & 8 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
Every component that forms Aleo is open-sourced and welcomes contributions of all kinds including [this documentation](./01_documentation_contribute.md). Each component has its own specific contribution guidelines, which are provided below for easy reference:
- [DevDocs](./01_documentation_contribute.md) - 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 -->
- [SnarkOS](./02_snarkos_contribute.md) - The operating system or blockchain node client of Aleo
- [SnarkVM](./03_snarkvm_contribute.md) - The virtual machine that performs verifiable computation
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 -->
2 changes: 1 addition & 1 deletion documentation/guides/aleo/03_language.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Aleo instructions currently only support fixed-length static arrays.

### Record

A [record](../../concepts/beginner/02_records.md) type is declared as `record {name}:`.
A [record](../../concepts/fundamentals/02_records.md) type is declared as `record {name}:`.
Records contain component declarations `{name} as {type}.{visibility};`.
Record data structures must contain the `owner` declaration as shown below.
When passing a record as input to a program function the `_nonce as group.{visibility}` declaration is also required.
Expand Down
2 changes: 1 addition & 1 deletion documentation/guides/aleo/05_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can print the list of commands by running `snarkvm --help`
[//]: # (5. [aleo deploy]&#40;#6-aleo-deploy&#41;)

The Aleo private key, view key, and address will be printed to console.
See [`concepts/accounts`](../../concepts/beginner/00_accounts.md) for more information.
See [`concepts/accounts`](../../concepts/fundamentals/00_accounts.md) for more information.

## `snarkvm new`

Expand Down
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
6 changes: 3 additions & 3 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.
To get started quickly and see Aleo in action, we recommend proceeding to the [Quick Start Guide](./00_quick_start.md). 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 -->
16 changes: 9 additions & 7 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).
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](./00_getting_started.md).


<!-- 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,17 +103,19 @@ 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/)
<!-- markdown-link-check-disable -->
- [Aleoscan](https://testnet.aleoscan.io/)
<!-- markdown-link-check-enable -->
- [Aleo123](https://testnet.aleo123.io/)
- [Aleo.Info](https://testnet.aleo.info/)

## 6. Execute your test application

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
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
Loading

0 comments on commit 9b0a14e

Please sign in to comment.