Beijing time on November 15, stone blocks chain node updates to the bottom of Nuwa v1.0.5, painters used chain (MicroChain) fully functional online, the latest version of Nuwa v1.0.10,
Users to download and install a good SCS software (or buy SCS hardware box), can register to the application of chain node mine pool (SCS pool) involved in application of chain, mining and mining revenues,
The user can also in the chain of stone blocks to create and chain, has its own application runs its own block chain business,
This article does not contain any code, let everybody can read application chain locations,
1. The purpose of the application of chain locations
In a nutshell, is to provide decentralization, the underlying technology, secure and extensible block chain
1.1 friendly to DAPP
The current block chain the underlying technology for DAPP friendly enough, mainly displays in:
For the small white block chain, DAPP users very steep learning curve;
Maintenance DAPP running costs unfair bias towards DAPP founder, the founder of DAPP does not need to pay any fees for the system maintenance, but the system resource consumption costs on to DAPP consumers;
Is not conducive to build ecological DAPP,
Based on block chain DAPP locations can do the same as the traditional DAPP, users to download from the APP store immediately after use the APP for free or at very low cost, and don't need to care about the underlying block chain is what, also don't need to care about how to obtain and pay the gas fee,
1.2 share
Distribution of the current mainstream block chain is through mining, the ideal is to anyone with a computer and network can participate in the mining, and get a virtual currency, in this way, make the asset allocation process decentralized, let more people can get and use it, rather than the control in the initial few people's hands, but the reality is that mining has become very expensive, only afford huge mine machine and electricity cost expensive talent can benefit in the process of the allocation,
Stone block chain by applying chain technology, making more and more people, with fewer costs involved, so as to realize effective, more decentralized secondary allocation process,
1.3 increase the TPS
By applying the chain technology into one hundred times increase in TPS, make application block chain can really be born,
2. The implementation technology of application chain locations
2.1 layered architecture
Stone block chain using layered architecture, the underlying consensus agreement (node called VNODE) USES the POW, solve the problem of global consistency, the upper (node called SCS) USES subdivision technology, through the POS, PBFT or custom consensus protocol implementation application chain function, at the same time, the application of chain by regular refresh mechanism to state the hash in the underlying block chain, in order to realize the consistency,
Through the layering, main deal with global trade and the underlying contract, as well as to the application of chain call, the user's business logic in the application of the upper chain, improve system TPS to 100 times,
2.2 subdivision technology
Stone block chain chain is through subdivision technology application, fragmentation is lots of SCS node in the network is divided into smaller, flexible combination and easier to manage team,
Stone block chain fragmentation driven by contract mode, a shard contract corresponds to a system, which is a chain,
Nodes oriented subdivision is proposed, which can make processing ability and the node number of linear correlation, SCS node, the more subdivision can be, the more the more application chain can, the higher the TPS, of course,
The working mechanism of 2.3
Stone block chain chain work mechanism is flexible and efficient, its features include:
Each shard has its own store, is the application of chain;
There can be different from the underlying consensus approach, such as pos, PBFT, custom or consensus way;
Block generated time could be inconsistent with the underlying, such as fast block cycle can be used to further improve the processing speed;
Application chain periodically flush to the ground floor as a result, thus they can obtain the global consistency, periodic
For example, the user can need according to oneself DAPP, by parameter Settings:
Demand for SCS node number 21, PBFT consensus mechanism, 15 seconds a block;
Demand for SCS node number 50, pos consensus mechanism, 30 seconds a block;
Demand for SCS node number 60, custom consensus mechanism, 60 seconds a block,
2.4 dig mechanism
Up the processing speed of the whole system, higher request to the VNODE, embodied in two aspects: one is the bandwidth of the network, the other is a storage capacity, of course, each node of the GPU computing power, for ordinary users, because of the SCS can participate in mining, does not necessarily need to deploy a VNODE VNODE can even can as long as there is trust, this system can form two levels of scholars dig nodes:
Massive computing power strong, high network bandwidth, large storage VNODE, perform POW, and provides the SCS access services, maintain the entire network must dig ability, the number in ten thousand to thousands,
Huge amounts of CPU -- -based SCS for handling contract execution and making profits, in view of the application of chain consensus diversity, the SCS nodes can be mobile devices, mobile phones, even under the current architecture, can have hundreds of thousands or even millions of SCS to participate in, and will not affect the performance of the system,
3. The role of system locations
USER: use application chain DAPP USER
DAPP SERVER: DAPP project or developers
MINER VNODE: main mining node
PROXY VNODE: main agent nodes, used to improve the stability of the application of chain node
SCS: the chain the node, to participate in the application of chain business logic
MONITOR the SCS: application to query chain business state, don't participate in consensus
Intelligent contract: the only interpretation and application of chain related intelligent contract:
Application intelligent contract subchainprotocol chain ore pool: used for SCS application chain nodes to join the pool miners;
Intelligent agent contract vnodeprotocol: used for main VNODE provide agent functions, add agent pool;
Chain control subchainbase: chain control logic for application, application of chain generated before and after generating a series of control logic;
Application chain DAPP intelligent dappcontract contract: contract chain used to deploy the application business logic;
DAPP users deploy application chain, need to focus only on the application of chain control and application of chain DAPP intelligent agreement,
4. How to participate in the application of chain dig
Users involved in the application of chain of mining locations, there are two ways:
4.1 as the SCS miners to participate in the application of chain node construction
There are two ways to becoming SCS miners:
Buy SCS box hardware, networking operation; The hardware box is provided by third-party merchants and users can purchase;
Download file SCS node, networking operation; Click on the download,
SCS node runtime operation steps if it is necessary for the SCS software node (for example) include:
Configuration miners earnings account Beneficiary, used to receive mining earnings;
Registered in SCS mineral pools, users can build a pool, but advice to join official mineral pool address here, in order to ensure safety;
SCS registration will need to provide the deposit (MC), the contract must be greater than the deposit ore pool setting values; The more you submit the deposit, the more you can participate in the application of chain;
Configuration VNODE of SCS need connections, which can communicate between SCS; Can be their own nodes, also can be connected to other agent node,
SCS miners in early work was done, if you are selected to participate in the application of chain operation, in the application of chain will refresh, after see benefits in the Beneficiary,
Note: the SCS is frequently dropped after operation, otherwise it may be regarded as cheating, has been dropped as a chain and deduct the deposit,
4.2 as the PROXY VNODE involved in the application of chain information
Main chain node registered with the VNODE mineral pools, into a PROXY VNODE, call contract services and applications by providing application chain chain historical data transfer services, access to income,
PROXY VNODE need vnodeconfig. Json VnodeBeneficialAddress set income account,
Provide application chain call service contract, via field in the transaction, you need to set up and VnodeBeneficialAddress are the same, otherwise, the node will not work.
Historical data transfer services, provide application chain PROXY VNODE is were randomly selected for application service chain,
5. The deployment of application of chain process
5.1 public mineral pool contract deployment
Deployment Vnode agreement contract: namely Vnode Proxy mineral pools, allowing Vnode to register, and provide services to earn profits for application chain;
Deploy the chain agreement contract: namely SCS mineral pools, allow the SCS to register, apply chain was selected to provide services, and obtain profits,
These two contracts, the official will be deployed, and provide the corresponding services; The third party can also be deployed, public information, provide service for dapp party,
5.2 DAPP business logic
Contract: 1. The deployed application chain chain chain control contract is DAPP users use application of the basic contract, which provides some necessary in the application of chain operation and before the interface,
Generally speaking, the application of chain control contract needs to be set:
A useful Vnode Proxy address pool contracts;
A useful SCS pool contract address;
After the application of chain operation need the minimum quantity of SCS and the largest number;
Application of chain refresh cycle (the system generated chain block number shall prevail), less than the value of 100, contract will automatically be set to 100,
2. Select the SCS: chain control contract after the success of the deployment, registration will open, conform to the conditions of the SCS can register, can check registration at this time;
3. Create an chain: if the registered number of SCS requirements, shut down after registration, the chain is complete and began to create application block out; If there is no enough SCS to register, need to restart the process;
4. Chain business contract: deploy application through directcall deployment of application in the form of chain business contracts with calls, directcall to VNODE PROXY node sends trading way to finish their task,
Generally speaking, the application of chain business contract need to set up:
Application of chain control contract address;
Shardingflag flags: must fill in 1, (0 indicates the main chain market, 1 application chain trade);
Send trading VNODE node config the address; Only configure the address of the VNODE PROXY will handle application deployment of chain business contracts and calls,
6. Application of chain of SCS choose
6.1 the application of chain SCS node selection by three steps:
Application of chain set a number of SCS nodes need to select range/min, Max, then calls the application agreement contract getSelectionTarget chain (), based on the current total number of registration of the SCS, get a selection target;
Vnode comparative application chain address and connected with their SCS distance, if less than selection target, inform SCS;
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull