讨论共识算法、经济模型以及智能合约的开发

Ultrain超脑信任计算-项目进展双周报(6/17-6/30)
B

以下为 6 月 17 日- 6 月 30 日项目进展双周报,包含#项目技术进展#及#社区动态更新#两项内容,供社区成员们查看,感谢大家对我们一直以来的热切关注!

项目进展双周报(6/17-6/30)

项目技术进展

• Ultrain 内核

静态TCP链接与动态TCP链接管理分离编码开发;

UDP协议应用层封装框架研究与集成分析;

优化本机不匹配的协议报文处理流程;

增强多链管理安全策略;

澳洲侧链部署以及支持币安 DEX交易所对接。

• Ultrain 智能合约及开发

完成主网映射所有文档和工具准备工作,开始交易所对接工作;

支持战略合作伙伴知链科技完成教学文档编写;

澳洲侧链项目需求确定,启动服务端以及合约侧编码开发。

• Ultrain 开发者套件

发布UltrainOne v2.2,支持多钱包管理,钱包密码修改及若干体验优化;

整理《Ultrain开发者手册》与《Ultrain DAPP接入规范》,待发布;

完成Cona插件钱包“连接”与“授权”功能的开发;

DAPP开放平台研发设计与第三方应用数据接口授权开发。

社区动态更新

• UltrainOne APP新版上线!

Ultrain官方APP——UltrainOne新版V2.2已上线!新版APP将支持账户绑定多个钱包、修改钱包密码,并优化了创建钱包流程及其它体验,欢迎大家更新使用!

• 社区精彩文章大放送!

近日,随着MIT图灵奖获得者创立的公链项目Algorand主网上线,Ultrain社区成员“仰望星空”(笔名)产出了一篇精彩文章《深入解析对比Algorand和Ultrain超脑链共识与生态》,全文分析客观、面面俱到,是一篇不可多得的好文,感兴趣的社区成员可扫码阅读!

• 跨链哪家强,跨洋大辩论!

6月20日晚,前 CoinDesk 亚洲战略发展编辑田川邀请到了Ultrain首席架构师沈宇峰和澳洲一线 crypto 投资机构 Crypto SA 联合创始人 /Algorand 澳洲大使 Yawn 展开了一场精彩的跨洋技术干货大辩论,重点分析近期大火的跨链话题,横向比较Ultrain、Cosmos、Polkadot在方方面面的异同。直播内容丰富、干货满满,欢迎扫二维码阅读直播内容实录!

• 超脑小象海报社区投票

上周,Ultrain于微信、Twitter分别进行了超脑小象海报社区有奖投票,海内外社区成员们均积极参与、反响强烈!(详情请戳有奖投票!快来pick你心目中最佳的超脑屏保)最终,票数统计结束后,以下这幅海报成为了票选冠军!感谢大家的热情参与,奖励将陆续发放到位!

• 超脑入选硅谷巨头加速器Plug and Play!

继微软加速器、亚马逊云创计划之后,Ultrain 再次成功入选硅谷巨头加速器 Plug and Play 物联网领域加速营!6 月 25 日,Plug and Play 中国在深圳开始举行“ Plug and Play 中国 2019 夏季峰会暨‘深’有新意创新启航”活动,深圳市政府有关部门的领导、来自日本和德国等国家的企业家代表、来自国内移动出行、金融科技、地产科技、物联网等领域的数十家知名大企业和创业公司代表、深耕创新理论研究的学界代表等,共计 200 余位嘉宾出席此次活动。Ultrain 生态副总裁 Samuel 肖颖浩也代表 Ultrain 进行了路演,并与在场众多知名大企业代表进行了深度交流和资源共享。详情请戳超脑入选硅谷巨头加速器Plug and Play!

• Ultrain 荣获「年度金融科技行业引领奖 」!

6月27日,Ultrain联合创始人&CEO 郭睿受邀出席了由上海财经大学金融科技研究院、聚菁会举办的第五届亚洲未来数字金融创新大会,并代表 Ultrain 领取了由大会颁发授予的「年度金融科技行业引领奖 」,此外,郭睿还于大会中进行了题为「基于区块链的未来商业基础设施」的演讲,获得了在场观众的一致认可!详情请戳Ultrain 荣获「年度金融科技行业引领奖 」!

以上便是 Ultrain 6 月 17 日至 6 月 30 日的项目进展,敬请期待此后的更多精彩内容!

read more

关于区块链与币市的行业动态与最新消息

威尔仕携手超脑信任计算,依托区块链全面赋能健身产业
B

2019年11月13日,高端健身品牌威尔仕集团宣布与全球领先商业公链Ultrain超脑信任计算正式达成战略合作,推动健身产业全面升级。

此后,威尔仕将依托于Ultrain超脑信任计算自主创新的顶尖区块链技术,启动新型的健身积分计划——将运动数据指标全面上链,使会员健身消耗卡路里数值与积分挂钩,实现会员积分激励,进行健身场景数字化建设,推动健身消费数字确权,使区块链技术与实体经济进行融合创新,让传统产业焕发新活力,拉开科技全面赋能数字健康产业的序幕。

“ 威尔仕是中国健身行业的领跑性企业,自1996年在上海建立第一家健身会所至今,已在全国范围内拥有超过160家直营专业健身俱乐部,会员人数超过60万,并已获LVMH集团合伙的基金LCatterton Asia投资。”

威尔仕立足于健身产业,不仅秉承健身这一简单理念,而是力求将健康生活方式带来中国,将健康理念渗透到会员的工作及生活中去。与此同时,威尔仕推出的150多种国际流行团操课程,同样是会员趋之若鹜的重要原因之一。齐全的课程设置,且及时的更新时效,能够让会员充分感受到运动的乐趣与新鲜感。此外,威尔仕还享有LES MILLS莱美课程体系的发布权,会员将不出国门就能紧跟世界健身潮流,同时还有机会定期参与到国际大师级的超级课程。

