代码开源意味着什么?超脑链首架在线解读答疑

Ultrain超脑信任计算·热度: 1288
中英文社区活跃度再创新高!

北京时间8月26日晚9点,Ultrain超脑链首席架构师沈宇峰针对「代码开源」进行了一场中英文社区同步的AMA(Ask Me Anything)活动,一一解答此前收集精选的几大社区成员们关于代码开源的问题,以帮助大家更加清晰地了解Ultrain代码开源的意义和众多知识点。

以下为本次AMA活动实录整理(中英文对照)

供社区成员参考了解

1

Q:超脑侧链的架构具体是怎样的?


A:主要的架构可以看这张图:

The overall multi-chainarchitecture diagram is like this:

具体的 DApp 是跑在特定的侧链上的,然后主链只是负责管理这些侧链;一个大概的流程是有企业需要用区块链来改造他的业务逻辑,那他通过购买质押一定数量的 UGAS来创造一条属于他的侧链;然后我们主链收到这个请求之后,会把一定的矿工机器调度过去组成这样的侧链;然后这个企业就可以独有的使用这条侧链上所有的计算/存储/带宽资源了;然后这个企业所质押的UGAS 会缓慢的释放给这条侧链上的出块的矿工,作为对他们提供计算资源的奖励。

DApps are running on specific shard-chain, and the main-chain ismanaging all the Shard-chains; and the general lifecycle of the shard-chain islike: some enterprise wants to rework some of their business using blockchaintechnology; so he acquires and deposits a certain amount of UGAS on themain-chain and requests an exclusive shard-chain. Main-chain locks up thedeposit and then summons and assigns a certain number of miner machines to forma new shard-chain. The enterprise can exclusively use all thecomputation/storage/network resource of that shard-chain; And the depositedUGAS from the enterprise is slowed released to the miners of the shard-chain asthe reward for their contribution of hardware resource.

当然我们也有共享链,小的DApp开发者可以按需购买这条链的部分的资源来满足他的需求;

And also we have the non-exclusive, or shared shard-chain, wheresmall Dapp developers can buy portions of the overall resource accordingly totheir needs and also pays UGAS in proportion.

然后在每条侧链上提供计算资源的矿工不是一成不变的;每个矿工都是定期的在不同的侧链上流转的,这样就大大降低了矿工联合在某条侧链上作恶的可能性,提高了链的安全性;

One important feature of the design is that miners don’t stay onone particular shard-chain permanently, instead they are rotated to differentshard-chains now-and-then, so the chance that miners collude together to attacka particular shard-chain is extremely low if not practically impossible, so theover all security of the whole Ultrain network is very high.

多链架构的详细设计可以看我们的黄皮书:

https://ultrain.io/downloads/Ultrain%20网络的多链架构.pdf

The detailed design can be found at

https://ultrain.io/downloads/Ultrain’s%20Multi-chain%20architecture%20-%20revised.pdf

2

Q:共识机制和主链一样吗?和主链的交互怎么进行?


A:主链和侧链是用同样的共识机制叫做 R-POS. 这个是我们自己研发的共识机制,首先他是基于 PoS 的,所有用UGAS做了staking 的账号都能成为出块委员会成员,然后每一次出块我们都用一个基于 VRF 的随机数算法选出这轮出块的候选人,然后整个委员会成员对这个些候选人进行投票,最终确定这轮的出块者;选中的出块者能拿到这轮的出块奖励;现在我们在单条链的情况下能做到大概~1000 的 TPS 和~10秒左右的确认时间;

The consensus algorithms are the same on both main/shard-chains,which is called R-POS. It is an original innovative consensus algorithm createdand implemented by the Ultrain team. First of all, it is a Proof-of-Stakealgorithm, any one can become the member of block producing committee bystaking a certain amount of UGAS; and during each round of block production,VRF-based random number is used to select a few block producing candidates fromthe committee, then the rest of the committee vote on the candidates to reachconsensus on one block producer for that round. The voted block producerdecides the block to be produced and earns the block reward. Currently forsinge-chain, we can reach about ~1000 TPS and about ~10 seconds confirmationtime.

侧链和主链的交互主要是通过轻客户端的技术来实现的;轻客户端的意思就是比方说我有主链和侧链 A, 那我主链上保存了侧链 A 上所有块的块头信息,因为块头信息相比整个块信息数据量要小很多,所以说主链是A链的“轻”客户端;(如果我们把链A的所有块信息存在主链上,那主链就变成了链A 的一个全节点,或者叫做“重”客户端) 同样的链 A 也是主链的“轻”客户端;

The interaction between main/shard-chains are mainly based on thetechniques called “light-weight client” or just light client. Let me try toexplain the idea of light client. Suppose we have main chain and one shardchain called chain A; All the blockheader information for chain A are stored on main chain, because the size ofblock header is much smaller than the size of whole block, so we call that mainchain is the “light-weight” client of chain A (suppose we save all the blockhistory of chain A on main chain, then main chain is a full-node orheave-weight client of chain A). And also vice versa we also make chain A to bea “light client” of the main chain.

那么有了轻客户端,就可以安全的验证很多跨链的事情,比方说我有个账号 xyz 想从主链往侧链上转 100 个UGAS, 那他首先需要在主链上把这100 个UGAS转到特定的银行账号里面锁定起来,然后我们才能在侧链上把这 100UGAS 发出来;那侧链怎么知道XYZ 在主链上把这 100个UGAS 已经锁定到特定的银行账号了能?这个时候就要借助轻客户端功能了,因为侧链 A 是主链的轻客户端,他保存有主链的所有的块头信息,他能通过这些块头信息来验证(具体是通过merkle proof方式)XYZ 确实在主链上存了100UGAS到特定的银行账号了,这个都是靠密码学来保证的,那在侧链上就可以把这 100UGAS发出来了;所以所有的主侧链之间的交互都是基于这个轻客户端的机制来实现的;

With the weapon of light client, we can now safely do manycross-chain verifications; for example, say that I have an account XYZ thatwants to transfer 100 UGAS from main chain to chain A. First of all XYZ needsto deposit the 100UGAS onto a certain main chain account/contract and locks itup, then we can release the 100 UGAS on chain A. now the question is how canchain A safely know that the 100 UGAS has been locked up on main chain? here iswhere light client comes to help; because chain A is the light client of mainchain, he keeps all the block header information of main chain, so by usingthese block headers (plus merkle proof techniques) chain A cancryptographically verify that XYZ has indeed deposited 100 UGAS on main chainand then the according 100 UGAS can safely be released on chain A. Basicallyall the interaction between main/shard chains are relying on this light-clientmechanism.

3

Q:代码开源的话,别人直接fork,重新成立一条新链,0成本,如果他们再降低商户的上链运营成本,会让超脑原链造成什么样的影响?


A:首先如果这个事情发生了,那说明他们认可超脑的技术,市面上有那么多开源的公链,他们选择了fork我们的话,我觉得对我们技术团队来说是非常正面的肯定:)而且从技术团队的角度来看,我们做的都是链的基础技术,比方说共识,p2p, 多链架构这些,这些都是平台性质的技术,并不局限于超脑链,而且我们的license 是 MIT License,是非常宽松的协议,基本上你可以拿这个开源代码做任何你想要的事;我们获益于开源社区,也很愿意回馈社区;Happy hacking!

First of all if this indeed happens, it means they appreciate theexcellency of Ultrain’s technology. There are so many choices of open-sourcedpublic chain projects and by choosing forking Ultrain’s code, it is a verypositive acknowledgement of Ultrain team’ technical capability. And from our perspective, the various technical components of thewhole Ultrain project like consensus, multi-chain architecture design, p2p andetc are actually project-agonistic and not necessarily be confined to the“Ultrain chain”; and our license is MIT License, which has very littlerestriction and essentially you can take the code and do anything you want. Webenefit a lot from the open-source community so we are more than willing tocontribute to the open-source community. Happy hacking!

其次类似的分叉链的做法在很多公链上都发生过,比方说 btc 和 ltc/doge/bch 这些,eth 和 etc ; eos 的话也有eosforce 这些;但是似乎很少有分叉链做的比原始链更好的例子。

Forked chains are actually very common, like BTC vs LTC/DOGE/BCH;Ethereum vs ETC; and also like EOS vs EOSForce; but honestly speaking we rarelysee that the forked chain can do significantly better than the original chain.

具体到你说的这个例子,我觉得现在公链之间的竞争是非常多维度的,从底层技术,到工程实现,技术社区,市场推广,企业合作,团队实力等等,我觉得不存在说单一因素比方说降低了链运营成本就能够在竞争中胜出;简单的说,公链市场还没有说充分竞争到了就只剩下商户成本这一单一决胜因素的时候

As for the specific question, I think now the competition betweendifferent public chain projects are along many different dimensions, liketechnical capability, engineering realization, community building, marketing,business development, core team building etc. I don’t think one single factorlike lowering the on-chain operation cost can win the competitionsingle-handedly.

4

Q:代码开源后,如果有bug的话,会不会被黑客利用?


A:首先是程序都会有bug, bitcoin在最开始的时候也出过整数溢出漏洞被凭空造出了很多的币,后来是中本聪做了硬分叉来修复的;以太坊也出现过 The Dao 事件后来分叉出了 ETC;cosmos 就在不久前也出现了validator解绑定的bug; 我们在开源前也找了业内实力比较强的安全审计公司(慢雾,知道创宇)等做了安全审计;在代码开源后,我们也时刻监控着网络的运行状况,如果有bug出现我们也会及时的响应。

我们的开源代码在这里,欢迎大家来查找bug, 多提意见。

https://github.com/ultrain-os/ultrain-core-production

First of all, no software is without bugs. Like in the earlyhistory of Bitcoin there is integer overflow bug that creates billions ofbitcoins from vain and it was fixed by an emergency hard-fork; For Ethereumthere is the famous The Dao exploit that results in the forked ETC fromEtehreum; And also remember just recently for Cosmos there is the validatorunstaking bug; For Ultrain, before open-source we have our code audited byvarious blockchain security companies like SlowMist and KnownSec; And we keepconstant monitoring of the network status and do our best to respond to any emergencybug. Our code repo is here and welcome for bug-hunting.

https://github.com/ultrain-os/ultrain-core-production

5

Q:技术开源对于超脑链的意义是什么?


A:最大的意思是证明我们不是个中心化的系统,我们确实是完全去中心化的一个公链系统;代码不会说谎;所有人都可以自由下载编译代码来运行我们的节点,自由的加入到我们超脑网络来提供计算资源从而获取奖励。

The most significant meaning is that it proves that the Ultrainnetwork is truly a fully decentralized public blockchain network. The code doesnot lie. Everyone can freely download and compile the code to build and run aUltrain node, and freely join the Ultrain network to contribute hardwareresource and earn reward.

6

Q:如何落地应用?目前应用情况如何?


A:除了公链技术开发之外,我们最大的资源投入就是推动企业应用落地了;目前我们已经有一些优秀的落地案例比方说和国内第一潮牌电商 YOHO!有货的潮牌鞋的验真和溯源上链,目前为止已经有数十万的鞋子的信息已经落在我们的链上了;另外我们最近举办的超星开发者大赛也孵化出了一批优秀的DAPP应用,其中比方说获得第二名的“加密三国”也会在9月份登陆我们主网,各位游戏玩家都可以关注下;

This year we have put tremendous effort and resource intolaunching enterprise level application on our blockchain network; For example,we have collaborated with YOHO!, which is the biggest collectible sneakerssellers in China, for putting their sneakers’ authentication information ontoour blockchain for the buyers to trace; Several hundreds of thousands sneakersinformation have been recorded on chain up until now; And our recent super-novahackathon has also incubated many creative Dapps, e.g. the second place winnerCryptoSanguo will launch on our mainnet in Sep. Stay tuned if you areinterested in games and crypto assets.

之前由于我们的UGAS还是以太坊上的erc20代币,只有交易所买卖的单一功能,并不能在主网上流通,极大的限制了应用在我们主网上的使用场景;现在我们已经开启了erc20代币到主网币的映射,预计9.15 号前完成映射,之后ugas就全在我们主网上流通和使用了,到时候之前在主网上因为ugas结算问题被压抑的应用场景都会爆发出来,真正的在我们主网上大规模落地应用起来。

