Skip to content

Commit

Permalink
docs: tiny mods #116
Browse files Browse the repository at this point in the history
  • Loading branch information
noslav committed Jun 7, 2018
1 parent 7b7745d commit 9ccec9e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
12 changes: 6 additions & 6 deletions website/versioned_docs/version-1.0.0/4_00_UC_OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ sidebar_label: Overview
original_id: uc_overview
---

The OpenST protocol allows for the staking of $OST⍺ on Ropsten Ethereum that enables Branded Tokens to be created, or "minted" on the OpenST network of sidechains. You can learn more about the OpenST Protocol [here.](https://openst.org/). The value of the utility tokens on the OpenST Utility Chain (UC) is backed by the $OST⍺ on the OpenST Value Chain (VC) - Ropsten Ethereum.
The OpenST protocol allows for the staking of $OST⍺ on Ropsten Ethereum that enables Branded Tokens to be created, or "minted" on the OpenST network of sidechains. You can learn more about the OpenST Protocol [here.](https://openst.org/) The value of the utility tokens on the OpenST Utility Chain (UC) is thus backed by the staked $OST⍺ on the OpenST Value Chain (VC) - Ropsten Ethereum.

The UC needs to support lower transaction fees and lower transaction confirmation times than the VC. OpenST Protocol hence is to enable micro-transactions within mainstream consumer applications using the utility tokens. For the utility chain we consider an Ethereum-based chain consensus engine which seals blocks cryptographically by Proof-of-Authority.

Proof-of-Authority is not Byzantine fault-tolerant, but it can still be considered useful in the context of UCs. The UC is cryptographically validated by a known set of validators then those validators can each report the block hashes they have seen on public Ethereum and a block hash is considered final when consensus among the validators is reached.

To understand more about the details on the protocol please refer to the OpenST [white paper.](https://ost.com/documents)
To understand more about the protocol refer to the OpenST [<u>white paper.</u>](https://ost.com/documents)

## Prerequisites

To be able to sync with the UC and also deploy contracts to it, you will need to install the following.

* [geth](https://github.com/ethereum/go-ethereum/wiki/Installing-Geth)
* [eth](https://www.ethereum.org/cli)
* [solc](http://solidity.readthedocs.io/en/v0.4.24/installing-solidity.html)
* [wget](https://www.gnu.org/software/wget/)
* [<u>geth</u>](https://github.com/ethereum/go-ethereum/wiki/Installing-Geth)
* [<u>eth</u>](https://www.ethereum.org/cli)
* [<u>solc</u>](http://solidity.readthedocs.io/en/v0.4.24/installing-solidity.html)
* [<u>wget</u>](https://www.gnu.org/software/wget/)


Post installation you can proceed to syncing and deploying contracts to the UC.
Expand Down
14 changes: 6 additions & 8 deletions website/versioned_docs/version-1.0.0/4_01_UC_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The scripts in `setup_utility_chain_1409` do the following -
```bash
$GETH_EXEC --networkid $networkid --datadir $datadir --port $port --rpc --rpcapi eth,net,web3,personal --rpcport $rpcport --ws --wsport $wsport --bootnodes $bootNodes $extraArgs;
```
Executing this script will sycn your geth node and store the UC `chaindata` locally at `~/uc_node_1409/geth`
Executing this script will sycn your geth node and store the UC `chaindata` locally at `~/uc_node_1409/geth`. This might be different in your case depending on how you decide to set it up.


2. To execute the `setup_utility_chain_1409` bash script you must first modify the rights.
Expand All @@ -146,7 +146,7 @@ WS-RPC server listening port (default: 8546)
Extra Args if any:
```
As the script starts the geth node sync with the UC, copy the inter-process communication (`IPC`) path displayed. Learn more about [inter-process communication](https://en.wikipedia.org/wiki/Inter-process_communication). You will find the `IPC` endpoint path beside `IPC endpoint opened` in the console; copy the `URL` path, so that we can use it later for contract deployment. The `URL` path is the (local) path to attach a geth node from which you will later deploy sample contract on the UC.
As the script starts the geth node sync with the UC, copy the inter-process communication (`IPC`) path displayed. Learn more about [<u>inter-process communication</u>](https://en.wikipedia.org/wiki/Inter-process_communication). You will find the `IPC` endpoint path beside `IPC endpoint opened` in the console; copy the `URL` path, so that we can use it later for contract deployment. The `URL` path is the (local) path to attach a geth node from which you will later deploy sample contract on the UC.
The details below are specific to the `user` executing the script.
Expand Down Expand Up @@ -187,17 +187,15 @@ geth attach ~/uc_node_1409/geth.ipc // the IPC URL may be different in your case
> eth.syncing
{
currentBlock: 4279201,
highestBlock: 5009971,
knownStates: 3167,
pulledStates: 2651,
startingBlock: 4276705
startingBlock: 300,
currentBlock: 312,
highestBlock: 512
}
> eth.blockNumber
3628737
```
The responses give the required information on the status of node's sync with the UC. Make sure you are in sync with the latest blocks before proceeding with deploying contracts on the UC.
Take a look at [<u>eth.syncing</u>](https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethsyncing) and [<u>eth.blockNumber</u>](https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethsyncing) to know what they mean. The responses give the required information on the status of node's sync with the UC. Make sure you are in sync with the latest blocks before proceeding with deploying contracts on the UC.
Expand Down
21 changes: 10 additions & 11 deletions website/versioned_docs/version-1.0.0/4_02_UC_DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,43 +36,42 @@ cat basicContract.js
geth attach ~/uc_node_1409/geth.ipc //this path will be different in your case
```
2. Create a new account, for this you will own the private key. So you can deploy your sample smart contract from this account. Enter a passphrase with which only you can access the account. To know about the list of available commands for geth look [here](https://ethereum.stackexchange.com/questions/28703/full-list-of-geth-terminal-commands)
2. Create a new account, for this you will own the private key. So you can deploy your sample smart contract from this account. Enter a passphrase with which only you can access the account. To know about the list of available commands for geth look [<u>here</u>](https://ethereum.stackexchange.com/questions/28703/full-list-of-geth-terminal-commands)
```bash
> personal.newAccount()
Passphrase:
Repeat passphrase:
```
3. This newly created account should be your [coinbase](https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethcoinbase) account (if you haven't already previously created an account). Please note this does not have any relation whatsoever to coinbase.com. Check for the coinbase account address and make sure its the same as the one created above, then take a look at your account's balance (this should be 0).
3. This newly created account should be your [<u>coinbase</u>](https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethcoinbase) account (if you haven't already previously created an account). Please note this does not have any relation whatsoever to coinbase.com. Check for the coinbase account address and make sure its the same as the one created above, then take a look at your account's balance (this should be 0).
```bash
> eth.coinbase
> eth.getBalance(eth.coinbase)
```
Copy-paste (save) the account address displayed here for the upcoming steps.
4. Now you need some funds - OST⍺ Prime to deploy your sample contract with `geth`. You should use the new [transfers api](https://dev.ost.com/docs/api_transfers_create.html)
4. Now you need some funds - OST⍺ Prime to deploy your sample contract with `geth`. You should use the new [<u>transfers api</u>](https://dev.ost.com/docs/api_transfers_create.html)
make sure to transfer to the coinbase address you have copied above.
For executing this step you will need to [register for OST KIT⍺](https://dev.ost.com/docs/kit.html). Complete the steps in this tutorial before moving forward if you have not already.
For executing this step you will need to [<u>register for OST KIT⍺</u>](https://dev.ost.com/docs/kit.html). Complete the steps in this tutorial before moving forward if you have not already.
5. In a separate console spin up an official OST KIT⍺ SDK and execute the new [Transfers API.](https://dev.ost.com/docs/api_transfers_create.html)
* javascript - https://dev.ost.com/docs/sdk_ruby.html
* ruby - https://dev.ost.com/docs/sdk_ruby.html
* php - https://dev.ost.com/docs/sdk_php.html
5. In a separate console spin up an official OST KIT⍺ SDK and execute the new [<u>Transfers API.</u>](https://dev.ost.com/docs/api_transfers_create.html)
* [<u>javascript</u>](https://dev.ost.com/docs/sdk_ruby.html)
* [<u>ruby</u>](https://dev.ost.com/docs/sdk_ruby.html)
* [<u>php</u>](https://dev.ost.com/docs/sdk_php.html)
Here we show the example of the JavaScript SDK. Make sure that the `to_address` is the coinbase address you copied previously. The amount to be sent to this address can be understood from the [Transfers API documentation.](https://dev.ost.com/docs/api_transfers_create.html#amount). Please note that you can transfer only as much OST OST⍺ Prime as you have available after the staking and minting. If you need more, you will have to stake and mint the required amound via the OST KIT⍺ dashboard.
Here we show the example of the JavaScript SDK. Make sure that the `to_address` is the coinbase address you copied previously. The amount to be sent to this address can be understood from the [<u>Transfers API documentation.</u>](https://dev.ost.com/docs/api_transfers_create.html#amount) Please note that you can transfer only as much OST OST⍺ Prime as you have available after staking and minting. If you need more, you will have to stake and mint the required amount via the OST KIT⍺ dashboard.
```javascript
const transferService = ostObj.services.transfers; // transfer object creation
transferService.execute({to_address:'0xd2b789293674faEE51bEb2d0338d15401dEbfdE3', amount:1000000000000000000}).then(function(res) { console.log(JSON.stringify(res)); }).catch(function(err) { console.log(JSON.stringify(err)); }); //here the address will be the coinbase address you copied.
```
## Contract Deployment on the UC
1. Provide some time for the balance to show up as transactions are mined and included into blocks by `geth` nodes. One way to check the status of the transfer would be to use the [List Transfers API.](https://dev.ost.com/docs/api_transfers_list.html) alternative you can check using the following command in the `geth` console.
1. Provide some time for the balance to show up as transactions are mined and included into blocks by `geth` nodes. One way to check the status of the transfer would be to use the [<u>List Transfers API.</u>](https://dev.ost.com/docs/api_transfers_list.html) alternative you can check using the following command in the `geth` console.
```bash
> eth.getBalance(eth.coinbase)
Expand Down

0 comments on commit 9ccec9e

Please sign in to comment.