目前,威尔仕正在最大程度地整合行业资源,并计划于海外上市,立志成为中国健身行业的第一品牌,为中国健康生活产业发展贡献自己的一份力量。

“ Ultrain超脑信任计算由数位前阿里、蚂蚁金服、360等著名科技型公司高管于2017年年底创立,并已获晨兴资本、洪泰基金、DraperDragon基金等多家海内外著名机构投资。”

Ultrain通过突破性的多项技术创新,彻底解决了公链商业落地中面临的TPS低、使用成本高、缺乏隐私保护的核心痛点,具备自主研发的基于JS语言极其友好的智能合约和开发者框架。而其可个性化开发的零知识证明解决方案以及通过美国权威机构认证的真随机数服务在实现分布式、高效、安全的底层技术创新同时打造出了好用且实惠的产品,为广大企业和开发者提供支持。

目前,Ultrain已广泛落地于出行、奢侈品、供应链、共享经济、医疗、零售、媒体娱乐、新能源等众多行业,致力于成为全球第一的商业公链。

read more

黑客马拉松与经常性的线下见面会或在线趣味游戏

超脑超星计划推进 十五支队伍并驱争先
B

——Ultrain“超星计划”首届颁奖典礼即将拉开帷幕

Ultrain超脑链联合火星财经于8月10日在北京朝阳区诚盈中心举办“超星计划”DApp开发者大赛首届线下颁奖典礼活动。本次活动凝聚了此次大赛排名前15的优秀DApp作品开发者。每支队伍都将展示各自项目的技术亮点及DApp使用场景,而由国内外顶级VC投资人和区块链领域专家组成的评审团队,将会全面考察参赛队伍技术、产品、商业等综合实力,对各个团队进行评选,在经济模型、商业模式、公司管理、资本运作等方面对各队伍进行综合指导和帮助。超脑链一直致力于完整的生态社区建设,为优秀的开发者提供更好的展示机会,以及更多的支持。

随着Ultrain“超星计划”的推进,参赛的队伍开始崭露头角,下面是关于参赛队伍DAPP的大致介绍。

链上恋:团队来自于杭州,基于区块链的情侣日记本。可以让情侣公开的见证永恒的誓言和聊天记录。让不希望恋爱回忆消逝的年轻人记录自己的青春。

Fanclub粉丝论坛:团队来自于上海,基于区块链的论坛,粉丝板块用于发帖,站务板块用于发布论坛资讯,票务板块用于出售演出票。论坛采用积分制,积分可通过每日登录、发帖、回帖来获取,积分用于购买演出票,或具有优先购买权。

Deswap交易协议: 团队来自于南京,DeSwap是一个去中心化的代币兑换系统,Ultrain上的交易代币协议。设计简便,交易快捷,为小规模代币提供流动性。无需用户挂单,也可以随时买卖。适用于超脑的UGAS和积分系统

海洋大亨: 团队来自于杭州,海洋大亨是⼀款模拟社交的游戏,游戏中融合鱼市买卖系统,模拟现实生活中,买鱼饵,造鱼钩,钓鱼到卖金币,形成商业闭环拥有组队系统,可邀请好友一起钓鱼,也可以随机匹配陌⽣人,在休闲娱乐的同时,也可以扩大自身的交际圈。

加密三国:团队来自于海外,加密三国志是一款全资产上链的游戏,具有真正游戏性的非博彩RPG 类游戏。在这个游戏中,玩家的目的是通过与 NPC或其他玩家对战,赚取稀有道具和三国币,用于提升自己的英雄和装备,并通过系统的分红机制赚取分红。

奶茶供应链: 团队来自于上海,该Dapp主要功能是记录一杯奶茶从生产到上市的整个过程中的信息。此Dapp有效提高奶茶在生产到上市过程中的可溯源性,公开性。可建立商家的信誉,提高消费者的信赖。建立一个更和谐健康的生态。

GBT预言: 团队来自于杭州,用户在该DAPP中可使用相应的代币进行预言,预言将扣除部分代币注入奖励池账户,为日后运营做基础。而大部分的代币将注入瓜分奖池账户,预言成功根据所投入代币比例瓜分奖池中代币,预言失败,则扣除投入代币。

IDE: 团队来自于南京,“ChainIDE”是全球第一个多链的智能合约集成环境(IDE), 能够快速的帮助开发者搭建初始的设计环境和节约成本。是一款优异的开发工具。

闪电保险:团队来自于重庆,通过区块链和人工智能技术,构建了保险商业联盟,将成熟稳定的人工智能的判别场景链入整个保险体系,从而将核保过程降为由机器识别、分钟级赔保的范围,极大提升用户体验,增加人们对保险产品信任感。

Last Trip “最后的旅途”:团队来自于南京, 是一款基于区块链的冒险解谜类游戏,玩家在游戏中是一个书写者。通过玩家各自的方式,撰写一本自己的《神曲》。游戏中包含了不同的文化,宗教,人文,故事,哲理。并将7种不同的画风,横跨欧亚非的哲理故事,数百种独立剧情,无数选择,人性,思考,迷雾,探索共融一炉。其完美结合区块链特性,将玩家的每一段旅途上链,并且化身为NPC,影响其他玩家的故事线。

区块链电商:团队来自于合肥,区块链电商项目可适用于多种购物场景和平台。在本次的模型设计中,我们以传统网购平台为载体,搭建一个基于区块链的网购平台,构建出一个可以实现保护用户隐私安全,减少信息骚扰的网购平台

餐引人:团队来自于杭州, 餐引人是基于区块链餐饮商家的一站式服务平台,链接小微餐饮商家的绝大多数服务商。以区块链技术为基础,力争打造“去中心化的真正可信的餐饮商家服务平台。

GC: 团队来自于杭州,作为垃圾分类的DAPP,一个有偿的知识分享平台,将代币和垃圾分类相结合,并逐渐形成垃圾分类知识库,设计简洁,功能清晰,是一款结合生活、环保的实用性DAPP。

