-
Hugo Trentesaux authored
* docker rmi * refac doc move "rpc" to "mirror" add docker documentation in TOC * refac docker documentation
Hugo Trentesaux authored* docker rmi * refac doc move "rpc" to "mirror" add docker documentation in TOC * refac docker documentation
Duniter v2s
Documentation TOC
- README
- docker docker-related documentation
-
docs
-
api
- manual
- runtime-calls the calls you can submit through the RPC API
- dev
- test
-
user
- autocompletion
- build-for-arm
- mirror deploy a permanent ǦDev mirror node
- smith deploy a permanent ǦDev validator node
-
api
- end2end-tests automated end to end tests written with cucumber
- live-tests sanity checks to test the storage of a live chain
Use
Join ĞDev network
The easiest way is to use the docker image.
Minimal command to deploy a temporary mirror peer:
docker run -it -p9944:9944 -e DUNITER_CHAIN_NAME=gdev duniter/duniter-v2s:v0.4.0 --tmp --execution=Wasm
To go further, read How to deploy a permanent mirror node on ĞDev network.
Create your local blockchain
It can be useful to deploy your local blockchain, for instance to have a controlled environement to develop/test an application that interacts with the blockchain.
docker run -it -p9944:9944 duniter/duniter-v2s:v0.4.0 --tmp
Or use the docker-compose.yml
at the root of this repository.
Control when your local blockchain should produce blocks
By default, your local blockchain produces a new block every 6 seconds, which is not practical in some cases.
You can decide when to produce blocks with the cli option --sealing
which has two modes:
-
--sealing=instant
: produce a block immediately upon receiving a transaction into the transaction pool -
--sealing=manual
: produce a block upon receiving an RPC request (methodengine_createBlock
).
Autocompletion
See autocompletion.
Test
Test a specific commit
At each commit on master, an image with the tag debug-sha-********
is published, where ********
corresponds to the first 8 hash characters of the commit.
Usage:
docker run -it -p9944:9944 --name duniter-v2s duniter/duniter-v2s:debug-sha-b836f1a6
Then open https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944
in a browser.
Enable detailed logging:
docker run -it -p9944:9944 --name duniter-v2s \
-e RUST_LOG=debug \
-e RUST_BACKTRACE=1 \
-lruntime=debug \
duniter/duniter-v2s:debug-sha-b836f1a6
Contribute
If you are beginner in Rust and need a well guided tutorial, follow the beginner walkthrough.
Before any contribution, please read carefully the CONTRIBUTING file and our git conventions.
Setup your dev environment
First, complete the basic setup instructions.
Build
NOTE: You must first follow the instructions in the Setup section.
Use the following command to build the node without launching it:
cargo build
Run
Use Rust's native cargo
command to build and launch the node:
cargo run -- --dev --tmp
This will deploy a local blockchain with test accounts (Alice, Bob, etc) in the genesis.
Single-Node Development Chain
This command will start the single-node development chain with persistent state:
./target/debug/duniter --dev --tmp
Then open https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944
in a browser.
Start the development chain with detailed logging:
RUST_LOG=debug RUST_BACKTRACE=1 ./target/debug/duniter -lruntime=debug --dev