在ugChain的架构设计中,整个系统分离出两个大的组成部分,一部分是核心链,另一部分是DAG账本链。核心链负责记录DAG区块哈希值,DAG账本链负责记录实际的交易数据。

任何用户都能花费一定量的币将哈希值记录到核心链,但是用户可能不广播(或者广播失败)哈希值对应的原像区块,这样就导致DAG账本的区块producer无法验证识别核心链区块是否合法,也就无法看到完备的DAG账本视图,因此需要引入对核心链区块数据的「确认」与「反确认」操作。

文章作者:UG Tech Team

目前的公链基本上都是封闭的,要完成两个公链之间的交互,就得引入第三方系统进行协调,第三方系统可以有多种模式。假设FooChain与BarChain是两个公链,发行的数字货币分别为FooCoin和BarCoin,那么对应的模式举例如下:

交易所模式

张三和李四在没有信任关系时,要完成FooCoin和BarCoin之间的兑换,就得通过中间机构,比如交易所,进行互换,显然这种模式是中心化的。

多重签名模式

张三和李四把FooCoin和BarCoin都存入多重签名地址,通过多个公证人的签名完成兑换功能。通过从M个公证人中取N个签名的机制(M > N),确保了只要大多数公证人是可靠的,那么兑换功能就是可靠的。

侧链模式

在侧链模式下,主链FooChain感知不到侧链BarChain,但是侧链BarChain需要感知、检测、查询主链FooChain,张三在主链上锁定、冻结一定量的FooCoin到冻结池,侧链感知到之后,会按照约定的比例释放BarCoin,完成数字货币从主链到侧链的流动。侧链上的币流动到主链,则通过多重签名,从冻结池中释放对应量的币。

桥梁模式

ug公链的核心链可作为去中心化的链桥系统,有力支撑应用链之间的跨链交互。

以下给出一个具体的比特币与山寨币进行跨链的流程与在ug公链中的跨链交易流程的对比示例。

张三用自己的1个BTC兑换李四的2个ATC,张三和李四协作兑换交流程如下:

1. 张三生成一个随机数r,并计算h = hash(r),然后将h发送给李四;

2. 张三创建TX-A交易,其输出为1个BTC对应的UTXO-A,并设定两个花费规则:

1) 若张三和李四共同签名,则可花掉UTXO-a;

2) 若李四知道h的原像r,则可花掉UTXO-a;

3. 张三和李四共同签名带有时间锁参数ta的赎回交易Tx-AR,其输入为UTXO-a,输出地址属于张三所有,因此张三可以在TxA被广播上链ta时间后,赎回自己的1个BTC,以防李四不配合完成整个兑换流程。

4. 李四创建Tx-B交易,其输出是2个ATC对应的UTXO-b,并设定两个花费规则:

1) 若张三和李四共同签名,则可花掉UTXO-b;

2) 若张三知道h的原像r,则可花掉UTXO-b;

5. 张三和李四共同签名带有时间锁参数Tb(Tb应该明显小于Ta)的赎回交易Tx-BR,其输入为UTXO-b,输出地址属于李四所有,因此李四可以在Tx-B被广播上链Tb时间后,赎回自己的2个ATC,以防张三异常中止整个兑换流程。

6. 张三和李四将Tx-A、Tx-AR、Tx-B、Tx-BR广播出去,Tx-A和Tx-B分别被录入BTC区块和ATC区块。张三知道r,可以签名一笔交易花掉UTXO-b,得到2个ATC,同时其交易数据也暴露了r,因此李四能够知道r并签名一笔交易花掉UTXO-a,得到1个BTC,整个兑换流程成功结束。

整个流程相对复杂,即使将Bitcoin换成有智能合约功能的Ethereum系统,将ATC替换为另一个支持智能合约功能的区块链系统,张三和李四仍然需要在兑换流程进行过程中一直监控对方的账本状态。

FooChain与BarChain部署在ug核心链上,张三用自己的1个FooCoin兑换李四的2个BarCoin:

1. 张三生成一个随机数密码r,并计算h = hash(r),然后将h发送给李四;

2. 张三在FooChain部署一个合约,并存入1个FooCoin到合约中,合约代码能够被包含了h的原像的核心链区块触发,并执行转账1个FooCoin给李四。

3. 李四在BarChain部署一个合约,并存入2个BarCoin到合约中,合约代码能够被包含了h的原像的核心链区块触发,并执行转账2个FooCoin给张三;2个BarCoin可以在一定的时间段之后被撤回,以防张三异常中止整个兑换流程,因为张三持有r,占据主动地位。

4. 张三将{ r,FooChain.Contract.address,BarChain.Contract.address }写入核心链, 打包了这些数据的核心链区块因包含h的原像r,因此会自动触发FooChain.Contract和BarChain.Contract执行各自的转账,实现跨链兑换功能。

在整个流程中,张三和李四无需监视对方的账本系统,只需确保写入正确数据到核心链即可。而核心链本来就是FooChain与BarChain的共通部分,是参与者双方系统密不可分的共同组成部件。所以桥梁模式的跨链交互是目前最自然、简洁的跨链模式。