Delibrary: 团队来自于南京, 是一款闲置图书共享领域的DAPP,拥有灵活经济激励模型,让更多的旧书籍放大其闲置图书的功效,可通过闲置图书的赠送、交换、出租和出售等操作实现资源的共享,并利用智能合约实现自动业务逻辑。

流浪宝贝: 一款专为流浪狗设计的DAPP,结合区块链,让用户的每一笔捐助触及狗狗本身。借助区块链,完成流浪狗身份溯源,监护人关系和捐助交易与消费流水。让流浪狗不在流浪!

read more

链上分布式应用的开发工具以及高质量的应用推荐

新版Ultrain浏览器上线,终于可以查Token啦!
I

Ultrain测试网上线后,很多开发者尝试写了合约,并用Ultrain浏览器进行了合约的部署操作。其中最热门的就是发Token合约,大家也想亲身体验发Token的快感!连Ultrain团队的的好几个程序员都迫不及待地进行创建账户、申请资源、写合约、部署合约、调用合约等一系列流程,尝试发Token。

可是操作完,大家向产品经理抱怨:通过「超脑浏览器」对Token合约部署、调用操作之后,在浏览器找不到自己的Token信息。于是产品经理第一时间拉着视觉、开发们,完成了测试网超脑浏览器的Token查询的设计,同时新版的Ultrain浏览器也在很多方面做了优化,继续往下看吧!

1、新增首页数据
打开新版Ultrain浏览器,首页除了全新的视觉设计,一眼就能看到块高、交易数、账户数、合约数、Token数的信息,帮助用户直观地了解超脑链最新数据。

2、Token查询
部署完Token合约,直接在超脑浏览器就可以查询到Token信息,超方便啦!

3、查看账户内Token信息
除了Token列表,在自己的账户内也可以查看账户拥有的Token信息啦。不用手动搜索,浏览器自动同步账户内Token信息,很贴心了哦~

4、无线端兼容
新版的整体视觉做了优化,包括列表页、详情页、创建账户流程、合约部署和调用流程等,同时也特别对无线端做了兼容处理,让用户在手机上操作时更舒服。

5、其他
开发还在性能上、缓存策略上进行了优化,使页面加载速度有了明显提升。

