Skip to content

Commit

Permalink
fix issues (neo-project#998)
Browse files Browse the repository at this point in the history
  • Loading branch information
Celia18305 committed Feb 13, 2020
1 parent 515465a commit 337a449
Show file tree
Hide file tree
Showing 11 changed files with 104 additions and 120 deletions.
24 changes: 12 additions & 12 deletions docs/en-us/network/private-chain/private-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section guides you to build a private chain using four virtual machines and

## Configuring the virtual machine

The deployment of an NEO private chain requires at least four servers to reach a consensus, where each server corresponds to a consensus node and a dedicated NEO wallet. Here we created four Windows virtual machines on Azure, the size is Standard DS1 v2 (1 core, 3.5 GB RAM).
The deployment of an Neo private chain requires at least four servers to reach a consensus, where each server corresponds to a consensus node and a dedicated Neo wallet. Here we created four Windows virtual machines on Azure, the size is Standard DS1 v2 (1 core, 3.5 GB RAM).

![image](../../assets/privatechain_1.png)

Expand All @@ -16,16 +16,16 @@ After creating the four virtual machines, open the port 10331-10334 by adding ne
Record the IP addresses after the four virtual machines have been created.

## Installing NEO-CLI
## Installing Neo-CLI

Do the following on four virtual machines:

1. Refer to [Installation of NEO-CLI](../../node/cli/setup.md) and install NEO-CLI.
1. Refer to [Installation of Neo-CLI](../../node/cli/setup.md) and install Neo-CLI.
2. Download [SimplePolicy](https://github.com/neo-project/neo-plugins/releases/download/v2.9.2/SimplePolicy.zip). Extract the file and place the Plugins folder under the neo-cli root directory.

## Creating wallet files

1. Create four wallet files, wallet1.db3 - wallet4.db3, using NEO-CLI or NEO-GUI. The following screenshot shows the creation with NEO-CLI.
1. Create four wallet files, wallet1.db3 - wallet4.db3, using Neo-CLI or Neo-GUI. The following screenshot shows the creation with Neo-CLI.
2. Record the public keys of four wallets, i.e. directly copy them on the screen and save to a txt file or use `list key` in [CLI Command](../../node/cli/cli.md) to view the public key, and then copy it.
3. Copy the four wallet files into each of the four virtual machines neo-cli folder.

Expand All @@ -35,7 +35,7 @@ Do the following on four virtual machines:

1. Under each neo-cli directory of the four nodes, open the file `protocol.json` and modify the following:

- `Magic`: Magic is used to identify the source network of the message, and specifying a different Magic ensures that different network information in the NEO block are not sent to other networks, during transmission. The type of Magic is unit, so note that the value you fill in is in the range [0 - 4294967295].
- `Magic`: Magic is used to identify the source network of the message, and specifying a different Magic ensures that different network information in the Neo block are not sent to other networks, during transmission. The type of Magic is unit, so note that the value you fill in is in the range [0 - 4294967295].
- `StandbyValidators`: Enter the four wallet public keys recorded before.
- `SeedList`: Enter the four virtual machines IP addresses recorded before. Leave the port number as it is.

Expand Down Expand Up @@ -97,19 +97,19 @@ Four nodes can still achieve consensus, even if one machine is turned off, as sh

In the genesis block of the NEO network, 100 million NEOs are generated. Additionally, GAS is generated with the generation of new blocks. When the private chain is set up, you can withdraw those NEO and GAS from a multi-party address with NEO-GUI, to facilitate your blockchain development and testing.

### Installing and configuring NEO-GUI
### Installing and configuring Neo-GUI

1. Download [NEO-GUI](https://github.com/neo-project/neo-gui/releases) from Github and extract the file.
2. Configure the file protocol.json under the neo-gui folder to connect the client to the private chain:
1. Download [Neo-GUI](https://github.com/neo-project/neo-gui/releases) from Github and extract the file.
2. Configure the file protocol.json under the Neo-gui folder to connect the client to the private chain:
- StandbyValidators`:enter the public keys of four wallets created before.
- `SeedList`:enter the four virtual machines IP addresses here and leave the port number as it is.
3. Configure the file config.json to make sure the NEO-GUI port is not conflict with the ports of other four nodes. If using the same port, NEO-GUI cannot work as NEO-CLI is running.
3. Configure the file config.json to make sure the Neo-GUI port is not conflict with the ports of other four nodes. If using the same port, Neo-GUI cannot work as Neo-CLI is running.

Start NEO-GUI and open any of the wallets, if you see the connection number in the lower left corner is not 0 and the client has been downloading the blocks, the client has been successfully connected to the private chain.
Start Neo-GUI and open any of the wallets, if you see the connection number in the lower left corner is not 0 and the client has been downloading the blocks, the client has been successfully connected to the private chain.

### Creating multi-party signature addresses

From NEO-GUI, open four wallets in turn and do the following:
From Neo-GUI, open four wallets in turn and do the following:

1. Right-click on the blank area of account page, click `Create Contract Address` -> `Multi-Signature`.

Expand All @@ -123,7 +123,7 @@ From NEO-GUI, open four wallets in turn and do the following:
>
> You must create the multi-party signature address in each wallet so that the transfer transaction can be signed successfully .

Now you should see the contract address has 100 million NEO shares.
Now you should see the contract address has 100 million Neo shares.

![image](../../assets/privatechain_14.png)

Expand Down
10 changes: 5 additions & 5 deletions docs/en-us/network/private-chain/private-chain2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

In previous document we described the standard way to build a private chain using four computers or virtual machines. In this document we will introduce an easier way to build a private chain on a windows system computer.

## Installing NEO node
## Installing Neo node

Install NEO-CLI and make four copies of the node folder with the name of node1, node2, node3, and node4, successively.
Install Neo-CLI and make four copies of the node folder with the name of node1, node2, node3, and node4, successively.

For more information refer to [Installation of NEO-CLI](../../node/cli/setup.md).
For more information refer to [Installation of Neo-CLI](../../node/cli/setup.md).

## Installing plug-in

Install [SimplePolicy](https://github.com/neo-project/neo-plugins/releases/) the plug-in to enable the consensus policy. The nodes cannot reach a consensus without the plug-in. For more information, refer to [Installing plug-ins](../../node/cli/setup.md).

## Creating wallet files

From NEO-CLI or NEO-GUI create four wallets, 1.json, 2.json, 3.json, and 4.json, and place each in the folder of four nodes.
From Neo-CLI or Neo-GUI create four wallets, 1.json, 2.json, 3.json, and 4.json, and place each in the folder of four nodes.

## Modifying config.json

Expand Down Expand Up @@ -226,4 +226,4 @@ Refer to [Withdrawing NEO and GAS](private-chain.md#withdrawing-neo-and-gas).

Tips:

[Here](https://github.com/chenzhitong/NEO-Private-Net) is a private chain which is all set for you to use directly. The NEO and GAS have been withdrawn. The NEO node version is 2.9.4.
[Here](https://github.com/chenzhitong/NEO-Private-Net) is a private chain which is all set for you to use directly. The NEO and GAS have been withdrawn. The Neo node version is 2.9.4.
14 changes: 7 additions & 7 deletions docs/en-us/network/private-chain/solo.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,21 @@ You can refer to the following example:

Run the command line and enter the NEO-CLI directory. Then enter `neo-cli.exe` to start the private chain. The private chain is set up successfully when it goes as shown below:

![img](https://github.com/chenzhitong/NEO-Private-Net/raw/master/img/privatechain_demo.png)
![img](../../assets/privatechain_demo.png)

The private chain is terminated if you close the window.

## Withdrawing NEO and GAS

In the genesis block of the NEO network, 100 million NEOs are generated. Additionally, GAS is generated with the generation of new blocks. When the private chain is set up, you can withdraw those NEO and GAS from a multi-party address with NEO-GUI, to facilitate your blockchain development and testing.
In the genesis block of the Neo network, 100 million NEOs are generated. Additionally, GAS is generated with the generation of new blocks. When the private chain is set up, you can withdraw those NEO and GAS from a multi-party address with Neo-GUI, to facilitate your blockchain development and testing.

### Installing and configuring NEO-GUI
### Installing and configuring Neo-GUI

1. Download [NEO-GUI](https://github.com/neo-project/neo-gui/releases) from Github and extract the file.
1. Download [Neo-GUI](https://github.com/neo-project/neo-gui/releases) from Github and extract the file.

2. Replace the protocol.json in the NEO-GUI folder with the one configured before.
2. Replace the protocol.json in the Neo-GUI folder with the one configured before.

3. Configure the file config.json to make sure the NEO-GUI port is not conflict with the one of NEO-CLI; otherwise, NEO-GUI cannot work as NEO-CLI is running.
3. Configure the file config.json to make sure the Neo-GUI port is not conflict with the one of Neo-CLI; otherwise, Neo-GUI cannot work as Neo-CLI is running.

```json
{
Expand All @@ -152,7 +152,7 @@ In the genesis block of the NEO network, 100 million NEOs are generated. Additio
}
```

Start NEO-GUI and open a.json, if you see the connection number in the lower left corner is not 0 and the client has been downloading the blocks, the client has been successfully connected to the private chain.
Start Neo-GUI and open a.json, if you see the connection number in the lower left corner is not 0 and the client has been downloading the blocks, the client has been successfully connected to the private chain.

### Transferring NEO/GAS

Expand Down
52 changes: 20 additions & 32 deletions docs/en-us/network/testnet.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Main Net and Test Net

The NEO node runs on the main net by default. The Main net is a block chain network that has been officially launched and operates independently.
The Neo node runs on the main net by default. The Main net is a block chain network that has been officially launched and operates independently.

The Test net is an environment where the user can develop, commission and test programs. Testing programs on the testnet incurs the network fee of testnet GAS (not real GAS!). Testnet NEO and GAS can be applied free of charge, on the official website, detailed instruction are below.

All the blockchain of the test network are independent of the main network. If you develop a simple smart contract or try to register assets, the use of testnet should suffice. After the testing is complete, the development can be moved to the NEO mainnet online operation.
All the blockchain of the test network are independent of the main network. If you develop a simple smart contract or try to register assets, the use of testnet should suffice. After the testing is complete, the development can be moved to the Neo mainnet online operation.

## TestNet characteristics

Expand All @@ -14,24 +14,13 @@ All the blockchain of the test network are independent of the main network. If y
4. Smart contract deployment in the test environment, where anyone in the world can employ it.
5. Test network can not be used as commercial application of an actual landing environment.

## Client Downloads
## Switching between test net and main net

The test network client is the same as the primary network client. By modifying the client's configuration file, the client can be switched between the primary and test networks.

Reference: [Introduction of NEO node](../node/introduction.md).

| | Neo-GUI | Neo-CLI |
| ---- | ---------------------------------------- | ---------------------------------------- |
| Releases | [Official website](https://www.neo.org/download) or [Github](https://github.com/neo-project/neo-gui/releases) | [Github](https://github.com/neo-project/neo-cli/releases) |
| Source code | [Github](https://github.com/neo-project/neo-gui) | [Github](https://github.com/neo-project/neo-cli) |

## Method of switching to test network

After downloading NEO client, you can switch the client to connect to test net by modifying the client configuration file. Here we take NEO-GUI for an example:
After downloading Neo client, you can switch the client to connect to test net by modifying the client configuration file. Here we take Neo-GUI for an example:

> [!Note]
>
> NEO3 clients can only connect to test net for the moment as the NEO3 main net has not launched yet.
> Neo3 clients can only connect to test net for the moment as the Neo3 main net has not launched yet.
1. Copy the contents of the program directory under the `protocol.testnet.json` into ` protocol.json` as shown.

Expand All @@ -41,37 +30,36 @@ After downloading NEO client, you can switch the client to connect to test net b

![image](../assets/testnet_2_v2.png)

## Applying for Test GAS and Test NEO

If you are a developer, you can ask for Neo and GAS on the TestNet. You will need 500 Test GAS to deploy a contract to the TestNet.

## Method of getting TEST GAS and TEST NEO
### Obtaining test coin automatically

If you are a developer, you can ask for NEO and GAS on the TestNet. You will need 500 Test GAS to deploy a contract to the TestNet.
Up to 1000 GAS and 1000 Neo per day can be requested via the [NGD faucet](https://neowish.ngd.network/).

Up to 1000 GAS and 1000 NEO per day can be requested via the [NGD faucet](https://neowish.ngd.network/). If you need more than that, you'll have to request it manually:
### Applying for test coin from Neo website

- Fill in the request form (https://www.neo.org/Testnet/Create) specifying your PUBLIC key and EMAIL.
- A day or so later you will receive an email with an Contract Address and a second PUBLIC KEY.
- Create/Add a multi-sig address in your wallet.
- Select the new address and transfer the assets from the multi-part signed address to your own address.
If you need more than that, you'll have to request it from Neo website manually.

### STEP 1 - Look up your PUBLIC key
In NEO the address and PUBLIC key are different.
#### Step 1 - Look up your public key
In Neo the address and PUBLIC key are different.
The PUBLIC KEY is shown when you view the PRIVATE KEY. (Never share your PRIVATE key.)

![image](../assets/neo_gas_0.jpg)

### STEP 2 - Fill in the request
#### Step 2 - Fill in the request
Complete the form here: https://neo.org/testcoin/apply specifying your EMAIL and PUBLIC key.
After a day or so you will be sent an email containing a "Multi-party signed address" and the PUBLIC key of the sender. See Advanced Features, Multi-party signed address.
After a day or so you will be sent an email containing a "Multi-party signed address" and the PUBLIC key of the sender. See [Multi-party signed address](../node/gui/sc.md).

### STEP 3 - Create a multi-party signed address
#### Step 3 - Create a multi-party signed address
To access the assets, in your neo-gui you will create a "Multi-party signed address" in your wallet using

- The "Multi-party signed address" (from the email)
- The PUBLIC KEY of the sender (from the email)
- Your PUBLIC KEY (from STEP 1 above)

1. From NEO-GUI, right-click on the account area and select `Create Contract Address` -> `Multi-Signature`.
1. From Neo-GUI, right-click on the account area and select `Create Contract Address` -> `Multi-Signature`.

![image](../assets/neo_gas_1.jpg)

Expand All @@ -83,14 +71,14 @@ The contract address specified in the email is created and displayed in the acco

![image](../assets/neo_gas_2.jpg)

You will see the quantity of NEO and/or GAS shown beside the Contact address.
You will see the quantity of Neo and/or GAS shown beside the Contact address.


### STEP 4 - Transfer the assets to another account
#### Step 4 - Transfer the assets to another account

1. Select the `Contact address` by clicking on it.

2. From NEO-GUI menu, select `Transaction` -> `Transfer`
2. From Neo-GUI menu, select `Transaction` -> `Transfer`

![image](../assets/neo_gas_3.png)

Expand Down
8 changes: 4 additions & 4 deletions docs/zh-cn/network/private-chain/neolocal.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# 快速搭建本地网络

你可以在本地搭建个人的区块链网络用于协助开发。使用 [NEO-Local](https://github.com/CityOfZion/neo-local) 项目可以帮助你快速完成搭建,你可以使用它运行测试、执行命令和检查状态,同时控制链的操作。
你可以在本地搭建个人的区块链网络用于协助开发。使用 [Neo-Local](https://github.com/CityOfZion/neo-local) 项目可以帮助你快速完成搭建,你可以使用它运行测试、执行命令和检查状态,同时控制链的操作。

> [!Note]
>
> 该项目仅用于开发目的,其 docker 镜像中使用的 NEO 组件可能不是最新的。所以请始终使用测试网测试你所编写的智能合约。
> 该项目仅用于开发目的,其 docker 镜像中使用的 Neo 组件可能不是最新的。所以请始终使用测试网测试你所编写的智能合约。
**使用 Docker**
该项目使用 Docker 和 Docker-compose,可运行在 MacOS、Linux 和 Windows 系统上。关于 Docker 的更多信息,请参见其 [官网](https://www.docker.com/)

[![img](https://github.com/neo-project/docs/raw/df3f3750862af288a789f05df456d2ce77175d04/assets/neolocal.png)](https://github.com/neo-project/docs/blob/df3f3750862af288a789f05df456d2ce77175d04/assets/neolocal.png)
![](../../assets/neolocal.png)

## Neo-local 组件

NEO-local 将启动以下容器:
Neo-local 将启动以下容器:

- 4 个共识节点 - 一个完整的工作网络
- 区块浏览器 - Neoscan
Expand Down
Loading

0 comments on commit 337a449

Please sign in to comment.