Technical Progress:

  • Improve the technical documentation of the public chain design;
  • Use the program to simulate the interaction process between the DAG and the main blockchain, analyze the possible asynchronous communication problems, and analyze the magnitude relationship between the block broadcast time, the block POW calculation time, and the block verification time.

Application Progress:

  • Increased function development: background support permission allocation, report data real-time statistics, increase background management and function setting module
  • Security function extension: when the user initiates asset transfer and transaction request, the database synchronize backup and run the multiple verification
  • Optimize response speed and improve asynchronous execution of multitasking queue process

Exchange Update:

Technical Progress:

  • Improve the technical documentation of the public chain design;
  • UGTick-Chain’s consensus algorithm analysis: analyzing the efficiency difference between POS-based GHOST algorithm and POW-based GHOST algorithm

Application Progress:

  • Completed the July version update, and started the development of new features;
  • Improve the user information setting module and optimized the authority allocation operation;
  • Data-related attribute settings ensure the implementation of the main functional modules of asset management. The main objectives are: automatic generation of the number of generated virtual assets, automatic settlement of the transfer transaction, and so on.

Exchange Update:

on August 6th, UGC was n listed on FCoin sub-brand FOne Bitrise Capital Trading Zone. Now, UGC can be traded onOKex and FCoin.

Technical Progress:

  • Improve the technical documentation of the public blockchain design.
  • UGTick-Chain’s consensus algorithm analysis: Tick-Block transmission test data analysis and Tick-Block data structure and size adjustment.

Application Progress:

  • Develope the function module while full function module self-test and the BUG correction and back testing.
  • Update the July version of the development team. The main new features include: segmentation of storage and requests; improved real-time sharing of asset information in the server.
  • The server virtual asset interface is linked with the client.

ugChain Event:

ugChain COO Peter was invited to participate in the large interactive carnival event “Huobi Carnival” held in South Korea. Huobi Carnival was…

Technical Progress:

  • Improve the technical documentation of the public blockchain design.
  • UGTick-Chain’s consensus algorithm analysis: Find the optimal configuration parameters to produce Tick-Block at stable intervals, and quantify the clock triangle logic sequencing model;Tick-Block’s data structure analysis and demonstrate the optimal Tick-Block data structure and size; Adjust the Tick-Block size, do the transmission test, and adjust the UNIX timestamp precision.

Application Progress:

  • Virtual asset module: implement background management and APP functions such as management, creation, setting, modification, and shutdown of the asset management module;The client synchronizes the development of the custom virtual asset interface; the server completes the virtual asset customization and personality management…

Technical Progress:

  • Improve the technical documentation of the public blockchain design.
  • Analyze UGTick-Chain consensus algorithm : Tick-Block’s data structure analysis, demonstrates the optimized Tick-Block data structure and size.Adjusts the Tick-Block size for transmission testing.

Application Progress:

  • Virtual asset module: implements background management and APP functions such as management, creation, setting, modification, and shutdown of the asset management module.
  • Third-party application: complete the management configuration function for third-party applications on the APP.
  • Event report: complete asset chaining and notify the background, players can view assets by themselves.

ugChain Events:

ugChain COO Peter was invited to participate in the Blockchain Partners Summit blockchain Conference held in Seoul, South…

Technical Progress:

  • Improve the technical documentation of the public blockchain design.
  • UGTick-Chain’s Consensus Algorithm Analysis: Tick-Block’s data structure analysis demonstrates the optimal Tick-Block data structure and size.

Application Progress:

  • The server completes the self-test of the virtual asset management module and performs joint debugging test with the client.
  • The client synchronizes the development of a custom virtual asset interface.
  • The server completes the virtual asset customization and personality management interface development, develops a self-test interface, and waits for joint debugging with the client.

More info

Official Website
Telegram
Twitter
Facebook
Medium
Reddit
Whitepaper
Coinmarketcap

Technical Progress:

  • Improve the technical documentation of the public blockchain.
  • UGTick-Chain algorithm analysis: find the optimal configuration parameters to produce Tick-Block at stable intervals, and quantify the clock triangle logic sequencing model.

Application Progress:

  • Complete asset management interface development and complete the details. Asset management interface has been completed, and R&D is being debugged.
  • The server starts the development of virtual asset customization and personality management interface.

ugChain Event

The 2015 Turing Award winner Whitfield Diffie team visited Hangzhou, the ugChain technical team participated in the reception meeting and discussed with the Diffie team the development of blockchain public blockchain and cryptography technology.

Technical progress:

  • Modify the digital certificate parsing module to implement correct resolution of the certificate Subject field.
  • The BouncyCastle library was introduced in the Alliance Chain Java SDK to support more popular cryptographic algorithms.
  • Delete the CouchDB KV database configuration and use Go LevelDB instead.
  • Developed and deployed an independent bulk transfer smart contract to complete bulk transfer of any ERC20-Token.
  • Write the Node.JS tool program, parse bulk transfer texts, generate corresponding transfer contract parameters based on the command line parameters, and send transactions to the Ethereum network, triggering contract function execution.
  • Perform POC verification of the basic functions of the core…

ugChain

Decentralized Game Ecosystem + Virtual Asset Management Based on Blockchain Technology. Learn more: http://ugchain.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store