Duniter v2s
🆙 A rewriting of Duniter v1 in the Substrate framework.
⚠️ Duniter-v2s is under active development.
🚧 A test network called "ĞDev" is deployed, allowing to test wallets and indexers.
Documentation
Multiple documentation sources are available depending on the level of detail you need.
- Full technical Rust doc (auto-generated with
cargo xtask gen-doc
) : https://doc-duniter-org.ipns.pagu.re/duniter/ - User and client developer doc (official website) : https://duniter.org/wiki/duniter-v2/
- Internal documentation (within git repository), see table of contents below : ./doc
Internal documentation TOC
- README (this file)
-
docs internal documentation
-
api API
- manual manage account and identities
- runtime-calls the calls you can submit through the RPC API
- runtime-errors the errors you can get submitting a call
- runtime-events the events you can get submitting a call
- dev developer documentation
- user user documentation
-
packaging packaging
- build-for-arm build for ARM architecture
- build-debian build a native Debian package
-
api API
- docker docker-related documentation
- 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-gdev-800:latest
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 environment to develop/test an application that interacts with the blockchain.
docker run -it -p9944:9944 duniter/duniter-v2s-gdev-800:latest
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
).
Shell autocompletion
See autocompletion to generate shell autocompletion for duniter commands.
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
This will deploy a local blockchain with test accounts (Alice, Bob, etc) in the genesis.
Open https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944
to watch and interact with your node.
Start the development chain with detailed logging:
RUST_LOG=debug RUST_BACKTRACE=1 ./target/debug/duniter -lruntime=debug --dev
License
See LICENSE
CopyLeft 2021-2023 Axiom-Team
Some parts borrowed from Polkadot (Parity Technologies (UK) Ltd.)
Duniter-v2S is free software: you can redistribute it and/or modify
it under the terms of the **GNU Affero General Public License** as published by
the Free Software Foundation, **version 3** of the License.
Duniter-v2S is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>.