Skip to content

Commit

Permalink
Update general wiki pages and the how-to section (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeder authored and Echo Protocol committed Jul 23, 2019
1 parent fa8b7fe commit baca73a
Show file tree
Hide file tree
Showing 10 changed files with 165 additions and 170 deletions.
Binary file removed .gitbook/assets/echorand-steps (1).png
Binary file not shown.
49 changes: 24 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@ Please note that the current version of the documentation is not final and will

Echo is a generalized smart contract protocol that enables efficient decentralized computing. It provides the infrastructure and developer tooling necessary to build and deploy scalable, high-performing decentralized applications.

Echo includes several main modules on which work is built:
Echo includes several main modules:

### PoWR Consensus

Fast, final and scalable BFT consensus using proof of weighted randomness \(PoWR\) also known as EchoRand. EchoRand uses a verifiable random function \(VRF\) to randomly select a pool of block producers and block verifiers based on their stake to validate each new set of transactions.
Fast, final and scalable BFT consensus using Proof of Weighted Randomness (PoWR) also known as EchoRand. EchoRand uses a Verifiable Random Function (VRF) to randomly select a pool of block producers and block verifiers proportionally to their stake to validate each new set of transactions.

### x64 Virtual Machie & EVM
### x64 Virtual Machine & EVM

Integrated virtual machines allow you to use smart contracts on the Echo network. Contracts can be written both in Solidity and in more familiar and convenient languages, such as C, C++, Rust, Go and other.
Integrated virtual machines allow you to use smart contracts on the Echo network. Smart contracts can be written both in Solidity and in more familiar and convenient languages, such as C, C++, Rust, Go and many more.

### Bitcoin and Ethereum Sidechains

The sidechain mechanism integrated into the protocol allows you to use Ethereum and Bitcoin within the Echo network and even realize the connection between these two currencies.
The sidechain mechanism integrated into the protocol allows you to access BTC and ETH within the Echo network, using built-in two-way pegging, thus enabling their direct use in Echo smart contracts and enabling the development of new DeFi technologies and products.

## What is available right now?
## Current Status

The project is currently under active development and testing.
The project is currently under heavy development and testing.

Therefore, at this moment in time, not all the functionality is available on the testnet. In turn, you can now do the following:
Therefore, some of the functionality isn't available on the testnet, yet. At the time of writing, Echo testnet supports the following:

* register an account and get assets for it
* be a consensus participant
* transfer Assets
* create and issue new Assets and use it
* create and call contracts written in Solidity using EVM
* create and call contracts written in С++ using x64 VM
* create and use account addresses
* launch your node and use its API to communicate with the blockchain
* Register an account.
* Participate in the EchoRand consensus.
* Create and issue new assets.
* Transfer assets.
* Deploy and access smart contracts written in Solidity via EVM.
* Deploy and access smart contracts written in С++ via x64 VM.
* Create and use account addresses.
* Launch your node and access its API to communicate with the blockchain.

## How to start?
## Getting Started

To get acquainted with how to start using Echo, you can visit the `How to` section and find the corresponding resource depending on which particular blockchain usage interests you.
To get acquainted with how to start using Echo, you can visit the [How To](how-to/) section.

## Technology Details

Expand All @@ -50,23 +50,22 @@ You can read more about how the Echo works and how it works from the inside. You
* [Overview](technologies/powr-echorand/overview.md) - detailed description of the mechanism with all the subtleties and nuances
* [Architecture](technologies/powr-echorand/architecture.md) - low-level detailed description of exactly how the idea was implemented in the code

## How to use?
## Using Echo

You can start using Echo right now. It all depends on how you are going to use it. For starters, you can use wallets to create an account and manage assets on it. The following wallets are currently available:
You can start using Echo right now. For starters, you can use wallets to create an account and manage assets on it. The following wallets are currently available:

* Echo Desktop Wallet
* Blip
* Echo Bridge Extension

Keep track of the blocks and transactions you can on the block explorer:
Use the Echo block explorer to keep track of the blocks and transactions:

* Echo Explorer - [https://explorer.echo.org](https://explorer.echo.org)
* Echo Explorer (testnet) - [https://explorer.echo.org](https://explorer.echo.org)

To interact with the blockchain at the code level, you have the following libraries and SDKs at your disposal:

* [echojs-lib](https://github.com/echoprotocol/echojs-lib) - A javascript Echo library for node.js and browsers
* [echopy-lib](https://github.com/echoprotocol/echopy-lib) - Python Library for Echo Blockchain
* [echo-unity-lib](https://github.com/echoprotocol/echo-unity-lib) - Unity library for Echo
* [echopy-lib](https://github.com/echoprotocol/echopy-lib) - Python Library for Echo Blockchain
* [echo-unity-lib](https://github.com/echoprotocol/echo-unity-lib) - Unity library for Echo
* [echo-ios-framework](https://github.com/echoprotocol/echo-ios-framework) - Pure Swift Echo framework for iOS
* [echo-android-framework](https://github.com/echoprotocol/echo-android-framework) - Pure Kotlin Echo framework for Android

2 changes: 1 addition & 1 deletion docs/get-started/docker.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Quickstart with Docker

The section will be described after the publication of source code.
The section will be described after the publication of source code.
34 changes: 18 additions & 16 deletions docs/get-started/installation.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
# Installing Echo

## Build it from source code
## Building from the Source Code

### Installing dependencies
### Installing Dependencies

Main system dependencies:

- **CMake 3.8.0** and later
- **GCC 7** and later or **Clang 5** and later
* **CMake 3.8.0** and later.
* **GCC 7** and later or **Clang 5** and later.

#### Installing dependencies on macOS
#### Installing Dependencies on Mac OS

To install dependencies for macOS follow this steps:
To install dependencies for Mac OS, follow these steps:

* Install Homebrew by following the instructions here: [http://brew.sh/](http://brew.sh/)
* Initialize Homebrew:
* Install `Homebrew` by following the instructions here: [http://brew.sh/](http://brew.sh/)
* Update `Homebrew`:

```
```bash
brew doctor
brew update
```
* Install necessary packages:

```
* Install the necessary packages:

```bash
brew install cmake git autoconf automake leveldb libtool libelf doxygen
```

#### Installing dependencies on Ubuntu 16.04 LTS
#### Installing Dependencies on Ubuntu 16.04 LTS

##### Ubuntu 16.04 LTS

Ubuntu 16.04 LTS have no required cmake and gcc-7 in default repositories. They can be installed though Pip and third-party PPA repository.
Ubuntu 16.04 LTS has no required `cmake` and `gcc-7` in its default repositories. They can be installed through Pip and third-party PPA repository.

```bash
sudo add-apt-repository ppa:jonathonf/gcc-7.3
Expand All @@ -42,14 +43,15 @@ sudo pip3 install cmake
sudo apt install make g++-7 libbz2-dev libdb++-dev libdb-dev libssl-dev openssl libreadline-dev autoconf libtool git ntp libcurl4-openssl-dev libcurl4-openssl-dev libleveldb-dev libelf-dev
```

#### Installing dependencies on Ubuntu 18.04 LTS and later
#### Installing Dependencies on Ubuntu 18.04 LTS and Later

```bash
sudo apt update
sudo apt install cmake make g++-7 libbz2-dev libdb++-dev libdb-dev libssl-dev openssl libreadline-dev autoconf libtool git ntp libcurl4-openssl-dev libcurl4-openssl-dev libleveldb-dev libelf-dev
```

### Build instructions
### Build Instructions

```bash
git clone https://github.com/echoprotocol/echo.git
cd echo
Expand All @@ -58,4 +60,4 @@ mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
```
```
60 changes: 31 additions & 29 deletions docs/get-started/running-committee.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,81 @@
# Running Committee Node

## Enabling Echorand consensus and sidechain
## Enabling EchoRand Consensus and Sidechain

By default Echo node doesn't generate any blocks and not participating in consensus or sidechain mechanisms.
By default, an Echo node doesn't generate any blocks and not participating in consensus or sidechain mechanisms, and
only acts as a wallet.

To enable this features you need to configure sidechain connection and pass Echo and Ethereum private keys.
To enable these features, you need to configure the sidechain connection and pass Echo and Ethereum private keys.

To enable sidechain you should add `sidechain-enabled` flag and specify Ethereum websocket RPC URL for sidechain.
To enable the sidechain, you should add the `sidechain-enabled` flag and specify a full node Ethereum websocket RPC URL for sidechain.

```
```bash
$ ./echo_node \
--sidechain-enabled --sidechain-eth-node-url="ws://1.2.3.4:8545"
```

In Echo node configuration files and CLI flags share same parameters, so flags and Ethereum URL can be added in both ways. In config file this setup will look like this:
Node configuration files and CLI flags share the same parameters, so the above flags can be added in both ways. For example, this is how you'd need to update your configuration file:

```
```ini
sidechain-enabled = true
sidechain-eth-node-url = "ws://1.2.3.4:8545"
```

## Adding private keys
## Adding Private Keys

Block production requires one or more private keys to generate signatures of block and messages of echorand consensus protocol and additional private key for Ethereum sidechain to sign its transactions.
Block production requires one or more private keys to be able to generate signatures on blocks and EchoRand messages and additional private key for Ethereum sidechain to sign its transactions.

There are two ways to add private keys:
- by adding keys in open format through configuration files or CLI flags;
- with encrypted keys file, generated in special interactive mode of the node.

### Adding private keys in open format
- By adding keys in open format through configuration files or CLI flags.
- Using an encrypted keys file, generated in an Echo console.

Note: in the current testnet, the keys are only separated by containerization, but in mainnet keys will be only stored in an HSM.

### Adding Private Keys in an Open Format

Parameter `account-info` is used by consensus to sign block and various messages. It accepts a tuple of **account id** and **eddsa private key**.
Parameter `account-info` is used by the consensus to sign on blocks and various messages. It accepts a tuple of **account id** and **eddsa private key**.

Parameter `sidechain-committeeman` is used by sidechain to sign Ethereum transactions. It accepts a tuple of **account id** and **Ethereum private key**.
Parameter `sidechain-committeeman` is used by the sidechain to sign on Ethereum transactions. It accepts a tuple of **account id** and **Ethereum private key**.

You can specify multiple account and sidechain keys for different accounts.
You can specify multiple accounts and sidechain keys for different accounts.

However to enter this keys in terminal their quotes and brackets should be escaped like so:

> However to enter this keys in terminal their quotes and brackets should be escaped like this
>
> `--account-info \[\"account id\",\"eddsa private key\"\]`
> `--sidechain-committeeman \[\"account id\",\"Ethereum private key\"\]`
```text
```bash
$ ./echo_node \
--sidechain-enabled --sidechain-eth-node-url="ws://1.2.3.4:8545" \
--account-info \[\"1.2.1234\",\"6L7UCPPSJrcFC6S8mTTQU4vZrhLsYPbwyyQ6cZENevbJ\"\] \
--account-info \[\"1.2.1235\",\"B1VyzqPkrf8o1rFMwE1GuvF81LVivfoDjxKu2gUdgBqs\"\] \
--sidechain-committeeman \[\"1.2.1234\", \"327bdacfdb6e548a6e2d7d770be94e11fa7234e58216865d5063fecfd6322f43\"\]
```

Alternatively keys can be added in config file in `~/.echo/config.ini`.
Alternatively, keys can be added to the config file, which can be found at `~/.echo/config.ini`:

```
```ini
account-info = ["1.2.1234", "6L7UCPPSJrcFC6S8mTTQU4vZrhLsYPbwyyQ6cZENevbJ"]
account-info = ["1.2.1235", "B1VyzqPkrf8o1rFMwE1GuvF81LVivfoDjxKu2gUdgBqs"]
sidechain-committeeman = ["1.2.1234", "327bdacfdb6e548a6e2d7d770be94e11fa7234e58216865d5063fecfd6322f43"]
```

### Adding private keys in interactive mode

Echo node's interactive mode lets you add multiple private keys to encrypted file.
### Adding Private Keys in Echo Console

To enter this mode add flag `--configure-keys` to Echo node.
Echo console lets you add multiple private keys to an encrypted file.

On first enter, when keys file is not created yet, you need to specify password which will encrypt future keys. This is done by calling `set_password` command and then entering your secret pass phrase. In future you can change password using the same command.
To enter this mode add the flag `--configure-keys` to Echo node.

When node can locate keys file you will be asked for password to decrypt them. After this you can manage existing keys and add new ones.
On the first run, when keys file wasn't created yet, you would need to specify a password which will be used to encrypt future keys. This is done by calling `set_password` command and entering your secret passphrase. You can change your password using the same command.

To add new key you need to call either `add_echo_key` or `add_ethereum_key` command and then input the key itself.
To add a new key, you would need to call either `add_echo_key` or `add_ethereum_key` command.

In the end to exit this interactive mode use `exit` command but if you don't want to save changes use `cancel` instead.
To exit the console, use the `exit`. In the case that you don't want to save any changes, use the `cancel` instead.

---

If private keys were added successfully node will output message like this:
If private keys were added successfully, the console will output a message like this:

```text
Account 1.2.1234 ED Public Key: ECHO5PNcN4VanyKHaAEtRx1UfwgJGMVJbCmeiD6toKD1WGeU
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# ECHO Blockchain Wiki
# Echo Blockchain Wiki
35 changes: 17 additions & 18 deletions how-to/create-account.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
# Create Account
# Creating an Account

## Options of account creation
There are two options to create an Echo account:

There are 2 options to create an account in Echo network:
- Using a public registrar.
- Using an existing account.

* use public registrar
* use your account
In the first case, you will use the RPC API of the public registrar's node. To register through a public registrar, you must use the appropriate API method.

In the first case, you will use the RPC API of the node running by someone, who provided the opportunity to register accounts through it. To register through a public registrar, you must use the appropriate api method. Details of the request you can find here - [https://dev.echo.org/developers/apis/registration-api/](https://dev.echo.org/developers/apis/registration-api/).
Details of the request you can find here: [https://dev.echo.org/developers/apis/registration-api/](https://dev.echo.org/developers/apis/registration-api/).

Also, if you already have an account, you can register a new account yourself by sending an account creation operation to the blockchain. [https://dev.echo.org/developers/operations/account\_management/\_account\_create\_operation/](https://dev.echo.org/developers/operations/account_management/_account_create_operation/)
Alternatively, using an existing account, you can register a new account by yourself by sending an account creation operation to the blockchain: [https://dev.echo.org/developers/operations/account\_management/\_account\_create\_operation/](https://dev.echo.org/developers/operations/account_management/_account_create_operation/)

You can also use the desktop wallet. For example, Blip Wallet allows you to use both registry options.
You can also use the Echo desktop wallet. For example, Echo Blip Wallet provides both of the registration options.

## Name requirements
## Account Name Requirements

A valid name consists of a dot-separated sequence of one or more labels consisting of the following rules:
A valid account name consists of a dot-separated sequence of one or more labels, according to the following rules:

* Each label is three characters or more
* Each label begins with a letter
* Each label ends with a letter or digit
* Each label contains only letters, digits or hyphens
- Each label is three characters or more.
- Each label begins with a letter.
- Each label ends with a letter, or digit.
- Each label contains only letters, digits, or hyphens.

In addition, we require the following:

* All letters are lowercase
* Length is between \(inclusive\) `ECHO_MIN_ACCOUNT_NAME_LENGTH` \(now = 1\) and `ECHO_MAX_ACCOUNT_NAME_LENGTH` \(now = 63\)
We also require the following:

- All letters are lowercase
- Length is between (inclusive\ `ECHO_MIN_ACCOUNT_NAME_LENGTH` (set by default to `1`) and `ECHO_MAX_ACCOUNT_NAME_LENGTH` (set by default to `63`).
19 changes: 9 additions & 10 deletions how-to/generate-address.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# Generate Address
# Generating an Address

## General Description

The payment identification mechanism in Echo is implemented by creating unique addresses for a single account. This enables receiving payments to a single account, providing users with different addresses to identify them or identify the product/object this payment is related to.

The generated addresses are an alias for the account and are regarded by the network as transfers between the sender and the recipient’s account who owns this address. Addresses can only be used to receive payments and cannot be used to send outgoing payments.
Generated addresses are an alias for an account and are regarded by the network as transfers between the sender and the recipient’s account who owns this address. Addresses can only be used to receive payments and cannot be used to send outgoing payments.

## API Methods and Operations

### Address Generation
### Generation

In order to generate an address, the `account_address_create_operation` must be sent from the account you want to create a new address for. Using this operation you can specify a `label` - a string value that will be bound to the generated address.
To generate an address, the `account_address_create_operation` must be sent from the account you want to create a new address for. Using this operation, you can specify a `label` - a string value that will be bound to the generated address.

IMPORTANT: the `label` associated with the address will be seen by all members of the network and is not private information.
IMPORTANT: the `label` associated with the address will be seen by all members of the network and is not a private information.

### To Return All Addresses
### List All Addresses

In order to get the list of addresses for the account, use the API method `get_account_addresses(account_id,from,limit)`. The method will return all the addresses associated with the account, and their labels, if they were specified.
In order to get the list of addresses for the account, use the API method `get_account_addresses(account_id,from,limit)`. The method will return all the addresses associated with the account and their labels if they were specified.

### To Return the Account by Its Address

Use the API method `get_account_by_address(address)` to return the account tied to the specified address.
### Find an Account by Its Address

Use the API method `get_account_by_address(address)` to find an account by its address.
Loading

0 comments on commit baca73a

Please sign in to comment.