book: Add light client section

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2023-05-25 14:25:33 +03:00
parent b4c818c27a
commit 8600842f69
2 changed files with 41 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
// Copyright 2019-2023 Parity Technologies (UK) Ltd.
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.
//! # Light Clien
//!
//! The light client vision is to help the decentralization of blockchains.
//! They connect to the p2p network, behaving similarly to a full node without needing excessive synchronization.
//!
//! The `unstable-light-client` feature flag enables this functionality.
//!
//! To connect to a blockchain network, the light client requires a trusted sync state of the network.
//!
//! ```bash
//! {
//! "bootNodes": [
//! "/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp"
//! ],
//! "genesis": { ... },
//! }
//! ```
//!
//! ## Example
//!
//! Here's an example which connects to a local chain and submits a transaction:
//!
//! ```rust,ignore
#![doc = include_str!("../../../../examples/examples/unstable_light_client_tx_basic.rs")]
//! ```
//!
//! ## Example live chain
//!
//! The following example connects to the polkadot live chain and performs
//! several queries using the light client.
//!
//! ```rust,ignore
#![doc = include_str!("../../../../examples/examples/unstable_light_client.rs")]
//! ```
//!
+2
View File
@@ -10,12 +10,14 @@
//! - [Constants](constants)
//! - [Blocks](blocks)
//! - [Runtime APIs](runtime_apis)
//! - [Unstable Light Client](light_client)
//!
//! Alternately, [go back](super).
pub mod blocks;
pub mod constants;
pub mod events;
pub mod light_client;
pub mod runtime_apis;
pub mod storage;
pub mod transactions;