From 77c3f55fc32a1406a19d65a9af775955eb37525f Mon Sep 17 00:00:00 2001 From: Aki Wu Date: Mon, 29 Mar 2021 15:06:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=B7=B2=E7=BB=8F=E8=BD=AC?= =?UTF-8?q?=E7=A7=BB=E5=88=B0crab=E4=B8=8A=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/en/crab-airdrop.md | 19 -- content/en/crab-home.md | 19 -- content/en/crab-parameters.md | 91 --------- content/en/crab-tool-index.md | 19 -- content/en/crab-tut-claim-cring.md | 99 --------- content/en/crab-tut-create-account.md | 177 ---------------- content/en/crab-tut-exchange.md | 249 ----------------------- content/en/crab-tut-get-free-cring.md | 53 ----- content/en/crab-tut-governance.md | 7 - content/en/crab-tut-index.md | 16 -- content/en/crab-tut-node.md | 130 ------------ content/en/crab-tut-nominator.md | 123 ----------- content/en/crab-tut-relayer.md | 7 - content/en/crab-tut-validator.md | 168 --------------- content/en/dev-dvm.md | 7 + content/zh-CN/crab-airdrop.md | 19 -- content/zh-CN/crab-home.md | 20 -- content/zh-CN/crab-parameters.md | 91 --------- content/zh-CN/crab-tool-index.md | 14 -- content/zh-CN/crab-tut-claim-cring.md | 74 ------- content/zh-CN/crab-tut-create-account.md | 158 -------------- content/zh-CN/crab-tut-exchange.md | 247 ---------------------- content/zh-CN/crab-tut-get-free-cring.md | 41 ---- content/zh-CN/crab-tut-governance.md | 8 - content/zh-CN/crab-tut-index.md | 17 -- content/zh-CN/crab-tut-node.md | 128 ------------ content/zh-CN/crab-tut-nominator.md | 113 ---------- content/zh-CN/crab-tut-relayer.md | 8 - content/zh-CN/crab-tut-validator.md | 142 ------------- content/zh-CN/dev-dvm.md | 7 + website/i18n/en.json | 63 +----- website/sidebars.json | 42 +--- 32 files changed, 21 insertions(+), 2355 deletions(-) delete mode 100644 content/en/crab-airdrop.md delete mode 100644 content/en/crab-home.md delete mode 100644 content/en/crab-parameters.md delete mode 100644 content/en/crab-tool-index.md delete mode 100644 content/en/crab-tut-claim-cring.md delete mode 100644 content/en/crab-tut-create-account.md delete mode 100644 content/en/crab-tut-exchange.md delete mode 100644 content/en/crab-tut-get-free-cring.md delete mode 100644 content/en/crab-tut-governance.md delete mode 100644 content/en/crab-tut-index.md delete mode 100644 content/en/crab-tut-node.md delete mode 100644 content/en/crab-tut-nominator.md delete mode 100644 content/en/crab-tut-relayer.md delete mode 100644 content/en/crab-tut-validator.md create mode 100644 content/en/dev-dvm.md delete mode 100644 content/zh-CN/crab-airdrop.md delete mode 100644 content/zh-CN/crab-home.md delete mode 100644 content/zh-CN/crab-parameters.md delete mode 100644 content/zh-CN/crab-tool-index.md delete mode 100644 content/zh-CN/crab-tut-claim-cring.md delete mode 100644 content/zh-CN/crab-tut-create-account.md delete mode 100644 content/zh-CN/crab-tut-exchange.md delete mode 100644 content/zh-CN/crab-tut-get-free-cring.md delete mode 100644 content/zh-CN/crab-tut-governance.md delete mode 100644 content/zh-CN/crab-tut-index.md delete mode 100644 content/zh-CN/crab-tut-node.md delete mode 100644 content/zh-CN/crab-tut-nominator.md delete mode 100644 content/zh-CN/crab-tut-relayer.md delete mode 100644 content/zh-CN/crab-tut-validator.md create mode 100644 content/zh-CN/dev-dvm.md diff --git a/content/en/crab-airdrop.md b/content/en/crab-airdrop.md deleted file mode 100644 index 12fe9623..00000000 --- a/content/en/crab-airdrop.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -id: crab-airdrop -title: Crab Network Airdrop -sidebar_label: Airdrop ---- -## Airdrop -**Darwinia will Airdrop the RING & DOT holders.** - -A portion of the initial supply of the Crab‘s CRING will be distributed to the holders of RING & DOT, they will get CRING (Airdrop) for free. - -Darwinia took a snapshot of RING & DOT holders on March 20, 2020 (GMT +8:00). RING & DOT holders can check / receive CRING after Crab launched. - -- DOT airdrop ratio: 1 DOT = 50 CRING -- RING airdrop ratio: 1 RING = 1 CRING - -> The snapshot contains the RING of ERC-20 and TRC-20, including the deposit certificate part in Gringotts. KTON is not in the scope of this snapshot. - -## How to claim Airdrop CRING -[Claim Airdrop CRING](crab-tut-claim-cring) diff --git a/content/en/crab-home.md b/content/en/crab-home.md deleted file mode 100644 index dc5e1b49..00000000 --- a/content/en/crab-home.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -id: crab-home -title: Darwinia Crab Network -sidebar_label: Crab Network ---- - -Darwinia Crab Testnet (Crab for short) is a Canary Network for Darwinia, The positioning of Crab is similar to Polkadot's Kusama Network. Expect Chaos is a reasonable expectation. - -Crab Network is not just a testnet, it will be a long-term network, but it cannot be ruled out that it will stop running due to unexpected conditions or failures. - -Crab mainly provides simulation and test environment for Darwinia's upgrade and application deployment, perform various radical experiments. The test environment includes not only the software operation environment and network environment required for testing, but also the test economic environment. - -For Crab to simulate the real economic environment to a certain extent, Crab has the same parameters as Darwinia Mainnet, and use the same Staking mechanism and inflation model. Crab’s tokens are CRING and CKTON, the initial supply of CRING is 2000M, and the supply of CKTON is 0. - -CRING and CKTON have got real value. After the Darwinia Mainnet launched, a Token Bridge will be built between Darwinia Mainnet and Crab, allowing CRING and RING to be mutually exchangeable in the long term, with a conversion ratio of 1 RING = 100 CRING. Darwinia will reserve 40M RING as the backed asset of CRING for the Cryptocurrency Backed Asset Model(CBA Model). Darwinia Mainnet is the backing chain, Crab Network is the issuing chain, CRING is CBA. - -A portion of the initial supply of the Crab‘s CRING will be distributed to the holders of RING & DOT, they will get CRING (Airdrop) for free. - -Darwinia took a snapshot of RING & DOT holders on March 20, 2020. RING & DOT holders can check / receive CRING after Crab launched. DOT airdrop ratio: 1 DOT = 50 CRING, RING airdrop ratio: 1 RING = 1 CRING. The snapshot contains the RING of ERC-20 and TRC-20, including the deposit certificate part in Gringotts. KTON is not in the scope of this snapshot. diff --git a/content/en/crab-parameters.md b/content/en/crab-parameters.md deleted file mode 100644 index 8341b987..00000000 --- a/content/en/crab-parameters.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -id: crab-parameters -title: Crab Network Parameters -sidebar_label: Parameters ---- - -> This page intends to reflect current network configurations, it reflects the [runtime file](https://github.com/darwinia-network/darwinia-common/blob/master/bin/node-template/runtime/src/lib.rs), which is still a work in progress. - -## Consensus - -| Parameter | Value | -| ----------------------- | ------- | -| **Consensus Mechanism** | BABE | -| **Finality Gadget** | GRANDPA | - -## Accounts and Transactions - -| Parameter | Value | Description | -| ----------------------- | ------------------------- | ----------------------------------------------------------------------------- | -| **Reaping Threshold** | 0.1 CRING and 0.001 CKTON | The minimum balance required in the account to create or maintain an account. | -| **Transaction Minimum** | 0 | The Min. amount you can send to an Darwinia Address. | - -## Identity - -| Parameter | Value | Description | -| ------------------------------------------------ | --------- | ------------------------------------------------------------ | -| Required Bond Per Identity | 10 CRING | Bond required to store IDs on-chain. | -| Required Bond Per Each Additional Identity Field | 2.5 CRING | Bond required to store additional IDs on-chain | -| Sub-Account Deposit | 2 CRING | Amount required to deposit in order to create a sub account. | -| Maximum Sub-Accounts | 100 | The maximum number of sub account an account may have. | - -## Periods of common actions and attributes - -| Darwinia | Time | Slots | -| -------- | --------- | ----- | -| Block | 6 seconds | 1 | -| Epoch | 1 hour | 600 | -| Era | 6 hours | 3,600 | - -**A maximum of one block per slot can be in a chain.* - -## Staking, Validating, and Nominating - -| Darwinia | Time | Slots | Description | -| ----------------------- | ---------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| Validator Slots | 7 | Initial slots for active validators, gradually increasing. | | -| Term duration | 6 hours | 3,600 | The time for which a validator is in the set after being elected. Note, this duration can be shortened in the case that a validator misbehaves. | -| Nomination period | 6 hours | 3,600 | Every 6 hours, a new validator set is elected according to Phragmen's method. | -| Bonding duration | 14 days | 201,600 | How long until your funds will be transferrable after unbonding. | -| Slash defer duration | 14 days | 201,600 | Prevents overslashing and validators "escaping" and getting their nominators slashed with no repercussions to themselves | -| Slash Cancellation Vote | Requires 3/4 of Council to Approve | | | - -## Governance - -| Democracy | Time | Slots | Description | -| ---------------- | ------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Voting period | 7 days | 100,800 | How long the public can vote on a referendum. | -| Launch period | 7 days | 100,800 | How long the public can select which proposal to hold a referendum on. i.e., Every week, the highest-weighted proposal will be selected to have a referendum | -| Enactment period | 8 days | 115,200 | Time it takes for a successful referendum to be implemented on the network. | - -| Council | Time | Slots | Description | -| ------------- | ----- | ----- | -------------------------------------------------------------------- | -| Term duration | 1 day | 3,600 | The length of a council member's term until the next election round. | -| Voting period | 1 day | 3,600 | The council's voting period for motions. | - -| Technical committee | Time | Slots | Description | -| ----------------------- | ------- | ------- | ---------------------------------------------------------------------------------------------- | -| Cool-off period | 7 days | 100,800 | The time a veto from the technical committee lasts before the proposal can be submitted again. | -| Emergency voting period | 3 hours | 1,800 | The voting period after the technical committee expedites voting. | - -## Treasury - -| Parameter | Value | Description | -| --------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| Budgeting Period** | 6 days | When the treasury can spend again after spending previously. | -| Proposal Bond | 5% and minumum 1000 CRING | The amount required to bond in order to propose a treasury spend. If approved, it is returned, if the proposal fails, it is burnt. | -| Burn unspent treasury funds | Off | This deactivates a burn of all unspent treasury funds at the end of a budgeting period. | - -## SS58 Address Format -| Network Alias | Network ID | Network Type | -| ------------- | ---------- | ---------------- | -| darwinia | 18 | Darwinia Mainnet | -| crab | 42 | Crab Network | - -## Seed Nodes - -| Seed Nodes | -| ---------- | -| TBC | -| TBC | -| TBC | diff --git a/content/en/crab-tool-index.md b/content/en/crab-tool-index.md deleted file mode 100644 index f56055f2..00000000 --- a/content/en/crab-tool-index.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -id: crab-tool-index -title: Crab Network Tools -sidebar_label: Tools ---- - -## Wallet: - -- [Polkadot.js Browser Extension](https://github.com/polkadot-js/extension) -- [Darwinia Crab Wallet](https://apps.darwinia.network/#/accounts) - -## Explorer: - -- [Subscan](https://crab.subscan.io/) - -## Networks: - -- [Telemetry](https://telemetry.polkadot.io/#list/crab) - diff --git a/content/en/crab-tut-claim-cring.md b/content/en/crab-tut-claim-cring.md deleted file mode 100644 index 2775d0e4..00000000 --- a/content/en/crab-tut-claim-cring.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -id: crab-tut-claim-cring -title: How to claim free CRING -sidebar_label: Claim CRING ---- - -Crab Tutorials: How to claim your free CRING - -## Receiving condition - -Darwinia Crab Network simulated the real network ecology and airdropped the Crab Network Token - CRING for the holders of **ERC-20 RING** **ERC-20 DOT** and **TRC-20 RING**. - -The airdrop will be carried out according to the number of RING (including **RING balance** and **in-progress deposit certificate**) and DOT held by the account at the time of the snapshot. The delivery ratio is: - -- **1RING -> 1CRING** - -- **1DOT -> 50CRING** - -The snapshot time is: **2020-03-20 13:50:00 (+0800)** - -## Environmental preparation - -Please select the following signature tools and download according to the usage scenarios and the needs of the chain: - -- For PC - - Ethereum network : [Metamask](https://metamask.io/) - - TRON network : [Tronlink](https://www.tronlink.org/) - -- For Mobile - - Ethereum / TRON wallet: [Math Wallet](http://www.mathwallet.org/) - - Ethereum wallet: [imToken](https://token.im/) - -> The above is the recommended mobile wallet. If you encounter problems, please upgrade to the latest version. You can also use the mobile wallet that has been injected into the web3 environment to operate according to your usual usage habits. The use of non-recommended wallets or operational errors may cause asset losses, please carefully evaluate and bear the corresponding risks. - -## Query the number of airdrops - -1.Confirm that the signature environment is ready and unlocked - -2.PC: Visit [CRING claim tool](http://claim.darwinia.network/) through chrome browser or mobile wallet - -3.Select the network you want to query (Ethereum / TRON) and click [Search]. (The Ethereum network is used as an example below) - -![02_claim_choosechain](assets/02_en.png) - -4.Get query results - -![03_claim_search](assets/03_en.png) - -## Claim `CRING` Airdrop - -1.Confirm that the signature environment is ready and unlocked - -2.PC: Visit [CRING claim tool](http://claim.darwinia.network/) through chrome browser or mobile wallet - - Mobile: Take the math wallet as an example, click [Dapps]-[DAPP Browser]-enter `http://claim.darwinia.network/` to access. - -![01_mathwallet](assets/01_en.png) - -3.Select the network you want to query (Ethereum / TRON) and click [Claim]. (The Ethereum network is used as an example below) - -![04_claim_choosechain 的副本](assets/04_en 的副本.png) - -4.Fill in the Darwinia Crab address that accepts CRING. After confirming that it is correct, click [Submit]. - - > ️ If there is no Darwinia Crab address, please refer to the generation method: [如何创建或导入 Darwinia Crab 地址](crab-tut-create-account) - -![claim_submitaccount](assets/05_en.png) - -5.Sign through mobile wallet or browser plug-in (signature does not consume fees) -![06_claim_sign](assets/06_en.png) - -6.After successfully obtaining the signature information, click [Copy Signature]. (Please pay attention to save the signature information, it is recommended not to close this page temporarily before successfully receiving the airdrop) -![07_claim_copy](assets/07_en.png) - -7.Open [Darwinia wallet - Claim](https://apps.darwinia.network#/claims):, Select the address just received to receive the airdrop and click [Continue]. - -![08_claim_chooseaccount](assets/08_en.png) - -8.Paste the signature information just generated in the `CRING Claim Tool`, and click [Confirm claim]-[Redeem]-[Submit] - -![09_claim_sign2](assets/09_en.png) - -9.After successful receipt, you will receive the following prompt. At this time, it means your airdrop has been successfully received, you can check the balance in [Darwinia Wallet-Account](https://apps.darwinia.network#/accounts) or [subscan](https://crab.subscan.io/). - -![10_claim_success](assets/10_en.png) - -## Contact Us - -If you encounter other problems in the process of receiving the airdrop, please join our community to communicate. - - WeChat public account: DarwiniaNetwork - - WeChat assistant: Darwinia_Network - - Telegram: diff --git a/content/en/crab-tut-create-account.md b/content/en/crab-tut-create-account.md deleted file mode 100644 index c8fb7f9c..00000000 --- a/content/en/crab-tut-create-account.md +++ /dev/null @@ -1,177 +0,0 @@ ---- -id: crab-tut-create-account -title: Create an Account -sidebar_label: Create an Account ---- - -There are mainly three ways to generate a Darwinia account, you can choose either one based on your preference. Once your account is created and you have your account `secret phrase` or `secret seed`, you can migrate your account from various medium by importing your account. - - - - -## 1. Darwinia Web Wallet - -### Switch to mainnet - -![setting](assets/tut/create-account-0.png) - -Enter [Darwinia Crab Web Wallet](https://apps.darwinia.network), you can see two buttons "Add Account" and "Restore JSON" in the "Account" column. - -![create account](assets/web-wallet-1-en.png) - -**New account** - -Click "Add Account", after setting the basic account information, click the "Save" button. (By default, only "mnemonic", "private key" need to be switched) - -![create account](assets/web-wallet-2-en.png) - -Click the "Create and Backup Account" button to back up the account "json file" - -![create account](assets/web-wallet-3-en.png) - -> Be sure to back up `mnemonics, private keys, json files`, etc. When backing up the json file, please keep the password safe. If the password is lost, the address cannot be restored through the json file, but it can be re-imported through the mnemonic word and private key. - -**Restore json** - -If you have created an account before and backed up a json file, you can directly select "Restore JSON". - -![create account](assets/web-wallet-4-en.png) - -**Restore account via "Mnemonic"** - -If you forget the password of the JSON file, you can use the "mnemonic word" to recover it. Click "Add Account" to replace the mnemonic with the original account's mnemonic. (The name and password can be reset) - -![create account](assets/web-wallet-5-en.png) - -**Generate Vanity account** - -If you need to generate a Darwinia wallet account containing specific letters, you can refer to the tutorial: - >This type of account is mostly used to receive the airdrop proof of work from the faucet, or is in need of memory and beauty. - -- Click [Vanity], fill in the conditions you need to filter - -![faucet-1](assets/faucet-1.png) - -`Search for` Type here what you would like your address to contain. This tool will generate the keys and show the associated addresses that best match your search. You can use \"?\" as a wildcard for a character.": "", - -`Case sensitive` Should the search be case sensitive, e.g if you select \"no\" your search for \"Some\" may return addresses containing \"somE\" or \"sOme\"...": "Should the search be case sensitive, e.g if you select \"no\" your search for \"Some\" may return addresses containing \"somE\" or \"sOme\". - -`Keypair crypto type` Determines what cryptography will be used to create this account. Note that to validate on Polkadot, the session account must use \"ed25519\".": "Determines what cryptography will be used to create this account. Note that to validate on Polkadot, the session account must use ed25519. - -- Click [Start generation], after waiting for the account to be generated, click [+] to select your favorite account for backup. - -![faucet-2](assets/faucet-2.png) - -- Click [Save], according to your usage habits, choose to back up the original seed or json file - -![faucet-3](assets/faucet-3.png) - -> Be sure to back up `mnemonics, private keys, json files`, etc. When backing up the json file, please keep the password safe. If the password is lost, the address cannot be restored through the json file, but it can be re-imported through the mnemonic word and private key. - - - - -## 2. Polkadot.js Browser Plugin - -**Install the Browser Plugin** - -The browser plugin is available for both [Google Chrome](https://chrome.google.com/webstore/detail/polkadot%7Bjs%7D-extension/mopnmbcafieddcagagdcbnhejhlodfdd?hl=en) and [FireFox](https://addons.mozilla.org/en-US/firefox/addon/polkadot-js-extension). - -![polkadot-js](assets/polkadot-js-1-cn.png) - -**New Account** - -Click the extension to open the "Account Management" dialog box, click the "Create New Account" button, and then follow the instructions. - -![polkadot-js](assets/polkadot-js-2-cn.png) - -![polkadot-js](assets/polkadot-js-3-cn.png) - -> Make sure to keep the mnemonics safe. - -**Set Address for Darwinia Mainnet or Crab Network** - -Now we will ensure that the addresses are displayed as Darwinia mainnet addresses. Your address will be different depending on network selection. - -Click on "Options" at the top of the plugin window. Select `Crab Network` or `Substrate` in "Display Address Format for" dropdown box. - -![polkadot-js](assets/polkadot-js-4-cn.png) - -> Crab Network share the same `Network ID` as `Substrate`, if you need to choose a network when generating an account, use `substrate` as the same effect as `crab network`. - - -## 3. Subkey - -Subkey is recommended for technically advanced users who are comfortable with command line and compiling Rust code. Subkey allows you to generate keys on any device that can compile the code. Subkey may also be useful for automated account generation, using an air-gapped device other than one running iOS or Android or other specific purposes. It is not recommended for general users. - -To [install Subkey](https://substrate.dev/docs/en/ecosystem/subkey#more-subkey-to-explore), run: - -```bash -$ curl https://getsubstrate.io -sSf | bash -s -- --fast -$ cargo install --force --git https://github.com/paritytech/substrate subkey -$ cargo build -p subkey -``` - -After installing Subkey successfully, run: - -```shell -subkey -n substrate generate -``` - -You should see an output something like below- **save all of this information somewhere secure you will not be able to recover your account if you lose your phrase or seed.** - -```text -Secret phrase `destroy vague trend estate person civil cattle lab hockey tooth error pigeon` is account: - Network ID/version: substrate - Secret seed: 0x58e57817a2ccfa696ed6c3735d4cc4646f894bf7daf51a94f0c4702a92e40710 - Public key (hex): 0x225ce1f9c178189d2a977a195f822ebbfb538b317f23f83ab35605fb009fa438 - Account ID: 0x225ce1f9c178189d2a977a195f822ebbfb538b317f23f83ab35605fb009fa438 - SS58 Address: 2owvscruh7PNbykGLMZPxHyjYdi1Ryanrm4PTxVKh85Ef8Dn -``` - -> If you previously created an account for other networks other than `substrate` or `crab network`, you need to derive the correct `Address` from your previous `secret phrase` or `secret seed`. You can use `subkey -n substrate inspect "YOUR SECRET PHRASE HERE"` to obtain the Crab network-ID inclusive Address (SS58). - - -### Polkadot.js Web Apps -TODO: complete guide when Darwinia network is supported - - -### ~~Itering ID Wallet~~ - -Coming soon. - -### ~~Math Wallet~~ - -Coming soon. - - - -## Storing your key safely - -> **DISCLAIMER: Key Security** -Your secret seed is the _only_ way to get access to your account. You must keep -the secret both secure and private. If you share you secret with anyone they -will be able to have full access to your account, including all of your funds. -The secret, for this reason, is a target from hackers and others with bad -intentions to steal your funds. We recommend a variety of account generation -methods that have various convienience and security tradeoffs. Please review -this page carefully before making your address so that you understand the risks -of the account generation method you choose and how to properly mitigate them -in order to keep your funds safe. - -The seed is your **key** to the account. Knowing the seed allows you, or anyone -else who knows the seed, to re-generate and control this account. - -It is imperative to store the seed somewhere safe, secret, and secure. If -you lose access to your account, you can re-create it by entering the seed. This -also means that somebody else can have control over your account if they have -access to your seed. - -For maximum security, the seed should be written down on paper or another non-digital device and stored in a -safe place. You may also want to protect your seed from physical damage, as well (e.g. by storing in a sealed -plastic bag to prevent water damage, storing it in a fireproof safe, etc.) It is recommended that you store -multiple copies of the seed in geographically separate locations (e.g., one in your home safe and one in a -safety deposit box at your bank). - -You should definitely not store your seed on any kind of computer that has or may have access to the internet -in the future. diff --git a/content/en/crab-tut-exchange.md b/content/en/crab-tut-exchange.md deleted file mode 100644 index fefc1293..00000000 --- a/content/en/crab-tut-exchange.md +++ /dev/null @@ -1,249 +0,0 @@ ---- -id: crab-tut-exchange -title: Darwinia Crab Exchange Access Guide -sidebar_label: Darwinia Crab Exchange Access Guide -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/en/crab-tut-exchange.md - ---- - -# Darwinia Crab Exchange Access Guide - -Darwinia Crab Testnet (Crab for short) is a Canary Network for Darwinia. Expect Chaos is a reasonable expectation. - -Crab Network is not just a testnet, it will be a long-term network. - -Crab mainly provides simulation and test environment for Darwinia's upgrade and application deployment, perform various radical experiments. The test environment includes not only the software operation environment and network environment required for testing, but also the test economic environment. - -Crab use the same Staking mechanism and inflation model with Darwinia mainnet. Crab’s tokens are CRING and CKTON, the initial supply of CRING is 2000M, and the supply of CKTON is 0. - -## Informations - -Official website: https://crab.network/ (under construction) -Blockchain Explorer: https://crab.subscan.io/ -Code: https://github.com/darwinia-network/darwinia -Block time: 6 seconds -Public Websocket RPC: [wss://crab-rpc.darwinia.network](wss://crab-rpc.darwinia.network) -Public Http RPC: https://crab-rpc.darwinia.network - -* CRING - Symbol: CRING - Name: Darwinia Crab Network Native Token - Precision: 9 - -* CKTON - Symbol: CKTON - Name: Darwinia Crab Commitment Token - Precision: 9 - -## Full node quick installation and running - -Download releases from https://github.com/darwinia-network/darwinia/releases - -### Minimum requirements of host server - -CPU: 1 core -Memory: 2 GB -Disk: 30 GB SSD - -### Linux - -#### 1. Prepare binary - -``` -curl -sL https://github.com/darwinia-network/darwinia/releases/download/vx.x.x/darwinia-x.x.x-x86_64-linux-gnu-glibc-x.xx-llvm-x.x.tar.bz2 - -tar xvf darwinia-x.x.x-x86_64-linux-gnu-glibc-x.xx-llvm-x.x.tar.bz2 - -chmod +x ./darwinia -``` - -#### 2. Run - -``` -./darwinia \ - --base-path \ - --name \ - --chain crab -``` - -Add the --ws-external and --rpc-cors all options if you want to [remotely connect to this node](https://wiki.polkadot.network/docs/en/maintain-wss): - -``` -./darwinia \ - --base-path \ - --name \ - --chain crab \ - --ws-external \ - --rpc-cors all -``` - -### Docker - -#### 1. Pull docker image - -``` -docker pull quay.io/darwinia-network/darwinia:vx.x.x -``` - -#### 2. Run - -``` -docker run -it \ - -v :/data \ - -p :9933 \ - -p :9944 \ - darwinianetwork/darwinia:vx.x.x \ - --base-path /data \ - --name \ - --chain crab \ - --ws-external \ - --rpc-cors all -``` - -## Usages - -### Check address correctness - -``` -var cryptoUtil = require('@polkadot/util-crypto'); - -/** - * check address - * @param {string} address - crab address - * @param {number} ss58 - ss58 number, darwinia crab = 42 - * @return {*} [boolean, string | null] - */ -var checkResult = cryptoUtil.checkAddress('5EU6EEhZRbh1NQS7HRMwAogoBHWtT2eLFQWei2UZHUHJosHt', 42); - -console.log('-----check crab address----- \n' , checkResult); -``` - -### Generate address -``` -var cryptoUtil = require('@polkadot/util-crypto'); - -// buffer is an ArrayBuffer -function buf2hex(buffer) { - return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)).join(''); -} - -cryptoUtil.cryptoWaitReady().then(() => { - /** - * generate mnemonic - * @param {number} numWords - word count ,default = 12 - * @return {*} string - */ - var mnemonic = cryptoUtil.mnemonicGenerate(); - var seed = cryptoUtil.mnemonicToMiniSecret(mnemonic); - - console.log('-----seed hex----- \n', buf2hex(seed.buffer)) - - /** - * Creates a new public/secret keypair from a seed - * @param {Uint8Array} seed - seed - * @return {*} a object containing a `publicKey` & `secretKey` generated from the supplied seed. - * { secretKey: [...], publicKey: [...] } - */ - var keyPair = cryptoUtil.schnorrkelKeypairFromSeed(seed); - // https://github.com/paritytech/substrate/blob/master/primitives/core/src/crypto.rs#L437 - // darwinia crab = 42 - var ss58Format = 42; - var address = cryptoUtil.encodeAddress(keyPair.publicKey, ss58Format); - console.log('-----mnemonic----- \n', mnemonic, seed, keyPair, address) -}) -``` - -### Get the latest block height -``` -curl 'http-rpc-url' -X POST -H "Content-Type: application/json" --data '{"id":1,"jsonrpc":"2.0","method":"chain_getFinalizedHead","params":[]}' -``` - -### Get the specified block information by hash - -``` -curl 'http-rpc-url' -X POST -H "Content-Type: application/json" --data '{"id":1,"jsonrpc":"2.0","method":"chain_getBlock","params":["0xb375d7db4d737bdbfb8f8089d7b4589fd9fe68a535d448b44dcf9aa2ef8eed17"]}' -``` - -### Get details of a transaction -``` -curl 'http-rpc-url' -X POST -H "Content-Type: application/json" --data '{"hash": "0x04af51c980a9152ad8319f73a85d13305e273be8ebd3cc979c18f4ad14e716d6"}' https://crab.subscan.io/api/scan/extrinsic -``` - -* How to judge and avoid a fake deposit - ``` - 1. Check whether the transaction is successful - result["data"]["success"] == true; - - 2. Check if the transaction is a transfer - // CRING - const event = result["event"].find(event => { - event["module_id"] == "balances" && event["event_id"] == "Transfer" - }); - - // CKTON - const event = result["event"].find(event => { - event["module_id"] == "kton" && event["event_id"] == "Transfer" - }); - - 3. Check if the transaction is finalized - result["data"]["finalized"] == true; - - 4. Confirm the receipt address and quantity - event["params"][1]["value"] == Deposit Address - - 5. Get the value transfered - value = event["params"][2]["value"] / 1_000_000_000 - ``` - -### Transfer - -``` -yarn add @polkadot/api -yarn add @polkadot/keyring -yarn add @darwinia/types -``` - -``` -const { ApiPromise } = require('@polkadot/api'); -const { Keyring } = require('@polkadot/keyring'); - -// Darwinia types -const { typesBundleForPolkadot } = require('@darwinia/types/mix'); - -const provider = new WsProvider('wss://:'); -const api = await ApiPromise.create({ - provider: wsProvider, - types: typesBundleForPolkadot -}); - -const keyring = new Keyring({ type: 'sr25519' }); - -const A = keyring.addFromUri(''); -const B = '5EU6EEhZRbh1NQS7HRMwAogoBHWtT2eLFQWei2UZHUHJosHt'; - -// Create a extrinsic -// CRING, transferring 1 CRING to B -const transfer = api.tx.balances.transfer(B, 1_000_000_000); - -// CKTON, transferring 1 CKTON to B -const transfer = api.tx.kton.transfer(B, 1_000_000_000); - -// Sign and send the transaction using our account -const hash = await transfer.signAndSend(A); - -console.log('Transfer sent with hash', hash.toHex()); -``` - -### Transfer: Offline signature with online broadcast -https://github.com/darwinia-network/darwinia-polkadotjs-typegen/blob/master/src/test/index.ts - -### Get address balance -``` -curl 'http-rpc-url' -X POST -H "Content-Type: application/json" --data '{"id":6,"jsonrpc":"2.0","method":"balances_usableBalance","params":[0, ss58 地址]}' -``` - -### Prevention of chain forks - -Waiting for block finalized - - diff --git a/content/en/crab-tut-get-free-cring.md b/content/en/crab-tut-get-free-cring.md deleted file mode 100644 index f8b1e591..00000000 --- a/content/en/crab-tut-get-free-cring.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -id: crab-tut-get-free-cring -title: How to get free CRING through faucet -sidebar_label: Get free CRING ---- - -## Get Faucet (CRING) - - - -- Join Darwinia Faucet Channel: [Click Here](https://t.me/DarwiniaFaucet) - -- Reply `/faucet + Account` - - Example: /faucet 5CRABWXr1AqSSqJwv9tzh8gk4mEnrRYV9VWq7VnHh1KxvTBD - - Attention: There is a space between /faucet and account. Account must containing [CRAB]. - -- If your account meets the requirements for issuance, 10 CRING will be automatically distributed to your account, you can view the transfer record through the browser [crab.subscan.io](https://crab.subscan.io/) via the link below. - -![faucet-4](assets/faucet-4.png) - -## Faucet distribution rules - -1) Each Telegram account can successfully receive `1` airdrops within 7 days. -2) Each crab address can only receive airdrop for `1` time -3) The address to receive the airdrop needs to be satisfied: the address contains the four letters `CRAB` (case sensitive). -4) The maximum daily distribution of airdrops is `500`, first come first served. -5) The number of each airdrop is a fixed value: `10` CRING. - -## Generate a Vanity account with CRAB - -- Click [Vanity account](https://apps.darwinia.network/#/vanity), fill in the conditions you need to filter. - - ![faucet-1](assets/faucet-1.png) - - `Search for` : fill in`CRAB` - >Type here what you would like your address to contain. This tool will generate the keys and show the associated addresses that best match your search. You can use \"?\" as a wildcard for a character.": "", - - `Case sensitive`: select `Yes` - >Should the search be case sensitive, e.g if you select \"no\" your search for \"Some\" may return addresses containing \"somE\" or \"sOme\"...": "Should the search be case sensitive, e.g if you select \"no\" your search for \"Some\" may return addresses containing \"somE\" or \"sOme\". - - `Keypair crypto type` : Both can be selected - - >Determines what cryptography will be used to create this account. Note that to validate on Polkadot, the session account must use \"ed25519\".": "Determines what cryptography will be used to create this account. Note that to validate on Polkadot, the session account must use ed25519. - -- Click [Start Generation] and wait for the account to be generated. Click [+] to select your favorite account for backup. - - ![faucet-2](assets/faucet-2.png) - -- Click [Save] and choose to back up the original seed or json file according to your usage habits. - - ![faucet-3](assets/faucet-3.png) - - > Be sure to back up `mnemonics, private keys, json files`, etc. When backing up the json file, please keep the password safe. If the password is lost, the address cannot be restored through the json file, but it can be re-imported through the mnemonic word and private key. diff --git a/content/en/crab-tut-governance.md b/content/en/crab-tut-governance.md deleted file mode 100644 index 2630a654..00000000 --- a/content/en/crab-tut-governance.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -id: crab-tut-governance -title: How to participate in governance -sidebar_label: Participate in governance ---- - -TBD diff --git a/content/en/crab-tut-index.md b/content/en/crab-tut-index.md deleted file mode 100644 index 6fa52e24..00000000 --- a/content/en/crab-tut-index.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: crab-tut-index -title: Tutorials List -sidebar_label: Tutorials ---- -## Staking -- Become a Nominator [View Guide](crab-tut-nominator) -- Run a Node [View Guide](crab-tut-node) -- Become a Validator [View Guide](crab-tut-validator) -- Participate in Governance [View Guide](crab-tut-governance) -- Become a Relayer [View Guide](crab-tut-relayer) - -## Other -- Create an Account [View Guide](crab-tut-create-account) -- Get free CRING (test coin) [View Guide](crab-tut-get-free-cring) -- Claim your CRING (test coin) [View Guide](crab-tut-claim-cring) diff --git a/content/en/crab-tut-node.md b/content/en/crab-tut-node.md deleted file mode 100644 index a6182c56..00000000 --- a/content/en/crab-tut-node.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -id: crab-tut-node -title: How to run a node -sidebar_label: Running a node ---- - -## Initial Set-up - -### Choose one of the following two ways to obtain an executable file - -#### 1.Compile from source - -- Compiler environment configuration. Refer to sections 4.1 to 4.1.3 https://github.com/darwinia-network/darwinia#41-hacking-on-darwinia -- Start command -- Enter the darwinia root directory -- cargo build --release -- The compiled executable file darwinia (.exe) can be found under darwinia / target / release - -#### 2.Download the compiled executable file - -- macOS Catalina: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-catalina.tar.gz -- ArchLinux: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-archlinux.tar.gz -- Ubuntu: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-ubuntu.tar.gz -- CentOS: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-centos7.tar.gz -- Docker: `docker pull darwinianetwork/darwinia:release-v0.6.7` - - -## Start Parameters - -### Choose one of the following two starting methods - -#### 1.Read the configuration and start from the file (Not currently supported) - -If not in the same folder, it is best to fill in the absolute path. - -``` -darwinia --conf=example.json -``` - -Example configuration file example.json: - -``` -{ - "validator": true, - "base-path": "/tmp/example", - "bootnodes": [ - "/ip4/0.0.0.0/tcp/0/p2p/aaa", - "/ip4/0.0.0.1/tcp/0/p2p/bbb", - "/ip4/0.0.0.2/tcp/0/p2p/ccc" - ], - "name": "Example" -} -``` - -#### 2.Read the configuration from the command line and start - -```sh -./darwinia \ - -d /tmp/example \ - --bootnodes /ip4/0.0.0.0/tcp/0/p2p/xxx \ - --name Example -``` - -### Common parameters - -| parameter | Annotate | Subparameter | Subparameter type | -| :----------: | :------------------------------------------------------------------------------------------------------------------------------: | :----------: | :---------------: | -| validator | The node type is the validator node | / | / | -| rpc-external | To monitor all rpc, the verifier node needs to use `--unsafe-rpc-external` but it is not recommended to enable the verifier node | / | / | -| ws-external | To monitor all ws, the verifier node needs to use `--unsafe-ws-external` but it is not recommended to enable the verifier node | / | / | -| port | p2p port | port number | number | -| rpc-port | rpc port | port number | number | -| ws-port | ws port | port number | number | -| base-path | Address for storing various data used in the chain | path | String | -| name | Node name | Node name | String | -| rpc-cors | Request header whitelist | Filter type | enumerate | -| bootnodes | The seed node used to obtain startup data(/ip4/0.0.0.0/tcp/0/p2p/xxx) | Node URL | String array | - -#### View all parameter descriptions: - -``` -./darwinia --help -``` - -## Start Node - -### Start Command - -```sh -./darwinia \ - -d /tmp/example \ - --bootnodes /ip4/0.0.0.0/tcp/0/p2p/xxx \ - --name Example -``` - -It is recommended to use systemctl, pm2, screen and other tools to maintain the process. - -### Bootnodes - -To avoid some seed nodes being fully connected, the following alternatives are provided, and you can choose to fill in bootnodes at will: - -```sh -# maintain by @AurevoirXavier -/ip4/49.234.225.216/tcp/30333/p2p/12D3KooWFHNgAmrphmgcgukREKRrwWn6pZ6qQ8eFVXsRdnUQKZvL -/ip4/106.54.116.32/tcp/30333/p2p/12D3KooWKhcHAUCs2CUGA5NtRnRRarL4C5U7fVB4ycmHxDidZsrj -/ip4/35.234.33.88/tcp/30333/p2p/12D3KooWMCTzZVwJCafwPVQGxr8CkSK1VKmg5pbhjKjqgEwhywSe -# maintain by @clearloop -/ip4/122.152.213.162/tcp/30333/p2p/QmWfdcdFaiCr6gfJvh7jjmQ6hUGshA4BrGSLSDMuFBf823 -# maintain by @HackFisher -/ip4/104.199.197.8/tcp/20222/p2p/Qmc9tW5xSVUH1EBdH8WEE5nYAuswGrRvtYZ93MAwH9fsZo -/ip4/104.199.197.8/tcp/30333/p2p/QmURDEZxHHVguYpfaDRAYfqYJSZT5LuBtK4mD7GXhfehtp -# maintain by @yanganto -/ip4/220.134.22.36/tcp/30333/p2p/Qme2VxbvZFxNbF3xKxWBQczRzbcudmny9n3eSube73ZmEw -``` - -### Q&A - -- Q: Unable to start node -- A: - 1. Confirm that the system supports the executable file - 1. Some dynamic link library dependencies are missing, installation dependencies - -- Q: Why does my node not synchronize blocks -- A: - 1. Check if bootnodes are filled in incorrectly - 1. Poor network communication with the target node, try other bootnodes - 1. The number of target node connections is full, try other bootnodes - 1. Confirm that the version numbers are consistent (in most cases, they do not need to be identical) - -- If there are still problems, welcome [Submit issue](https://github.com/darwinia-network/darwinia/issues/new) diff --git a/content/en/crab-tut-nominator.md b/content/en/crab-tut-nominator.md deleted file mode 100644 index 3713295b..00000000 --- a/content/en/crab-tut-nominator.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -id: crab-tut-nominator -title: How to become a nominator -sidebar_label: Become a nominator ---- -> - Staking is a consensus mechanism based on PoS (Proof of Stake / Proof of Stake). Token holders obtain rewards and benefits through pledge, voting, delegation, and locking. - -> - Before participating in staking, please make sure you have at least **1** Darwinia address. If you hold more tokens or have higher security requirements, it is recommended to prepare **2** Darwinia addresses. If there is no address, please refer to: [How to create an account](<) - -> - A small amount of CRING must be prepared in Darwinia-Crab Network's address as fee. If you have no CRING, please refer to: [How to get free CRING through faucet](https://docs.darwinia.network/docs/en/crab-tut-claim-cring) - - -## Start Staking - -- Enter [Darwinia Wallet](https://apps.darwinia.network) and lick the [Staking] column on the left , Click [Start staking]. - - ![nominate-1-en](assets/nominate-1-en.png) - -- Fill in the staking parameters - - ![nominate-2-en](assets/nominate-2-en.png) - - - ` Stash account` Account for stashing tokens. Tokens participating in staking will come from this account. The operations of this account are mostly related to changes in stash. - - - `Controller account` The controller is the account that will be used to control any nominating or validating actions. Should not match another stash or controller. - - > The `Stash account` and` Controller account` can be set to the same account. If you hold more tokens or have higher security requirements, it is recommended to set up different accounts here. - - - `Value bonded` The total amount of the stash balance that will be at stake in any forthcoming rounds (should be less than the total amount available). This part of the tokens will be temporarily bonded. bonding takes 14 days to unbond; you can choose to bond CRING or CKTON. - - - `Payment destination` The destination account for any payment as either a nominator or validator. - - - `Bond period` Optional; bond CRING promise for 3-36 months to get additional CKTON rewards. (Promise to lock to accept user terms) - - > If you unlock CRING in advance within the lock limit, you will be charged a penalty of 3 times the CKTON reward (In the absence of sufficient CKTON, the CRING can not be used for payment of fines). - -- After filling in the staking parameters, please click [bond] and [submit] - - ![nominate-3-en](assets/nominate-3-en.png) - -
- -## Nominate a validator - -1. After completing the staking parameters, click [Nominate] on this page. - - ![nominate-4-en](assets/wiki-tut-nominator-4-en.png) - - > The identities of the validator and the nominator are mutually exclusive and cannot coexist. If you are running a validator, you need to cancel the validator before proceeding with the nomination. - -2. Choose your favorite validator. - - ![nominate-5-en](assets/wiki-tut-nominator-5-en.png) - - -3. Sign and submit - - ![nominate-6-en](assets/wiki-tut-nominator-6-en.png) - -4. View information about nominated validators - - ![nominate-7-en](assets/wiki-tut-nominator-7-en.png) - - > The operation of nominating validators will take effect from the next era, and it is normal to temporarily delay. - -
- -## Tokens' statuses - -The tokens' statuses are following: - -- `Available` The amount of tokens that are able to transfer, bond and transfer. - -- `Bonded` The amount of tokens that cannot operated directly but does not have lock limit, which is used to gain voting power and can be taken out at any time (with a 14-day unbonding period) or add lock limit. - -- `Locked` The amount of tokens that cannot be operated and has a lock limit, which is used to gain voting power and earn additional KTON rewards. - -- `Unbonding` The amount of tokens that has been unlocked but in the unbonding period. - -
- -## Other Staking operations - -There are other operations in staking for the following purposes: - -![nominate-8-en](assets/wiki-tut-nominator-8-en.png) - -- `Stop nomination` Cancels all nominees. - -- `Bond` & `Bond more` Adds bonded tokens for staking to obtain more power. - -- `Unbond` Unbond tokens for staking, and at the same time the power will be reduced proportionally. - - > The 14-day bond period is required to unbond. Tokens that are in the bond period cannot be operated. Please be careful. - -- `Reward history` Go to Subscan explorer to view historical reward records - -- `Claim reward` Manually claim the reward, and the reward will be distributed in units of era. - - > Please note: 56 era (about 56 days) will be saved, and you will not be able to claim it if it expires. - -![](assets/wiki-tut-nominator-9-en.png) - -- `Claim Reward` Manually claim the reward, and the reward will be distributed in units of era. - -- `Bond more funds` Adds bonded tokens for staking to obtain more power. - -- `Unbond funds` Unbond tokens for staking, and at the same time the power will be reduced proportionally. - -- `Lock extra` Add lock limit for bonded tokens to obtain KTON rewards. - -- `Rebond funds` Rebond the unbonding funds to earn power. - -- `Change controller account` Change the account that will be used to control any nominating or validating actions. Should not match another stash or controller. - -- `Change reward destination` Change the destination account for any payment as either a nominator or validator. - -- `Set nominees` Re-nominate validator - -- `Change session key` If you want to upgrade to become a validator, you need to fill in this item. [How to become a validator](https://docs.darwinia.network/docs/en/wiki-tut-validator) - -- `Set on-chain identity` Set your personal information, such as display, legal name, email, website, twitter and riot. Other users can view this information and contact you. - diff --git a/content/en/crab-tut-relayer.md b/content/en/crab-tut-relayer.md deleted file mode 100644 index eaef818f..00000000 --- a/content/en/crab-tut-relayer.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -id: crab-tut-relayer -title: How to become a relayer -sidebar_label: Become a relayer ---- - -TBD diff --git a/content/en/crab-tut-validator.md b/content/en/crab-tut-validator.md deleted file mode 100644 index a3d4cadf..00000000 --- a/content/en/crab-tut-validator.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -id: crab-tut-validator -title: How to become a validator -sidebar_label: Become a validator ---- -> - Staking is a consensus mechanism based on PoS (Proof of Stake / Proof of Stake). Token holders obtain rewards and benefits through pledge, voting, delegation, and locking. - -> - Before participating in staking, please make sure you have at least **1** Darwinia address. If you hold more tokens or have higher security requirements, it is recommended to prepare **2** Darwinia addresses. If there is no address, please refer to: [How to create an account](<) - -> - A small amount of CRING must be prepared in Darwinia-Crab Network's address as fee. If you have no CRING, please refer to: [How to get free CRING through faucet](https://docs.darwinia.network/docs/en/crab-tut-claim-cring) - - - -## Start Staking - -### Entrance -- Enter [Darwinia Wallet](https://apps.darwinia.network) and click the [Staking] column on the left , Click [Start staking]. - - ![nominate-1-en](assets/nominate-1-en.png) - - -### Fill in the staking parameters - -![nominate-2-en](assets/nominate-2-en.png) - -- ` Stash account` Account for stashing tokens. Tokens participating in staking will come from this account. The operations of this account are mostly related to changes in stash. - -- `Controller account` The controller is the account that will be used to control any nominating or validating actions. Should not match another stash or controller. - - > The `Stash account` and` Controller account` can be set to the same account. If you hold more tokens or have higher security requirements, it is recommended to set up different accounts here. - -- `Value bonded` The total amount of the stash balance that will be at stake in any forthcoming rounds (should be less than the total amount available). This part of the tokens will be temporarily bonded. bonding takes 14 days to unbond; you can choose to bond CRING or CKTON. - -- `Payment destination` The destination account for any payment as either a nominator or validator. - -- `Bond period` Optional; bond CRING promise for 3-36 months to get additional CKTON rewards. (Promise to lock to accept user terms) - - > If you unlock CRING in advance within the lock limit, you will be charged a penalty of 3 times the CKTON reward (In the absence of sufficient CKTON, the CRING can not be used for payment of fines). - -- After filling in the staking parameters, please click [bond] and [submit] - - ![nominate-3-en](assets/nominate-3-en.png) - -
- -## Set Validate Parameters - -### Generate session key - -- **Generate via command** - - Enter the following command under the server terminal to receive the returned session keys - - ```sh - curl -H 'Content-Type: application/json' --data '{ "jsonrpc":"2.0", "method":"author_rotateKeys", "id":1 }' http://localhost:9933 - ``` -- **Generate via web wallet** - - Click [Settings] on the left to change the interface operation mode to developer mode, turn on [Custom Endpoint], enter the local node address(e.g `ws://127.0.0.1:9944`), and click [Save] after confirming that it is correct. - - ![tut-validator-session-1](assets/tut-validator-session-1.png) - - Click [Toolbox] on the left, select `author` / `rotate keys` in RPC Calls, click [submit RPC Call] - - ![tut-validator-session-2](assets/tut-validator-session-2.png) - - Copy the generated session key and keep it properly. - -- **Q & A:** - - *Q: What port is 9933?* - - A: The port number specified for `--rpc-port`, the default is 9933 - - *Q: What port is 9944?* - - A: The port number specified for `--ws-port`, the default is 9944 - - *Q: RPC request returned Method not found* - - A: Please add `--unsafe-rpc-external --rpc-methods Unsafe` when the node starts, it is recommended to delete this parameter after the generation is completed and restart the node - - *Q: RPC request returned Request header is not in* - - A: Please add `rpc-cors all` when the node starts, it is recommended to delete this parameter and restart the node after generation - - > ***If there are still problems, welcome [Submit issue]("https://github.com/darwinia-network/darwinia/issues/new")*** - -### Set session key - -1. **Click [Set session key] on this page, completing the generated session key and submit.** - - > The session key must be filled with real data, otherwise it will result in missing blocks and be slashed. - - ![tut-validator-1](assets/tut-validator-1.png) - - -2. **After confirming, click [sign and submit]** - - > The identities of the validator and the nominator are mutually exclusive and cannot coexist. If you are running a validator, you need to cancel the validator before proceeding with the nomination. - - ![tut-validator-2](assets/tut-validator-2.png) - - -3. **Click [validate] and set the validator parameters** - -- `Reward commission percentage` Set the proportion of the node's priority distribution of income, the range is 0-100. (Example: If a 5% reward commission is set, this node will first receive 5% of the node's revenue, and the remaining 95% of the node's revenue will be distributed in proportion to the amount of mortgages validated by the validator and nominator; Validator's income = node reward commission + mortgage reward share) - - ![tut-validator-3](assets/tut-validator-3.png) - - -4. **After confirming, click [sign and submit]」** - - ![tut-validator-4](assets/tut-validator-4.png) - - -5. **Go to [staking scan] to view information about validators** - - ![tut-validator-5](assets/tut-validator-5.png) - - > The operation of validate will take effect after the first epoch of the next era. Prior to this, the validator will be in the [waiting] list. - - -
- -## Other Staking operations - -There are other operations in staking for the following purposes: - -![](assets/wiki-tut-validator-6-en.png) - -- `Stop nomination` Cancels all nominees. - -- `Bond` & `Bond more` Adds bonded tokens for staking to obtain more power. - -- `Unbond` Unbond tokens for staking, and at the same time the power will be reduced proportionally. - - > The 14-day bond period is required to unbond. Tokens that are in the bond period cannot be operated. Please be careful. - -- `Reward history` Go to Subscan explorer to view historical reward records. - -- `Claim reward` Manually claim the reward, and the reward will be distributed in units of era. - - > Please note: 56 era (about 56 days) will be saved, and you will not be able to claim it if it expires. - -![](assets/wiki-tut-validator-7-en.png) - -- `Claim Reward` Manually claim the reward, and the reward will be distributed in units of era. - -- `Bond more funds` Adds bonded tokens for staking to obtain more power. - -- `Unbond funds` Unbond tokens for staking, and at the same time the power will be reduced proportionally. - -- `Lock Extra` Add lock limit for bonded tokens to obtain KTON rewards. - -- `Rebond funds` Rebond the unbonding funds to earn power. - -- `Change controller account` Change the account that will be used to control any nominating or validating actions. Should not match another stash or controller. - -- `Change reward destination` Change the destination account for any payment as either a nominator or validator. - -- `Set nominees` Re-nominate validator. - -- `Change session key` If you want to upgrade to become a validator, you need to fill in this item. - -- `Set on-chain identity` Set your personal information, such as display, legal name, email, website, twitter and riot. Other users can view this information and contact you. - - diff --git a/content/en/dev-dvm.md b/content/en/dev-dvm.md new file mode 100644 index 00000000..9a2dde1d --- /dev/null +++ b/content/en/dev-dvm.md @@ -0,0 +1,7 @@ +--- +id: dev-dvm +title: DVM +sidebar_label: DVM +--- + +See: [https://crab.network/docs/pangolin-home](https://crab.network/docs/pangolin-home/) \ No newline at end of file diff --git a/content/zh-CN/crab-airdrop.md b/content/zh-CN/crab-airdrop.md deleted file mode 100644 index ce1806df..00000000 --- a/content/zh-CN/crab-airdrop.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -id: crab-airdrop -title: Crab 网络空投 -sidebar_label: 空投 ---- -## 空投 -**Darwinia 将对 RING & DOT 的持有者进行空投。** - -Crab 网络初始供应量中一部分 CRING 将分发给 RING & DOT 的持有者,RING & DOT 的持有者可以免费获得 CRING 空投。 - -Darwinia 官方已于 2020 年 3 月 20 日 13:50(GMT +8:00),对 RING & DOT 的持有者进行了快照,RING & DOT 的持有者可在 Crab 网络上线后自行查询/领取。 - -- DOT 的空投比例:1 DOT = 50 CRING -- RING 的空投比例:1 RING = 1 CRING。 - -> 快照包含 ERC-20 和 TRC-20 的 RING,包括古灵阁中存单部分,KTON 不在此次快照范围。 - -## 查询/领取 CRING -[如何 查询 / 领取 空投的 CRING](crab-tut-claim-cring) diff --git a/content/zh-CN/crab-home.md b/content/zh-CN/crab-home.md deleted file mode 100644 index 171061f8..00000000 --- a/content/zh-CN/crab-home.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -id: crab-home -title: Crab 网络 -sidebar_label: Crab 网络 -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/zh-CN/crab-home.md ---- - -Darwinia Crab Network(简称:Crab 网络)对于 Darwinia 来说是一个金丝雀网络,定位类似于 Kusama 网络之于 Polkadot,Expect Chaos 是一个合理的预期。 - -Crab 网络不仅仅是一个测试网,它将会是一个长期运行的网络,但是无法排除会因为意外的情况或者故障导致其停止运行。 - -Crab 网络主要是为 Darwinia 的升级和应用部署提供模拟和测试环境,进行各种激进的实验 。测试环境不仅包含测试所需要的软件运行环境和网络环境,还包括测试经济博弈的经济环境。 - -为了让 Crab 网络能够一定程度的模拟真实经济环境,Crab 网络的参数与 Darwinia 主网一样,并使用相同的 Staking 机制和通胀模型。通证分别为 CRING 和 CKTON,CRING 的初始供应量为 2000M,CKTON 的供应量为 0。 - -CRING 和 CKTON 是有价值的。在 Darwinia 主网上线之后,将创建一个 Darwinia 主网和 Crab 网络之间的 Token Bridge,并使 CRING 和 RING 在长期内可以做到相互转换,转换比例为 1 RING = 100 CRING,Darwinia 将预留 40M RING 作为 CRING 的背书资产供 Token Bridge 的背书模块使用,Darwinia 主链为背书链,Crab 网络为发行链, CRING 为 CBA。 - -Crab 网络初始供应量中一部分 CRING 将分发给 RING & DOT 的持有者,可以免费获得 CRING 空投。 - -Darwinia 官方已于 2020 年 3 月 20 日,对 RING & DOT 的持有者进行了快照,RING & DOT 的持有者可在 Crab 网络上线后自行查询/领取。DOT 的空投比例:1 DOT = 50 CRING,RING 的空投比例:1 RING = 1 CRING。快照包含 ERC-20 和 TRC-20 的 RING,包括古灵阁中存单部分,KTON 不在此次快照范围。 diff --git a/content/zh-CN/crab-parameters.md b/content/zh-CN/crab-parameters.md deleted file mode 100644 index d06e12c5..00000000 --- a/content/zh-CN/crab-parameters.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -id: crab-parameters -title: Crab 网络参数 -sidebar_label: Crab 网络参数 ---- - -> This page intends to reflect current network configurations, it reflects the [runtime file](https://github.com/darwinia-network/darwinia-common/blob/master/bin/node-template/runtime/src/lib.rs), which is still a work in progress. - -## Consensus - -| Parameter | Value | -| ----------------------- | ------- | -| **Consensus Mechanism** | BABE | -| **Finality Gadget** | GRANDPA | - -## Accounts and Transactions - -| Parameter | Value | Description | -| ----------------------- | ------------------------- | ----------------------------------------------------------------------------- | -| **Reaping Threshold** | 0.1 CRING and 0.001 CKTON | The minimum balance required in the account to create or maintain an account. | -| **Transaction Minimum** | 0 | The Min. amount you can send to an Darwinia Address. | - -## Identity - -| Parameter | Value | Description | -| ------------------------------------------------ | --------- | ------------------------------------------------------------ | -| Required Bond Per Identity | 10 CRING | Bond required to store IDs on-chain. | -| Required Bond Per Each Additional Identity Field | 2.5 CRING | Bond required to store additional IDs on-chain | -| Sub-Account Deposit | 2 CRING | Amount required to deposit in order to create a sub account. | -| Maximum Sub-Accounts | 100 | The maximum number of sub account an account may have. | - -## Periods of common actions and attributes - -| Darwinia | Time | Slots | -| -------- | --------- | ----- | -| Block | 6 seconds | 1 | -| Epoch | 1 hour | 600 | -| Era | 6 hours | 3,600 | - -**A maximum of one block per slot can be in a chain.* - -## Staking, Validating, and Nominating - -| Darwinia | Time | Slots | Description | -| ----------------------- | ---------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| Validator Slots | 7 | Initial slots for active validators, gradually increasing. | | -| Term duration | 6 hours | 3,600 | The time for which a validator is in the set after being elected. Note, this duration can be shortened in the case that a validator misbehaves. | -| Nomination period | 6 hours | 3,600 | Every 6 hours, a new validator set is elected according to Phragmen's method. | -| Bonding duration | 14 days | 201,600 | How long until your funds will be transferrable after unbonding. | -| Slash defer duration | 14 days | 201,600 | Prevents overslashing and validators "escaping" and getting their nominators slashed with no repercussions to themselves | -| Slash Cancellation Vote | Requires 3/4 of Council to Approve | | | - -## Governance - -| Democracy | Time | Slots | Description | -| ---------------- | ------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Voting period | 7 days | 100,800 | How long the public can vote on a referendum. | -| Launch period | 7 days | 100,800 | How long the public can select which proposal to hold a referendum on. i.e., Every week, the highest-weighted proposal will be selected to have a referendum | -| Enactment period | 8 days | 115,200 | Time it takes for a successful referendum to be implemented on the network. | - -| Council | Time | Slots | Description | -| ------------- | ----- | ----- | -------------------------------------------------------------------- | -| Term duration | 1 day | 3,600 | The length of a council member's term until the next election round. | -| Voting period | 1 day | 3,600 | The council's voting period for motions. | - -| Technical committee | Time | Slots | Description | -| ----------------------- | ------- | ------- | ---------------------------------------------------------------------------------------------- | -| Cool-off period | 7 days | 100,800 | The time a veto from the technical committee lasts before the proposal can be submitted again. | -| Emergency voting period | 3 hours | 1,800 | The voting period after the technical committee expedites voting. | - -## Treasury - -| Parameter | Value | Description | -| --------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| Budgeting Period** | 6 days | When the treasury can spend again after spending previously. | -| Proposal Bond | 5% and minumum 1000 CRING | The amount required to bond in order to propose a treasury spend. If approved, it is returned, if the proposal fails, it is burnt. | -| Burn unspent treasury funds | Off | This deactivates a burn of all unspent treasury funds at the end of a budgeting period. | - -## SS58 Address Format -| Network Alias | Network ID | Network Type | -| ------------- | ---------- | ---------------- | -| darwinia | 18 | Darwinia Mainnet | -| crab | 42 | Crab Network | - -## Seed Nodes - -| Seed Nodes | -| ---------- | -| TBC | -| TBC | -| TBC | diff --git a/content/zh-CN/crab-tool-index.md b/content/zh-CN/crab-tool-index.md deleted file mode 100644 index cb9d59af..00000000 --- a/content/zh-CN/crab-tool-index.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -id: crab-tool-index -title: Crab 网络工具集 -sidebar_label: 工具集 ---- -## 钱包: -- [Darwinia Web Wallet](https://apps.darwinia.network) -- [Polkadot.js Browser Extension](https://github.com/polkadot-js/extension) - -## 浏览器: -- [Subscan](https://crab.subscan.io/) - -## 网络: -- [Telemetry](https://telemetry.polkadot.io/#list/crab) diff --git a/content/zh-CN/crab-tut-claim-cring.md b/content/zh-CN/crab-tut-claim-cring.md deleted file mode 100644 index ab7cdd41..00000000 --- a/content/zh-CN/crab-tut-claim-cring.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -id: crab-tut-claim-cring -title: 如何领取空投的 CRING -sidebar_label: 领取空投的 CRING -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/zh-CN/crab-tut-claim-cring.md ---- -## 领取条件 - -Darwinia Crab 为模拟真实的网络生态,为 **RING (ERC-20 & TRC-20)** 和 **DOT (ERC-20)** 的持有者空投了 Crab 网络的 Token: CRING。 - -空投将按快照时账号持有 RING(包括**RING 余额**和**正在进行中的存单**)和 DOT 的数量进行投放,投放比例为: -- **1RING -> 1CRING** -- **1DOT -> 50CRING** -- 快照时间为:**2020-03-20 13:50:00 (+0800)** - -## 准备 - -> 推荐在 PC 端使用 Chrome 浏览器 + Metamask / Tronlink 插件完成领取操作! - -- Crab 地址:https://apps.darwinia.network/#/account -> 如没有 Darwinia Crab 地址,生成方式请参考: [如何创建或导入 Darwinia Crab 地址](crab-tut-create-account) - -- 插件下载地址: - - Metamask: (https://metamask.io/) - - Tronlink: (https://www.tronlink.org/) - -## 查询空投数量 - -1、通过 Chrome 浏览器,访问: https://claim.darwinia.network/ - -2、选择想要查询的网络(以太坊/波场),点击「查询」。(下文以以太坊网络为例) - -![02_claim_choosechain](assets/02_claim_choosechain.png) - -3、获得查询结果 - -![03_claim_search](assets/03_claim_search.png) - -## 领取 CRING 空投 - -1、通过 Chrome 浏览器或手机钱包,访问 CRING [领取工具](https://claim.darwinia.network/) - -2、选择想要查询的网络(以太坊/波场),点击「领取」。(下文以以太坊网络为例) - -![04_claim_choosechain 的副本](assets/04_claim_choosechain 的副本.png) - -3、填写接受 CRING 的 Darwinia Crab 地址,确认无误后,点击「提交」。 - -![claim_submitaccount](assets/05_claim_submitaccount.png) - -4、通过浏览器插件签名(签名不消耗燃料费) - -![06_claim_sign](assets/06_claim_sign.png) - -5、成功获取签名信息,点击复制。(请注意保存签名信息,建议在成功接收空投前,暂时不关闭本页面) - -![07_claim_copy](assets/07_claim_copy.png) - -6、打开[达尔文钱包-认领模块]():,选中刚刚填写的接收空投的地址,点击「继续」。 - -![08_claim_chooseaccount](assets/08_claim_chooseaccount.png) - -7、将刚刚在 CRING Claim Tool 中生成的签名信息贴入,依次点击「确定认领」-「领取」-「签名」 - -![09_claim_sign2](assets/09_claim_sign2.png) - -8、领取成功后,您将收到如下提示。这时就代表您的空投已成功领取,可以到 [达尔文钱包-账户]() 或 [subscan]()中查看账户余额信息。 - -![10_claim_success](assets/10_claim_success.png) - -- 如果您在领取空投的过程中遇到其他问题,请加入我们的社群交流。 - - 微信公众号:DarwiniaNetwork - - 微信小助手:Darwinia_Network - - Telegram: diff --git a/content/zh-CN/crab-tut-create-account.md b/content/zh-CN/crab-tut-create-account.md deleted file mode 100644 index d4464e4a..00000000 --- a/content/zh-CN/crab-tut-create-account.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -id: crab-tut-create-account -title: 创建账户 -sidebar_label: 创建账户 ---- - -## 创建 Darwinia 帐户 - -创建 Darwinia 帐户的方法有多种,您可以根据自己的喜好选择其中一种。如果您之前创建过帐户,则可直接通过 “助记词/私钥/json 文件” 等恢复/导入账户。 - - - - -### Darwinia Web Apps - -进入[Darwinia Crab Web Wallet](https://apps.darwinia.network),可在「账户」栏看到「添加账号」和「使用 JSON 恢复」两个按钮。 - -![create account](assets/crab-tut-create-account-1-cn.png) - -**新建账号** - -点击「添加账号」,在设置完账户基本信息后,点击「保存」按钮。(默认只显示“助记词“,”私钥“需切换) - -![create account](assets/crab-tut-create-account-2-cn.png) - -点击「创建并且备份账户」按钮,备份该账户“json 文件” - -![create account](assets/crab-tut-create-account-3-cn.png) - -> 务必备份好 ` 助记词、私钥、json 文件 ` 等。备份 json 文件时,请注意保管密码,密码丢失将无法通过 json 文件恢复地址,但可通过助记词、私钥重新导入。 - -**通过 json 恢复账号** - -如之前创建过账号,且备份有 json 文件,可直接选择「使用 JSON 回复」。 - -![create account](assets/crab-tut-create-account-4-cn.png) - -**通过「助记词」恢复账号** - -如忘记 JSON 文件密码,可通过「助记词」进行恢复。点击「添加账号」,将助记词替换成原先账户的助记词即可。(名称和密码均可重新设置) - -![create account](assets/crab-tut-create-account-5-cn.png) - -**生成自定义账号** - -如您需要生成一个包含特定字母的 Darwinia 钱包账号,可参考一下教程: - > 此类账号多用于从水龙头领取空投的工作量证明,或者处于记忆和美观的需要。 -- 点击「美化账号」,填写您需要筛选的条件 -![faucet-1-cn](assets/faucet-1-cn.png) - -` 搜索 ` 在此处输入您希望包含的地址,该工具将生成密钥并显示与您的搜索最匹配的关联地址。 - -` 大小写敏感 ` 搜索的内容是否区分大小写。 - -` 密钥加密类型 ` 选择账号的加密类型,session 账号只能使用 Edwards (ed25519) 。 - -- 点击「开始生成」,等待账户生成,点击「 + 」选择您心仪的账户进行备份。 - -![faucet-2-cn](assets/faucet-2-cn.png) - -- 点击「保存」,根据你的使用习惯,选择备份原始种子或 json 文件 - -![faucet-3-cn](assets/faucet-3-cn.png) - - > 务必备份好 ` 助记词、私钥、json 文件 ` 等。备份 json 文件时,请注意保管密码,密码丢失将无法通过 json 文件恢复地址,但可通过助记词、私钥重新导入。 - - - -### Polkadot.js 浏览器插件 - -**安装浏览器插件** - -浏览器插件可用于 [Google Chrome](https://chrome.google.com/webstore/detail/polkadot%7Bjs%7D-extension/mopnmbcafieddcagagdcbnhejhlodfdd?hl=en) and [FireFox](https://addons.mozilla.org/en-US/firefox/addon/polkadot-js-extension). - -![polkadot-js](assets/polkadot-js-1-cn.png) - -**新建账户** - -单击扩展程序打开 “帐户管理” 对话框,单击「创建新帐户」按钮,然后按照说明进行操作。 - -![polkadot-js](assets/polkadot-js-2-cn.png) - -![polkadot-js](assets/polkadot-js-3-cn.png) - -> 确保将助记词安全保管。 - -**设置 Crab 网络 的地址** - -现在,我们将确保这些地址显示为 Crab 网络 地址。您的地址将根据网络选择而有所不同。单击插件窗口顶部的 “选项”。在 “显示地址格式为” 下拉框中选择 “Crab” 或 “Substrate”。 - -![polkadot-js](assets/polkadot-js-4-cn.png) - -> Crab 网络与 Substrate 共享相同的 `Network ID`,如果在生成帐户时需要选择网络,请选择 `Substrate`,与 `Crab Network` 通用。 - - -### Subkey - -对于熟悉命令行和编译 Rust 代码的技术高级用户,建议使用 Subkey。Subkey 允许您在可以编译代码的任何设备上生成密钥。Subkey 可能对使用自动运行的设备(而不是运行 iOS 或 Android 的设备或其他特定用途的设备)的自动生成帐户有用。不建议一般用户使用。 - -安装 Subkey [install Subkey](https://substrate.dev/docs/en/ecosystem/subkey#more-subkey-to-explore), 运行: - -```bash -$ curl https://getsubstrate.io -sSf | bash -s -- --fast -$ cargo install --force --git https://github.com/paritytech/substrate subkey -$ cargo build -p subkey -``` - -成功安装 Subkey 后,运行: - -```shell -subkey -n substrate generate -``` - -您应该看到类似下面的信息弹出: **save all of this information somewhere secure you will not be able to recover your account if you lose your phrase or seed.** - -```text -Secret phrase `destroy vague trend estate person civil cattle lab hockey tooth error pigeon` is account: - Network ID/version: substrate - Secret seed: 0x58e57817a2ccfa696ed6c3735d4cc4646f894bf7daf51a94f0c4702a92e40710 - Public key (hex): 0x225ce1f9c178189d2a977a195f822ebbfb538b317f23f83ab35605fb009fa438 - Account ID: 0x225ce1f9c178189d2a977a195f822ebbfb538b317f23f83ab35605fb009fa438 - SS58 Address: 2owvscruh7PNbykGLMZPxHyjYdi1Ryanrm4PTxVKh85Ef8Dn -``` - -> 如果您之前为除 “Substrate” 或 “Crab 网络” 之外的其他网络创建了帐户,则需要从之前的“秘语”或“秘密种子”中得出正确的“地址”。您可以使用 `subkey -n substrate inspect "YOUR SECRET PHRASE HERE"` 来获取 Crab 网络 ID 地址(SS58)。 - - -### Polkadot.js Web Apps -TODO:支持达尔文网络的完整指南 - - -### ~~Itering ID Wallet~~ - -Coming soon. - -### ~~Math Wallet~~ - -Coming soon. - - - -## 安全存储密钥 - -> **免责声明:密钥安全性** -您的私钥/助记词是访问您帐户的唯一方法,你必须保证它的隐秘和安全。 -如果您与任何人分享私钥/助记词,他将能够完全访问您的帐户,包括所有资金。因此,这个私钥/助记词是黑客和其他恶意攻击者的目标,有意窃取您的资金。 -我们建议您使用多种帐户的生成方式,保证便利性和折衷的安全性。 -在填写您的地址之前请仔细阅读此页面,以便您了解选择不同的帐户生成方式的风险以及如何适当缓解它们,来保证您的资金安全。 - -私钥/助记词是您进入帐户的“关键”。知道私钥/助记词可以让您或任何人,知道种子的其他人可以重新生成和控制此帐户。 - -必须将种子存储在安全,秘密和安全的地方。 如果如果您无法访问自己的帐户,则可以通过输入种子来重新创建它。 这个也意味着其他人可以控制您的帐户获取您的种子。 - -为了保证安全性最大化,应将种子记录在纸上或其他非数字设备上,并存储在安全的地方。 您可能还希望保护种子免受物理损坏(例如,通过密封保存) - -防止水损坏的塑料袋,将其存放在防火保险箱中等)。建议您存放种子的多个副本位于不同的地理位置(例如,一个放在您的家庭保险箱中,另一个放在您银行的保管箱)。 - -您绝对不应将种子存储在可以访问互联网或将来可以访问互联网的任何类型的计算机上。 diff --git a/content/zh-CN/crab-tut-exchange.md b/content/zh-CN/crab-tut-exchange.md deleted file mode 100644 index 393c42bf..00000000 --- a/content/zh-CN/crab-tut-exchange.md +++ /dev/null @@ -1,247 +0,0 @@ ---- -id: crab-tut-exchange -title: 交易所接入 Crab 网络指南 -sidebar_label: 交易所接入 Crab 网络指南 -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/zh-CN/crab-tut-exchange.md - ---- - -# 交易所接入 Crab 网络指南 - -Darwinia Crab Network(简称:Crab 网络)对于 Darwinia 来说是一个金丝雀网络,定位类似于 Kusama 网络之于 Polkadot。它将会是一个长期运行的网络。 - -Crab 网络是一个具有价值的网络,其为应用部署提供了和 Darwinia 主网类似的环境,它的参数更为激进,非常适合各种快速演进的应用。Crab 网络不仅包含应用运行所需要的软件环境和网络环境,还包括接近 Darwinia 主网的经济博弈环境。 - -Crab 网络使用与 Darwinia 主网相同的抵押机制和通胀模型。 Crab 的代币为 CRING 和 CKTON,CRING 的初始供应为 2000M,CKTON 的供应为 0。 - -## Informations - -官网: https://crab.network/ (under construction) -链浏览器: https://crab.subscan.io/ -代码: https://github.com/darwinia-network/darwinia -出块时间: 6 秒 -公共 Websocket RPC: [wss://crab-rpc.darwinia.network](wss://crab-rpc.darwinia.network) -公共 Http RPC: https://crab-rpc.darwinia.network - -* CRING - 符号: CRING - 全称: Darwinia Crab Network Native Token - 精度: 9 - -* CKTON - 符号: CKTON - 全称: Darwinia Crab Commitment Token - 精度: 9 - -## 全节点快速安装并运行 - -从 https://github.com/darwinia-network/darwinia/releases 下载最新的程序 - -### 服务器的最低要求 - -CPU: 1 core -Memory: 2 GB -Disk: 30 GB SSD - -### Linux - -#### 1. 准备二进制 - -``` -curl -sL https://github.com/darwinia-network/darwinia/releases/download/vx.x.x/darwinia-x.x.x-x86_64-linux-gnu-glibc-x.xx-llvm-x.x.tar.bz2 - -tar xvf darwinia-x.x.x-x86_64-linux-gnu-glibc-x.xx-llvm-x.x.tar.bz2 - -chmod +x ./darwinia -``` - -#### 2. 运行 - -``` -./darwinia \ - --base-path \ - --name \ - --chain crab -``` - -Add the --ws-external and --rpc-cors all options if you want to [remotely connect to this node](https://wiki.polkadot.network/docs/en/maintain-wss): - -``` -./darwinia \ - --base-path \ - --name \ - --chain crab \ - --ws-external \ - --rpc-cors all -``` - -### Docker - -#### 1. 拉取 docker 镜像 - -``` -docker pull quay.io/darwinia-network/darwinia:vx.x.x -``` - -#### 2. 运行 - -``` -docker run -it \ - -v :/data \ - -p :9933 \ - -p :9944 \ - darwinianetwork/darwinia:vx.x.x \ - --base-path /data \ - --name \ - --chain crab \ - --ws-external \ - --rpc-cors all -``` - -## 使用 - -### Check address correctness - -``` -var cryptoUtil = require('@polkadot/util-crypto'); - -/** - * check address - * @param {string} address - crab address - * @param {number} ss58 - ss58 number, darwinia crab = 42 - * @return {*} [boolean, string | null] - */ -var checkResult = cryptoUtil.checkAddress('5EU6EEhZRbh1NQS7HRMwAogoBHWtT2eLFQWei2UZHUHJosHt', 42); - -console.log('-----check crab address----- \n' , checkResult); -``` - -### Generate address -``` -var cryptoUtil = require('@polkadot/util-crypto'); - -// buffer is an ArrayBuffer -function buf2hex(buffer) { - return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)).join(''); -} - -cryptoUtil.cryptoWaitReady().then(() => { - /** - * generate mnemonic - * @param {number} numWords - word count ,default = 12 - * @return {*} string - */ - var mnemonic = cryptoUtil.mnemonicGenerate(); - var seed = cryptoUtil.mnemonicToMiniSecret(mnemonic); - - console.log('-----seed hex----- \n', buf2hex(seed.buffer)) - - /** - * Creates a new public/secret keypair from a seed - * @param {Uint8Array} seed - seed - * @return {*} a object containing a `publicKey` & `secretKey` generated from the supplied seed. - * { secretKey: [...], publicKey: [...] } - */ - var keyPair = cryptoUtil.schnorrkelKeypairFromSeed(seed); - // https://github.com/paritytech/substrate/blob/master/primitives/core/src/crypto.rs#L437 - // darwinia crab = 42 - var ss58Format = 42; - var address = cryptoUtil.encodeAddress(keyPair.publicKey, ss58Format); - console.log('-----mnemonic----- \n', mnemonic, seed, keyPair, address) -}) -``` - -### Get the latest block height -``` -curl 'http-rpc-url' -X POST -H "Content-Type: application/json" --data '{"id":1,"jsonrpc":"2.0","method":"chain_getFinalizedHead","params":[]}' -``` - -### Get the specified block information by hash - -``` -curl 'http-rpc-url' -X POST -H "Content-Type: application/json" --data '{"id":1,"jsonrpc":"2.0","method":"chain_getBlock","params":["0xb375d7db4d737bdbfb8f8089d7b4589fd9fe68a535d448b44dcf9aa2ef8eed17"]}' -``` - -### Get details of a transaction -``` -curl 'http-rpc-url' -X POST -H "Content-Type: application/json" --data '{"hash": "0x04af51c980a9152ad8319f73a85d13305e273be8ebd3cc979c18f4ad14e716d6"}' https://crab.subscan.io/api/scan/extrinsic -``` - -* How to judge and avoid a fake deposit - ``` - 1. Check whether the transaction is successful - result["data"]["success"] == true; - - 2. Check if the transaction is a transfer - // CRING - const event = result["event"].find(event => { - event["module_id"] == "balances" && event["event_id"] == "Transfer" - }); - - // CKTON - const event = result["event"].find(event => { - event["module_id"] == "kton" && event["event_id"] == "Transfer" - }); - - 3. Check if the transaction is finalized - result["data"]["finalized"] == true; - - 4. Confirm the receipt address and quantity - event["params"][1]["value"] == Deposit Address - - 5. Get the value transfered - value = event["params"][2]["value"] / 1_000_000_000 - ``` - -### Transfer - -``` -yarn add @polkadot/api -yarn add @polkadot/keyring -yarn add @darwinia/types -``` - -``` -const { ApiPromise } = require('@polkadot/api'); -const { Keyring } = require('@polkadot/keyring'); - -// Darwinia types -const { typesBundleForPolkadot } = require('@darwinia/types/mix'); - -const provider = new WsProvider('wss://:'); -const api = await ApiPromise.create({ - provider: wsProvider, - types: typesBundleForPolkadot -}); - -const keyring = new Keyring({ type: 'sr25519' }); - -const A = keyring.addFromUri(''); -const B = '5EU6EEhZRbh1NQS7HRMwAogoBHWtT2eLFQWei2UZHUHJosHt'; - -// Create a extrinsic -// CRING, transferring 1 CRING to B -const transfer = api.tx.balances.transfer(B, 1_000_000_000); - -// CKTON, transferring 1 CKTON to B -const transfer = api.tx.kton.transfer(B, 1_000_000_000); - -// Sign and send the transaction using our account -const hash = await transfer.signAndSend(A); - -console.log('Transfer sent with hash', hash.toHex()); -``` - -### Transfer: Offline signature with online broadcast -https://github.com/darwinia-network/darwinia-polkadotjs-typegen/blob/master/src/test/index.ts - -### Get address balance -``` -curl 'http-rpc-url' -X POST -H "Content-Type: application/json" --data '{"id":6,"jsonrpc":"2.0","method":"balances_usableBalance","params":[0, ss58 地址]}' -``` - -### Prevention of chain forks - -Waiting for block finalized - - diff --git a/content/zh-CN/crab-tut-get-free-cring.md b/content/zh-CN/crab-tut-get-free-cring.md deleted file mode 100644 index 8f1f30be..00000000 --- a/content/zh-CN/crab-tut-get-free-cring.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: crab-tut-get-free-cring -title: 如何通过水龙头获得免费的 CRING -sidebar_label: 从水龙头获取免费 CRING -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/zh-CN/crab-tut-get-free-cring.md ---- -## CRING 领取方式 - -- 加入 Darwinia Faucet 频道:[点击此处](https://t.me/DarwiniaFaucet) -- 回复 `/faucet + 账号 ` - - 例如:/faucet 5CRABWXr1AqSSqJwv9tzh8gk4mEnrRYV9VWq7VnHh1KxvTBD - - 注意:/faucet 和 账号 之间有空格,账号必须包含「CRAB」四个大写字母 - -- 如您的账号符合发放要求,将自动发放 10 CRING 到您的账户,您可以到浏览器[crab.subscan.io](https://crab.subscan.io/)查看转账记录。 - -![faucet-4](assets/faucet-4.png) - -## Darwinia Faucet 发放规则 - -1)每个 Telegram 账号 `7 天 ` 内可以成功领取 `1` 次空投。 -2)每个 crab 网络地址最多领取 `1` 次空投。 -3)领取空投的地址需要包含 `CRAB` 四个字母(全部为大写)。 -4)空投每日最大发放量为 `500` 份,先到先得。 -5)每笔空投的数量为固定值:`10` CRING。 - -## 如何生成包含 CRAB 字母的账号 - -- 点击[美化账号](https://apps.darwinia.network/#/vanity),填写您需要筛选的条件。 - -![faucet-1-cn](assets/faucet-1-cn.png) - -- 点击「开始生成」,等待账户生成,点击「 + 」选择您心仪的账户进行备份。 - -![faucet-2-cn](assets/faucet-2-cn.png) - -- 点击「保存」,根据你的使用习惯,选择备份原始种子或 json 文件。 - -![faucet-3-cn](assets/faucet-3-cn.png) - - > 务必备份好 ` 助记词、私钥、json 文件 ` 等。备份 json 文件时,请注意保管密码,密码丢失将无法通过 json 文件恢复地址,但可通过助记词、私钥重新导入。 -> diff --git a/content/zh-CN/crab-tut-governance.md b/content/zh-CN/crab-tut-governance.md deleted file mode 100644 index af89cccc..00000000 --- a/content/zh-CN/crab-tut-governance.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -id: crab-tut-governance -title: 如何参与网络治理 -sidebar_label: 参与治理 -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/zh-CN/crab-tut-governance.md ---- - -Crab 网络教程: 如何参与网络治理 diff --git a/content/zh-CN/crab-tut-index.md b/content/zh-CN/crab-tut-index.md deleted file mode 100644 index 2aa97980..00000000 --- a/content/zh-CN/crab-tut-index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -id: crab-tut-index -title: 教程清单 -sidebar_label: 教程清单 -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/zh-CN/crab-tut-index.md ---- -## Staking 相关 -- 成为投票人 [查看教程](crab-tut-nominator) -- 运行一个节点 [查看教程](crab-tut-node) -- 成为验证人 [查看教程](crab-tut-validator) -- 参与治理 [查看教程](crab-tut-governance) -- 成为 Relayer [查看教程](crab-tut-relayer) - -## 其他相关 -- 创建账户 [查看教程](crab-tut-create-account) -- 通过水龙头获得免费的 CRING [查看教程](crab-tut-get-free-cring) -- 领取空投的 CRING [查看教程](crab-tut-claim-cring) diff --git a/content/zh-CN/crab-tut-node.md b/content/zh-CN/crab-tut-node.md deleted file mode 100644 index 71c590ec..00000000 --- a/content/zh-CN/crab-tut-node.md +++ /dev/null @@ -1,128 +0,0 @@ ---- -id: crab-tut-node -title: 如何运行一个节点 -sidebar_label: 运行节点 -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/zh-CN/crab-tut-node.md ---- - -## 环境准备 - -### 以下两种获取可执行文件方式任选其一 - -#### 1.从源码编译 - -- 编译环境配置,参考从 4.1 到 4.1.3 小节之前 https://github.com/darwinia-network/darwinia#41-hacking-on-darwinia -- 启动命令行 -- 进入 darwinia 根目录 -- cargo build --release -- 可以在 darwinia/target/release 下面找到编译好的可执行文件 darwinia(.exe) - -#### 2.下载可执行文件 - -- macOS Catalina: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-catalina.tar.gz -- ArchLinux: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-archlinux.tar.gz -- Ubuntu: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-ubuntu.tar.gz -- CentOS: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-centos7.tar.gz -- Docker: `docker pull darwinianetwork/darwinia:release-v0.6.7` - -## 启动参数 - -### 以下两种启动方式任选其一 - -#### 1.从文件读取配置启动(暂不支持) - -如不在同一文件夹下最好填写绝对路径 - -``` -./darwinia --conf=example.json -``` - -配置文件 example.json 示例: - -``` -{ - "validator": true, - "base-path": "/tmp/example", - "bootnodes": [ - "/ip4/0.0.0.0/tcp/0/p2p/aaa", - "/ip4/0.0.0.1/tcp/0/p2p/bbb", - "/ip4/0.0.0.2/tcp/0/p2p/ccc" - ], - "name": "Example" -} -``` - -#### 2.从命令行读取配置启动 - -```sh -./darwinia \ - -d /tmp/example \ - --bootnodes /ip4/0.0.0.0/tcp/0/p2p/xxx \ - --name Example -``` - -### 常用参数 - -| 参数 | 注释 | 子参数 | 子参数类型 | -| :----------: | :-----------------------------------------------------------------------------: | :------: | :--------: | -| validator | 节点类型为验证人节点 | 无 | 无 | -| rpc-external | 监听所有 rpc,验证人节点需要使用 `--unsafe-rpc-external` 但不推荐验证人节点开启 | 无 | 无 | -| ws-external | 监听所有 ws,验证人节点需要使用 `--unsafe-ws-external` 但不推荐验证人节点开启 | 无 | 无 | -| port | p2p 端口 | 端口号 | 数字 | -| rpc-port | rpc 端口 | 端口号 | 数字 | -| ws-port | ws 端口 | 端口号 | 数字 | -| base-path | 保存用于链的各种数据的地址 | 路径 | 字符串 | -| name | 节点的名称 | 节点名 | 字符串 | -| rpc-cors | 请求头白名单 | 过滤类型 | 枚举 | -| bootnodes | 用来获取启动数据的种子节点(/ip4/0.0.0.0/tcp/0/p2p/xxx) | 节点 URL | 字符串数组 | - -#### 查看所有参数 - -``` -./darwinia --help -``` - -## 启动节点 - -### 启动命令 - -```sh -./darwinia \ - -d /tmp/example \ - --bootnodes /ip4/0.0.0.0/tcp/0/p2p/xxx \ - --name Example -``` - -建议使用 systemctl,pm2,screen 等工具来维护进程。 - -### 种子节点 - -```sh -# 维护者 @AurevoirXavier -/ip4/49.234.225.216/tcp/30333/p2p/12D3KooWFHNgAmrphmgcgukREKRrwWn6pZ6qQ8eFVXsRdnUQKZvL -/ip4/106.54.116.32/tcp/30333/p2p/12D3KooWKhcHAUCs2CUGA5NtRnRRarL4C5U7fVB4ycmHxDidZsrj -/ip4/35.234.33.88/tcp/30333/p2p/12D3KooWMCTzZVwJCafwPVQGxr8CkSK1VKmg5pbhjKjqgEwhywSe -# 维护者 @clearloop -/ip4/122.152.213.162/tcp/30333/p2p/QmWfdcdFaiCr6gfJvh7jjmQ6hUGshA4BrGSLSDMuFBf823 -# 维护者 @HackFisher -/ip4/104.199.197.8/tcp/20222/p2p/Qmc9tW5xSVUH1EBdH8WEE5nYAuswGrRvtYZ93MAwH9fsZo -/ip4/104.199.197.8/tcp/30333/p2p/QmURDEZxHHVguYpfaDRAYfqYJSZT5LuBtK4mD7GXhfehtp -# 维护者 @yananto -/ip4/220.134.22.36/tcp/30333/p2p/Qme2VxbvZFxNbF3xKxWBQczRzbcudmny9n3eSube73ZmEw -``` - -### Q&A - -- Q:无法启动节点 -- A: - 1. 确认系统支持该可执行文件 - 1. 部分动态链接库依赖丢失,安装依赖 - -- Q:我的节点为什么不同步块 -- A: - 1. 检查 bootnodes 是否填错 - 1. 与目标节点网络通信差,尝试其他 bootnodes - 1. 目标节点连接数已满,尝试其他 bootnodes - 1. 确认版本号一致(多数情况下并不需要完全一致) - -- ***如仍有问题,欢迎[提交 issue]("https://github.com/darwinia-network/darwinia/issues/new")*** diff --git a/content/zh-CN/crab-tut-nominator.md b/content/zh-CN/crab-tut-nominator.md deleted file mode 100644 index d76422be..00000000 --- a/content/zh-CN/crab-tut-nominator.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -id: crab-tut-nominator -title: 如何成为一个投票人 -sidebar_label: 成为投票人 -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/zh-CN/crab-tut-nominator.md ---- -> - Staking 是基于 PoS(Proof of Stake/权益证明)的共识机制,代币持有人通过质押、投票、委托和锁定等行为获取收益。 - -> - 在参与 staking 之前,请确保至少拥有 **1** 个 Darwinia 地址,如果您持有较多代币或对安全性要求较高,建议准备 **2** 个或以上 Darwinia 地址。如果目前您还没有足够数量的账户,请参考:[如何创建账户](https://docs.darwinia.network/docs/zh-CN/crab-tut-create-account) - -> - Darwinia 地址内需准备少许 CRING,作为交易手续费。没有 CRING 请参考:[如何通过水龙头获得免费的 CRING](https://docs.darwinia.network/docs/zh-CN/crab-tut-claim-cring) - -## 开始质押 - -- 进入 [Darwinia Web Wallet](https://apps.darwinia.network),点击左侧「抵押」栏目,点击「开始 staking」 - ![crab-tut-nominator-1](assets/crab-tut-nominator-1.png) - - -- 填写 Staking 参数 - - ![crab-tut-nominator-2](assets/crab-tut-nominator-2.png) - - ` 资金账户 ` 保管资金的账号,参与 Staking 的代币将来自这个账户,此账户的操作多与资金变动相关。 - - ` 控制账户 ` 管理 Staking 其他操作的账号,如参与投票、参与验证等。 - - > ` 资金账户 ` 和 ` 控制账户 ` 可设置为同一账户,如果您持有较多代币或对安全性要求较高,建议此处设置为不同账号。 - - - ` 冻结数量 ` 参与 Staking 的代币数量,这部分代币将被暂时冻结,解冻需要 14 天的解冻期;您可以选择冻结 CRING 或 CKTON。 - - ` 收益账号 ` 接收 Staking 收益的账号 - - ` 冻结期限 ` 可选项;将 CRING 承诺冻结 3-36 个月,可以获得额外的 CKTON 奖励。(承诺锁定需接受用户条款) - - > 如提前赎回有承诺期限的 CRING,需要支付获得奖励 **3** 倍的 CKTON 惩罚 (在 CKTON 不足的情况下,不可以使用 CRING 来代缴罚金)。 - -- 填写好 Staking 参数后,请点击「冻结」,签名并提交。 - ![crab-tut-nominator-3](assets/crab-tut-nominator-3.png) - -
- -## 提名验证人 - -> **注意**: 验证人和提名人的身份是互斥的,不可并存。如果您正在参选验证人,需要先取消参选验证人,再进行后续的提名操作。 - -1. 完成 Staking 参数后,在本页面点击「提名」。 - - ![wiki-tut-nominator-4](assets/wiki-tut-nominator-4-cn.png) - -2. 选择合适的验证人,并点击「提名」。 - - ![wiki-tut-nominator-5](assets/wiki-tut-nominator-5-cn.png) - -3. 签名并提交。 - - ![wiki-tut-nominator-6](assets/wiki-tut-nominator-6-cn.png) - -4. 返回「抵押」处,查看已提名验证人的相关信息。 - - ![wiki-tut-nominator-7](assets/wiki-tut-nominator-7-cn.png) - - > 提名验证人的操作结果,会在下一个 era 开始时生效,暂时延迟为正常现象。 - -
- -## 资产状态 - -当前的资产状态列举如下: -- ` 可用的 ` 当前可以操作的 token 数量,可用于质押、交易、转账等。 - -- ` 冻结 ` 无法直接操作但无锁定期限的的 token 数量,用于获取 power,可以随时取出(需要 14 天等待期限)或添加锁定期限。 - -- ` 锁定 ` 无法直接操作的 token 且有锁定期限的 token 数量,用于获取投票权,锁定也可以获得额外的氪石收益。 - -- ` 解冻中 ` 已选择取出但在等待期限的 token。 - -
- -## 其他 Staking 操作 - -Staking 还有一些其他操作,感兴趣的朋友,可以自行探索,列举如下: - -![wiki-tut-nominator-8](assets/wiki-tut-nominator-8-cn.png) - - - ` 停止提名 ` 取消所有投票。 - - - ` 质押 ` 增加 Staking 冻结的代币,用来获得更多的票权(power)。 - - - ` 解除质押 ` 解冻 Staking 的代币,与此同时票权(power)也会按比例减少。 - - > 取消抵押需要 14 天的解冻期,处于解冻期内的代币不能进行任何操作,请谨慎处理。 - - - ` 收益历史 ` 去 Subscan 浏览器查看历史收益记录 - - - ` 领取收益 ` 手动领取已获得的收益,收益将以 era 为单位发放。 - - > 注意:收益会保存 56 个 era(约 56 天),超期将无法领取。 - - ![](assets/wiki-tut-nominator-9-cn.png) - - - ` 领取收益 ` 手动领取已获得的收益,收益将以 era 为单位发放。 - - - ` 质押更多资金 ` 增加 Staking 冻结的代币,用来获得更多的票权(power)。 - - - ` 解除质押资金 ` 解冻 Staking 的代币,与此同时票权(power)也会按比例减少。 - - - ` 冻结转锁定 ` 将冻结的 Staking 代币锁定,并选择锁定期限,可以获得额外的氪石奖励。 - - - ` 撤销解冻 ` 将解冻中的资产重新冻结以恢复票权(power)。 - - - ` 更改控制账户 ` 更改用于管理 Staking 其他操作的账号,如参与投票、参与验证等。 - - - ` 更改收益账号 ` 更改用于接收 Staking 收益的账号。 - - - ` 设置 session keys` 如果要升级成为验证人,需填写此项。[如何成为验证人](https://docs.darwinia.network/docs/zh-CN/wiki-tut-validator) - - - ` 设置链上身份 ` 设置您的个人信息,如昵称、邮箱、网站、twitter、riot 等信息,其他用户可查看此信息并联系您。 diff --git a/content/zh-CN/crab-tut-relayer.md b/content/zh-CN/crab-tut-relayer.md deleted file mode 100644 index 32289a33..00000000 --- a/content/zh-CN/crab-tut-relayer.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -id: crab-tut-relayer -title: 如何成为 Relayer -sidebar_label: 成为 Relayer -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/zh-CN/crab-tut-relayer.md ---- - -Crab 网络教程: 如何成为 Relayer diff --git a/content/zh-CN/crab-tut-validator.md b/content/zh-CN/crab-tut-validator.md deleted file mode 100644 index 25592422..00000000 --- a/content/zh-CN/crab-tut-validator.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -id: crab-tut-validator -title: 如何成为验证人 -sidebar_label: 成为验证人 -custom_edit_url: https://github.com/darwinia-network/docs/edit/master/content/zh-CN/crab-tut-validator.md ---- -> - Staking 是基于 PoS(Proof of Stake/权益证明)的共识机制,代币持有人通过质押、投票、委托和锁定等行为获取收益。 - -> - 在参与 Staking 之前,请确保有至少拥有 **1** 个 Darwinia 地址,如果您持有较多代币或对安全性要求较高,建议准备 **2** 个 Darwinia 地址。没有地址请参考:[如何创建账户](https://docs.darwinia.network/docs/zh-CN/crab-tut-create-account) - -> - Darwinia 地址内需准备少许 CRING ,作为交易手续费。没有 CRING 请参考:[如何通过水龙头获得免费的 CRING](https://docs.darwinia.network/docs/zh-CN/crab-tut-claim-cring) - -
- -## 参与验证 - -### 入口 - -- 进入 [Darwinia Web Wallet](https://apps.darwinia.network),点击左侧「抵押」栏目,点击「开始 Staking」 - - ![crab-tut-nominator-1](assets/crab-tut-nominator-1.png) - - -### 参与 Staking - -![crab-tut-nominator-2](assets/crab-tut-nominator-2.png) - -- ` 资金账户 ` 保管资金的账号,参与 Staking 的代币将来自这个账户,此账户的操作多与资金变动相关。 -- ` 控制账户 ` 管理 Staking 其他操作的账号,如参与投票、参与验证等。 - - > ` 资金账户 ` 和 ` 控制账户 ` 可设置为同一账户,如果您持有较多代币或对安全性要求较高,建议此处设置为不同账号。 - -- ` 冻结数量 ` 参与 Staking 的代币数量,这部分代币将被暂时冻结,解冻需要 **14** 天的解冻期;您可以选择冻结 CRING 或 CKTON。 -- ` 收益账号 ` 接收 Staking 收益的账号 -- ` 冻结期限 ` 可选项;将 CRING 承诺冻结 **3-36** 个月,可以获得额外的 CKTON 奖励。(承诺锁定需接受用户条款) - - > 如提前赎回有承诺期限的 CRING,需要支付获得奖励 **3** 倍的 CKTON 惩罚 (在 CKTON 不足的情况下,不可以使用 CRING 来代缴罚金)。 - -- 填写好 Staking 参数后,请点击「冻结」,签名并提交。 - - ![crab-tut-nominator-3](assets/crab-tut-nominator-3.png) - -### 参选验证人 - -#### 生成 session keys - -- **通过命令行生成** - - 在服务器终端下输入以下命令,成功的话会返回生成好的 session keys - ```sh - curl -H 'Content-Type: application/json' --data '{ "jsonrpc":"2.0", "method":"author_rotateKeys", "id":1 }' http://localhost:9933 - ``` - -- **通过网页钱包生成** - - 点击钱包左侧「设置」,将接口操作模式改为开发者模式;开启「自定义终端」,输入本地节点地址(e.g `ws://127.0.0.1:9944`),确认无误后点击「保存」。 - - ![tut-validator-session-1-cn](assets/tut-validator-session-1-cn.png) - - 点击左侧「工具箱」,在 RPC Calls 中选择 `author`/`rotate keys`,点击「submit RPC Call」 - - ![tut-validator-session-2-cn](assets/tut-validator-session-2-cn.png) - - 复制生成好的 session keys 并妥善保管。 - -- **Q & A:** - - *Q:9933 是什么端口* - - A:为 `--rpc-port` 指定的端口号,默认为 9933 - - *Q:9944 是什么端口* - - A:为 `--ws-port` 指定的端口号,默认为 9944 - - *Q:RPC 请求返回方法未找到* - - A:请在节点启动时加入 `--unsafe-rpc-external --rpc-methods Unsafe`,建议生成完后删除本参数重启节点 - - *Q:RPC 请求返回请求头不在* - - A:请在节点启动时加入 `rpc-cors all`,建议生成完后删除本参数重启节点 - - > 如仍有问题,欢迎**[提交 issue]("https://github.com/darwinia-network/darwinia/issues/new")** - -#### 设置 session keys - -**点击「session 账号」,输入刚刚生成的 session keys ,点击「设置 session keys」提交。** -> session keys 务必填写真实数据,否则会导致漏块,从而收到经济惩罚。 - -![tut-validator-1-cn](assets/tut-validator-1-cn.png) - -**确认无误后,点击「签名并提交」** - -![tut-validator-2-cn](assets/tut-validator-2-cn.png) -> 验证人和提名人的身份是互斥的,不可并存。如果您正在提名其他验证人,需要取消提名操作后,再进行后续的操作。 - -**点击「验证」,开始设置验证人参数** - -- ` 奖励佣金百分比 ` 设置本节点优先分配收益的比重,范围为 **0-100%**。(例:如设置了 **5%** 的奖励佣金,本节点将优先获得节点收益的 **5%**,剩下 **95%** 的节点收益,将依据验证人和投票人抵押的金额,按比例分配;也就是说,` 验证人的收益 = 节点奖励佣金 + 抵押奖励分成 `) - -![tut-validator-3-cn](assets/tut-validator-3-cn.png) - -**确认无误后,点击「签名并提交」** - -![tut-validator-4-cn](assets/tut-validator-4-cn.png) - -**去「浏览器」查看当前验证人的相关信息** - -![tut-validator-5-cn](assets/tut-validator-5-cn.png) -> 参选验证人后会进入「候选」队列,在进入下一个 era 的时刻参与选举。 - -
- -## 其他 Staking 操作 - -Staking 还有一些其他操作,感兴趣的朋友,可以自行探索,列举如下: - -![](assets/wiki-tut-validator-6-cn.png) - -- ` 停止提名 ` 取消所有投票。 -- ` 质押 ` 增加 Staking 冻结的代币,用来获得更多的票权(power)。 -- ` 解除质押 ` 解冻 Staking 的代币,与此同时票权(power)也会按比例减少。 - - > 请注意:取消抵押需要 **14** 天的解冻期,处于解冻期内的代币不能进行任何操作,请谨慎处理。 - -- ` 收益历史 ` 去 Subscan 浏览器查看历史收益记录。 -- ` 领取收益 ` 手动领取已获得的收益,收益将以 era 为单位发放。 - - > 请注意:收益会保存 **56** 个 era(约 **56** 天),超期将无法领取。 - -![](assets/wiki-tut-validator-7-cn.png) - -- ` 领取收益 ` 手动领取已获得的收益,收益将以 era 为单位发放。 -- ` 质押更多资金 ` 增加 Staking 冻结的代币,用来获得更多的票权(power)。 -- ` 解除质押资金 ` 解冻 Staking 的代币,与此同时票权(power)也会按比例减少。 -- ` 冻结转锁定 ` 将冻结的 Staking 代币锁定,并选择锁定期限,可以获得额外的氪石奖励。 -- ` 撤销解冻 ` 将解冻中的资产重新冻结以恢复票权(power)。 -- ` 更改控制账户 ` 更改用于管理 Staking 其他操作的账号,如参与投票、参与验证等。 -- ` 更改收益账号 ` 更改用于接收 Staking 收益的账号。 -- ` 设置 session key` 更改 session key,请谨慎操作。 -- ` 设置链上身份 ` 设置您的个人信息,如昵称、邮箱、网站、twitter、riot 等信息,其他用户可查看此信息并联系您。 diff --git a/content/zh-CN/dev-dvm.md b/content/zh-CN/dev-dvm.md new file mode 100644 index 00000000..7a0cc1d1 --- /dev/null +++ b/content/zh-CN/dev-dvm.md @@ -0,0 +1,7 @@ +--- +id: dev-dvm +title: DVM 相关 +sidebar_label: DVM 相关 +--- + +详见:[https://crab.network/zh-CN/docs/pangolin-home](https://crab.network/zh-CN/docs/pangolin-home) \ No newline at end of file diff --git a/website/i18n/en.json b/website/i18n/en.json index 97f7f3d2..ca58b46d 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -5,62 +5,6 @@ "previous": "Previous", "tagline": "Cross-chain App Hub and Internet of Tokens", "docs": { - "crab-airdrop": { - "title": "Crab Network Airdrop", - "sidebar_label": "Airdrop" - }, - "crab-home": { - "title": "Darwinia Crab Network", - "sidebar_label": "Crab Network" - }, - "crab-parameters": { - "title": "Crab Network Parameters", - "sidebar_label": "Parameters" - }, - "crab-tool-index": { - "title": "Crab Network Tools", - "sidebar_label": "Tools" - }, - "crab-tut-claim-cring": { - "title": "How to claim free CRING", - "sidebar_label": "Claim CRING" - }, - "crab-tut-create-account": { - "title": "Create an Account", - "sidebar_label": "Create an Account" - }, - "crab-tut-exchange": { - "title": "Darwinia Crab Exchange Access Guide", - "sidebar_label": "Darwinia Crab Exchange Access Guide" - }, - "crab-tut-get-free-cring": { - "title": "How to get free CRING through faucet", - "sidebar_label": "Get free CRING" - }, - "crab-tut-governance": { - "title": "How to participate in governance", - "sidebar_label": "Participate in governance" - }, - "crab-tut-index": { - "title": "Tutorials List", - "sidebar_label": "Tutorials" - }, - "crab-tut-node": { - "title": "How to run a node", - "sidebar_label": "Running a node" - }, - "crab-tut-nominator": { - "title": "How to become a nominator", - "sidebar_label": "Become a nominator" - }, - "crab-tut-relayer": { - "title": "How to become a relayer", - "sidebar_label": "Become a relayer" - }, - "crab-tut-validator": { - "title": "How to become a validator", - "sidebar_label": "Become a validator" - }, "dev-bounty": { "title": "Bounty Program", "sidebar_label": "Bounty Program" @@ -69,6 +13,10 @@ "title": "Developer Community", "sidebar_label": "Community" }, + "dev-dvm": { + "title": "DVM", + "sidebar_label": "DVM" + }, "dev-home": { "title": "Developer Portal", "sidebar_label": "Developers" @@ -386,8 +334,7 @@ "Understand Darwinia": "Understand Darwinia", "Tutorials": "Tutorials", "RFCs": "RFCs", - "Developers": "Developers", - "Crab Network": "Crab Network" + "Developers": "Developers" } }, "pages-strings": { diff --git a/website/sidebars.json b/website/sidebars.json index 8a979618..a3ba582b 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -115,48 +115,10 @@ "dev-workshop-show" ] }, - { - "type": "subcategory", - "label": "Tutorials", - "ids": [ - "dev-tut-dvm-deposit", - "dev-tut-dvm-withdraw", - "dev-tut-dvm-use-web3-contract", - "dev-tut-dvm-use-web3-transaction" - ] - }, "dev-community", "dev-substrate", - "dev-rust" - ] - }, - "crab": { - "Crab Network": [ - "crab-home", - "crab-tool-index", - "crab-airdrop", - "crab-parameters", - { - "type": "subcategory", - "label": "Get Started", - "ids": [ - "crab-gs-faucet", - "crab-gs-faucet" - ] - }, - "crab-tut-index" - ], - "Tutorials": [ - "crab-tut-create-account", - "crab-tut-get-free-cring", - "crab-tut-claim-cring", - "crab-tut-staking", - "crab-tut-nominator", - "crab-tut-node", - "crab-tut-validator", - "crab-tut-exchange", - "crab-tut-relayer", - "crab-tut-governance" + "dev-rust", + "dev-dvm" ] } }