Skip to content
Snippets Groups Projects

Add beginner walkthrough documentation

Merged Hugo Trentesaux requested to merge hugo-doc into master
All threads resolved!
2 files
+ 14
10
Compare changes
  • Side-by-side
  • Inline
Files
2
# Beginner walkthrough
This is a beginner tutorial for those who do not have a previous experience with Rust ecosystem or need guidance to get familiar with Duniter v2s project. You'll need a development machine with an internet connexion, at least 20 Go of free storage, and an hour or two depending on your computing power.
This is a beginner tutorial for those who do not have a previous experience with Rust ecosystem or need guidance to get familiar with Duniter v2s project. You'll need a development machine with an internet connection, at least **20 Go of free storage**, and **an hour or two** depending on your computing power.
This walkthrough is based on the following video (french), don't hesitate to make an english voicecover if you feel so.
This walkthrough is based on the following video (french), don't hesitate to record an english voicecover if you feel so.
[![preview](https://tube.p2p.legal/lazy-static/previews/654006dc-66c0-4e37-a32f-b7b5a1c13213.jpg)](https://tube.p2p.legal/w/n4TXxQ4SqxzpHPY4TNMXFu)
@@ -10,7 +10,7 @@ This walkthrough is based on the following video (french), don't hesitate to mak
## Requirements
If you are a debian based system, you can install the system requirements with:
If you are on a debian based system, you can install the required packages with:
```bash
sudo apt install cmake pkg-config libssl-dev git build-essential clang libclang-dev curl
@@ -33,7 +33,7 @@ rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
```
This can take about one or two minutes.
This can take about **2 minutes**.
## Build project
@@ -49,13 +49,13 @@ you can go to the root folder and build the substrate client with:
cargo build
```
This will take about 2 minutes to download dependencies and 12 minutes to build in debug mode. At this point, you only built the substrate client, a kind of "shell" in which lies the runtime. You can build the runtime and run a local blockchain with:
This will take about **2 minutes** to download dependencies and **12 minutes** to build in debug mode. At this point, you only built the substrate client, a kind of "shell" in which lies the runtime. You can build the runtime and run a local blockchain with:
```bash
cargo run -- --dev --tmp
```
Which should take about 1 minute. When you see the logs, the blockchain is running and you can connect to it with polkadotjs app: [https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944). You should see blocks being added every 6 seconds. You can use Alice, Bob, etc test accounts to submit extrinsics.
Which should take about **1 minute**. When you see the logs, the blockchain is running and you can connect to it with polkadotjs app: [https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944). You should see blocks being added every 6 seconds. You can use Alice, Bob, etc test accounts to submit extrinsics.
## Autocompletion
@@ -70,9 +70,9 @@ cargo run --release -- completion --generator bash > ~/.local/share/duniter/comp
[[ -f $HOME/.local/share/duniter/completion.bash ]] && source $HOME/.local/share/duniter/completion.bash
```
Building in release mode for the first time is very long and can take up to 20 minutes. You will then benefit from completion using `<Tab>` key and `*`.
Building in release mode for the first time is very long and can take up to **20 minutes**. You will then benefit from completion using `<Tab>` key and `*`.
## End to end tests using cucumber
## End-to-end tests using cucumber
Cucumber end2end tests are a good way to dive in Duniter's business procedure. They work by spawning a local blockchain and submitting extrinsics to it. You can build and run the cucumber tests by running:
@@ -80,4 +80,8 @@ Cucumber end2end tests are a good way to dive in Duniter's business procedure. T
cargo cucumber
```
which should take about 4 minutes to build and run the tests. A highly detailed documentation about the end2end tests is available [in the dedicated folder](../../end2end-tests/README.md), you will learn how to read and modify the tests.
\ No newline at end of file
which should take about **4 minutes** to build and run the tests. A highly detailed documentation about the end2end tests is available [in the dedicated folder](../../end2end-tests/README.md), you will learn how to read and modify the tests.
## Get in tuch with us
Wether you are stuck and need help or have sucessfully completed this tutorial, don't hesitate to get in touch with us on the Duniter forum! If you found this walkthrough useful, please 🙏 let us know on the [walkthrough topic](https://forum.duniter.org/t/contribuer-a-duniter-tutoriel-video/9770) on the forum 😊.
\ No newline at end of file
Loading