Experimental Radicle Registry implementation with Substrate.
Click here to learn how to get started participating in the Radicle Registry Network.
See DEVELOPING.md
for developer information.
- Prerequisites
- Build from source
- Getting the Node
- Running the node
- Chains
- Using the Client
- Account Keys
- Developing with the Client
- Using the CLI
- License
ⓘ Follow this guide to get started developing or to build from source.
-
It will run
rustup
, The Rust toolchain installer, which installsrustc
,cargo
,rustup
, amongst other standard tools that compose the default Rust toolchain. -
Run
rustc --version
in a new shell.To verify that the installion is sound.
-
Run
./scripts/rustup-setup
To install all
rustup
components and targets required by the Radicle Registry.
⚠ Make sure you have followed the prerequisites guide before proceeding.
We currently only provide prebuilt binaries for x86_64
linux targets in
the Radicle Registry Releases page.
To build the Radicle Registry binaries to run on other targers, run:
./scripts/build-release
The resulting binaries can be found at:
./target/release/radicle-registry-cli
./target/release/radicle-registry-node
We build binaries of the node and docker images for every pushed commit.
You can obtain the node binaries from “Artifacts” section of a build on
Buildkite. Node binaries are available for the
x86_64-unknown-linux-gnu
target triple.
You can pull a docker image of the node with
docker pull gcr.io/opensourcecoin/radicle-registry/node:<commit-sha>
In the image the node binary is located at /usr/local/bin/radicle-registry-node
To build the node from source see [DEVELOPING.md
][dev-manual].
To run a node you need to specify the chain
radicle-registry-node --chain devnet
See below for more information on the different chains.
For more information use the --help
flag. See also “Running development
node”.
The node prints logs to stdout in the following format
<local time> <level> <target> <msg>
You can adjust the global log level and the log level for specific targets with
the RUST_LOG
environment variable.
The chain a node follows is set by the --chain
flag. The following chains are
supported.
The ffnet
is our first public network for friends & family to participate.
The dev
chain is intended for local development. The node runs an isolated
network with a dummy proof-of-work. The dev
chain uses ./runtime-cache/latest.wasm
as the genesis runtime.
We host a devnet that you can connect to. To join you need to use the most recent pre-built binary (see “Getting the node”).
Like the dev
chain, we use ./runtime-cache/latest.wasm
as the genesis runtime.
We are frequently resetting the devnet blockchain. If you local node is not
syncing blocks download the most recent version and run radicle-registry-node --chain devnet purge-chain
.
The client for the registry node is provided by the radicle-registry-client
package in the ./client
directory. To get started take a look at
./client/examples/getting_started.rs
.
You’ll need to build the client with Rust Nightly.
To build and view the client documentation run ./scripts/build-client-docs --open
.
You can find examples in the ./client/examples
directory.
We use Ed25519 keys for accounts. Key creation and handling functionality is
provided by the radicle-registry-client::ed25519
module. To use this module
you will likely need to import the radicle-registry-client::CryptoPair
and
radicle-registry-client::CryptoPublic
traits.
You can create key pairs using CryptoPair::generate()
use radicle-registry-client::{ed25519, CryptoPair};
let (key, seed) = ed25519::Pair::generate();
To create keys from human readable strings, use CryptoPair::from_string
.
use radicle-registry-client::{ed25519, CryptoPair};
let alice = ed25519::Pair::from_string("//Alice", None);
To obtain the SS58
address for your local key-pairs, you can run:
cargo run -p radicle-registry-cli -- key-pair list
The radicle-registry-client::ed25519
module and the crypto traits are
re-exports from substrate_primitives::ed25519
and
substrate_primitives::crypto
, respectively
For development you can create a ledger emulator with
radicle_registry_client::Client::new_emulator()
. Instead of connecting to a
node this client runs the ledger in memory. See the API docs for more
information.
We provide a CLI to talk read and update the ledger in the cli
directory. To
learn more run cargo run -p radicle-registry-cli -- --help
.
This code is licensed under GPL v3.0.