Skip to content

Commit

Permalink
Fix explorer link and remove usage of testnet3
Browse files Browse the repository at this point in the history
  • Loading branch information
d0cd committed Aug 1, 2024
1 parent fd1069e commit be2a7dd
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 44 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This repository serves as a guide for getting started with building on Aleo. Her
- [🦁 Leo](https://leo-lang.org/) - A programming language for zero-knowledge proofs.
- [🛝 Leo Playground](http://play.leo-lang.org) - A browser interface to the Leo compiler for rapid ZK development and testing.
- [🧰 Aleo SDK](https://provable.tools/) - A Software Development Kit (SDK) for Zero-Knowledge Transactions.
- [🔭 Aleo Explorer](https://aleo.network) - Validate and broadcast on Aleo Testnet III
- [🔭 Aleo Explorer](https://explorer.aleo.org) - Validate and broadcast on Aleo Testnet Beta

For help setting up, join us on [Discord](https://discord.com/invite/aleo) to ask questions and help others answer their questions.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Clone the `snarkOS` repository
git clone https://github.com/AleoHQ/snarkOS.git --depth 1
cd snarkOS

# Switch to the testnet3 branch
git checkout testnet3
# Switch to the mainnet branch
git checkout mainnet

[For Ubuntu users] A helper script to install dependencies is available. From the snarkOS directory, run:

Expand Down Expand Up @@ -325,7 +325,7 @@ Although this command is used to run a function, it also builds your program.
## Deploy

```
snarkos developer deploy {$PROGRAM_NAME} --private-key {$PRIVATE_KEY} --query "https://api.explorer.aleo.org/v1" --path ".build/" --broadcast "https://api.explorer.aleo.org/v1/testnet3/transaction/broadcast" --priority-fee 0
snarkos developer deploy {$PROGRAM_NAME} --private-key {$PRIVATE_KEY} --query "https://api.explorer.aleo.org/v1" --path ".build/" --broadcast "https://api.explorer.aleo.org/v1/testnet/transaction/broadcast" --priority-fee 0
```
If successful, it should look something like
![Deploy confirmation](./images/deploy-confirmation.png)
Expand All @@ -334,9 +334,9 @@ The hash at the bottom of the image represents the transaction hash, which you c

## Execute
```
snarkos developer execute {$PROGRAM_NAME} {$TRANSITION_NAME} {$INPUT_ARGUMENTS} --private-key {$PRIVATE_KEY} --query "https://api.explorer.aleo.org/v1" --broadcast "https://api.explorer.aleo.org/v1/testnet3/transaction/broadcast"
snarkos developer execute {$PROGRAM_NAME} {$TRANSITION_NAME} {$INPUT_ARGUMENTS} --private-key {$PRIVATE_KEY} --query "https://api.explorer.aleo.org/v1" --broadcast "https://api.explorer.aleo.org/v1/testnet/transaction/broadcast"
```
If successful, it should look something like
![Execute confirmation](./images/execute-confirmation.png)

The hash at the bottom of the image represents the transaction hash, which you can look up the transaction details on an [explorer](https://explorer.aleo.org)
The hash at the bottom of the image represents the transaction hash, which you can look up the transaction details on an [explorer](https://explorer.aleo.org)
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Record private data is encoded as a list of field elements which is encrypted wi

This process enables users to securely and privately transfer data and values across the network. A key aspect of this system is that only the sender and receiver, who each possess their respective view keys, can unlock and access the contents of these records. This safeguard ensures that sensitive information is protected from unauthorized access while maintaining transparency and trust in the transaction process, providing a robust foundation for secure communications.

The code for encryption and decryption is available in the snarkVM sections, which can be accessed at the [encrypt](https://github.com/AleoHQ/snarkVM/blob/testnet3/circuit/program/src/data/record/encrypt.rs) and [decrypt](https://github.com/AleoHQ/snarkVM/blob/testnet3/circuit/program/src/data/record/decrypt.rs) pages, respectively.
The code for encryption and decryption is available in the snarkVM sections, which can be accessed at the [encrypt](https://github.com/AleoNet/snarkVM/blob/mainnet/circuit/program/src/data/record/encrypt.rs) and [decrypt](https://github.com/AleoNet/snarkVM/blob/mainnet/circuit/program/src/data/record/decrypt.rs) pages, respectively.

Additionally, users can decrypt their encrypted records using their view key via a web interface available at [Provable Tools](https://www.provable.tools/record). This feature allows for the practical application of decryption processes directly through a browser.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Provers are an integral part of the Aleo network but do not participate in Aleo'

In the long term, the *CoinbaseReward* incentive that Provers can obtain is directly proportional to their computational power relative to the entire network. The economic incentive for Provers is similar to PoW in Bitcoin, but unlike Bitcoin, Aleo's network doesn't employ a winner-takes-all strategy. As long as the *ProverSolution* satisfies the *ProofTarget*, it is accepted by the network. This approach ensures fairer and more stable rewards for Provers. It's noteworthy that unlike the *BlockReward* for validators, the *CoinbaseReward* decreases over time, reducing by 10% annually until there are no *CoinbaseReward* incentives after 10 years.

Users can view CoinbaseReward, BlockReward, and PuzzleReward through the [browser](https://testnet3.aleoscan.io/).

> PuzzleReward = CoinbaseReward * 2/3
>
> BlockReward = 23.8 + CoinbaseReward * 1 / 3
Expand All @@ -28,4 +26,4 @@ Besides requiring ProverSolutions to be valid, the network also demands that the

### Become a Prover Node

Becoming a Prover node does not require staking or authorization, anyone can [start a Prover node](https://github.com/AleoHQ/snarkOS?tab=readme-ov-file#32-run-an-aleo-prover).
Becoming a Prover node does not require staking or authorization, anyone can [start a Prover node](https://github.com/AleoHQ/snarkOS?tab=readme-ov-file#32-run-an-aleo-prover).
2 changes: 1 addition & 1 deletion documentation/aleo/02_hello.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ You can find your development application address inside the `.env` file:
```json
{
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpFsQNXJwdvjKs9bRsM91KcwJW1gW4CDtF3FJbgVBAvPds
}
```
Expand Down
2 changes: 1 addition & 1 deletion documentation/aleo/03_language.md
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ The `self.caller` command returns the address of the immediate caller of the pro
The examples in this section will use the following environment.

```bash title=".env"
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpE37QxQynZuEGg3XxYrTuvhzWbkVaN5NgzCdEGzS43Ms5 # user private key
ADDRESS=aleo1p2h0p8mr2pwrvd0llf2rz6gvtunya8alc49xldr8ajmk3p2c0sqs4fl5mm # user address
```
Expand Down
4 changes: 2 additions & 2 deletions documentation/concepts/00_accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ a sequence of field elements and outputs a field element. The output is uniforml
### HashToScalar

An instantiation of HashToField that output elements in the scalar field <code>F<sub>scalar</sub></code>.
[source code](https://github.com/AleoHQ/snarkVM/blob/testnet3/console/algorithms/src/poseidon/hash_to_scalar.rs#L24)
[source code](https://github.com/AleoNet/snarkVM/blob/mainnet/console/algorithms/src/poseidon/hash_to_scalar.rs#L24)

### EncodeToF

Expand Down Expand Up @@ -147,7 +147,7 @@ Given global instantiated Aleo parameters and subroutines.

3.`private_key` = (`seed`, (`sk_sig`, `r_sig`))

[source code](https://github.com/AleoHQ/snarkVM/blob/testnet3/console/account/src/private_key/try_from.rs)
[source code](https://github.com/AleoNet/snarkVM/blob/mainnet/console/account/src/private_key/try_from.rs)

#### Generate a View Key
1. `(sk_sig, r_sig)` = `private_key`
Expand Down
2 changes: 1 addition & 1 deletion documentation/leo/05_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Use this command to add a dependency to your program. This is a precursor to bei
To add an already deployed program as a project dependency.
`{$PROGRAM}` should be the name of the program to add as a dependency.
```bash
leo add {$PROGRAM} // {$NETWORK} defaults to `testnet3`.
leo add {$PROGRAM} // {$NETWORK} defaults to `testnet`.
leo add -n {$NETWORK} {$PROGRAM} // To pull from a custom network.
```
Expand Down
4 changes: 2 additions & 2 deletions documentation/leo/07_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ Reducing the source code that caused the issue to a bare minimum is always very

## Make a Pull Request

Start by forking off of the `testnet3` branch to make your changes. Commit messages should clearly explain why and what you changed.
Start by forking off of the `mainnet` branch to make your changes. Commit messages should clearly explain why and what you changed.

If you need to pull in any changes from the `testnet3` branch after making your fork (for example, to resolve potential merge conflicts),
If you need to pull in any changes from the `mainnet` branch after making your fork (for example, to resolve potential merge conflicts),
please avoid using git merge and instead, git rebase your branch. Rebasing will help us review your changes easily.

### Tools Required
Expand Down
6 changes: 3 additions & 3 deletions documentation/leo/10_basic_bank.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Let's make some bank transactions. We'll take the role of the bank and issue 100

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpHtqVWT6fSHgUMNxsuVf7eaR6id2cj7TieKY1Z8CP5rCD
" > .env

Expand All @@ -84,7 +84,7 @@ Now, let's have the user deposit 50 of their tokens with the bank. We'll take th

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkp75cpr5NNQpVWc5mfsD9Uf2wg6XvHknf82iwB636q3rtc
" > .env

Expand All @@ -109,7 +109,7 @@ Now, let's have the bank withdraw all tokens after 15 periods. Let's switch to t

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpHtqVWT6fSHgUMNxsuVf7eaR6id2cj7TieKY1Z8CP5rCD
" > .env

Expand Down
8 changes: 4 additions & 4 deletions documentation/leo/11_vote.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Let's propose a new ballot. Take on the role of the proposer and run the propose

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkp8wKHF9zFX1j4YJrK3JhxtyKDmPbRu9LrnEW8Ki56UQ3G
" > .env

Expand All @@ -93,7 +93,7 @@ Let's create a new private ticket to make a vote. Take on the role of voter 1 an

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpHmSu9zuhyuCJqVfQE8p82HXpCTLVa8Z2HUNaiy9mrug2
" > .env

Expand All @@ -118,7 +118,7 @@ Let's create a new private ticket for voter 2. Take on the role of voter 1 and r

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkp6NHwbT7PkpnEFeBidz5ZkZ14W8WXZmJ6kjKbEHYdMmf2
" > .env

Expand All @@ -137,4 +137,4 @@ leo run disagree "{

## <a id="step3"></a> How votes are tallied

Votes on the ticket are private. But the sum total of the agreements and disagreements are shown on-chain in the public mapping. You can query this data on-chain.
Votes on the ticket are private. But the sum total of the agreements and disagreements are shown on-chain in the public mapping. You can query this data on-chain.
12 changes: 6 additions & 6 deletions documentation/leo/12_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Let's play Alice. Swap in her private key and publicly mint 100 tokens.

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkp1w8PTxrRgGfAtfKUSq43iQyVbdQHfhGbiNPEg2LVSEXR
" > .env

Expand All @@ -63,7 +63,7 @@ Now let's privately mint 100 tokens for Bob. Switch to Bob's private key and pri

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpFo72g7N9iFt3JzzeG8CqsS5doAiXyFvNCgk2oHvjRCzF
" > .env

Expand All @@ -78,7 +78,7 @@ Let's publicly transfer 10 tokens from Alice to Bob. Swap the private key back t

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkp1w8PTxrRgGfAtfKUSq43iQyVbdQHfhGbiNPEg2LVSEXR
" > .env

Expand All @@ -93,7 +93,7 @@ Let's privately transfer 20 tokens from Bob to Alice. Switch to Bob's private ke

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpFo72g7N9iFt3JzzeG8CqsS5doAiXyFvNCgk2oHvjRCzF
" > .env

Expand All @@ -112,7 +112,7 @@ Let's convert 30 of Alice's public tokens into 30 private tokens for Bob. Switch

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkp1w8PTxrRgGfAtfKUSq43iQyVbdQHfhGbiNPEg2LVSEXR
" > .env

Expand All @@ -127,7 +127,7 @@ Let's convert 40 of Bob's private tokens into 40 public tokens for Alice. Switch

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpFo72g7N9iFt3JzzeG8CqsS5doAiXyFvNCgk2oHvjRCzF
" > .env

Expand Down
12 changes: 6 additions & 6 deletions documentation/leo/14_battleship.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ With player 1's private key, they initialize the board with the placement of 4 s

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpGKaJY47BXb6knSqmT3JZnBUEGBDFAWz2nMVSsjwYpJmm
" > .env

Expand Down Expand Up @@ -157,7 +157,7 @@ We switch our .env to player 2's private key and similarly run initialize_board

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkp86FNGdKxjgAdgQZ967bqBanjuHkAaoRe19RK24ZCGsHH
" > .env

Expand Down Expand Up @@ -249,7 +249,7 @@ We switch the .env back to player 1, and we run the transition function play.

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpGKaJY47BXb6knSqmT3JZnBUEGBDFAWz2nMVSsjwYpJmm
" > .env

Expand Down Expand Up @@ -305,7 +305,7 @@ We switch the .env back to player 2, and we run the transition function play.

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkp86FNGdKxjgAdgQZ967bqBanjuHkAaoRe19RK24ZCGsHH
" > .env

Expand Down Expand Up @@ -366,7 +366,7 @@ We switch the .env back to player 1, and we run the transition function play.

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkpGKaJY47BXb6knSqmT3JZnBUEGBDFAWz2nMVSsjwYpJmm
" > .env

Expand Down Expand Up @@ -434,7 +434,7 @@ We switch the .env back to player 2, and we run the transition function play.

```bash
echo "
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkp86FNGdKxjgAdgQZ967bqBanjuHkAaoRe19RK24ZCGsHH
" > .env

Expand Down
2 changes: 1 addition & 1 deletion documentation/leo/16_testnet_beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Extensive information on deployed programs, mapping values, blocks, transactions

```
leo query program credits.aleo --mapping-value account aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px
Leo ✅ Successfully retrieved data from 'http://api.explorer.aleo.org/v1/testnet3/program/credits.aleo/mapping/account/aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px'.
Leo ✅ Successfully retrieved data from 'http://api.explorer.aleo.org/v1/testnet/program/credits.aleo/mapping/account/aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px'.
"10331249u64"
```
Expand Down
7 changes: 3 additions & 4 deletions documentation/sdk/create-leo-app/01_create_leo_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ Example:
Note down your transaction ID in the back of the URL from the faucet. The success message in the Discord thread should look like this:

```bash
Transfer successful! for message ID: 1156693507768078496
https://apiv2.aleo.network/testnet3/transaction/at12u62xwfew2rq32xee8nwhtlxghfjz7mm3528yj240nuezue625fqy4lhlp
have fun https://explorer.aleo.org/transaction/...
```

### Leo & `helloworld`
Expand All @@ -106,7 +105,7 @@ import helloworld_program from "../helloworld_[randomsuffix]/build/main.aleo?raw
Let's dig in a little more. Navigate back to your Leo project and Add your private key to the `.env` in your new Aleo project. Replace the example private key with the one you saved above.

```bash
NETWORK=testnet3
NETWORK=testnet
PRIVATE_KEY=APrivateKey1zkp2FCZZ7ucNVx5hoofizpq18mvCZNKTpqKMTt1wTahmxSf
```

Expand Down Expand Up @@ -143,7 +142,7 @@ Take your transaction ID from the Discord URL earlier:
at12u62xwfew2rq32xee8nwhtlxghfjz7mm3528yj240nuezue625fqy4lhlp
```
<!-- markdown-link-check-disable -->
Go to “Get Transaction” at [provable.tools/rest](https://provable.tools/rest) and insert your transaction ID to look at the JSON object. You can similarly use https://api.explorer.aleo.org/v1/testnet3/transaction/[insert-your-transaction-id] to get the same output in your browser.
Go to “Get Transaction” at [provable.tools/rest](https://provable.tools/rest) and insert your transaction ID to look at the JSON object. You can similarly use https://api.explorer.aleo.org/v1/testnet/transaction/[insert-your-transaction-id] to get the same output in your browser.
<!-- markdown-link-check-enable-->

![get-transaction](./images/get-transaction.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ snarkos developer transfer <AMOUNT_TO_TRANSFER> --input-record <INPUT_RECORD> --
```


## Usage on Testnet 3 (Phase 2)
## Usage on Testnet Beta

To deploy and execute programs on Testnet3
To deploy and execute programs on Testnet Beta
<!-- markdown-link-check-disable -->

1. Replace [step 3](#3-scan-the-node-for-spendable-records) with the Aleo faucet to obtain spendable credits. You can request credits from [the faucet](https://faucet.aleo.org/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ PATHTOAPP=$(realpath -q $APPNAME)

By this point, the Aleo faucet should have sent your wallet credits. Next, you'll need to verify your credit balance by decrypting the ciphertext record for the execute transfer that was sent to you.

If you requested credits by texting with your phone number, you should also receive a confirmation with a URL that has a prefix of `vm.aleo.org/api/testnet3/transaction...`
If you requested credits by texting with your phone number, you should also receive a confirmation with a URL that has a prefix of `explorer.aleo.org/transaction...`

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

Expand Down

0 comments on commit be2a7dd

Please sign in to comment.