Ultrain浏览器的地址(https://explorer.ultrain.io/),你也来试一试吧!有问题的话,可以到开发者门户-论坛(https://bbs.ultrain.io/)给我们留言哦!

read more

consensus and smart contract development

Ultrain Launches Enterprise Mainnet Monitoring & Round Two of Testnet Participant Selection
R

Dear Ultrain community members,

We are excited to announce the launch of Ultrain’s mainnet monitoring page! Click the following link to see the operational status of our permitted mainnet including mining profitability, real-time consensus visualization, and existing mainnet users: https://www.ultrain.io/miner-registration

The addition of this visibility feature will further explain Ultrain’s consensus procedure and business model. Please visit the Mainnet Monitoring service (link provided above) and read the supporting article at https://medium.com/ultrain-chain/introduction-to-ultrains-economic-model-74920e1c687f. These resources assist us to comprehend Ultrain’s token economic system, and understand how Ultrain’s model is based on a notion of servicing and empowering the fundamentals of the real economy.

Ultrain business development model is dependable and scalable; as the demand for blockchain services increases, Ultrain’s economic system will grow accordingly to meet the interests of early adopters, as well as ensure the healthy development of the entire business ecosystem.

Since the call went out for Ultrain’s second round of testnet miner recruitment, we received many applications from all over the world. Thank you all once again for the great interest!
The following is the list of successful applicants – welcome to the Ultrain testnet family and enjoy your preview of Ultrain’s technology.

1、aveloyan@xxxx.com
2、975719785@xxxx.com
3、1341568776@xxxx.com
4、lowesyang@xxxx.com
5、739884701@xxxx.com
6、gaoshouye@xxxx.com
7、xiangzhong0912@xxxx.com
8、429624223@xxxx.com
9、771310025@xxxx.com
10、312374979@xxxx.com
11、563585812@xxxx.com
12、35433651@xxxx.com

(The list below represents the selected miners since December 26 2018 to January 13,2019)

Ultrain encourages everyone to continue submitting testnet applications, and stay tuned for more updates from the team!

Thank you all for your continued support of Ultrain.

Ultrain Team
2019. January 25th

read more

Industry dynamics and latest news about blockchain and currency

Ultrain Bi-Weekly Report(10.21–11.3)
B

Following is the biweekly report on the progress of the project from Oct 21th -November 03th, which contains two items: project development progress and community dynamic update. It is for the community members to check. Thank you for your attention.

Technology Update from Ultrain (10/21–11/03)
Ultrain’s Core Technology

UDP protocol application layer package compatible version is tested and deployed to some main net nodes;

The IDC engine room mining machine and the home mining machine have been tested successfully;

Build an automated test framework and improve the operation and maintenance automatic monitoring system;

The function of the automated building chain completes the test, and the code has been submitted to be merged into the main branch;

The historical data query function increases the account balance batch query interface and completes the unit test;

The open source version of the main net code is upgraded to V2.2.0.

Ultrain’s Ecosystem

Complete the UIP10 and UIP10 Container specification design and code review;

Under the new UIP10 and Container structure, write supernova elephant and T-shirt contract, Container contract code.

Ultrain Developer Kit

The S.I.R. mini-program is updated to V2.0.2 to support the sale of T-shirts and sweaters;

UltrainOne is updated to V2.5.2 to support digital twins asset reorganization.

Ultrain’s Latest Community & Event Update

Emma was invited by the Yunnan Provincial Government to give a speech about trust computing

On October 21, the 4th Yunnan International Talent Exchange Conference opened in Kunming. The conference was hosted by the Yunnan Provincial Committee of the Communist Party of China and the Yunnan Provincial People’s Government. It was organized by the Yunnan Provincial Party Committee Organization Department, the Yunnan Provincial Department of Science and Technology, and the Yunnan Provincial Department of Human Resources and Social Security. The theme was “Gathering the Talents to Bring Yunnan”. It covers many fields such as biotechnology, genetic engineering, digital economy, new energy, international cooperation in technology transfer, and forensic science. Emma also expressed the hope that Ultrain will cooperate with Yunnan and Lijiang governments in smart cities and digital economy, and through technology empowerment culture, consumption, lifestyle and other fields, it will bring innovation power and new to the local real economy.

Xi’an Global Programmers’ Day: Jin Li, the Chief Digital Officer of Ultrain, was Invited to Give a Speech

On October 24th, the 3rd Global Programmers’ Day was held in Xi’an. With the theme of “Digital Connected Code for the Future”, the event will bring together the world’s top software companies, research institutions and venture capital institutions to create a multi-level communication platform for global software IT talents and promote the “digital silk road” channel on the cloud. Build and bring together talents in the industry to empower the digital economy. In his speech, Li Jin explained the cross-AI of AI, computing, blockchain, IoT, financial risk control, etc., and used Ultrain as an example to elaborate on the blockchain technology. He introduced that Ultrain provides computational support for blockchain business models by integrating idle computing resources and providing an independent computing model based on blockchain technology, the “trust computing” service.

Chinese famous singer Lu directed “Miss Forever” cooperated with the S.I.R. to launch peripheral products.

On November 29th, directed by Shuimu Nianhua’s lead singer Lu Gengxu, Xu Jiao, Xie Binbin, Yan Zidong, SNH48 Huang Tingting, Lu Shaocong, Jin Zhiwen, Bao Jianfeng, Zeng Li special performance of the campus love movie “Miss Forever” will be officially released. Recently, the “Miss Forever” producer officially cooperate with the “S.I.R.” to authorize selling the products of movie.

“S.I.R.” is the first social e-commerce platform for independent innovation in blockchain in the world. The S.I.R. firmly protects the customer’s data, better manages the visits of all merchants and purchases the customer’s relationship network and incentive settlement, and can realize the sharing of user groups by multiple merchants in the encrypted state, creating more revenue.

Ultrain Sponsored 2019 San Francisco Blockchain Week

2019 San Francisco Blockchain Week was held from October 28th to November 3rd. Blockchain startup representatives, scholars, developers and investors from around the world gather in San Francisco to explore the development and future of the blockchain industry. The conference invited more than 40 key speakers including Ethereum founder Vitalik Buterin and Ripple Executive Chairman Chris Larsen. The content of the conference is also focus on the global blockchain field. Like last year, Ultrain is still a sponsorship of this conference, working with conference organizers to provide a world-class communication and education platform for the industry through a week of learning and discussion of top projects.

The above is the progress report of Ultrain from Oct 21th to Nov 3rd, looking forward to more exciting contents after that!

read more

hacker marathon and regular meetup or online game

Follow the National Call, Ultrain Never Stops
B

Chinese President Jinping Xi emphasized blockchain is an important breakthrough for independent innovation of core technologies during the 18th collective study of the Political Bureau of the Central Committee. He said, we should accelerate the development of blockchain technology and product.

He said, the integrated application of blockchain technology plays an important role in new technological innovations and industrial changes, we must take the blockchain as an important breakthrough for independent innovation of core technologies, clarify the main direction, increase investment, focus on a number of key core technologies, and accelerate the development of blockchain technology and industrial innovation.

Chen Chun, a professor at Zhejiang University and an academician of the Chinese Academy of Engineering, explained the issue and discussed opinions and suggestions.

The comrades of the Political Bureau of the CPC Central Committee listened carefully to the explanations and discussed them.

Xi delivered a speech while presiding over the study. He pointed out that:

The application of blockchain technology has been extended to digital finance, Internet, intelligent manufacturing, supply chain management, digital asset trading and other fields. At present, major countries in the world are accelerating the development of blockchain technology. China has a good foundation in the field of blockchain. It is necessary to accelerate the development of blockchain technology and industrial innovation, and actively promote the development of blockchain and economic and social integration.

It is necessary to strengthen basic research, enhance the original innovation ability, and strive to let China take the leading position in the emerging field of blockchain, occupy the commanding heights of innovation, and gain new industrial advantages.

It is necessary to promote collaborative research, accelerate the breakthrough of core technologies, and provide safe and controllable technical support for the development of blockchain applications. It is necessary to strengthen the research on blockchain standardization and enhance the right to speak and make rules in the world.

It is necessary to speed up industrial development, use market advantages, and further open up the innovation chain, application chain and value chain. It is necessary to build a blockchain industry ecology, accelerate the deep integration of blockchain and frontier information technologies such as artificial intelligence, big data, and internet, and promote integrated innovation and integration applications. It is necessary to strengthen the construction of the talent team, establish and improve the personnel training system, build a variety of high-level talent training platforms, and cultivate a group of leading figures and high-level innovation teams.

It is necessary to seize the opportunity of blockchain technology integration, function expansion and industry segmentation, and play the role of blockchain in promoting data sharing, optimizing business processes, reducing operating costs, improving synergy efficiency, and building a credible system.

It is necessary to promote the deep integration of the blockchain and the real economy, and solve the problems of difficulty in financing loans for SMEs, difficulties in controlling the risks of banks, and difficulties in departmental supervision.

It is necessary to use blockchain technology to explore digital economic model innovation, provide power for creating a convenient, efficient, fair and competitive, stable and transparent business environment, and provide services for promoting supply-side structural reforms and realizing the effective docking of supply and demand in various industries, in order to accelerate new and old kinetic energy. Provide support for continuous transformation and promote high-quality economic development.

It is necessary to explore the application of “blockchain+” in the field of people’s livelihood, and actively promote the application of blockchain technology in the fields of education, employment, pension, precision poverty alleviation, medical health, commodity anti-counterfeiting, food safety, public welfare, social assistance, etc. The masses provide more intelligent, more convenient and better public services.

It is necessary to promote the combination of the underlying technical services of blockchain and the construction of new smart cities, explore the promotion and application in the fields of information infrastructure, smart transportation, energy and power, and improve the level of intelligence and precision of urban management. It is necessary to use blockchain technology to promote greater inter-connectivity between cities in terms of information, capital, talents, and credit information, and ensure the orderly and efficient flow of production factors within the region.

It is necessary to explore the use of the blockchain data sharing model to achieve the joint maintenance and utilization of government data across departments and regions, promote business synergy, deepen the “run-up once” reform, and bring better government service experience to the people.

It is necessary to strengthen the guidance and regulation of blockchain technology, strengthen the research and analysis of blockchain security risks, closely track development trends, and actively explore development laws.

It is necessary to explore the establishment of a safety guarantee system that adapts to the blockchain technology mechanism, and guide and promote blockchain developers and platform operators to strengthen industry self-discipline and implement safety responsibilities.

It is necessary to implement the rule of law network into the management of blockchain and promote the safe and orderly development of blockchain.

Relevant departments and their responsible leaders should pay attention to the status and trend of blockchain technology development, improve the application and management of blockchain technology capabilities, and make blockchain technology play a more important role in building network power, developing digital economy, and helping economic and social development great effect.

Every step that Ultrain has taken since its inception has consistently implemented the policies mentioned by the national leaders. Ultrain is the world’s leading trust computing infrastructure. It is one of the few public chains in China that follow national requirements. Based on independent innovation, RPOS consensus, privacy protection, zero-knowledge proof, main-side multi-chains, smart contracts and other core technologies. We really provide the decentralized, efficient and secure first commercial public chain for the real economy.

According to People’s Daily News, the Blockchain Research Institute has recently published the “Blue paper on Blockchain Applications: Chinese Blockchain Application Development Research Report (2019)”. The book invites a number of central institutions and scientific research unit leaders, as well as experts and scholars from well-known universities to participate in the compilation to comprehensive discuss the hot issues facing the development of Chinese blockchain.

Mentioned in the book that it is necessary to strengthen the combination of blockchain and sharing economy. On the basis of solving the problem of trust, relying on the e-commerce system of the shared platform and the design of the certificate, effectively promote the sharing of assets in multiple chains. The transaction flows between the two, enabling the programmable economy of the shared economy.

This is in line with what Ultrain is currently doing. Ultrain has launched the world’s first blockchain independent innovation social e-commerce platform: Super Item Relationship(S.I.R)! The S.I.R firmly protects the customer’s customer data, better manages the visits of all merchants and purchases the customer’s relationship network and incentive settlement, and can realize the sharing of user groups by multiple merchants in the encrypted state, creating more revenue, and is hoping to try in the future. The convenience of the various types of businesses of social e-commerce. Ultrain aims to expand the C-side application through social e-commerce, create a true private domain traffic pool, and create a decentralized financial infrastructure in the actual business scenario of the service.

At present, the Ultrain has been widely used in many industries such as e-commerce, supply chain, sharing economy, medical care, media entertainment, new energy, etc., insisting on independent innovation and empowering the real economy. I believe that with the strong support of the government, we will be able to have a new future.

read more

Dapp develop tools and high-quality application recommendations

How to build an end-to-end DApp on Ultrain - 2
R

Step2:Write DApp

There are two Dapps to be written, one is MiningDapp, the other is UDapp. We use the Javascript SDK U3.js to write the DApps. To be simple, we create the two DApps in one project.

Written by DApp

In WebStorm, create a new project -> Node.js Express App-> Template select Pug (Jade); modify the project name to CarbonDApp;

Click ‘Create’ to create a project

Import project dependent class library

Copy all the directories in node_modules in CarbonProject to the node_modules directory of CarbonDApp, and repeat the directory skipping without copying;
Copy the CarbonDApp/node_modules/u3.js/dist/u3.js file to the CarbonDApp/public/javascripts directory.

Modify the DApp server port

Since the default 3000 port is already occupied, you need to modify the server port of the DApp.

Open the bin/www file and find var port = normalizePort(process.env.PORT || '3000'); change 3000 to 3001

Create an account information browsing page

Create an index.html page in the public directory and add the following code to the page:

<html> <head> <meta charset="UTF-8"> <title>test</title> <link rel="stylesheet" href="/stylesheets/style.css"> <script src="./javascripts/u3.js"></script> <script> let u3 = U3.createU3({ httpEndpoint: 'http://127.0.0.1:8888', httpEndpoint_history: 'http://127.0.0.1:3000', broadcast: true, debug: false, sign: true, logger: { log: console.log, error: console.error, debug: console.log }, chainId:'2616bfbc21e11d60d10cb798f00893c2befba10e2338b7277bb3865d2e658f58', symbol: 'UGAS' }); async function getBalanceInfo() { let SYMBOL = 'CARB'; let account = 'ben'; const ben_balance = await u3.getCurrencyBalance({ code:'ben', symbol: SYMBOL, account: account }); document.getElementById("carbon_balance").innerHTML = '账户余额:'+ben_balance; const bob_balance = await u3.getCurrencyBalance({ code:'ben', symbol: SYMBOL, account: 'bob' }); document.getElementById("bob_balance").innerHTML = '账户余额:'+ bob_balance; const tom_balance = await u3.getCurrencyBalance({ code:'ben', symbol: SYMBOL, account: 'tom' }); document.getElementById("tom_balance").innerHTML = '账户余额:'+tom_balance; const tony_balance = await u3.getCurrencyBalance({ code:'ben', symbol: SYMBOL, account: 'tony' }); document.getElementById("tony_balance").innerHTML = '账户余额:'+tom_balance; const jerry_balance = await u3.getCurrencyBalance({ code:'ben', symbol: SYMBOL, account: 'jerry' }); document.getElementById("jerry_balance").innerHTML = '账户余额:'+tom_balance; const jack_balance = await u3.getCurrencyBalance({ code:'ben', symbol: SYMBOL, account: 'jack' }); document.getElementById("jack_balance").innerHTML = '账户余额:'+tom_balance; } getBalanceInfo(); //transfer(); </script> </head> <body> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>CarbonCoin发行方</h1> <p>账户:ben</p> <p>描述:进行CarbonCoin发行的发行方,持有所有未分配的CarbonCoin</p> <p id="carbon_balance"></p> </div> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>节能设备1</h1> <p>账户:bob</p> <p>描述:通过节能产生CarbonCoin的节能设备1</p> <p id="bob_balance"></p> </div> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>节能设备2</h1> <p>账户:tom</p> <p>描述:通过节能产生CarbonCoin的节能设备2</p> <p id="tom_balance"></p> </div> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>航空公司C</h1> <p>账户:tony</p> <p>描述:大型航空公司,化石能源使用大户</p> <p id="tony_balance"></p> </div> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>汽车制造商D</h1> <p>账户:jerry</p> <p>描述:大型汽车制造商,化石能源使用大户</p> <p id="jerry_balance"></p> </div> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>CarbonCoin销毁账户</h1> <p>账户:jack</p> <p>描述:用于CarbonCoin销毁的账户,持有所有销毁的CarbonCoin</p> <p id="jack_balance"></p> </div> </body> </html> Start the DApp service, test the page
In the npm interface, double click the start button

After the server is successfully started, visit http://127.0.0.1:3001/index.html and the following page appears:

It can be seen that the issuer ben account holds 10 million of all CARB Tokens issued; other accounts have not yet held CARB Token;

Create a mining.html page

Mining.html page, energy-saving device 1 and energy-saving device 2 send the calorie value generated in the first 30 seconds to the energy smart contract every 30 seconds, and redeem CarbonCoin;

Create a mining.html page in the public directory, enter the following code:

<html> <head> <meta charset="UTF-8"> <title>test</title> <link rel="stylesheet" href="/stylesheets/style.css"> <script src="./javascripts/u3.js"></script> <script> let u3_bob = U3.createU3({ httpEndpoint: 'http://127.0.0.1:8888', httpEndpoint_history: 'http://127.0.0.1:3000', broadcast: true, debug: false, sign: true, logger: { log: console.log, error: console.error, debug: console.log }, chainId:'2616bfbc21e11d60d10cb798f00893c2befba10e2338b7277bb3865d2e658f58', keyProvider: '5JoQtsKQuH8hC9MyvfJAqo6qmKLm8ePYNucs7tPu2YxG12trzBt',//bob's private_key symbol: 'CARB' }); let u3_tom = U3.createU3({ httpEndpoint: 'http://127.0.0.1:8888', httpEndpoint_history: 'http://127.0.0.1:3000', broadcast: true, debug: false, sign: true, logger: { log: console.log, error: console.error, debug: console.log }, chainId:'2616bfbc21e11d60d10cb798f00893c2befba10e2338b7277bb3865d2e658f58', keyProvider: '5KXYYEWSFRWfNVrMPaVcxiRTjD9PzHjBSzxhA9MeQKHPMxWP8kU',//tom's private_key symbol: 'CARB' }); function wait(ms = 0) { return new Promise(res => setTimeout(res, ms)); } function randomFrom(lowerValue,upperValue) { return Math.floor(Math.random() * (upperValue - lowerValue + 1) + lowerValue); } async function mining() { let owner_account = 'ben'; const tr_bob = await u3_bob.contract(owner_account); const tr_tom = await u3_tom.contract(owner_account); // let amount = U3.format.UDecimalPad(2000,4); let heat_bob = randomFrom(15000,20000); let heat_tom = randomFrom(15000,20000); await tr_bob.recordHeat(heat_bob,{ authorization: [`bob@active`] }); await tr_tom.recordHeat(heat_tom,{ authorization: [`tom@active`] }); var d=new Date(); var t=d.toLocaleTimeString(); document.getElementById("bob_log").innerHTML = 'time :'+t+', heat value :'+ heat_bob; document.getElementById("tom_log").innerHTML = 'time :'+t+', heat value :'+ heat_tom; } mining(); var int=self.setInterval("mining()",30*1000); </script> </head> <body> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>节能设备1</h1> <p>账户:bob</p> <p>描述:通过节能产生CarbonCoin的节能设备1</p> <p id="bob_log"></p> </div> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>节能设备2</h1> <p>账户:tom</p> <p>描述:通过节能产生CarbonCoin的节能设备2</p> <p id="tom_log"></p> </div> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <button onclick="int=window.clearInterval(int)">stop</button> </div> </body> </html>

Go to http://127.0.0.1:3001/mining.html and the following page appears:

There are two things to note here.

When sending data to the energy smart contract, you need to hold the private key of the account before you can sign and send it. In order to simplify the programming, the private key is directly written to the webpage. In the actual program, the private key needs to be protected and hidden.

To simplify the writing, the Bob and tom DApp programs are written directly to a page. Actually, they should be two DApp program instances, which are running on two devices respectively.

Now our energy-saving equipment can already send data to the smart contract, and after the energy smart contract receives the data, it will pass the data to the operator server, and the operator server will call the energy smart contract again to exchange carboncoin. So we need to establish EnergyServer;

Step3: EnergyServer

Establish event monitor and handle events

In this section, we will deal with the above calorific value data upload event.

1.1 Establish listener event server code

In the bin directory of the CarbonDApp project, create a new file msgBroker.js and enter the following code.

const { createU3 , format} = require('u3.js/src'); const http = require('http'); const port = 3002; let u3 = createU3({ httpEndpoint: 'http://127.0.0.1:8888', httpEndpoint_history: 'http://127.0.0.1:3000', broadcast: true, debug: false, sign: true, logger: { log: console.log, error: console.error, debug: console.log }, chainId:'2616bfbc21e11d60d10cb798f00893c2befba10e2338b7277bb3865d2e658f58', keyProvider:'5JbedY3jGfNK7HcLXcqGqSYrmX2n8wQWqZAuq6K7Gcf4Dj62UfL',//ben's private key symbol: 'UGAS' }); let server = http.createServer((request, response) => { const { headers, method, url } = request; console.log(method); console.log(url); let body = []; request.on('error', (err) => { console.error(err); }).on('data', (chunk) => { body.push(chunk); }).on('end', () => { body = Buffer.concat(body).toString(); console.log("received msg:", body); if (body != null && body.trim()!="") { var obj = JSON.parse(body); let heatValue = JSON.parse(obj[1]).heat.split(",")[0]; let account = JSON.parse(obj[1]).heat.split(",")[1]; exchangeCarbonCoin(account,heatValue); } response.on('error', (err) => { console.error(err); }); response.statusCode = 200; response.setHeader('Content-Type', 'application/json'); response.write("ok"); response.end(); }); }); server.keepAliveTimeout = 0; server.timeout = 0; server.listen(port, function () { console.log((new Date()) + " Server is listening on port " + port); }); function wait(ms = 0) { return new Promise(res => setTimeout(res, ms)); } async function exchangeCarbonCoin(account,heat) { let SYMBOL = 'CARB'; let code = 'ben'; const tr = await u3.contract(code); let heatValue = format.DecimalPad(heat,4); const result = await tr.exchangeCarbonCoin('ben', account, heatValue+' ' + SYMBOL, 'test', { authorization: [`ben@active`] }); let tx = await u3.getTxByTxId(result.transaction_id); while (!tx.irreversible) { await wait(1000); tx = await u3.getTxByTxId(result.transaction_id); if (tx.irreversible) { console.log(tx); break; } } }

The code establishes a service on port 3002. After the energy-saving device uploads its calorific value, the smart contract will send the energy-saving device to the service to upload the calorific value data. The service calls the exchangeCarbonCoin method of the energy smart contract to exchange the CarbonCoin.

1.2 Establish a listener event server startup script

Open the CarbonDApp/package.json file and add the following code to the scripts property: "event": "node ./bin/msgBroker"

1.3 Start the listening server

Refresh the npm window with the ‘event’ option

Double-click event to complete server startup

1.4 Register event monitoring mechanism on the chain

Query the internal network address of the machine through the ifconfig command, for example: 10.20.8.32

In the CarbonProject/test directory, create the registerEvent.js file; enter the following code in the file

const U3Utils = require('u3-utils/dist/es5'); const { createU3, format, listener } = require('u3.js/src'); const config = require('../config'); const chai = require('chai'); require('chai') .use(require('chai-as-promised')) .should(); const should = chai.should(); const expect = chai.expect; const assert = chai.assert; describe('Test cases', function() { it('event register', async () => { let account = 'ben'; const u3 = createU3(config); await u3.registerEvent(account, 'http:// 10.20.8.32:3002'); U3Utils.wait(1000); }); it('event unregister', async () => { let account = 'ben'; const u3 = createU3(config); await u3.unregisterEvent(account, ' http:// 10.20.8.32:3002'); U3Utils.wait(1000); }); });

Note that the registered address is modified to be the internal network address of the machine, and 127.0.0.1 cannot be used.
Run the event register test case to complete the event registration;

1.5 Test calorie value for CarbonCoin function

Visit http://127.0.0.1:3001/mining.html page, every 30 seconds, both bob and tom will randomly send a random value between 15000 and 20000 as the calorific value to convert the smart contract to CarbonCoin;
Visit and refresh the http://127.0.0.1:3001/index.html page, you can find that the CarbonCoin account of bob and tom is increasing every 30 seconds;

Step4:Improve DApp functionality

Add transfer function

After the energy-saving equipment acquires CarbonCoin, it can sell CarbonCoin to the enterprise, such as airlines, etc. The simple embodiment is that the equipment account can be transferred to the corporate company account;

Open the /CarbonDApp/index.html page and add the code

1.1 U3 object used when establishing the transfer

let u3_bob = U3.createU3({ keyProvider:'5JoQtsKQuH8hC9MyvfJAqo6qmKLm8ePYNucs7tPu2YxG12trzBt',//bob's private key }) let u3_tom = U3.createU3({ keyProvider:'5KXYYEWSFRWfNVrMPaVcxiRTjD9PzHjBSzxhA9MeQKHPMxWP8kU',//tom's private key })

1.2 Add the js code of the transfer to call the corresponding smart contract method

async function sendCoin(from,to){ let SYMBOL = 'CARB'; let code = 'ben'; let coins = U3.format.DecimalPad(this.randomFrom(100,500),4); if (from == 'bob'){ const tr = await u3_bob.contract(code); const result = await tr.transfer(from, to, coins + ' ' + SYMBOL, 'sendCoin', { authorization: [`bob@active`] }); let tx = await u3_bob.getTxByTxId(result.transaction_id); while (!tx.irreversible) { await wait(1000); tx = await u3_bob.getTxByTxId(result.transaction_id); if (tx.irreversible) { alert("bob send coin success:"+ coins); break; } } } else if (from == 'tom'){ const tr = await u3_tom.contract(code); const result = await tr.transfer(from, to, coins + ' ' + SYMBOL, 'sendCoin', { authorization: [`tom@active`] }); let tx = await u3_tom.getTxByTxId(result.transaction_id); while (!tx.irreversible) { await wait(1000); tx = await u3_tom.getTxByTxId(result.transaction_id); if (tx.irreversible) { alert("tom send coin success:"+ coins); break; } } } }

1.3 Add a call to the sendcoin() method on the page, update the following code

<div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>节能设备1</h1> <p>账户:bob</p> <p>描述:通过节能产生CarbonCoin的节能设备1</p> <p id="bob_balance"></p> <p><a href="#" OnClick="sendCoin('bob','tony')">给航空公司C转账</a></p> </div> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>节能设备2</h1> <p>账户:tom</p> <p>描述:通过节能产生CarbonCoin的节能设备2</p> <p id="tom_balance"></p> <p><a href="#" OnClick="sendCoin('tom','jerry')">给汽车制造商D转账</a></p> </div>

1.4 Access the page and test the function

Visit: http://127.0.0.1:3001/index.html, click the "Transfer to the airline C" button, wait for a period of time (up to about 10 seconds, confirm the time for the Ultrain transaction), the following prompt appears, indicating the transfer success.

Add a company to convert CarbonCoin to a charity point function

By converting CarbonCoin into charitable points, the company makes its own contribution to reducing carbon emissions and enhances its reputation:

Open the /CarbonDApp/index.html page and add the code

2.1 U3 object used when establishing point redemption

let u3_tony = U3.createU3({ keyProvider:'5KbHvFfDXovPvo2ACNd23yAE9kJF7Mxaws7srp6VapjMr7TrHZB',//tony's private key }) let u3_jerry = U3.createU3({ keyProvider:'5JFz7EbcsCNHrDLuf9VpHtnLdepL4CcAEXu7AtSUYfcoiszursr',//jerry's private key })

2.2 Add the redeemed js code to call the corresponding smart contract method

async function exchangeScore(account){ let SYMBOL = 'CARB'; let code = 'ben'; let to = 'jack'; let coins = U3.format.DecimalPad(this.randomFrom(10,50),4); if (account == 'tony'){ const tr = await u3_tony.contract(code); const result = await tr.exchangeScore(account, to, coins + ' ' + SYMBOL, 'sendCoin', { authorization: [`tony@active`] }); let tx = await u3_tony.getTxByTxId(result.transaction_id); while (!tx.irreversible) { await wait(1000); tx = await u3_tony.getTxByTxId(result.transaction_id); if (tx.irreversible) { alert("tony buy score success:"+ coins); break; } } } else if (account == 'jerry'){ const tr = await u3_jerry.contract(code); const result = await tr.exchangeScore(account, to, coins + ' ' + SYMBOL, 'sendCoin', { authorization: [`jerry@active`] }); let tx = await u3_jerry.getTxByTxId(result.transaction_id); while (!tx.irreversible) { await wait(1000); tx = await u3_jerry.getTxByTxId(result.transaction_id); if (tx.irreversible) { alert("jerry buy score success:"+ coins); break; } } } }

2.3 Add a call to the exchangeScore() method on the page, update the following code

<div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>航空公司C</h1> <p>账户:tony</p> <p>描述:大型航空公司,化石能源使用大户</p> <p id="tony_balance"></p> <p><a href="#" OnClick="exchangeScore('tony');return false;">购买公益积分</a></p> </div> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>汽车制造商D</h1> <p>账户:jerry</p> <p>描述:大型汽车制造商,化石能源使用大户</p> <p id="jerry_balance"></p> <p><a href="#" OnClick="exchangeScore('jerry');return false;">购买公益积分</a></p> </div>

2.4 Access the page and test the function

Visit: http://127.0.0.1:3001/index.html, click the "Buy Charity Points" button, wait for a period of time (up to about 10 seconds, confirm the time for the Ultrain transaction), the following prompt appears, indicating that the points are successfully redeemed. At the same time, you can see the number of CarbonCoins destroyed in the CarbonCoin destruction account at the bottom of the page.

Query the public welfare points exchange history

By enquiring the redemption history of charity points, we can establish a ranking of corporate charity points.

3.1 Creating a page

In the CarbonDApp/public/ directory, create a new leaderboard.html and enter the following code:

<html> <head> <meta charset="UTF-8"> <title>leaderboard</title> <link rel="stylesheet" href="/stylesheets/style.css"> <script src="./javascripts/u3.js"></script> <script> let u3 = U3.createU3({ httpEndpoint: 'http://127.0.0.1:8888', httpEndpoint_history: 'http://127.0.0.1:3000', broadcast: true, debug: false, sign: true, logger: { log: console.log, error: console.error, debug: console.log }, chainId:'2616bfbc21e11d60d10cb798f00893c2befba10e2338b7277bb3865d2e658f58', symbol: 'UGAS' }); function wait(ms = 0) { return new Promise(res => setTimeout(res, ms)); } async function getLeaderboard() { let owner_account = 'ben'; const tr = await u3.contract(owner_account); const result = await u3.getAllTxs(1,10000000,{"actions.name":"exchangeScore"},{_id:-1}); //console.log(result); let content = ''; for ( let i = 0 ;i< result.results.length;i++){ content = content + '<tr><td>'+ result.results[i].actions[0].data.from+":"+result.results[i].actions[0].data.quantity +'</td></tr>'; } document.getElementById("leaderboard").innerHTML = content; } getLeaderboard(); </script> </head> <body> <div style="padding:8px;border:1px solid #96c2f1;background:#eff7ff"> <h1>leaderboard</h1> <table id="leaderboard"> </table> </div> </body> </html>

We use the u3.getAllTxs(1,10000000,{"actions.name":"exchangeScore"},{_id:-1}); method to query all redemption transactions and print their specific data to the page.

3.2 Run page

Visit http://127.0.0.1:3001/leaderboard.html and you can see the following page:

Here is a history of all points redemption.

Summary

This tutorial system describes how to write an end-to-end web version of the DApp application. Although it has been simplified in the process of writing, it generally describes the overall picture of DApp application development, developers can do the basis of this framework. Enrich and improve your DApp application.

About developing DApp on iOS and Android, you can integrate u3.js into the corresponding hybrid Native development framework, and the principle is the same as the web version DApp.

read more