From 6d1311482437bb4eb0d27e4e6e67e41da39ca6bd Mon Sep 17 00:00:00 2001 From: raychu86 Date: Tue, 11 Aug 2020 23:09:02 -0700 Subject: [PATCH 1/5] Add documentation for Aleo credits and block rewards --- documentation/aleo/concepts/02_records.md | 8 +++--- .../aleo/concepts/03_transactions.md | 8 +++--- documentation/aleo/concepts/04_blocks.md | 2 +- documentation/aleo/concepts/05_consensus.md | 10 +++++++ documentation/aleo/concepts/06_credits.md | 27 +++++++++++++++++++ .../{06_glossary.md => 07_glossary.md} | 0 6 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 documentation/aleo/concepts/06_credits.md rename documentation/aleo/concepts/{06_glossary.md => 07_glossary.md} (100%) diff --git a/documentation/aleo/concepts/02_records.md b/documentation/aleo/concepts/02_records.md index 21e3abecb..f14158ecc 100644 --- a/documentation/aleo/concepts/02_records.md +++ b/documentation/aleo/concepts/02_records.md @@ -54,7 +54,7 @@ The **record payload** is a that encodes arbitrary application information. 692575f93ebd4c58e9e6ed288d7ef2328623a8e391224b3cf24c1e65d4f0660ed5d14b78f84a259f14cb24a91fd58386 ``` -The **birth program ID** corresponds to the [birth program](06_glossary.md#birth-program) that must be satisfied when the record is created. +The **birth program ID** corresponds to the [birth program](07_glossary.md#birth-program) that must be satisfied when the record is created. ### Death Program ID @@ -62,7 +62,7 @@ The **birth program ID** corresponds to the [birth program](06_glossary.md#birth 9cb1c71986e72e36640b7fbe09d1853a37bdcbc19a406526a80e54ce37b5c1dd5d14b78f84a259f14cb24746a7fe8b01 ``` -The **death program ID** corresponds to the [death program](06_glossary.md#death-program) that must be specified when the record is spent. +The **death program ID** corresponds to the [death program](07_glossary.md#death-program) that must be specified when the record is spent. ### Serial Number Nonce @@ -70,14 +70,14 @@ The **death program ID** corresponds to the [death program](06_glossary.md#death c8d81ac0028a5643449a80c3cdf8e8f9593ca5e6bcf103b3c33606b01ea20108 ``` -The **serial number nonce** is used to generate a record [record serial number](06_glossary.md#record-serial-number) when the record is being spent. +The **serial number nonce** is used to generate a record [record serial number](07_glossary.md#record-serial-number) when the record is being spent. ### Commitment Randomness ``` 5acbd2c0475c7b4afa72173d7ed800edfc1bde235f5cf4e6c09ef70a36a48a09 ``` -The **commitment randomness** used to generate the [record commitment](06_glossary.md#record-commitment). +The **commitment randomness** used to generate the [record commitment](07_glossary.md#record-commitment). ## Advanced Topics diff --git a/documentation/aleo/concepts/03_transactions.md b/documentation/aleo/concepts/03_transactions.md index 5d6f00456..555b55b89 100644 --- a/documentation/aleo/concepts/03_transactions.md +++ b/documentation/aleo/concepts/03_transactions.md @@ -31,7 +31,7 @@ An Aleo transaction is serialized in the following format: e8a82df9d2e92758f50e52832a0b635718c253ce60962e993afebca9a726de91] ``` -The **old serial numbers** are the [serial numbers](06_glossary.md#record-serial-number) for corresponding records +The **old serial numbers** are the [serial numbers](07_glossary.md#record-serial-number) for corresponding records that were consumed by the transaction. ### New Commitments @@ -41,7 +41,7 @@ that were consumed by the transaction. 2854be536b8ba0feafd10ae0725c1f920aec6b18740607321660b872feac4700] ``` -The **new commitments** are the [commitments](06_glossary.md#record-commitment) for corresponding records that were produced by the transaction. +The **new commitments** are the [commitments](07_glossary.md#record-commitment) for corresponding records that were produced by the transaction. ### Program Commitment @@ -91,7 +91,7 @@ The **network ID** indicates the network that the transaction is included in. Fo 5b74266ae4566ca630c0ce2df1b9bec84c788c6635a40f80e1761dc1bfb0c600f720ea0c6d5e9b8a579e6f00ad6ccfdf916b96b1189c1ff470bfb77d10513703] ``` -The [randomized signatures](06_glossary.md#randomized-signature) used by the record spenders to allow for authorized delegation of transaction generation. +The [randomized signatures](07_glossary.md#randomized-signature) used by the record spenders to allow for authorized delegation of transaction generation. ### Ledger Digest @@ -129,7 +129,7 @@ The steps to create a transaction are as follows: 3. Generate the program commitment 4. Generate the local data commitment 5. Generate the transaction signatures -6. Generate the ledger digest and [ledger membership witnesses](06_glossary.md#ledger-membership-witness) for the input record commitments +6. Generate the ledger digest and [ledger membership witnesses](07_glossary.md#ledger-membership-witness) for the input record commitments 7. Generate the inner SNARK proof 8. Generate the program SNARK proofs 9. Generate the transaction proof diff --git a/documentation/aleo/concepts/04_blocks.md b/documentation/aleo/concepts/04_blocks.md index 1f3e95486..7e15a027a 100644 --- a/documentation/aleo/concepts/04_blocks.md +++ b/documentation/aleo/concepts/04_blocks.md @@ -15,7 +15,7 @@ An Aleo block is serialized in the following format: | Parameter | Type | Size (bytes) | |:----------------:|:------------------------------------------------------------------:|:------------:| | `header` | [Block Header](#components-of-a-block-header) | 503 | -|`num_transactions`| [variable_length_integer](06_glossary.md#variable-length-integer) | `variable` | +|`num_transactions`| [variable_length_integer](07_glossary.md#variable-length-integer) | `variable` | | `transactions` | \[[Transaction](03_transactions.md#components-of-a-transaction)\] | `variable` | #### Block Header diff --git a/documentation/aleo/concepts/05_consensus.md b/documentation/aleo/concepts/05_consensus.md index dce8ef6dd..57d1d3fdf 100644 --- a/documentation/aleo/concepts/05_consensus.md +++ b/documentation/aleo/concepts/05_consensus.md @@ -26,6 +26,16 @@ proofs per second that miners on Aleo contribute. A block reward is the total amount of Aleo credits rewarded to the address that mined a block. This value is the base block reward in addition to the fees paid by all transactions included in the block. +| Block Number | Reward | +|:---------------------:|:---------:| +| 0 - 3,503,999 | 150 ALEO | +| 3,504,000 - 7,007,999 | 75 ALEO | +| 7,008,000 - ∞ | 37.5 ALEO | + +Initially, each Aleo block reward is worth 150 Aleo credits. This block reward is halved after every 3,504,000 blocks, which +is approximately four years at an estimated 100 blocks per hour. After two iterations of halving the block reward, it will +remain at 37.5 for perpetuity. + ### Block Difficulty and Block Times The block time is the amount of time it takes for the network to produce a valid block. diff --git a/documentation/aleo/concepts/06_credits.md b/documentation/aleo/concepts/06_credits.md new file mode 100644 index 000000000..19bed2cd8 --- /dev/null +++ b/documentation/aleo/concepts/06_credits.md @@ -0,0 +1,27 @@ +--- +id: credits +title: Aleo Credits +--- + +Aleo credits are the currency used within Aleo. + +Aleo credits are stored and transferred through [records](02_records.md) via transactions. +Additionally, because all transactions on Aleo are fully private by default, +the ownership and amounts of Aleo credits being transferred is never revealed to the network. + +### Denominations + +Aleo credits are divisible down to 6 decimal places of precision. The two denominations are Bytes and Gates, which +represent a millionth and a thousandth of an ALEO, respectively. + + Below is a list of the named denominations and their value in ALEO. + +| Denomination | Abbreviation | Value in ALEO | +|:------------:|:------------:|:-------------:| +| Byte | AB | 0.000001 ALEO | +| Gate | AG | 0.001 ALEO | +| Aleo | ALEO | 1 ALEO | + + +There is no limit to the amount of Aleo credits in the network, but the total circulating supply is +dictated by [block rewards](05_consensus.md#block-rewards). \ No newline at end of file diff --git a/documentation/aleo/concepts/06_glossary.md b/documentation/aleo/concepts/07_glossary.md similarity index 100% rename from documentation/aleo/concepts/06_glossary.md rename to documentation/aleo/concepts/07_glossary.md From 7b0e3c740e4aaebee8abbe20a84c8c184629663e Mon Sep 17 00:00:00 2001 From: raychu86 Date: Tue, 11 Aug 2020 23:10:03 -0700 Subject: [PATCH 2/5] Update file references --- documentation/README.md | 2 +- documentation/developer/programming_model/00_model.md | 4 ++-- documentation/developer/programming_model/01_erc20.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/documentation/README.md b/documentation/README.md index 3b57ae400..57425ad0e 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -21,7 +21,7 @@ - [Transactions](./aleo/concepts/03_transactions.md) - [Blocks](./aleo/concepts/04_blocks.md) - [Consensus](./aleo/concepts/05_consensus.md) -- [Glossary](./aleo/concepts/06_glossary.md) +- [Glossary](aleo/concepts/07_glossary.md) ## Developer Preview I diff --git a/documentation/developer/programming_model/00_model.md b/documentation/developer/programming_model/00_model.md index 74a8d99f5..555639ce2 100644 --- a/documentation/developer/programming_model/00_model.md +++ b/documentation/developer/programming_model/00_model.md @@ -8,7 +8,7 @@ This section assumes that you have knowledge of [records](../../aleo/concepts/02 ## Leo Record Runtime -Each Leo `.leo` file is compiled into [program](../../aleo/concepts/06_glossary.md#program). +Each Leo `.leo` file is compiled into [program](../../aleo/concepts/07_glossary.md#program). Each program lives in a [record](../../aleo/concepts/02_records.md). Each record lives in a [transaction](../../aleo/concepts/03_transactions.md). An Aleo transaction spends two old records: `old_record_0`, `old_record_1` and creates two new records: `new_record_0`, `new_record_1`. @@ -36,7 +36,7 @@ To ensure the accuracy of input and output register state, a hash of each is sto ## Committing to Register Data. Register values are hashed and included in the [local data commitment](../../aleo/concepts/03_transactions.md#local-data-commitment). -The Leo runtime calculates the [record commitment](../../aleo/concepts/06_glossary.md#record-commitment) as well as +The Leo runtime calculates the [record commitment](../../aleo/concepts/07_glossary.md#record-commitment) as well as the local data commitment to ensure that all record data is included in the [local data root](../../aleo/concepts/03_transactions.md#ledger-digest). ## `.in` and `.out` files diff --git a/documentation/developer/programming_model/01_erc20.md b/documentation/developer/programming_model/01_erc20.md index 0aa73825c..899b90e67 100644 --- a/documentation/developer/programming_model/01_erc20.md +++ b/documentation/developer/programming_model/01_erc20.md @@ -26,8 +26,8 @@ The updated [execute](./00_model.md#registers) for our example: `old_record_0` contains a token value balance that is transferred entirely into the `new_record_0`. -* `token_debit` is the [death program](../../aleo/concepts/06_glossary.md#death-program) of `old_record_0`. -* `token_credit` is the [birth program](../../aleo/concepts/06_glossary.md#birth-program) of `new_record_0`. +* `token_debit` is the [death program](../../aleo/concepts/07_glossary.md#death-program) of `old_record_0`. +* `token_credit` is the [birth program](../../aleo/concepts/07_glossary.md#birth-program) of `new_record_0`. After `old_record_0` dies, `token_debit` outputs the token id and token value balance `(token_id, value_balance)` being transferred to `new_record_0`. From 3650b0a1ee6bf3586017bc5d2b6d75f0239b2374 Mon Sep 17 00:00:00 2001 From: raychu86 Date: Tue, 11 Aug 2020 23:38:42 -0700 Subject: [PATCH 3/5] Add documentation for Aleo network IDs --- .../getting_started/01_installation.md | 2 +- .../testnet/getting_started/02_networks.md | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 documentation/testnet/getting_started/02_networks.md diff --git a/documentation/testnet/getting_started/01_installation.md b/documentation/testnet/getting_started/01_installation.md index 554aa7606..f43cacc19 100644 --- a/documentation/testnet/getting_started/01_installation.md +++ b/documentation/testnet/getting_started/01_installation.md @@ -67,7 +67,6 @@ FLAGS: -h, --help Prints help information --is-bootnode Run the node as a bootnode (IP is hard coded in the protocol) --is-miner Start mining blocks from this node - --testnet Run the node on the testnet --no-jsonrpc Run the node without running the json rpc -q, --quiet Do not show any logging in the console @@ -78,6 +77,7 @@ OPTIONS: --mempool-interval Specify the frequency in seconds x 10 the node should fetch the mempool from sync node --min-peers Specify the minimum number of peers the node should connect to --miner-address Specify the address that will receive miner rewards + --network Run the node on a specified network id (default = 0) -d, --path Specify the node's storage path -p, --port Run the node on a specified port --rpc-password Specify a password for rpc authentication diff --git a/documentation/testnet/getting_started/02_networks.md b/documentation/testnet/getting_started/02_networks.md new file mode 100644 index 000000000..e6c98bd16 --- /dev/null +++ b/documentation/testnet/getting_started/02_networks.md @@ -0,0 +1,29 @@ +--- +id: networks +title: Aleo networks +sidebar_label: Networks +--- + +Aleo networks are delineated by a network identifier. Each network has a unique network ID that enforces +transactions are only valid in the context of their respective networks. + +Each testnet is an alternative ledger meant only for testing and designing protocols to be included +in the Aleo mainnet. The Aleo credits on each testnet is not meant to hold any value, which allows +developers to safely test circuits and experimental features. + + +### Network IDs + +Currently, Aleo has reserved the use of network id 0 for **Aleo Mainnet** and 1 for the **Aleo Testnet I**: + +| Network ID | Name | +|:----------:|:--------------:| +| 0 | Aleo Mainnet | +| 1 | Aleo Testnet I | + + +### Ports + +By default a snarkOS node is exposed at port `4130` + their network ID. For example, mainnet nodes are exposed at +port 4130, testnet 1 nodes are exposed at port 4131, and so forth. The uniqueness of ports is an additional safeguard +for node operators to connect to nodes on their particular network and run multiple networks on the same IP. \ No newline at end of file From 3209c430438674e21026623d217e8ae5288167ff Mon Sep 17 00:00:00 2001 From: Aleobot Date: Wed, 12 Aug 2020 06:39:36 +0000 Subject: [PATCH 4/5] Sync aleo documentation --- documentation/README.md | 4 +++- documentation/aleo/getting_started/00_overview.md | 4 +++- .../autogen/introduction/introduction/00_overview.md | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/documentation/README.md b/documentation/README.md index 57425ad0e..91fe9d4ef 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -21,7 +21,8 @@ - [Transactions](./aleo/concepts/03_transactions.md) - [Blocks](./aleo/concepts/04_blocks.md) - [Consensus](./aleo/concepts/05_consensus.md) -- [Glossary](aleo/concepts/07_glossary.md) +- [Aleo Credits](./aleo/concepts/06_credits.md) +- [Glossary](./aleo/concepts/07_glossary.md) ## Developer Preview I @@ -103,6 +104,7 @@ - [Testnet I.](./testnet/getting_started/00_overview.md) - [Install snarkOS](./testnet/getting_started/01_installation.md) +- [Aleo networks](./testnet/getting_started/02_networks.md) ### Chapter 10: Networking diff --git a/documentation/aleo/getting_started/00_overview.md b/documentation/aleo/getting_started/00_overview.md index 21c088e9d..14a457275 100644 --- a/documentation/aleo/getting_started/00_overview.md +++ b/documentation/aleo/getting_started/00_overview.md @@ -28,7 +28,8 @@ to compile, execute, and finalize its state autonomously. - [Transactions](./aleo/concepts/03_transactions.md) - [Blocks](./aleo/concepts/04_blocks.md) - [Consensus](./aleo/concepts/05_consensus.md) -- [Glossary](./aleo/concepts/06_glossary.md) +- [Aleo Credits](./aleo/concepts/06_credits.md) +- [Glossary](./aleo/concepts/07_glossary.md) ## Developer Preview I @@ -110,6 +111,7 @@ to compile, execute, and finalize its state autonomously. - [Testnet I.](./testnet/getting_started/00_overview.md) - [Install snarkOS](./testnet/getting_started/01_installation.md) +- [Aleo networks](./testnet/getting_started/02_networks.md) ### Chapter 10: Networking diff --git a/documentation/autogen/introduction/introduction/00_overview.md b/documentation/autogen/introduction/introduction/00_overview.md index 21c088e9d..14a457275 100644 --- a/documentation/autogen/introduction/introduction/00_overview.md +++ b/documentation/autogen/introduction/introduction/00_overview.md @@ -28,7 +28,8 @@ to compile, execute, and finalize its state autonomously. - [Transactions](./aleo/concepts/03_transactions.md) - [Blocks](./aleo/concepts/04_blocks.md) - [Consensus](./aleo/concepts/05_consensus.md) -- [Glossary](./aleo/concepts/06_glossary.md) +- [Aleo Credits](./aleo/concepts/06_credits.md) +- [Glossary](./aleo/concepts/07_glossary.md) ## Developer Preview I @@ -110,6 +111,7 @@ to compile, execute, and finalize its state autonomously. - [Testnet I.](./testnet/getting_started/00_overview.md) - [Install snarkOS](./testnet/getting_started/01_installation.md) +- [Aleo networks](./testnet/getting_started/02_networks.md) ### Chapter 10: Networking From 5db1cf0a96d9bf6fd5fb57fc3cb030196c3aada3 Mon Sep 17 00:00:00 2001 From: raychu86 Date: Wed, 12 Aug 2020 01:34:12 -0700 Subject: [PATCH 5/5] Clean up docs --- documentation/testnet/getting_started/01_installation.md | 2 +- documentation/testnet/getting_started/02_networks.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/testnet/getting_started/01_installation.md b/documentation/testnet/getting_started/01_installation.md index f43cacc19..93a6fad4a 100644 --- a/documentation/testnet/getting_started/01_installation.md +++ b/documentation/testnet/getting_started/01_installation.md @@ -77,7 +77,7 @@ OPTIONS: --mempool-interval Specify the frequency in seconds x 10 the node should fetch the mempool from sync node --min-peers Specify the minimum number of peers the node should connect to --miner-address Specify the address that will receive miner rewards - --network Run the node on a specified network id (default = 0) + --network Run the node on a specified network (default = 0) -d, --path Specify the node's storage path -p, --port Run the node on a specified port --rpc-password Specify a password for rpc authentication diff --git a/documentation/testnet/getting_started/02_networks.md b/documentation/testnet/getting_started/02_networks.md index e6c98bd16..b36ddeaec 100644 --- a/documentation/testnet/getting_started/02_networks.md +++ b/documentation/testnet/getting_started/02_networks.md @@ -25,5 +25,5 @@ Currently, Aleo has reserved the use of network id 0 for **Aleo Mainnet** and 1 ### Ports By default a snarkOS node is exposed at port `4130` + their network ID. For example, mainnet nodes are exposed at -port 4130, testnet 1 nodes are exposed at port 4131, and so forth. The uniqueness of ports is an additional safeguard +port `4130`, testnet 1 nodes are exposed at port `4131`, and so forth. The uniqueness of ports is an additional safeguard for node operators to connect to nodes on their particular network and run multiple networks on the same IP. \ No newline at end of file