• Docs
  • Modules
    • Introduction
    • Introduction
    • Contents
    • Structure of QURAS Blockchain
    • QURAS Blockchain Consensus Algorithm
    • Virtual Machine Structure of a QURAS Blockchain
    • Encryption Module for QURAS Blockchain
    • JSON-RPC in the QURAS Blockchain
    • Building a QURAS Blockchain
    • Future Projects
    • Future projects services
    • Reference
    • Reference
  • TechnicalPaper
  • DevelopmentReference
  • EN
    • EN
    • 日本語
  • Introduction
  • Introduction
  • Contents
  • Structure of QURAS Blockchain
  • QURAS Blockchain Consensus Algorithm
  • Virtual Machine Structure of a QURAS Blockchain
  • Encryption Module for QURAS Blockchain
  • JSON-RPC in the QURAS Blockchain
  • Building a QURAS Blockchain
  • Future Projects
  • Future projects services
  • Reference
  • Reference
Building a QURAS Blockchain

The consensus node verifies all transactions including a smart contract that is generated in blockchain and plays a role of promoting block generation/verification to form QURAS blockchain.

As the first phase of QURAS blockchain operation, the method for setting the consensus node is as follows:

Configuring a Blockchain's Engine and How to Build It
First, in QURAS blockchain, a wallet that is used for the consensus node needs to be generated.
In the folder containing QURAS blockchain’s consenseus node execution files, there are files named “Config.json” and “Protocol.json”. First, these two will be configured.
Next, QURAS blockchain’s initial coin issuance volume needs to be set. The engine’s source code needs to be revised for this part.
Afer completing the above configuration, the engine as well as the consensus node can be built.
Before staring the configuration work, first, establish the number of consensus nodes.
After establishing the number of consensus nodes, generate wallet addresses corresponding the number of consensus nodes, and store public keys for these addresses.
Here, the configuration methods for the above 2 parts will be explained in details.
Configuring a Blockchain's Engine
Generating a Wallet for Consensus Nodes
Start the “Pure-gui” project and use the “new wallet” function to generate a wallet to be used in consensus nodes.
Next, store the public key of a wallet being generated.
Establishing a Coin's Initial Issuance Volume
QURAS blockchain’s initial coin issuance volume is configured in the following file.
Configure an initial coin issuance volume in the PureCode/Core/BlockChain.cs file and build a blockchain.
GetGenesisInitialTxs() function is a function that generates a first block (GenesisBlock) in blockchain. During the process, add “issue transaction”as indicated below to the GenesisBlock.
new IssueTransaction
{
    Attributes = new TransactionAttribute[0],
    Inputs = new CoinReference[0],
    Outputs = new[]
    {
        new TransactionOutput
        {
            AssetId = GoverningToken.Hash,
            Value = GoverningToken.Amount,
            ScriptHash = Contract.CreateMultiSigRedeemScript(StandbyValidators.Length / 2 + 1, StandbyValidators).ToScriptHash()	
        },
        new TransactionOutput
        {
            AssetId = UtilityToken.Hash,
            Value = Fixed8.FromDecimal(888888888),
            ScriptHash = Contract.CreateMultiSigRedeemScript(StandbyValidators.Length / 2 + 1, StandbyValidators).ToScriptHash()
        }
    },
    Scripts = new[]
    {
        new Witness
        {
            InvocationScript = new byte[0],
            VerificationScript = new[] { (byte)OpCode.PUSHT }
        }
    }
}
                                    
Use the above code to specify the initial number of issuance (the part highlighted in red)
Configuring a Json File
Configuring a Config.json File
- Revisions to the「Config.json」file
"NodePort": 10034,
"WsPort": 10035,
"UriPrefix": [ "http://*:10030" ]
                                

It is necessary to revise the above part.

“NodePort” is a P2P’s port number that is used to relay, generate and verify transactions and blocks.

“WsPort”is a P2P/s port number that is used to relay, generate and verify transactions and blocks that use Websocket.

The item“UriPrefix”includes RPC connection information.

During the process, RPC node’s IP can be statically given to the IP item so that the time to find the RPC node can be reduced.