Historically our token UGAS is an ERC20 token issued on Ethereumso it only has limited functionality like trading in exchange and can’t beactually used on our mainnet, which suppressed a lot of practical applicationscenarios to happen on our mainnet; Now that we have officially started ourERC20 -> Mainnet UGAS migration process and it is estimated all the tokenswill be mapped to Ultrain mainnet before 9.15; and after that we expect a lotof applications with practical use cases will emerge and run freely on ourmainnet with the support of native UGAS.

7

Q:代码开源后,矿工如何挖矿?如何保证矿工的收益和资产安全性?


A:首先我们最终希望看到的场景是:矿工首先获得一定的ugas, 然后通过钱包操作在主网上抵押获得矿工资格;然后他下载ultrain的代码,编译出一个ultrain的节点程序,然后在他的家庭PC 电脑上运行这个节点程序就能加入我们的超脑网络提供算力并获得出块奖励了;

Ultimately what I want to see happening islike: interested miner first acquires a certain amount of UGAS; he can use walletto stake the UGAS to become a qualified miner of the Ultrain network; Then hedownloads the source code and build a Ultrain node program. Then on his home PChe can run this node program to join the Ultrain network to contribute hishardware resource to the network and earn rewards.

代码开源是达到上述终极目标的一个必要条件,但还不是充分条件;主要的问题是普通矿工用户是不懂代码的,甚至是不懂机器和节点程序的日常维护的;我们现在看到的现状还是大部分的矿工都希望通云矿机的形式来来参与进来,这样对他们来说省心省力,不用担心机器维护不当和节点程序运行异常所带来的收益损失,以及潜在的黑客入侵带来的资产安全问题;

Open sourcing is a necessary but notsufficient condition for reaching the abovementioned goal; the key problem weare facing is that most interested and potential miners have no technicalbackground, they don’t know the code, and don’t know hardware maintenance. Andmost of the potential miners we have talked to are more interested in choosingthe cloud-mining option, in which all the machines are hosted on (different)clouds and maintained by professionals, so they don’t have to worry about theeconomical loss caused by like machine misbehavior or node program exceptions,and also don’t have to worry about asset stealth because their PC gets hacked.

所以总的来说,现状是如果你不希望担心太多,那云挖矿比较适合你;如果你有技术背景又热衷于DIY,那用实体矿机挖矿也可以;

In summary, if you want worry-free thencloud-mining suits you better; and if you have strong technical background anddon’t mind getting your hands dirty, then home PC mining will be fun for you.

最后从我们技术理想来看,我们会在节点程序的易用性和稳定性上持续投入,希望最终小白用户也能够轻松的在家庭电脑上“一键挖矿”;只有这样,才能够真正的实现我们构建完全去中心化网络的初心。

But to realize the ideal, we will keepimproving the whole experience of setup and running the mining node, make iteasy to use and more robust and ultimately everyone can just one click to mineon their home computer; and only then we can say we have fully realized theideal of making Ultrain a permission-less and decentralized blockchain network.

8

Q:如何对接开发者?提交bug的github地址是什么?


A:可以先访问我们的开发者网站https://developer.ultrain.io来熟悉我们的链环境和开发工具,也可以在我们的社群里面直接找我们的工作人员;

可以到 https://github.com/ultrain-os/ultrain-core-production 来提 issue,后续我们也会开启bug bounty program。

You can visit our developerportal at https://developer.ultrain.io to get yourself familiar with our chainenvironment and the related dev tools. Or you can directlyu reach to our staffthrough various community IMs.

For filing bugs, you cancrate issues at

https://github.com/ultrain-os/ultrain-core-production

and also we will launch bugbounty program soon.

若大家仍有其它代码开源相关问题,可添加客服微信号(ultra-in),将疑问提交,等待项目团队进行解答,了解更多Ultrain相关信息。

声明:本文为入驻“火星号”作者作品,不代表火星财经官方立场。
转载请联系网页底部:内容合作栏目,邮件进行授权。授权后转载时请注明出处、作者和本文链接。 未经许可擅自转载本站文章,将追究相关法律责任,侵权必究。
提示:投资有风险,入市须谨慎,本资讯不作为投资理财建议。
语音技术由科大讯飞提供
关键字:  超脑代码开源
推广
最近更新
本文来源:
原文标题:
涨跌幅
排名币种成交额价格(USD)涨幅
您可能感兴趣的内容
暂无内容

评论0