mirror of
https://github.com/AleoHQ/leo.git
synced 2024-09-11 15:05:33 +03:00
Update install docs to include troubleshooting guide
This commit is contained in:
parent
3c2da076ff
commit
6621ba1bec
18
README.md
18
README.md
@ -19,9 +19,10 @@ Leo is a functional, statically-typed programming language built for writing pri
|
||||
* [2.1 Install Rust](#21-install-rust)
|
||||
* [2.2 Build from Source Code](#22-build-from-source-code)
|
||||
* [3. Quick Start](#3-quick-start)
|
||||
* [4. Documentation](#4-documentation)
|
||||
* [5. Contributing](#5-contributing)
|
||||
* [6. License](#6-license)
|
||||
* [4. Troubleshooting](#4-troubleshooting)
|
||||
* [5. Documentation](#5-documentation)
|
||||
* [6. Contributing](#6-contributing)
|
||||
* [7. License](#7-license)
|
||||
|
||||
|
||||
## 1. Overview
|
||||
@ -93,18 +94,23 @@ The `leo run` command will compile the program into Aleo instructions and run it
|
||||
|
||||
Congratulations! You've just run your first Leo program.
|
||||
|
||||
## 4. Documentation
|
||||
## 4. Troubleshooting
|
||||
If you are are having trouble installing and using Leo, please check out our [guide](docs/troubleshooting.md).
|
||||
|
||||
If the issue still persists, please [open an issue](https://github.com/AleoHQ/leo/issues/new/choose).
|
||||
|
||||
## 5. Documentation
|
||||
|
||||
* [Hello World - Next Steps](https://developer.aleo.org/leo/getting_started/hello_world)
|
||||
* [Leo Language Documentation](https://developer.aleo.org/leo/getting_started/overview)
|
||||
* [Leo ABNF Grammar](./docs/grammar/abnf-grammar.txt)
|
||||
* [Homepage](https://developer.aleo.org/overview/)
|
||||
|
||||
## 5. Contributing
|
||||
## 6. Contributing
|
||||
|
||||
Please see our guidelines in the [developer documentation](./CONTRIBUTING.md)
|
||||
|
||||
Thank you for helping make Leo better!
|
||||
|
||||
## 6. License
|
||||
## 7. License
|
||||
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](./LICENSE.md)
|
||||
|
71
docs/troubleshooting.md
Normal file
71
docs/troubleshooting.md
Normal file
@ -0,0 +1,71 @@
|
||||
# Troubleshooting Guide
|
||||
|
||||
In this guide, we will cover some common issues that may arise when installing and using Leo for the first time.
|
||||
|
||||
## Downloading parameters
|
||||
|
||||
When running `leo run` for the first time, Leo will download the necessary parameters from a remote server.
|
||||
This may take a while and may outright fail, depending on your internet connection and network configuration.
|
||||
|
||||
You will know that the download has failed if you see the following error message or something similar:
|
||||
|
||||
```bash
|
||||
ATTENTION - "genesis.prover.1c9bbe9" does not exist, downloading this file remotely and storing it locally. Please ensure "genesis.prover.1c9bbe9" is stored in "/Users/xxx/.aleo/resources/genesis.prover.1c9bbe9".
|
||||
|
||||
snarkvm_parameters::testnet3 - Downloading parameters...
|
||||
snarkvm_parameters::testnet3 - thread `main` panicked at 'Failed to load proving key: Crate("curl::error", "Error { description: \"Transferred a partial file\", code: 18, extra: Some(\"transfer closed with 92197356 bytes remaining to read\") }")', /Users/xxx/.cargo/git/checkouts/snarkvm-f1160780ffe17de8/ea14990/parameters/src/testnet3/mod.rs:95:9
|
||||
stack backtrace:
|
||||
0: backtrace::capture::Backtrace::new
|
||||
1: leo::set_panic_hook::{{closure}}
|
||||
2: std::panicking::rust_panic_with_hook
|
||||
3: std::panicking::begin_panic_handler::{{closure}}
|
||||
4: std::sys_common::backtrace::__rust_end_short_backtrace
|
||||
5: _rust_begin_unwind
|
||||
6: core::panicking::panic_fmt
|
||||
7: core::result::unwrap_failed
|
||||
8: std::sync::once::Once::call_once::{{closure}}
|
||||
9: std::sync::once::Once::call_inner
|
||||
10: snarkvm_compiler::process::Process<N>::load
|
||||
11: snarkvm::package::Package<N>::get_process
|
||||
12: snarkvm::package::build::<impl snarkvm::package::Package<N>>::build
|
||||
13: aleo::commands::build::Build::parse
|
||||
14: <leo::commands::build::Build as leo::commands::Command>::apply
|
||||
15: leo::commands::Command::execute
|
||||
16: leo::commands::Command::try_execute
|
||||
17: leo::run_with_args
|
||||
18: scoped_tls::ScopedKey<T>::set
|
||||
19: leo::main
|
||||
20: std::sys_common::backtrace::__rust_begin_short_backtrace
|
||||
21: std::rt::lang_start::{{closure}}
|
||||
22: std::rt::lang_start_internal
|
||||
23: _main
|
||||
```
|
||||
|
||||
If this happens, try using the following script to download the parameters until it succeeds:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
echo "
|
||||
Downloading parameters. This will take a few minutes...
|
||||
"
|
||||
|
||||
# Create a new Leo project.
|
||||
leo new install > /dev/null 2>&1
|
||||
cd install
|
||||
|
||||
# Attempt to compile the program until it passes.
|
||||
# This is necessary to ensure that the universal parameters are downloaded.
|
||||
declare -i DONE
|
||||
|
||||
DONE=1
|
||||
|
||||
while [ $DONE -ne 0 ]
|
||||
do
|
||||
leo build 2>&1
|
||||
DONE=$?
|
||||
sleep 0.5
|
||||
done
|
||||
|
||||
# Remove the program.
|
||||
cd .. && rm -rf install
|
||||
```
|
Loading…
Reference in New Issue
Block a user