Configuring a Protocol.json File
- Revision to the「Protocol.json」file
"Magic": 7630401,
"AddressVersion": 31,
"AnonymousAddressVersion": 30,
"StealthAddressVersion": 90,
"RingSize": 3,
"StandbyValidators": [
    "03bce33e85cc7a46b96a71b11e3674184df7fd1e48c4e88582c19c7e73cfa2a1af",
    "0222336930d7258710c858f8e4b53bc0ce2720e96b50ace30d05c6995f5de667d4"
],
"SeedList": [
    "54.238.189.190:10034",
    "52.197.125.132:10034" 
],
                                

The item “Magic”indicates the blockchain’s ID.

The item “AddressVersion” indicates the difficulty level of transparent wallet address generation.

The item “AnonymousAdressVersion” indicates the difficulty level of anonymous wallet address generation.

The item “StealthAdressVersion” indicates the difficulty level of stealth wallet address generation.

The item “RingSize” indicates the size of a group that is used for a stealth transaction. In other words, it indicates computers included in the group.

The item “StandbyValidators” indicates the array of already-created consensus node wallet’s public key.

The item “SeedList” indicates the connection information for the consensus node.

When a computer tries to connect to QURAS blockchain for the first time, the consensus node in the item “SeedList” can be used to quickly connect to the blockchain.

Building a Blockchain's Engine
Stracture of Nodes

In blockchain, nodes that store all blocks are called “full-node”, of which nodes are connected to blockchain through P2P network.

Quras provides two programs that operate in full-node.

Quras-GUI (Quras-wallet)

This is a GUI tool for Quras blockchain users that includes user-level functions such as creating a wallet, transferring funds and creating tokens.

Quras-CLI(pure-cli)

This is a CLI tool that can be used as a tool that uses Quras blockchain at a specialist level through commands. In Quras blockchain,“pure-cli”is used for consensus nodes and RPC nodes.

The following is a chart that compares functions that are supported by “Quras-wallet” and “pure-cli”.

List of functions GUI CLI
User interface ⊙
Executing commands ⊙
Creating wallets ⊙ ⊙
Wallet log-in ⊙ ⊙
Restructuring of a wallet ⊙ ⊙
Key’s display functions ⊙
Key pair’s input/output functions ⊙
Address’ display functions ⊙ ⊙
Token’s display functions ⊙ ⊙
Address-creation function ⊙
Fund transfer function ⊙ ⊙
Claim function ⊙ ⊙
Smart contract creation ⊙ ⊙
Functions of consensus nodes ⊙
Display function of an overall transaction list ⊙
Display function of a node list ⊙
Token creation function ⊙ ⊙
Token distribution ⊙
JSON-RPC ⊙
Required Specifications for Consensus Node

In order to start on the main net, the required specifications for consensus nodes are as follows:

OS:WindowsServer2012 R2

CPU:vCPUS 4 (2.4GHz)

RAM:16G or higher

HardDisk:SSD 500G or higher

Network:dedicated line of 100Mbps or higher

For successfully starting on the main net, 4 or more consensus nodes are required.

Building Engine

After the engine is configured, the “quras-cli” project is built and the last “quras-cli.exe” file is generated.

The “quras-cli” project is a QURAS blockchain’s consensus node.

An account tht is required for the consensus node is created. During the process, the number of accounts must match with the number of nodes.

Set “quras-cli.exe” for all the consensus nodes and start them.

Use the following command to open accounts allocated to each consensus node.

>>Open Wallet [Account path]

Next, enter a password.

By executing the following command for all the consensus node, the consensus functions can be started.

>>start consensus

Use the above process to start the consensus nodes to start the blockchain’s agreement algorhythm to form blockchains.

JSON-RPC in the QURAS Blockchain Future Projects and services
  • Configuring a Blockchain's Engine and How to Build It
  • Configuring a Blockchain's Engine
  • Configuring a Jason File
  • Building a Blockchain's Engine
  • Stracture of Nodes
  • Required Specifications for Consensus Node
  • Building Engine
Tweets by @qurasofficial
Tweets by qurasofficial
  • Docs
  • TechnicalPaper
We are here!
Community
  • Quras Telegram Group
  • Facebook
  • Twitter
Register your email address to get updates

Copyright © 2021 Quras. All Rights Reserved.

hello@quras.io