[关闭]
@zhenxi 2018-01-11T12:20:37.000000Z 字数 2967 阅读 1401

Asch相关算法

Asch


1、阿希链的算法说明---中文版
Asch的共识算法:
在委托权益证明(DPOS,Delegated Proof of Stake)的基础上了加入了拜占庭容错算法(PBFT,Practical Byzantine Fault Tolerance),从而保证区块链不分叉并且有较高的性能。

密钥对生成算法:
a.Asch 系统选择的熵长度为 128bit,将之转换成符合BIP39标准的12 个单词,即主密码。
b.以主密码的sha256哈希做种子,得到hash_seed
c.再通过ed25519爱德华兹曲线签名算法对hash_seed进行签名,得到生成密钥对,包括公钥和私钥。

阿希地址生成算法:
a.对公钥buffer进行1次sha256运算,得到h1。
b.然后对h1进行r160运算得到paylaod。
c.对payload进行sha256得到checksum1。
d.对checksum1进行sha256得到checksum2。
e.拼接 paylaod和checnksum2,得到seed。
f.取seed的len(payload)+4,得到addr。
g.对addr进行base58编码得到b1。
h.“A”+b1即为生成的base58格式的阿希地址。

1.Relevant algorithms of Asch blockchain---英文版
Distributed consensus algorithm of Asch:
Asch added PBFT(Practical Byzantine Fault Tolerance) on the basis of dpos(Delegated Proof of Stake) to ensure that the block chain is consistent and has high performance.

Key pair generation algorithm:
a.The Asch system selected the entropy length of 128bit and converted it into 12 words conforming to the BIP39 standard, namely the master password.
b.Perform SHA-256 hashing on the master password,and hash_seed is obtained.
c.After the ed25519 Edwards curve signature algorithm is used to sign hash_seed, the key pair is generated, including the public key and private key.

Asch address generation algorithm:
a.Perform SHA-256 hashing on the public key buffer,get h1.
b.Perform RIPEMD-160 hashing on the h1,get payload.
c.Perform SHA-256 hashing on the payload,get checksum1.
d.Perform SHA-256 hashing on the checksum1,get checksum2.
e.Paylaod and checnksum2 join together,get seed.
f.Take the first len(payload)+4 bytes of the seed,get addr.
g.Convert the addr from a byte string into a base58 string using Base58Check encoding,get b1.
h."A" and b1 join together,get final Asch address.This is the most commonly used Asch Address format.


2.目前我们每次在github上提交完更新后,都会在travis-ci.org上自动跑测试用例,该用例是自动启动4个节点,并且在上面用mocha测试如下功能:钱包账户生成、转账、锁仓、多重签名、dapp注册、dapp充值、dapp提现等所有钱包功能。测试地址为https://travis-ci.org/AschPlatform/asch ,测试用例源代码地址为:https://github.com/AschPlatform/asch/tree/master/test
测试用例报告见下(附件一:Asch钱包测试报告)

At present, Asch will automatically run test cases on travis-ci.org when we commited codes to the github, the use case is automatically start four nodes, and test the following functions use mocha: wallet account generation, transfer XAS and UIA, account lock, multisignature, dapp registration, dapp deposit, dapp withdrawal etc.Test cases url is https://travis-ci.org/AschPlatform/asch, the source code of test cases is: https://github.com/AschPlatform/asch/tree/master/test.
See the test case report (appendix I: Asch wallet test report)


项目 阿希 以太坊
架构 侧链 单链
共识机制 DPOS+PBFT(无分叉且高性能) POW,POS(未来)
安全问题 侧链应用独立于主链(安全) 应用集成在单链(危险)
成本问题 独立发行资产(便宜) 需要消耗Gas(贵)
开发门槛 Javascript(门槛低) Solidity,GO(门槛高)
性能问题 扩展无限资源(加法) 共用仅有资源(减法)
智能合约 DAPP(广义智能合约) 智能合约(狭义)
Projects Asch Ethereum
Architecture sideChain singleChain
Consensus algorithm DPOS+PBFT(hight consistency and high performance.) POW,POS(future)
Security Side chain applications are independent of the main chain.(safety) Applications integration in single chain.(risk)
Costs independent issue assets(cheap) consume Gas(expensive)
Barrier for developer Javascript(easy) Solidity,GO(difficult )
Performance Expand unlimited resources(addition) Share limited resources(subtraction)
Smart Contract DAPP(broad sense) Smart Contract(narrow sense)
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注