Building a fork-free network allows Zentalk and Zentavault to make the perfect provision for the ecosystem. Zentameshnet is the important part that allows Zentalk users to communicate offline 2 offline. Running a Zentanode will support the nodes in the Zentameshnet and the node owners will be rewarded with the native token ($CHAIN).
The network is designed to allow Offline communication in the Zentameshnet. Zentalk users can have Zentanode to be rewarded with native cryptocurrency Zentachain. Zentalk also includes Zentawallet with a layer 1 to protecting payment between receiver and sender. As with all our services, Zentachain will have no information about your identity, the region in which you live, or any personal data about the user. The ecosystem holds all necessary building blocks for creating and hosting scalable decentralized databases, distributed services, and p2p decentralized cloud storage.
Rust is a programming language designed for security, speed, and concurrency. Its structure lets you create programs that have the power and control of a low-level language, but with the powerful abstractions of a high-level language. Rust performs most of its security checks and memory management decisions at compile-time, so it does not affect the runtime performance of your program. This makes Rust useful for a number of use cases for which other languages are not suitable: Programs with predictable memory and timing, embedding in other languages, and writing low-level code such as device drivers, operating systems, blockchain, or even networks. The network is built with the Substrate framework.
Cargo is Rust’s build system and package manager. Most use this tool to manage their Rust projects. Cargo handles a lot of tasks, such as building your code, downloading the libraries your code depends on, and building those libraries. When you write more complex Rust programs, you will add dependencies, and when you start a project with Cargo, adding dependencies will be much easier.
Substrate framework can be defined as an open-source community, a modular software development framework, and a developer platform. The Substrate framework provides modular development of fast, secure, and forkless blockchains using Substrate palettes.
Please follow the instructions to download rustup-init.exe
Open terminal and type:
$ curl https://sh.rustup.rs -sSf | sh
🎉 Great Rust is now installed 🎉
1.2 Updating Rust
$ rustup update
1.3 Uninstalling Rust
$ rustup self uninstall
$ rustc --version
1.5 Downgrade Nightly Version
$ rustup install nightly-YYYY-MM-DD
$ rustup override set nightly-YYYY-MM-DD
1.7 To install a specific Rust version use:
$ rustup toolchain install 1.30.0 (Example)
1.8 Rust Version Managing
1.9 Change between the version in the directory:
If you'd like to have a different default per-directory, that's easy too! If you run this inside of a project:
$ rustup override set nightly
Or, if you'd like to target a different version of Rust:
$ rustup override set 1.30.0
1.0 Cargo version
$ cargo --version
Cargo Building & Running
$ cargo build
Cargo check (Quickly checks your code to make sure it compiles)
$ cargo check
1.1 Building for Release
When your project is finally ready for release, you can use
cargo build --release to compile it with optimizations. This command will create an executable in target/release instead of target/debug. The optimizations make your Rust code run faster, but turning them on lengthens the time it takes for your program to compile the code. If you’re benchmarking your code’s running time, be sure to run cargo
build --release and benchmark with the executable in
1.0 Start Substrate on Windows
1.1 Start Substrate on macOS
Setup / Install Choco
To install GNU make, run the following command from the command line or from PowerShell:
$ choco install make
A Subkey is a tool that generates keys specifically designed to be used with Substrate. This may take up to 15 minutes.
1.0 Install Subkey
$ cargo install --force subkey --git https://github.com/paritytech/substrate --version 2.0.0
$ subkey generate --scheme sr25519
$ subkey inspect --scheme ed25519 "--Seed--Phrase--"
1.3 Generate a Password Protected Key-Pairs
add command --password "enter-password-here"
1.4 For more security, use (supports 12, 15, 18, 21, and 24)
add command --words 24
1.5 Information about the keys:
Secret Phrase = Mnemonic phrases (Important keep it Safe)
Secret Seed = Private Key or Raw Seed (Important keep it Safe)
Public Key (HEX*) = Account ID (Public Address)
SS58 Address = SS58-encoded address (Public Address)
Schnorr signatures bring some noticeable features over the ECDSA/EdDSA schemes:
It is better for hierarchical deterministic key derivations.
It allows for native multi-signature through signature aggregation.
It is generally more resistant to misuse.
One sacrifice that is made when using Schnorr signatures over ECDSA is that both require 64 bytes, but only ECDSA signatures communicate their public key.
1.6 Generate Key pairs with Polkadot-JS
For more visit the PolkadotJS UI website.
1.0 Token Economics
Network ID: Zentanetwork
Algorithm: PoS (Mainnet)
Proof of stake (PoS) is a type of consensus algorithm by which a cryptocurrency blockchain network aims to achieve distributed consensus. In PoS-based cryptocurrencies, the creator of the next block is chosen via various combinations of random selection and wealth or age (i.e., the stake). In contrast, the algorithm of proof-of-work-based cryptocurrencies such as bitcoin uses mining; that is, the solving of computationally intensive puzzles to validate transactions and create new blocks.
The main advantages of the Proof of Stake algorithm are energy efficiency and security. A huge number of users are encouraged to run nodes since it’s easy and affordable. This along with the randomization process also makes the network more decentralized, since mining pools are no longer needed to mine the blocks.
Incentives differ between the two systems of block generation. In Proof of Work (PoW), miners may potentially own none of the currency they are mining and thus seek only to maximize their own profits. It is unclear whether this disparity lowers or raises security risks. In Proof of Stake(PoS), however, those "guarding" the coins always own the coins, although several cryptocurrencies do allow or enforce the lending of staking power to other nodes.
In the Proof of Stake system, the validation process is done randomly depending on the number of $CHAIN in the wallet account of the people. So every wallet that owns the $CHAIN can become a validator in the network. Of course, accounts with a large number of $CHAIN's in the system are more likely to be used as validation and therefore receive more shares from the network.
The Framework for Runtime Aggregation of Modularized Entities (FRAME) is a set of modules (called pallets) and supports libraries that simplify runtime development. Pallets are individual modules within FRAME that host domain-specific logic. (Substrate Runtime Modules)
Pallets are a special kind of Rust module from which Substrate runtimes can be composed. Each pallet has its own discrete logic which can modify the features and functionality of your blockchain's state transition function. (A Substrate runtime modules)
The Balances module provides functionality for handling accounts and balances.
Aura provides a slot-based block authoring mechanism. In Aura, a known set of authorities take turns producing blocks.
GRANDPA provides block finalization. It has a known weighted authority set like BABE. However, GRANDPA does not author blocks; it just listens to gossip about blocks that have been produced by some authoring engine like the three discussed above. GRANDPA validators vote on chains, not blocks, i.e. they vote on a block that they consider "best" and their votes are applied transitively to all previous blocks. Once more than 2/3 of the GRANDPA authorities have voted for a particular block, it is considered final. GRANDPA Abstract paper by Alistair Stewart can be found here.
The property of a block can not be reverted. Generally, created blocks are not final until some point in the future - perhaps never, in the case of "probabilistic finality".
BABE also provides slot-based block authoring with a known set of validators. In these ways, it is similar to Aura. Unlike Aura, slot assignment is based on the evaluation of a Verifiable Random Function (VRF). Each validator is assigned a weight for an epoch.y This epoch is broken up into slots and the validator evaluates its VRF at each slot. For each slot that the validator's VRF output is below its weight, it is allowed to author a block. BABA Abstract by Handan Kılınç Alper can be found here.
Slot-based consensus algorithms must have a known set of validators who are permitted to produce blocks. Time is divided up into discrete slots, and during each slot, only some of the validators may produce a block. The specifics of which validators can author blocks during each slot vary from engine to engine. The Substrate provides Aura and Babe, both of which are slot-based block authoring engines.
An epoch is a time duration in the BABE protocol that is broken into smaller time slots. Each slot has at least one slot leader who has the right to propose a block.
A (whole) number of sessions, which is the period that the validator set (and each validator's active nominator set) is recalculated and where rewards are paid out.
The runtime of a blockchain is the business logic that defines its behavior. In Substrate-based chains, the runtime is referred to as the "state transition function"; it is where Substrate developers define the storage items that are used to represent the blockchain's state as well as the functions that allow blockchain users to make changes to this state.
Since validator slots will be limited, most of those who wish to stake their Zentachain tokens and contribute economic security to the network will be nominators. Validators do most of the heavy lifting: they produce new block candidates in BABE, vote, and come to a consensus in GRANDPA. Nominators, on the other hand, do not need to do anything once they have bonded their Zentachain tokens.
Accounts that select a set of validators to nominate by bonding their Zentachain tokens. Nominators receive some of the validators' rewards but are also liable for slashing if their nominated validators misbehave.
Slashing will happen if a validator misbehaves (e.g. goes offline, attacks the network, or runs modified software) in the network. They and their nominators will get slashed by losing a percentage of their bonded/staked Zentachain. Any slashed Zentachain will be added to the Treasury.
The Treasury is a pot of funds collected through transaction fees, slashing, staking inefficiencies, etc. The funds held in the Treasury can be spent by making a spending proposal that, if approved by the Council, will enter a waiting period before distribution. This waiting period is known as the budget period, and its duration is subject to governance, with the current default set to 24 days.
The Council primarily serves as a body to optimize and check/balance the more inclusive referendum system. (Election and Proposals)
The network information including what nodes are running the chain, what software versions they are running, and sync status.
A session is a Substrate implementation term for a period of time that has a constant set of validators. Validators can only join or exit the validator set at a session change.
Session keys are used by validators to sign consensus-related messages.
SessionKeys is a generic, indexable type that is made concrete in the runtime.
A subsystem in Substrate for managing keys for the purpose of producing new blocks.
A process by which tokens can be "frozen" in exchange for some other benefit. For example, staking is a form of bonding for which you receive rewards in exchange for securing the network.
State changes that come from the outside world, i.e. they are not part of the system itself.
Zentachain native token is called:
When a block author constructs a block, it must limit the block's execution time. A block body consists of a series of extrinsic. Since the resources needed to execute an extrinsic can vary, Substrate provides a flexible mechanism called "weights" to characterize the time it takes to execute an extrinsic. To be economically sustainable and to limit spam, some transactions --- primarily those dispatched by users --- require a fee prior to transaction execution.
As the name of the Sudo pallet implies, it provides capabilities related to the management of a single
sudo ("superuser do") administrator. In FRAME, the
Root Origin is used to identify the runtime administrator; some of the FRAME's features, including the ability to update the runtime by way of the
set_code function, are only accessible to this administrator. The Sudo pallet maintains a single storage item: the ID of the account that has access to the pallet's dispatchable functions. The Sudo pallet's
sudo function allows the holder of this account to invoke a dispatchable as the
Root origin. The Sudo rights will be removed after the main-network and given to the community.
By using Wasm in Substrate, the framework powering Polkadot, Kusama, and many connecting chains, the chains are given the ability to upgrade their runtime logic without hard forking. Hard forking is a standard method of upgrading a blockchain that is slow, inefficient, and error-prone due to the levels of offline coordination required, and thus the propensity to bundle many upgrades into one large-scale event. By deploying Wasm on-chain and having nodes auto-enact the new logic at a certain block height, upgrades can be small, isolated, and very specific.
WebAssembly, shortened to simply Wasm, is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable target for compilation of high-level languages like C/C++/Rust, enabling deployment on the web for client and server applications. WebAssembly is a platform-agnostic binary format, meaning that it will run the same instructions across whatever machine it is operating on. Blockchains need determinacy in order to have reliable state transition updates across all nodes in the peer-to-peer network without forcing every peer to run the same exact hardware. Wasm is a nice fit for reliability among the possibly diverse set of machines. Wasm is both efficient and fast. The efficiency means that it can be uploaded onto the chain as a blob of code without causing too much state bloat while keeping its ability to execute at near-native speeds.
Libp2p is a network framework that allows you to write decentralized peer-to-peer applications. Originally the networking protocol of IPFS, it has since been extracted to become its own first-class project.
The InterPlanetary File System is a peer-to-peer hypermedia protocol designed to make the web faster, safer, and more open.
Contract calls are charged a gas fee to limit the amount of computational resources a transaction can use. When forming a contract transaction, a gas limit is specified. As the contract executes, gas is incrementally used up depending on the complexity of the computation. If the gas limit is reached before the contract execution completes, the transaction fails, contract storage is reverted, and the gas fee is not returned to the user.
$ git clone https://github.com/ZentaChain/Zentanetwork
$ cargo build --release
Check Runtime compiles:
cargo check -p zentachain-runtime
$ ./target/release/zentachain --dev
$ ./target/release/zentachain --local
$ ./target/release/zentachain --chain=local --alice -d /tmp/alice
$ ./target/release/zentachain ----chain=local --bob -d /tmp/bob --port 30334 --bootnodes '/ip4/127.0.0.1/tcp/30333/p2p/BOOTNODEID'
1.0 Zajin Network (Alpha)
$ ./target/release/zentachain --zajin
1.1 Zikaron Network (Beta)
$ ./target/release/zentachain --zikaron
1.3 Start a full Zenta node Main-net
1.5 Zentachain Mainnet (Aleph-Network)
$ ./target/release/zentachain --mainnet
1.6 Purge DB
$ ./target/release/zentachain purge-chain --chain=ID
$ ./target/release/zentachain --help
Before you start the network in Docker please make sure you have installed Docker and Composer.
2.2 Install Docker
2.3 Install Docker Compose
Visit: Compose Hub
2.4 Run in Docker
Used for Zentanetwork
Specify the development chain
Disable log color output
Enable peer discovery on local networks
Force using Zentachain native runtime
Run in light client mode
Disable GRANDPA voter when running in validator mode
Disable mDNS discovery
Disable connecting to the Substrate telemetry server
Use interactive shell for entering the password used by the keystore
Whether to only synchronize the chain with reserved nodes
Listen to all RPC interfaces
Enable storage chain mode
Run a temporary node
Listen to all RPC interfaces
Listen to all Websocket interfaces
Enable validator mode
Prints version information
Listen to all Websocket interfaces
Prints help information
Join the IPFS network
Used for Zentanetwork
Specify custom base path
Specify a list of bootnodes
Specify the chain specification
Select database backend to use
Limit the memory the database cache can use
Should execute offchain workers on every block
Specify IPC RPC server path
Add the destination address to the jaeger agent.
Specify the number of finalized blocks to keep in the database
Specify custom keystore path
Specify custom URIs to connect to for keystore-services
Listen on this multiaddress
The human-readable name for this node
The secret key to use for libp2p networking
The file from which to read the node's secret key to use for libp2p networking
The type of secret key to use for libp2p networking
Password used by the keystore
File that contains the password used by the keystor
Specify p2p protocol TCP port
The public address that other nodes will use to connect to it. This can be used if there's a proxy in front of this node
Specify a list of reserved node addresses
Specify HTTP RPC server TCP port
Enable sentry mode
pecify a list of sentry node public addresses
The URL of the telemetry server to connect to
Method for executing Wasm runtime code
Specify the path where local WASM runtimes are stored
Maximum number of WS RPC server connections
Specify WebSockets RPC server TCP port
Used for Zentanetwork
Benchmark runtime pallets
Build a chain specification
Export the state of a given block into a chain spec
Prints this message or the help of the given subcommand(s)
Key management CLI utilities
Remove the whole chain
Revert the chain to a previous state
1.1 Launch the Frontend
Substrate Primitives (
sp-*), Frame (
frame-*) and the pallets (
pallets-*), binaries (
/bin) and all other utilities are licensed under Apache 2.0.
Substrate Client (
sc-*) is licensed under GPL v3.0 with a classpath linking exception.
The reason for the split-licensing is to ensure that for the vast majority of teams using Substrate to create feature-chains, then all changes can be made entirely in Apache2-licensed code, allowing teams full freedom over what and how they release and giving licensing clarity to commercial teams.
In the interests of the community, we require any deeper improvements made to Substrate's core logic (e.g. Substrate's internal consensus, crypto or database code) to be contributed back so everyone can benefit.
Proof of Work: https://en.wikipedia.org/wiki/Proof_of_work
Proof of Stake: https://de.wikipedia.org/wiki/Proof_of_Stake
Handan Kılınç Alper: https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html
Web3 Foundation: https://web3.foundation
Zentachain Github: https://github.com/ZentaChain/Zentanetwork
Zentachain Whitepaper: https://zentachain.io/documents/Zentachain_Whitepaper.pdf